Xio |
public sealed class XioCloudRoomSlot : GenericDevice
The XioCloudRoomSlot type exposes the following members.
| Name | Description | |
|---|---|---|
| AlertsFeedback | Response to XIO Cloud for the state of alerts. | |
| ConnectedIpList |
A property containing the list of the ConnectedIpInformation objects which contain information about the devices that are connected to this IP ID.
This property is only valid for an ethernet device. If this is not an ethernet device, then this property will return null.
If this is an ethernet device, the list will be non-null. It will be empty if no devices are connected.
The order of items in this list is not guaranteed.
(Inherited from GenericDevice) | |
| CurrentSourceFeedback | Response to XIO Cloud for the state of current source. | |
| Description |
Get/Set the description of this device.
(Inherited from GenericBase) | |
| DisplayPowerFeedback | Response to XIO Cloud for the state of display power. | |
| DisplayPowerOff |
Requested state of display power off from XIO Cloud.
This property will trigger BaseEvent event with DisplayPowerOffEventId. | |
| DisplayPowerOn |
Requested state of display power on from XIO Cloud.
This property will trigger BaseEvent event with DisplayPowerOnEventId. | |
| Disposed |
Property to indicate if the device has been disposed.
(Inherited from GenericDevice) | |
| ID |
Property to get the ID of the device.
(Inherited from GenericDevice) | |
| IsOnline |
Property to get the current online state of the device.
(Inherited from GenericDevice) | |
| MaintenanceMode |
Requested state of maintenance mode from XIO Cloud.
This property will trigger BaseEvent event with MaintenanceModeEventId. | |
| Name |
Get the name of this device.
(Inherited from GenericBase) | |
| Occupied |
Requested state of occupied from XIO Cloud.
This property will trigger BaseEvent event with OccupiedEventId. | |
| OccupiedFeedback | Response to XIO Cloud for the state of occupied. | |
| Parent |
The parent that a given object was added to.
(Inherited from GenericBase) | |
| Registerable |
Property to indicate that this device can be registered.
(Inherited from GenericDevice) | |
| Registered |
Property to get the current registration state of the device.
(Inherited from GenericDevice) | |
| RegistrationFailureReason |
Property to get the Registration Failure Reason, this will match the return value from the call to register.
(Inherited from GenericDevice) | |
| ResolveAlertsFeedback | Resolve specific alerts | |
| ResolveAllAlertsFeedback | Resolve all alerts | |
| RoomName |
Requested state of room name from XIO Cloud.
This property will trigger BaseEvent event with RoomNameEventId. | |
| SIMPLDeviceImplementation |
Internal protected member used for actual device control.
(Inherited from GenericDevice) | |
| SystemCheck |
Requested state of system check from XIO Cloud.
This property will trigger BaseEvent event with SystemCheckEventId. | |
| SystemCheckMessageFeedback | Response to XIO Cloud for the state of system message. | |
| SystemCheckStateFeedback | Response to XIO Cloud for the state of system state. | |
| SystemPowerFeedback | Response to XIO Cloud for the state of system power. | |
| SystemPowerOff |
Requested state of system power off from XIO Cloud.
This property will trigger BaseEvent event with SystemPowerOffEventId. | |
| SystemPowerOn |
Requested state of system power on from XIO Cloud.
This property will trigger BaseEvent event with SystemPowerOnEventId. | |
| Type |
Property to determine to type of device this is.
(Inherited from GenericDevice) | |
| UnRegistrationFailureReason |
Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
(Inherited from GenericDevice) | |
| UserSpecifiedObject |
Can be assigned anything that user wants.
(Inherited from GenericBase) | |
| Vacant |
Requested state of vacant from XIO Cloud.
This property will trigger BaseEvent event with VacantEventId. | |
| XioEndpointStubSIMPLDevice |
The SIMPL "stub" Device that the XiO Director creates for an endpoint to send the 1C/0E to the
correct place in hierarchy.
(Inherited from GenericDevice) |
| Name | Description | |
|---|---|---|
| Dispose |
Clean up of resources.
(Inherited from GenericBase) | |
| Dispose(Boolean) |
Method to perform the actual disposing of the device.
(Inherited from GenericDevice) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize |
Destructor of the device.
(Inherited from GenericDevice) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| OnBaseEvent(Int32) |
Protected member used to fire the BaseEvent with the default extended information.
(Inherited from GenericBase) | |
| OnBaseEvent(Int32, UInt16) |
Protected member used to fine the BaseEvent with extended event information.
(Inherited from GenericBase) | |
| Register |
Register this device with the system.
(Inherited from GenericDevice) | |
| Register(Sig) | Register the device by enabling or disabling the required sigs. | |
| ToString |
String representation of the XIO Cloud Room Slot.
(Overrides GenericDeviceToString) | |
| UnRegister |
Unregister this device with the system. This function can not be called from the device's own SigChange event handler.
On successful unregistration, if this device supports the OnlineStatusChange event, it will trigger indicating the device when offline. (Inherited from GenericDevice) |
| Name | Description | |
|---|---|---|
| BaseEvent |
Generic base event, triggered when the there are no other handlers available
for a specific EventID.
(Inherited from GenericBase) | |
| IpInformationChange |
Event that tells what IP Address is connected/disconnected from an IP ID for a non-UDP device.
This is only valid for an Ethernet device. An exception will be thrown if it is not.
(Inherited from GenericDevice) | |
| OnlineStatusChange |
Event triggered when the Online status of the device changes.
(Inherited from GenericDevice) |
| Name | Description | |
|---|---|---|
| DisplayPowerOffEventId |
The state of DisplayPowerOff has changed.
The BaseEvent event will trigger for this event id. | |
| DisplayPowerOnEventId |
The state of DisplayPowerOn has changed.
The BaseEvent event will trigger for this event id. | |
| MaintenanceModeEventId |
The value of MaintenanceMode has changed.
The BaseEvent event will trigger for this event id. | |
| OccupiedEventId |
The state of Occupied has changed.
The BaseEvent event will trigger for this event id. | |
| RoomNameEventId |
The value of RoomName has changed.
The BaseEvent event will trigger for this event id. | |
| SystemCheckEventId |
The value of SystemCheck has changed.
The BaseEvent event will trigger for this event id. | |
| SystemPowerOffEventId |
The state of SystemPowerOff has changed.
The BaseEvent event will trigger for this event id. | |
| SystemPowerOnEventId |
The state of SystemPowerOn has changed.
The BaseEvent event will trigger for this event id. | |
| VacantEventId |
The state of Vacant has changed.
The BaseEvent event will trigger for this event id. |
public class ControlSystem : CrestronControlSystem { GlsOirLclCCn _occSensor; Xpanel _xpanel; public ControlSystem() { // Register for incoming signals from XiO ControllerXioCloudRoomSlotDevice.BaseEvent += CloudRoom_PropertyChangeEventHandler; // Register for XiO connection status change ControllerXioCloudRoomSlotDevice.OnlineStatusChange += CloudRoom_OnlineStatusChange; _occSensor = new GlsOirLclCCn(0x17, this); _occSensor.BaseEvent += OccSensor_PropertyChangeEventHandler; _xpanel = new Xpanel(0x05, this); } public override void InitializeSystem() { // Register the CloudRoom slot with XiO; by default all signals on the slot are registered with XiO // Signals may be passed here to exclude their registration with XiO if (ControllerXioCloudRoomSlotDevice.Register(ControllerXioCloudRoomSlotDevice.Occupied, ControllerXioCloudRoomSlotDevice.Vacant) == eDeviceRegistrationUnRegistrationResponse.Success) { // AlertsFeedback may be sent at any time ControllerXioCloudRoomSlotDevice.AlertsFeedback.StringValue = "Program has started"; } _occSensor.Register(); _xpanel.Register(); } private void CloudRoom_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { const uint XioOnlineStateJoin = 1; _xpanel.BooleanInput[XioOnlineStateJoin].BoolValue = args.DeviceOnLine; // Set current source feedback with enum value ControllerXioCloudRoomSlotDevice.CurrentSourceFeedback.Value = XioCloudRoomSlot.eCurrentSource.Laptop1; } private void CloudRoom_PropertyChangeEventHandler(GenericBase device, BaseEventArgs args) { // Handle all events which come in from XiO switch (args.EventId) { case XioCloudRoomSlot.SystemPowerOnEventId: TurnSystemPowerOn(); break; case XioCloudRoomSlot.SystemPowerOffEventId: TurnSystemPowerOff(); break; case XioCloudRoomSlot.DisplayPowerOnEventId: TurnDisplayPowerOn(); break; case XioCloudRoomSlot.DisplayPowerOffEventId: TurnDisplayPowerOff(); break; case XioCloudRoomSlot.OccupiedEventId: HandleOccupiedEvent(ControllerXioCloudRoomSlotDevice.Occupied.BoolValue); break; case XioCloudRoomSlot.VacantEventId: HandleVacantEvent(ControllerXioCloudRoomSlotDevice.Vacant.BoolValue); break; case XioCloudRoomSlot.RoomNameEventId: HandleRoomNameEvent(ControllerXioCloudRoomSlotDevice.RoomName.StringValue); break; case XioCloudRoomSlot.MaintenanceModeEventId: HandleMaintenanceModeEvent(ControllerXioCloudRoomSlotDevice.MaintenanceMode.BoolValue); break; case XioCloudRoomSlot.SystemCheckEventId: RunSystemCheck(); break; } } private void TurnSystemPowerOn() { // Send system power state to XiO ControllerXioCloudRoomSlotDevice.SystemPowerFeedback.BoolValue = true; } private void TurnSystemPowerOff() { // Send system power state to XiO ControllerXioCloudRoomSlotDevice.SystemPowerFeedback.BoolValue = false; } private void TurnDisplayPowerOn() { // Send display power state to XiO ControllerXioCloudRoomSlotDevice.DisplayPowerFeedback.BoolValue = true; } private void TurnDisplayPowerOff() { // Send display power state to XiO ControllerXioCloudRoomSlotDevice.DisplayPowerFeedback.BoolValue = false; } private void HandleOccupiedEvent(bool value) { const uint OccupiedStateJoin = 10; _xpanel.BooleanInput[OccupiedStateJoin].BoolValue = value; } private void HandleVacantEvent(bool value) { const uint VacantStateJoin = 11; _xpanel.BooleanInput[VacantStateJoin].BoolValue = value; } private void HandleRoomNameEvent(string value) { const uint RoomNameJoin = 12; _xpanel.StringInput[RoomNameJoin].StringValue = value; } private void HandleMaintenanceModeEvent(bool value) { const uint MaintenanceModeJoin = 13; if (value) { _xpanel.StringInput[MaintenanceModeJoin].StringValue = "Room is in maintenance mode"; } else { _xpanel.StringInput[MaintenanceModeJoin].StringValue = ""; } } private void RunSystemCheck() { ControllerXioCloudRoomSlotDevice.SystemCheckStateFeedback.Value = XioCloudRoomSlot.eSystemCheckState.Running; if (_occSensor.IsOnline) { ControllerXioCloudRoomSlotDevice.SystemCheckStateFeedback.Value = XioCloudRoomSlot.eSystemCheckState.Success; } else { // SystemCheckMessageFeedback may be sent to provide details about system check ControllerXioCloudRoomSlotDevice.SystemCheckMessageFeedback.StringValue = "Occupancy sensor offline"; ControllerXioCloudRoomSlotDevice.SystemCheckStateFeedback.Value = XioCloudRoomSlot.eSystemCheckState.Error; } } public void OccSensor_PropertyChangeEventHandler(GenericBase device, BaseEventArgs args) { if (args.EventId == GlsOccupancySensorBase.RoomOccupiedFeedbackEventId) { // Send occupancy state to XiO ControllerXioCloudRoomSlotDevice.OccupiedFeedback.BoolValue = _occSensor.OccupancyDetectedFeedback.BoolValue; } } }