Din |
public class DinCenCn2 : GenericDevice, ICresnetBridge, IDeviceBranchCollection, IBridgeHelper
The DinCenCn2 type exposes the following members.
| Name | Description | |
|---|---|---|
| Branches | Collection of cresnet branches a part of this device. | |
| BranchTestDoneFeedback |
Flag to indicate that all branch testing has completed.
The BaseEvent event will trigger with BranchTestDoneFeedbackEventId. | |
| 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) | |
| Description |
Get/Set the description of this device.
(Inherited from GenericBase) | |
| Disposed |
Property to indicate if the device has been disposed.
(Inherited from GenericDevice) | |
| FakeUpdateRequest | Property to activate fake cresnet update request True = Active; False = InActive | |
| Helper | Cresnet bridge helper. | |
| ID |
Property to get the ID of the device.
(Inherited from GenericDevice) | |
| InTestModeFeedback |
Flag to indicate if this bridge is currently running a test.
The BaseEvent event will trigger with InTestModeFeedbackEventId. | |
| IsOnline |
Property to get the current online state of the device.
(Inherited from GenericDevice) | |
| Name |
Get the name of this device.
(Inherited from GenericBase) | |
| OverTemperatureFeedback |
Flag to indicate that the device is running over safe temperature ratings.
The BaseEvent event will trigger with OverTemperatureFeedbackEventId. | |
| Parent |
The parent that a given object was added to.
(Inherited from GenericBase) | |
| PowerSupplyErrorStatusFeedback |
Bridge's Power Supply Status.
The BaseEvent event will trigger with PowerSupplyErrorStatusFeedbackEventId and the corresponding to the power supply number. | |
| PowerSupplyStatusFeedback |
Get the status of the detected power source.
The BaseEvent event will trigger with PowerSupplyStatusFeedbackEventId and the corresponding to the power supply number. | |
| 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) | |
| SIMPLDeviceImplementation |
Internal protected member used for actual device control.
(Inherited from GenericDevice) | |
| TestResultsFeedback |
Results of the electrical test that previous ran.
The BaseEvent event will trigger with TestResultsFeedbackEventId. | |
| 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 | |
|---|---|---|
| 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) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (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) | |
| TestAllBranches | Method to start electrical testing on all branches. | |
| 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) | |
| 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) |
//Add reference to Crestron.SimplSharpPro.Keypads for C2nCbdP. //Add reference to Crestron.SimplSharpPro.GeneralIO for DinCenCn2. public class ControlSystem : CrestronControlSystem { //Cresnet bridge public DinCenCn2 BridgeDevice; //Cresnet keypad public C2nCbdP CbdP; //Constructor public ControlSystem() { CrestronConsole.AddNewConsoleCommand(AddDeviceToBridge, "AddDevice", "Add devices to the cresnet bridge.", ConsoleAccessLevelEnum.AccessOperator); } //Console Command Handler private void AddDeviceToBridge(string cmdParameters) { if (BridgeDevice != null) return; //Initialize bridge BridgeDevice = new DinCenCn2(0x44, this); //Initialized Cresnet keypad //Valid Cresnet IDs for a branch are from 0x03 to 0x16. CbdP = new C2nCbdP(0x10, BridgeDevice.Branches[1]); //Register for the Online/Offline status change. BridgeDevice.OnlineStatusChange += DeviceOnOnlineStatusChange; CbdP.OnlineStatusChange += DeviceOnOnlineStatusChange; //Register the bridge (this will register the cresnet keypad) BridgeDevice.Register(); //If the keypad was added at a later time call register on the device to indicated to the //bridge that it is going to be used by this program. } //Online/Offline event handler private void DeviceOnOnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) { //Print indicating the bridge's or keypad's online/offline state. CrestronConsole.PrintLine(String.Format("{1} is {0}", args.DeviceOnLine ? "Online" : "Offline.", currentDevice)); } }