private void AmOnOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (!args.DeviceOnLine) { CloudLog.Warn("{0} is offline!", currentDevice.ToString()); } if (args.DeviceOnLine && currentDevice is AmX00) { try { ((AmX00)currentDevice).DisplayControl.DisableAutomaticRouting(); } catch (Exception e) { CloudLog.Exception(e); } } try { if (DeviceCommunicatingChange != null) { DeviceCommunicatingChange(this, args.DeviceOnLine); } } catch (Exception e) { CloudLog.Exception(e); } }
void _tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { (currentDevice as DmRmc4k100C).IROutputPorts[1].LoadIRDriver(Directory.GetApplicationDirectory() + Path.PathSeparator + "Samsung BD Series.ir"); } }
protected virtual void OnFusionOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (!args.DeviceOnLine) { return; } FusionShouldUpdateCoreParameters(); foreach (var asset in _fusionAssets) { var staticAsset = Fusion.UserConfigurableAssetDetails[asset.Key].Asset as FusionStaticAsset; if (staticAsset == null) { continue; } var device = asset.Value; staticAsset.FusionGenericAssetSerialsAsset3.StringInput[50].StringValue = device.DeviceAddressString; staticAsset.FusionGenericAssetSerialsAsset3.StringInput[51].StringValue = device.SerialNumber; staticAsset.FusionGenericAssetSerialsAsset3.StringInput[52].StringValue = device.VersionInfo; } }
void xp_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (currentDevice.IsOnline) { CrestronConsole.PrintLine("xPanel came Online"); } }
/// <summary> /// Event Handler for online status changes between the card and the program. /// </summary> /// <param name="currentDevice"></param> /// <param name="args"></param> void myC3com3_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine == true) { //The device is online. } }
void FusionRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { FusionUpdate(); } }
void device_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (currentDevice is GenericDevice && Devices[currentDevice as GenericDevice] is FusionStaticAsset) { ((FusionStaticAsset)Devices[currentDevice as GenericDevice]).Connected.InputSig.BoolValue = args.DeviceOnLine; ((FusionStaticAsset)Devices[currentDevice as GenericDevice]).PowerOn.InputSig.BoolValue = args.DeviceOnLine; } }
/// <summary> /// Online/Ofline event handler for Xpanel /// </summary> /// <param name="currentDevice">The device that triggered the event</param> /// <param name="args">Contains DeviceOnline for status feedback</param> public void Xpanel_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { // TODO: Level1. Implement Xpanel online/offline feedback on digital join 11 if (args.DeviceOnLine) { tp01.BooleanInput[11].BoolValue = true; } }
private void InterfacesOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { CrestronConsole.PrintLine("Online status changed for {0}: {1}", currentDevice.ID, args.DeviceOnLine); if (args.DeviceOnLine) { ErrorLog.Notice("{0} has come online.", currentDevice.ID); } }
void PanelOnlineStatusChangeHandler(GenericBase currentDevice, OnlineOfflineEventArgs args) { Trace("PanelOnlineStatusChangeHandler() panel online: " + args.DeviceOnLine); if (args.DeviceOnLine) { Update(); } }
private void DeviceOnOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (!args.DeviceOnLine || !VisibleJoin.BoolValue) { return; } //VisibleJoin.BoolValue = false; //new CTimer(specific => VisibleJoin.BoolValue = true, 100); }
public void tp_OnlineChange(GenericBase dev, OnlineOfflineEventArgs args) { var obj = dev.UserSpecifiedObject; if (obj is Action <bool> ) { var func = (Action <bool>)obj; func(args.DeviceOnLine); } }
private void avSwitch_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { // report online/offline status to event handler EventHandler <GenericEventArgs <bool> > temp = DeviceOnlineStatusEvent; if (temp != null) { temp(this, new GenericEventArgs <bool>(args.DeviceOnLine)); } }
void _rx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { (currentDevice as DmRmc4k100C).ComPorts[1].SetComPortSpec(ComPort.eComBaudRates.ComspecBaudRate9600, ComPort.eComDataBits.ComspecDataBits8, ComPort.eComParityType.ComspecParityNone, ComPort.eComStopBits.ComspecStopBits1, ComPort.eComProtocolType.ComspecProtocolRS232, ComPort.eComHardwareHandshakeType.ComspecHardwareHandshakeNone, ComPort.eComSoftwareHandshakeType.ComspecSoftwareHandshakeNone, false); } }
void matrix_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (currentDevice.IsOnline) { CrestronConsole.PrintLine("DM-MD-8x8 came Online"); } else if (currentDevice.IsOnline == false) { CrestronConsole.PrintLine("DM-MD-8x8 went Offline"); } }
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { Debug.Console(2, this, "OnlineStatusChange Event. Online = {0}", args.DeviceOnLine); foreach (var feedback in Feedbacks) { if (feedback != null) { feedback.FireUpdate(); } } }
void Device_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { CrestronConsole.PrintLine("TDS: {0} is online", currentDevice.Description); } else { CrestronConsole.PrintLine("TDS: {0} is offline", currentDevice.Description); } }
private void MyEISC_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { ErrorLog.Error("TDS: EISC is now online"); } else { ErrorLog.Error("TDS: EISC is NOT online"); } }
void PanelOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { ErrorLog.Notice("Checking Status of {0}...", currentDevice.Name); if (args.DeviceOnLine) { ErrorLog.Error("{0} is Online", currentDevice.Name); } else { ErrorLog.Error("{0} is Offline!", currentDevice.Name); } }
void MyRemote_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { ErrorLog.Notice("TDS: Frame Online should be happening"); if (args.DeviceOnLine) { ErrorLog.Notice("TDS: {0} is online", currentDevice.Description); } else { ErrorLog.Notice("TDS: {0} is offline", currentDevice.Description); } }
void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { foreach (var feedback in Feedbacks) { if (feedback != null) { feedback.FireUpdate(); } } } }
/// <summary> /// Method to handle online/offline events raised by the fusion room object. /// </summary> /// <param name="currentDevice">Reference to the FusionRoom object that is raising this event.</param> /// <param name="args">Information about the online/offline event being raised.</param> void myRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { CrestronConsole.PrintLine("Fusion is {0}", args.DeviceOnLine ? "online" : "offline"); // start/stop the timer to simulate the touchscreen asset going online/offline every 60sec (60,000ms) if (args.DeviceOnLine) { TouchscreenOnlineToggleTimer.Reset(2000, 60000); } else { TouchscreenOnlineToggleTimer.Stop(); } }
void ui_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { OnDebug(eDebugEventType.Info, "{0} online status {1}", currentDevice.ToString(), args.DeviceOnLine.ToString()); Type type = currentDevice.GetType(); SmartObject so = ((BasicTriListWithSmartObject)currentDevice).SmartObjects[SG_DYNAMIC_BTN_LIST]; int i = 0; ushort fontsize = 16; string formattedText = UI.FormatTextForUi(currentDevice.Name, fontsize, UI.eCrestronFont.Crestron_Sans_Pro, UI.eNamedColour.White); SG.SetSmartObjectVisible(so, ++i, true); SG.SetSmartObjectText(so, i, formattedText); formattedText = String.Format("IPID: 0x{0:X2}", currentDevice.ID); formattedText = UI.FormatTextForUi(formattedText, fontsize, UI.eCrestronFont.Crestron_Sans_Pro, UI.eNamedColour.White); SG.SetSmartObjectVisible(so, ++i, true); SG.SetSmartObjectText(so, i, formattedText); formattedText = "Type: " + type.Name.ToString(); formattedText = UI.FormatTextForUi(formattedText, fontsize, UI.eCrestronFont.Crestron_Sans_Pro, UI.eNamedColour.White); SG.SetSmartObjectVisible(so, ++i, true); SG.SetSmartObjectText(so, i, formattedText); try { if (typeof(TswFt5Button).IsAssignableFrom(currentDevice.GetType())) { formattedText = "IP: " + ((TswFt5Button)currentDevice).ExtenderEthernetReservedSigs.IpAddressFeedback.ToString(); formattedText = UI.FormatTextForUi(formattedText, fontsize, UI.eCrestronFont.Crestron_Sans_Pro, UI.eNamedColour.White); SG.SetSmartObjectVisible(so, ++i, true); SG.SetSmartObjectText(so, i, formattedText); formattedText = "MAC: " + ((TswFt5Button)currentDevice).ExtenderEthernetReservedSigs.MacAddressFeedback.ToString(); formattedText = UI.FormatTextForUi(formattedText, fontsize, UI.eCrestronFont.Crestron_Sans_Pro, UI.eNamedColour.White); SG.SetSmartObjectVisible(so, ++i, true); SG.SetSmartObjectText(so, i, formattedText); } if (typeof(TswX60BaseClass).IsAssignableFrom(currentDevice.GetType())) { ((TswX60BaseClass)currentDevice).ExtenderHardButtonReservedSigs.DeviceExtenderSigChange -= ui_HardButton_SigChange; // remove existing event from invocation list ((TswX60BaseClass)currentDevice).ExtenderHardButtonReservedSigs.DeviceExtenderSigChange += ui_HardButton_SigChange; } } catch (Exception e) { OnDebug(eDebugEventType.Info, "ui_OnlineStatusChange exception: {0}", e.Message); } }
/// <summary> /// Online/Ofline event handler for Xpanel /// </summary> /// <param name="currentDevice">The device that triggered the event</param> /// <param name="args">Contains DeviceOnline for status feedback</param> public void Xpanel_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { // if it was tpForCWS that triggered the event if (currentDevice == this.tpForCWS) { ErrorLog.Notice(string.Format(LogHeader + "{0} is online", tpForCWS.Type)); this.tpForCWS.BooleanInput[11].BoolValue = args.DeviceOnLine; } } else { // ErrorLog.Notice(string.Format(LogHeader + "{0} is offline", currentDevice.Description)); } }
protected void Chassis_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { Debug.WriteInfo(GetType().Name, "{0} Online = {1}", Chassis, args.DeviceOnLine); if (args.DeviceOnLine) { Chassis.VideoEnter.BoolValue = false; Chassis.USBEnter.BoolValue = false; Chassis.EnableUSBBreakaway.BoolValue = true; /*foreach (DMOutput output in Chassis.Outputs) * { * Debug.WriteInfo(GetType().Name, "Dm on init, route {0} to {1}", * output.VideoOutFeedback != null ? output.VideoOutFeedback.Number : 0, output.Number); * output.VideoOut = output.VideoOutFeedback; * } * * * Chassis.VideoEnter.Pulse(1); * Chassis.USBEnter.Pulse(1);*/ var info = currentDevice.ConnectedIpList.FirstOrDefault(); if (info != null) { _connectedIp = info.DeviceIpAddress; } foreach (var input in Chassis.Inputs) { if (InputStatusChanged != null) { InputStatusChanged(this, new SwitcherInputStatusChangeEventArgs(this, input.Number)); } } } try { if (DeviceCommunicatingChange != null) { DeviceCommunicatingChange(this, DeviceCommunicating); } } catch (Exception e) { CloudLog.Exception(e); } }
void myEISC_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (currentDevice == myEISC) { if (args.DeviceOnLine == true) { // Device is ONLINE... Go ahead and start sending data to it.. myEISC.StringInput[1].StringValue = " Hello From Remote via EISC"; CrestronConsole.PrintLine("Connected to remote via EISC"); } else { // Device just went offline CrestronConsole.PrintLine("Connection to remote EISC had been dropped!!! "); } } }
public void Remote_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (args.DeviceOnLine) { // if it was remote01 that triggered the event if (currentDevice == this.remote01) { // ErrorLog.Notice(string.Format(LogHeader + "{0} is online", tp01.Type)); // this.remote01.BooleanInput[11].BoolValue = args.DeviceOnLine; ErrorLog.Notice(string.Format(LogHeader + "{0} is online", remote01.Type)); } } else { // ErrorLog.Notice(string.Format(LogHeader + "{0} is offline", currentDevice.Description)); ErrorLog.Notice(string.Format(LogHeader + "{0} is offline", remote01.Type)); } }
private void DeviceOnOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (!args.DeviceOnLine) { CloudLog.Warn("{0} is offline!", currentDevice.ToString()); } try { if (DeviceCommunicatingChange != null) { DeviceCommunicatingChange(this, args.DeviceOnLine); } } catch (Exception e) { CloudLog.Exception(e); } }
void swampA_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { if (swampA.IsOnline) { for (ushort i = 1; i < 9; i++) { swampA.Zones[i].Name.StringValue = zoneNameArray[i - 1]; } for (ushort i = 1; i < 25; i++) { swampA.Sources[i].Name.StringValue = sourceNameArray[i]; } if (numberOfExpanders > 0) { ushort zonePlaceHolder = 10; for (ushort i = 1; i < numberOfExpanders; i++) { if (swampA.Expanders[i].OnlineFeedback) { for (ushort j = 1; j < swampA.Expanders[i].NumberOfZones; j++) { swampA.Expanders[i].Zones[j].Name.StringValue = zoneNameArray[zonePlaceHolder + j - 1]; } } zonePlaceHolder += (ushort)swampA.Expanders[i].NumberOfZones;//NEEDS TESTING } } } }
/// <summary> /// Method to handle online/offline events from the devices. /// </summary> /// <param name="currentDevice">Reference to the device raising the event.</param> /// <param name="args">Information about the event being raised.</param> void Device_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { // determine which device raised this event if (currentDevice == dmTx) { // update the xpanel with new online status xPanelUi.BooleanInput[(uint)eXpanelFeedbacks.BoolDmTxOnline].BoolValue = args.DeviceOnLine; } else if (currentDevice == dmRmc) { // update the xpanel with new online status xPanelUi.BooleanInput[(uint)eXpanelFeedbacks.BoolDmRmcOnline].BoolValue = args.DeviceOnLine; if (args.DeviceOnLine) UpdateRmcConfig(); } }
void Tx_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { ActiveVideoInputFeedback.FireUpdate(); VideoSourceNumericFeedback.FireUpdate(); AudioSourceNumericFeedback.FireUpdate(); }
void switcher_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { SwitcherOnlineEvent(args.DeviceOnLine); }