Click or drag to resize

Din1Dim4 Class

The Din1Dim4 provides four universal dimming channels for dimming loads such as incandescent, magnetic low voltage, and leading-edge dimmable ELV loads. The Din1Dim4 can be used in applications where reverse-phase dimming is not a requirement.

This class will trigger BaseEvent and OverrideEventHandler events.

The Index field in the BaseEvent will indicate the DinDimmableLoad that has changed.

Inheritance Hierarchy

Namespace: Crestron.SimplSharpPro.Lighting.Din
Assembly: Crestron.SimplSharpPro.Lighting (in Crestron.SimplSharpPro.Lighting.dll) Version: 2.21.121
Syntax
C#
public class Din1Dim4 : DinBaseClass<DinDimmableLoad>

The Din1Dim4 type exposes the following members.

Constructors
 NameDescription
Public methodDin1Dim4(UInt32, CrestronControlSystem) Constructor to generate a new Din1Dim4
Public methodDin1Dim4(UInt32, IDeviceBranch) Constructor to generate a new Din1Dim4
Top
Properties
 NameDescription
Public propertyConnectedIpList 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)
Public propertyCode exampleDescription Get/Set the description of this device.
(Inherited from GenericBase)
Public propertyDinLoads Collection of loads for the specific device. This could be of type DinAnalogOutput or DinFluorescentBallasts or DinDimmableLoad or DinLeds.
(Inherited from DinBaseClassT)
Public propertyDisposed Property to indicate if the device has been disposed.
(Inherited from GenericDevice)
Public propertyID Property to get the ID of the device.
(Inherited from GenericDevice)
Public propertyInExternalOverrideFeedback Indicates if the device is in external override mode

The OverrideHandler will trigger with External.


(Inherited from DinBaseClassT)
Public propertyInManualOverrideFeedback Indicates if the device is in manual override mode

The OverrideHandler will trigger with Manual.


(Inherited from DinBaseClassT)
Public propertyIsOnline Property to get the current online state of the device.
(Inherited from GenericDevice)
Public propertyName Get the name of this device.
(Inherited from GenericBase)
Public propertyNoAcPower Indicates that AC power is not available at the LIVE input. If power is available there, the module will be powered from that AC source; otherwise the module will be powered from Cresnet. The property remains true for as long as AC power is not available at the LIVE input. This is only valid for the Crestron.SimplSharpPro.Lighting.Din.Din1Dim4 and Crestron.SimplSharpPro.Lighting.Din.Din1Dimu4
(Inherited from DinBaseClassT)
Public propertyParameterOverrideControl Parameter to specify the manner in which the override state is saved to non-volatile memory. When set to Program, the unit will recall the corresponding Load's ParameterOverrideLevel level upon entering override (whether manual or external), while disallowing the user from saving new override values at the front panel. When set to Local, this allows the user to save new override values at the front panel. Upon saving the new values locally, this invalidates the corresponding Load's ParameterOverrideLevel level.
(Inherited from DinBaseClassT)
Public propertyParent The parent that a given object was added to.
(Inherited from GenericBase)
Public propertyRegisterable Property to indicate that this device can be registered.
(Inherited from GenericDevice)
Public propertyRegistered Property to get the current registration state of the device.
(Inherited from GenericDevice)
Public propertyRegistrationFailureReason Property to get the Registration Failure Reason, this will match the return value from the call to register.
(Inherited from GenericDevice)
Protected propertySIMPLDeviceImplementation Internal protected member used for actual device control.
(Inherited from GenericDevice)
Public propertyType Property to determine to type of device this is.
(Inherited from GenericDevice)
Public propertyUnRegistrationFailureReason Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
(Inherited from GenericDevice)
Public propertyUserSpecifiedObject Can be assigned anything that user wants.
(Inherited from GenericBase)
Protected propertyXioEndpointStubSIMPLDevice 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)
Top
Methods
 NameDescription
