C2n |
This class will trigger BaseEvent and SystemChange events.
public sealed class C2nLcdb3 : C2nLcdBXXBaseClass
The C2nLcdb3 type exposes the following members.
| Name | Description | |
|---|---|---|
| C2nLcdb3(UInt32, CrestronControlSystem) | Constructor to generate a new C2nLcdb3 device. | |
| C2nLcdb3(UInt32, IDeviceBranch) | Constructor to generate a new C2nLcdb3 device. |
| Name | Description | |
|---|---|---|
| BacklightControl |
The Backlight object.
This property will trigger BaseEvent event with C2nLcdBXXBaseClass. (Inherited from C2nLcdBXXBaseClass) | |
| Button |
Get the collection of the Button objects for this device.
(Inherited from C2nLcdBXXBaseClass) | |
| ClimateControl |
The Climate object.
This property will trigger BaseEvent event with C2nLcdBXXBaseClass. (Inherited from C2nLcdBXXBaseClass) | |
| 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) | |
| CurrentPageFeedback |
Property to report the number of the page currently displayed by the device.
This property value is a numerical representation of the page currently displayed on the device
screen.
This property will trigger BaseEvent event with CurrentPageFeedbackEventId. (Inherited from C2nLcdBXXBaseClass) | |
| Description |
Get/Set the description of this device.
(Inherited from GenericBase) | |
| DesiredPage |
Property to select the page we want the device to display.
This property value is a numerical representation of the page we want the device to display when we pulse the property TriggerPageChange value.
(Inherited from C2nLcdBXXBaseClass) | |
| 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) | |
| Left |
Get the Button object corresponding to the Left button
for this device.
(Inherited from C2nLcdBXXBaseClass) | |
| LightingSystem |
The Lighting System object.
This property will trigger SystemChange event with LightingSystem. (Inherited from C2nLcdBXXBaseClass) | |
| MediaControl |
The Media object.
This property will trigger BaseEvent event with C2nLcdBXXBaseClass. (Inherited from C2nLcdBXXBaseClass) | |
| Middle |
Get the Button object corresponding to the Middle button
for this device.
(Inherited from C2nLcdBXXBaseClass) | |
| Name |
Get the name of this device.
(Inherited from GenericBase) | |
| PageChangeInvalidFeedback |
Property to indicate that page number selected is invalid.
This property value becomes 'true' momentarily and again becomes 'false', when TriggerPageChange value is pulsed and an invalid page number input to DesiredPage.
The BaseEvent event will trigger with PageChangeInvalidFeedbackEventId. (Inherited from C2nLcdBXXBaseClass) | |
| 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) | |
| Right |
Get the Button object corresponding to the Right button
for this device.
(Inherited from C2nLcdBXXBaseClass) | |
| ScreenSaverActiveFeedback |
Property to indicate the screen saver active status.
This property value will be 'true' while the device’s screen is asleep and 'false' when the screen backlight is lit.
The BaseEvent event will trigger with ScreenSaverActiveFeedbackEventId. (Inherited from C2nLcdBXXBaseClass) | |
| ShadingSystem |
The Shading System object.
This property will trigger SystemChange event with ShadingSystem. (Inherited from C2nLcdBXXBaseClass) | |
| SIMPLDeviceImplementation |
Internal protected member used for actual device control.
(Inherited from GenericDevice) | |
| SuspendScreenUpdate |
Property to suspend the screen update.
While 'true', this property will suppress any updates to the device’s screen.
This is used at times when there are multiple pieces of information that you want to appear
on the screen simultaneously, rather than see them filter in one at a time.
(Inherited from C2nLcdBXXBaseClass) | |
| SystemSetup |
The Setup object.
This property will trigger BaseEvent event with C2nLcdBXXBaseClass. (Inherited from C2nLcdBXXBaseClass) | |
| 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) | |
| 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 | |
|---|---|---|
| ActivateScreenSaver |
Method to set the screen to go to “sleep”. This is basically forces a timeout. The unit will still wake up under normal circumstances.
(Inherited from C2nLcdBXXBaseClass) | |
| 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) | |
| ToString |
Return the name of the device.
(Inherited from GenericDevice) | |
| 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) | |
| ButtonStateChange |
Event fired when a button state change was received from the device.
(Inherited from C2nLcdBXXBaseClass) | |
| 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) |
static C2nLcdB3 _keypad; public ControlSystemC2nLcdB3() { CrestronConsole.AddNewConsoleCommand(CreateDeviceCmd, "CreateDevice", "This is a C2N-LCD-B3 International Keypad CreateDevice command", ConsoleAccessLevelEnum.AccessOperator); } public void CreateDeviceCmd(String args) { //Initialize the C2N-LCD-B3 device for Cresnet Communication _keypad = new C2nLcdb3(0x03, this); _keypad.BaseEvent += KeypadEventHandler; _keypad.ButtonStateChange += KeypadButtonChange; _keypad.LightingSystem.SystemChange += LightingSystem_SystemChange; _keypad.ShadingSystem.SystemChange += ShadingSystem_SystemChange; // Now setup the keypad _keypad.ShadingSystem.NumberOfScenes.UShortValue = 2; _keypad.ShadingSystem.Scenes[1].Name.StringValue = "Morning"; _keypad.ShadingSystem.Scenes[2].Name.StringValue = "Night"; _keypad.ShadingSystem.NumberOfLightsOrShades.UShortValue = 4; CrestronConsole.PrintLine(" Number of shading loads is {0} ", _keypad.ShadingSystem.Loads.Count); foreach (C2nLcdBXXBaseClass.Load shadingLoad in _keypad.ShadingSystem.Loads) { CrestronConsole.PrintLine(" Lighting load number is {0} ", shadingLoad.Number); shadingLoad.Name.StringValue = "SL" + shadingLoad.Number; shadingLoad.Level.UShortValue = 25; } _keypad.LightingSystem.NumberOfScenes.UShortValue = 3; _keypad.LightingSystem.Scenes[1].Name.StringValue = "Party1"; _keypad.LightingSystem.Scenes[2].Name.StringValue = "Party2"; _keypad.LightingSystem.Scenes[3].Name.StringValue = "Party3"; _keypad.LightingSystem.NumberOfLightsOrShades.UShortValue = 3; CrestronConsole.PrintLine(" Number of lighting loads is {0} ", _keypad.LightingSystem.Loads.Count); foreach (C2nLcdBXXBaseClass.Load lightingLoad in _keypad.LightingSystem.Loads) { CrestronConsole.PrintLine(" Lighting load number is {0} ", lightingLoad.Number); lightingLoad.Name.StringValue = "LL" + lightingLoad.Number; lightingLoad.Level.UShortValue = 125; } foreach (C2nLcdBXXBaseClass.Load shadingLoad in _keypad.ShadingSystem.Loads) { CrestronConsole.PrintLine(" Shading load number is {0} ", shadingLoad.Number); shadingLoad.Name.StringValue = "SL" + shadingLoad.Number; shadingLoad.Level.UShortValue = 25; } //Register the C2N-LCD-B3 Keypad with the Control system _keypad.Register(); } // Method to handle slot sig change events for C2N-LCD-B3 Keypad. static void KeypadEventHandler(GenericBase device, BaseEventArgs args) { if (args.EventId == C2nLcdBXXBaseClass.ScreenSaverActiveFeedbackEventId) { CrestronConsole.PrintLine("{0} Screen Saver Active Feedback event occurred\r\n", device.ToString()); } else if (args.EventId == C2nLcdBXXBaseClass.PageChangeInvalidFeedbackEventId) { CrestronConsole.PrintLine("{0} Page Change Invalid Feedback event occurred\r\n", device.ToString()); } } // Sig callback for handling C2N-LCD-B3 button events. void KeypadButtonChange(GenericBase currentDevice, ButtonEventArgs args) { for (uint i = 1; i <= _keypad.Button.Count; i++) { if (args.Button.Number == _keypad.Button[i].Number) { CrestronConsole.PrintLine("Button{0}'s state is {1}\r\n", i, args.Button.State); } } } // Shading system change handler void ShadingSystem_SystemChange(object sender, GenericEventArgs args) { C2nLcdBXXBaseClass.LoadSystem shadingLoad = sender as C2nLcdBXXBaseClass.LoadSystem; CrestronConsole.PrintLine(" System change fired for {2} with args eventId {0}:{1} ", args.EventId, args.Index, shadingLoad.ToString()); switch (args.EventId) { case C2nLcdBXXBaseClass.RaiseFeedbackEventId: CrestronConsole.PrintLine(" Raise feedback fired for shade load {0} and value is {1} and string is {2} ", args.Index, shadingLoad.Loads[args.Index].RaiseFeedback.UShortValue, shadingLoad.Loads[args.Index].ToString()); break; case C2nLcdBXXBaseClass.LowerFeedbackEventId: CrestronConsole.PrintLine(" Lower feedback fired for shade load {0} and value is {1} and string is {2} ", args.Index, shadingLoad.Loads[args.Index].LowerFeedback.UShortValue, shadingLoad.Loads[args.Index].ToString()); break; case C2nLcdBXXBaseClass.LowerRoomFeedbackEventId: break; case C2nLcdBXXBaseClass.RecallSceneFeedbackEventId: CrestronConsole.PrintLine(" Recall scene feedback fired for shade scene {0} and value is {1} and string is {2} ", args.Index, shadingLoad.Scenes[args.Index].RecallFeedback.BoolValue, shadingLoad.Scenes[args.Index].ToString()); break; } } // Lighting system change handler void LightingSystem_SystemChange(object sender, GenericEventArgs args) { C2nLcdBXXBaseClass.LoadSystem lightingLoad = sender as C2nLcdBXXBaseClass.LoadSystem; CrestronConsole.PrintLine(" System change fired for {2} with args eventId {0}:{1} ", args.EventId, args.Index, lightingLoad.ToString()); switch (args.EventId) { case C2nLcdBXXBaseClass.RaiseFeedbackEventId: CrestronConsole.PrintLine(" Raise feedback fired for light load {0} and value is {1} and string {2} ", args.Index, lightingLoad.Loads[args.Index].RaiseFeedback.UShortValue, lightingLoad.Loads[args.Index]); break; case C2nLcdBXXBaseClass.LowerFeedbackEventId: CrestronConsole.PrintLine(" Lower feedback fired for light load {0} and value is {1} and string is {2} ", args.Index, lightingLoad.Loads[args.Index].LowerFeedback.UShortValue, lightingLoad.Loads[args.Index]); break; case C2nLcdBXXBaseClass.LowerRoomFeedbackEventId: break; case C2nLcdBXXBaseClass.RecallSceneFeedbackEventId: CrestronConsole.PrintLine(" Recall scene feedback fired for lighting scene {0} and value is {1} and string is {2} ", args.Index, lightingLoad.Scenes[args.Index].RecallFeedback.BoolValue, lightingLoad.Loads[args.Index]); break; case C2nLcdBXXBaseClass.AmbientLightLevelFeedbackEventId: CrestronConsole.PrintLine(" Ambient feedback is {0} ", lightingLoad.AmbientLightLevelFeedback.ToString()); break; } }