Exemplo n.º 1
0
        public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
        {
            var joinMap = new SystemMonitorJoinMap();

            var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);

            if (!string.IsNullOrEmpty(joinMapSerialized))
            {
                joinMap = JsonConvert.DeserializeObject <SystemMonitorJoinMap>(joinMapSerialized);
            }

            joinMap.OffsetJoinNumbers(joinStart);

            Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
            Debug.Console(2, this, "Linking API starting at join: {0}", joinStart);

            TimeZoneFeedback.LinkInputSig(trilist.UShortInput[joinMap.TimeZone]);
            TimeZoneTextFeedback.LinkInputSig(trilist.StringInput[joinMap.TimeZoneName]);

            IoControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.IOControllerVersion]);
            SnmpVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.SnmpAppVersion]);
            BaCnetAppVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.BACnetAppVersion]);
            ControllerVersionFeedback.LinkInputSig(trilist.StringInput[joinMap.ControllerVersion]);
            SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumber]);
            ModelFeedback.LinkInputSig(trilist.StringInput[joinMap.Model]);
            UptimeFeedback.LinkInputSig(trilist.StringInput[joinMap.Uptime]);
            LastStartFeedback.LinkInputSig(trilist.StringInput[joinMap.LastBoot]);

            // iterate the program status feedback collection and map all the joins
            LinkProgramInfoJoins(this, trilist, joinMap);

            LinkEthernetInfoJoins(this, trilist, joinMap);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Responds to time zone changes and updates the appropriate feedbacks
        /// </summary>
        /// <param name="args"></param>
        private void TimeZoneInformation_TimeZoneChange(TimeZoneEventArgs args)
        {
            Debug.Console(2, this, "Time Zone Change Detected.");
            TimeZoneFeedback.FireUpdate();
            TimeZoneTextFeedback.FireUpdate();

            OnSystemMonitorPropertiesChanged();
        }
Exemplo n.º 3
0
        private void UpdateFeedback(object o)
        {
            TimeZoneFeedback.FireUpdate();
            TimeZoneTextFeedback.FireUpdate();
            IoControllerVersionFeedback.FireUpdate();
            SnmpVersionFeedback.FireUpdate();
            BaCnetAppVersionFeedback.FireUpdate();
            ControllerVersionFeedback.FireUpdate();
            SerialNumberFeedback.FireUpdate();
            ModelFeedback.FireUpdate();

            OnSystemMonitorPropertiesChanged();
        }
        /// <summary>
        /// Gets data in separate thread
        /// </summary>
        /// <param name="command"></param>
        void RefreshSystemMonitorData(string command)
        {
            // this takes a while, launch a new thread
            CrestronInvoke.BeginInvoke((o) =>
            {
                TimeZoneFeedback.FireUpdate();
                TimeZoneTextFeedback.FireUpdate();
                IOControllerVersionFeedback.FireUpdate();
                SnmpVersionFeedback.FireUpdate();
                BACnetAppVersionFeedback.FireUpdate();
                ControllerVersionFeedback.FireUpdate();

                OnSystemMonitorPropertiesChanged();
            }
                                       );
        }