Public methodDispose Clean up of resources.
(Inherited from GenericBase)
Protected methodDispose(Boolean) Method to perform the actual disposing of the device.
(Inherited from GenericDevice)
Public methodEnterManualOverride Method to enter manual override mode.This recalls the override load levels previously saved in the unit's non-volatile memory
(Inherited from DinBaseClassT)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExitManualOverride Method to exit manual override mode.
(Inherited from DinBaseClassT)
Protected methodFinalize Destructor of the device.
(Inherited from GenericDevice)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnBaseEvent(Int32) Protected member used to fire the BaseEvent with the default extended information.
(Inherited from GenericBase)
Protected methodOnBaseEvent(Int32, UInt16) Protected member used to fine the BaseEvent with extended event information.
(Inherited from GenericBase)
Public methodRegister Register this device with the system.
(Inherited from GenericDevice)
Public methodToString Return the name of the device.
(Inherited from GenericDevice)
Public methodUnRegister 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)
Top
Events
 NameDescription
Public eventBaseEvent Generic base event, triggered when the there are no other handlers available for a specific EventID.
(Inherited from GenericBase)
Public eventIpInformationChange 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)
Public eventOnlineStatusChange Event triggered when the Online status of the device changes.
(Inherited from GenericDevice)
Public eventOverrideEventHandler Override event handler
(Inherited from DinBaseClassT)
Top
Example
C#
// Register the device within the constructor or InitializeSystem function
public ControlSystem() : base()
{
    myDin1Dim4 = new Din1Dim4(0x89, this);
    // Now register the event handlers
    myDin1Dim4.OverrideEventHandler += new OverrideHandler(OverrideEventHandler);
    myDin1Dim4.OnlineStatusChange += new OnlineStatusChangeEventHandler(OnlineStatusChangeCallback);
    myDin1Dim4.BaseEvent += new BaseEventHandler(BaseEventCallback);

    // Need to set parameters before we register the device
    foreach (DinDimmableLoad dimmableLoad in myDin1Dim4.DinLoads)
    {
        dimmableLoad.ParameterOverrideLevel = SimplSharpDeviceHelper.PercentToUshort(50);
    }
    // Register the device now
    if (myDin1Dim4.Register() != eDeviceRegistrationUnRegistrationResponse.Success)
    {
        CrestronConsole.PrintLine(" Unable to register for device ");
    }
    else
    {
        CrestronConsole.PrintLine(" Device successfully registered ");
    }
}

// Online Offline Status Change Event Handler 
void OnlineStatusChangeCallback(GenericBase currentDevice, OnlineOfflineEventArgs args)
{
    CrestronConsole.PrintLine(" Din1Dim4 state {0} ", args.DeviceOnLine ? "Online" : "Offline");
}

// Base Event handler for the Din1Dim4
void BaseEventCallback(GenericBase device, BaseEventArgs args)
{
    switch (args.EventId)
    {
        case DinLoadBaseClass.LevelOutFeedbackEventId:
            CrestronConsole.PrintLine(" Level out changed for output {0} ", args.Index);
            CrestronConsole.PrintLine(" Value of load is {0} ", myDin1Dim4.AnalogOutputs[(uint)args.Index].LevelOut.UShortValue);
            break;
        case Crestron.DeviceSupport.Lighting.DinXXXLoadBaseClass.NoAcPowerFeedbackEventId:
            CrestronConsole.PrintLine(" NoAcPowerFeedbackEventId fired. State is {0} ",myDin1Dim4.NoAcPower.BoolValue);
            break; 
    }
}

// Override handler for the Din1Dim4
void OverrideEventHandler(GenericBase device, eOverrideEvents overrideEvent)
{
    switch (overrideEvent)
    {
        case eOverrideEvents.External:
            CrestronConsole.PrintLine(" Device  reports external override event. State is {0} ", myDin1Dim4.InExternalOverrideFeedback.BoolValue);
            break;
        case eOverrideEvents.Manual:
            CrestronConsole.PrintLine(" Device  reports manual override event. State is {0} ", myDin1Dim4.InManualOverrideFeedback.BoolValue);
            break;
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also