/// <summary> /// Creates a new <see cref="CommandFrame"/> from specified parameters. /// </summary> /// <param name="command">The <see cref="GSF.PhasorProtocols.DeviceCommand"/> for this <see cref="CommandFrame"/>.</param> /// <remarks> /// This constructor is used by a consumer to generate an Macrodyne command frame. /// </remarks> public CommandFrame(PhasorProtocols.DeviceCommand command) : base(new CommandCellCollection(0), command) { if (command != PhasorProtocols.DeviceCommand.EnableRealTimeData && command != PhasorProtocols.DeviceCommand.DisableRealTimeData && command != PhasorProtocols.DeviceCommand.SendConfigurationFrame1 && command != PhasorProtocols.DeviceCommand.SendConfigurationFrame2 && command != PhasorProtocols.DeviceCommand.SendHeaderFrame) throw new ArgumentException("Macrodyne does not support " + command + " device command.", "command"); }
/// <summary> /// Creates a new <see cref="CommandFrame"/> from specified parameters. /// </summary> /// <param name="command">The <see cref="GSF.PhasorProtocols.DeviceCommand"/> for this <see cref="CommandFrame"/>.</param> /// <param name="messagePeriod">The desired <see cref="SelFastMessage.MessagePeriod"/> for SEL device connection.</param> /// <remarks> /// This constructor is used by a consumer to generate an SEL Fast Message command frame. /// </remarks> public CommandFrame(PhasorProtocols.DeviceCommand command, MessagePeriod messagePeriod) : base(new CommandCellCollection(0), command) { if (command != PhasorProtocols.DeviceCommand.EnableRealTimeData && command != PhasorProtocols.DeviceCommand.DisableRealTimeData) throw new ArgumentException("SEL Fast Message does not support " + command + " device command.", nameof(command)); m_messagePeriod = messagePeriod; }