Beispiel #1
0
        /// <summary>
        /// Private event handler method, to handle any zone state change.
        /// </summary>
        /// <param name="sender">Pointer, to the sender of the event.</param>
        /// <param name="e">Event Argument, contains the zone state.</param>
        void _protocolDriver_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
        {
            _log.Trace(m => m(String.Format("OSCC.onZoneStatusUpdate: Address={0}, Command={1}", e.ZoneAddress.ToString(), e.ZoneState.ToString())));
            if (_oscDriver != null)
            {
                _oscDriver.SendMessage("/NuvoControl/message", String.Format("Zone {0} Update at {1}", e.ZoneAddress, DateTime.Now));

                // Update "dynamic" text (dynamic data)
                UpdateZoneStateOnOscClient(e.ZoneAddress, e.ZoneState);

                // Init "static" text (configuration data)
                updateConfigurationDataOnOscClient();
            }
            StoreZoneStateFromDriver(e.ZoneAddress, e.ZoneState);
        }
Beispiel #2
0
        /// <summary>
        /// Zone Status Event method
        /// </summary>
        /// <param name="sender">This pointer to the sender of the event.</param>
        /// <param name="e">Event arguments, returned by the sender.</param>
        static void _driver_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
        {
            Zone   zone   = _configurationService.GetZoneHWConfiguration(e.ZoneAddress);
            Source source = _configurationService.GetSourceHWConfiguration(e.ZoneState.Source);

            if (e.ZoneState.PowerStatus == true)
            {
                // Zone is ON ...
                LogHelper.Log(LogLevel.Info, String.Format(">>>   [{0}]  Zone '{1}'({2}) is ON -> Source '{3}' with Volume '{4}'", DateTime.Now.ToShortTimeString(), zone.Name, e.ZoneAddress.ToString(), source.Name, e.ZoneState.Volume));
            }
            else
            {
                // Zone is OFF ...
                LogHelper.Log(LogLevel.Info, String.Format(">>>   [{0}]  Zone '{1}'({2}) is OFF", DateTime.Now.ToShortTimeString(), zone.Name, e.ZoneAddress.ToString()));
            }
            LogHelper.Log(LogLevel.Debug, String.Format(">>>   [{0}]  Zone {1}  Status Update: {2}", DateTime.Now.ToShortTimeString(), e.ZoneAddress.ToString(), e.ZoneState.ToString()));
        }
Beispiel #3
0
        /// <summary>
        /// Private event handler method, to handle any zone state change.
        /// </summary>
        /// <param name="sender">Pointer, to the sender of the event.</param>
        /// <param name="e">Event Argument, contains the zone state.</param>
        void _protocolDriver_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
        {
            bool notifyClient = false;

            lock (this)
            {
                if (e.ZoneAddress.Equals(_zoneId))
                {
                    _log.Trace(m => m(String.Format("ZC.onZoneStatusUpdate: Address={0}, Command={1}", _zoneId.ToString(), e.ZoneState.ToString())));
                    UpdateZoneStateFromDriver(e.ZoneState);
                    notifyClient = true;
                }
            }
            if (notifyClient)
            {
                NotifySubscribedClients();
            }
        }
Beispiel #4
0
 /// <summary>
 /// Event method used in SendCommandTest2
 /// </summary>
 /// <param name="sender">This pointer to the sender of the event.</param>
 /// <param name="e">Event arguments, returned by the sender.</param>
 void _protDriver_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
 {
     _protZoneUpdatedEventArgs.Add(e);
 }
Beispiel #5
0
 /// <summary>
 /// Zone Status Event method
 /// </summary>
 /// <param name="sender">This pointer to the sender of the event.</param>
 /// <param name="e">Event arguments, returned by the sender.</param>
 static void _driver_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
 {
     LogHelper.Log(LogLevel.Info, String.Format(">>>   [{0}]  Zone {1}  Status Update: {2}", DateTime.Now.ToShortTimeString(), e.ZoneAddress.ToString(), e.ZoneState.ToString()));
 }
Beispiel #6
0
 void _nuvoServer_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
 {
     DisplayData(MessageType.Normal, string.Format("Zone Udpate: Zone='{0}' State='{1}'", e.ZoneAddress, e.ZoneState));
 }
Beispiel #7
0
 void _nuvoServer_onZoneStatusUpdate(object sender, ProtocolZoneUpdatedEventArgs e)
 {
     LogHelper.Log(LogLevel.Info, String.Format("Zone Update: Zone='{0}' State='{1}'", e.ZoneAddress, e.ZoneState));
 }