Exemplo n.º 1
0
 /// <summary>
 /// Creates a new LedProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the LedProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public LedProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
     for (var i = 1; i <= 4; i++)
     {
         _ledChannels[i - 1] = new LedChannelProtocol(port, (Enums.Channels)i, echoComTraffic);
     }
 }
 /// <summary>
 /// Creates a new ContinuousStrobeProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the ContinuousStrobeProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public ContinuousStrobeProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
     for (var i = 1; i <= 4; i++)
     {
         _ledChannels[i - 1] = new ContinuousStrobeChannelProtocol(port, (Enums.Channels)i, echoComTraffic: _echoComTraffic);
     }
 }
 /// <summary>
 /// Creates a new LegacyProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the LegacyProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public LegacyProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
     Controls        = new ControlsProtocol(port, echoComTraffic);
     Status          = new StatusProtocol(port, echoComTraffic);
     Diagnostics     = new DiagnosticsProtocol(port, echoComTraffic);
     Configurations  = new ConfigurationProtocol(port, echoComTraffic);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new ControlsProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the ControlsProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public ControlsProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port            = port;
     _echoComTraffic  = echoComTraffic;
     Led              = new LedProtocol(port, echoComTraffic);
     ContinuousStrobe = new ContinuousStrobeProtocol(port, echoComTraffic);
     TriggeredStrobe  = new TriggeredStrobeProtocol(port, echoComTraffic);
     Equalizer        = new EqualizerProtocol(port, echoComTraffic);
     Fan              = new FanProtocol(port, echoComTraffic);
 }
Exemplo n.º 5
0
        /// <summary>
        /// Creates a new ControlsProtocol for the given port
        /// </summary>
        /// <param name="port">The port for the ControlsProtocol to use.</param>
        /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
        public StatusProtocol(ILegacyProtocol port, bool echoComTraffic = false)
        {
            _port           = port;
            _echoComTraffic = echoComTraffic;

            TemperatureLed   = new TemperatureProtocol(port, TemperatureLocations.Led, echoComTraffic);
            TemperatureBoard = new TemperatureProtocol(port, TemperatureLocations.Board, echoComTraffic);
            VoltageInput     = new VoltageProtocol(port, VoltageLocations.Input, echoComTraffic);
            VoltageRefOut    = new VoltageProtocol(port, VoltageLocations.Reference5V, echoComTraffic);
            Fan            = new FanStatusProtocol(port, echoComTraffic);
            Equalizer      = new EqualizerStatusProtocol(port, echoComTraffic);
            System         = new SystemProtocol(port, echoComTraffic);
            Memory         = new MemoryProtocol(port, echoComTraffic);
            Identification = new IdentificationProtocol(port, echoComTraffic);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Creates a new TemperatureProtocol for the given port
        /// </summary>
        /// <param name="port">The port for the TemperatureProtocol to use.</param>
        /// <param name="location">The location to set up the TemperatureProtocol for.</param>
        /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
        public TemperatureProtocol(ILegacyProtocol port, TemperatureLocations location, bool echoComTraffic = false)
        {
            _port           = port;
            _echoComTraffic = echoComTraffic;

            switch (location)
            {
            case TemperatureLocations.Led:
                _char = "l";
                break;

            case TemperatureLocations.Board:
                _char = "b";
                break;
            }
        }
        /// <summary>
        /// Creates a new VoltageProtocol for the given port
        /// </summary>
        /// <param name="port">The port for the VoltageProtocol to use.</param>
        /// <param name="location">The location to set up the VoltageProtocol for.</param>
        /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
        public VoltageProtocol(ILegacyProtocol port, VoltageLocations location, bool echoComTraffic = false)
        {
            _port           = port;
            _echoComTraffic = echoComTraffic;

            switch (location)
            {
            case VoltageLocations.Input:
                _char = "i";
                break;

            case VoltageLocations.Reference5V:
                _char = "o";
                break;

            default:
                break;
            }
        }
 /// <summary>
 /// Creates a new ConfigurationProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the protocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public ConfigurationProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Creates a new EqualizerProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the EqualizerProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public EqualizerProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }
 /// <summary>
 /// Creates a new TriggeredStrobeChannelProtocol for the given port and channel
 /// </summary>
 /// <param name="port">The port for the TriggeredStrobeChannelProtocol to use.</param>
 /// <param name="selectedChannel">The channel for the TriggeredStrobeChannelProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public TriggeredStrobeChannelProtocol(ILegacyProtocol port, Enums.Channels selectedChannel, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
     _channel        = selectedChannel;
 }
 /// <summary>
 /// Creates a new MemoryProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the MemoryProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public MemoryProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Creates a new IdentificationProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the IdentificationProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public IdentificationProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Creates a new DiagnosticsProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the protocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public DiagnosticsProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }
 /// <summary>
 /// Creates a new FanStatusProtocol for the given port
 /// </summary>
 /// <param name="port">The port for the FanStatusProtocol to use.</param>
 /// <param name="echoComTraffic">When True, the protocol object will echo com traffic to the subscribed message functions.</param>
 public FanStatusProtocol(ILegacyProtocol port, bool echoComTraffic = false)
 {
     _port           = port;
     _echoComTraffic = echoComTraffic;
 }