Click or drag to resize

DmMd32x32 Class

Crestron DigitalMedia switchers provide digital multi-channel "audio-follows-video" matrix switching, plus independent stereo matrix switching for audio breakaway. The switcher distributes uncompressed digital video and audio signals over DM, which consists of a Shielded Twisted Pair (STP), CAT5e and 4-wire DMNET. The switcher can also route any USB-capable input to any output.
Inheritance Hierarchy

Namespace: Crestron.SimplSharpPro.DM
Assembly: Crestron.SimplSharpPro.DM (in Crestron.SimplSharpPro.DM.dll) Version: 2.21.121
Syntax
C#
public sealed class DmMd32x32 : DmMDMnxn

The DmMd32x32 type exposes the following members.

Constructors
 NameDescription
Public methodDmMd32x32 Constructor to generate a new Crestron DM-MD32x32 switch
Top
Properties
 NameDescription
Public propertyAudioEnter Enables the "AudioOut#" audio source selection analogs for as long as the input is 'true'. When the input is 'false', the analogs have no effect. 'true' (level-sensitive) = Enable audio; 'false' = Disable audio
(Inherited from DmMDMnxn)
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 propertyDisposed Property to indicate if the device has been disposed.
(Inherited from GenericDevice)
Public propertyEnableAudioBreakaway Enables audio breakaway for as long as the input is 'true'. This allows audio to be routed independently from video. If audio breakaway is not enabled, the audio routes will follow the selected video routes. 'true' (level-sensitive) = Enable audio breakaway; 'false' = Disable audio breakaway
(Inherited from DmMDMnxn)
Public propertyEnableAudioBreakawayFeedback Indicates that audio breakaway is enabled. The output remains 'true' for as long as audio breakaway is enabled. 'true' = Audio breakaway enabled; 'false' = Audio breakaway disabled

The DMSystemChange event will trigger with the AudioBreakawayEventId.


(Inherited from DmMDMnxn)
Public propertyEnableUSBBreakaway Enables USB breakaway for as long as the input is 'true'. This allows USB to be routed independently from video. If USB breakaway is not enabled, the USB routes will follow the selected video routes, and the "USBOut#" inputs will have no effect. 'true' (level-sensitive) = Enable USB breakaway; 'false' = Disable USB breakaway This property is not supported by HD-RX-4K-X01 switches
(Inherited from Switch)
Public propertyEnableUSBBreakawayFeedback Indicates that USB breakaway is enabled. The output remains high for as long as USB breakaway is enabled. 'true' = USB breakaway enabled; 'false' = USB breakaway disabled This property is not supported by HD-RX-4K-X01 switches

The DMSystemChange event will trigger with the USBBreakawayEventId if the switcher is a device.


(Inherited from Switch)
Public propertyFrontPanelLockOffFeedback Indicates that the front panel is unlocked. The output remains 'true' for as long as the front panel is unlocked. 'true' = Front panel unlocked; 'false' = Front panel not unlocked

The DMSystemChange event will trigger with the SystemIdEventId.


(Inherited from DmMDMnxn)
Public propertyFrontPanelLockOnFeedback Indicates that the front panel is locked. The output remains 'true' for as long as the front panel is locked. 'true' = Front panel locked; 'false' = Front panel not locked

The DMSystemChange event will trigger with the FrontPanelLockOnEventId.


(Inherited from DmMDMnxn)
Public propertyFrontPanelPassword Front Panel Password (Integer)
(Inherited from DmMDMnxn)
Public propertyFrontPanelPasswordFeedback Reports the front panel password.
(Inherited from DmMDMnxn)
Public propertyID Property to get the ID of the device.
(Inherited from GenericDevice)
Public propertyInputs Get Collection of inputs for this switch
(Inherited from DmMDMnxn)
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 propertyNumberOfInputs Number of Input Channels on this switch
(Inherited from Switch)
Public propertyNumberOfOutputs Number of Output Channels on this switch
(Inherited from Switch)
Public propertyOutputs Get Collection of outputs for this switch
(Inherited from DmMDMnxn)
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)
Public propertySavingSettingsFeedback Indicates that the save operation is in progress. The output will remain 'true' while the save operation is in progress (usually a few seconds) and then go 'false' when the save operation is complete. 'true' = Saving settings; 'false' = Save settings complete

The DMSystemChange event will trigger with the SavingSettingsEventId.


(Inherited from DmMDMnxn)
Protected propertySIMPLDeviceImplementation Internal protected member used for actual device control.
(Inherited from GenericDevice)
Public propertySwitchType The type of DM switcher
(Inherited from Switch)
Public propertySystemId If Private Network Mode (PNM) is enabled, sets the System ID. Does not take effect until the "ApplySystemId" is called.
(Inherited from DmMDMnxn)
Public propertySystemIdBusy Indicates that the changing the System ID operation is in progress. The output will remain 'true' while the changing the System ID operation is in progress (usually a few seconds) and then go 'false' when the operation is complete. 'true' = Changing System ID; 'false' = Changing System ID complete

The DMSystemChange event will trigger with the SystemIdBusyEventId.


(Inherited from DmMDMnxn)
Public propertySystemIdFeedback Indicates the current System ID (if Private Network Mode is enabled).

The DMSystemChange event will trigger with the SystemIdEventId.


(Inherited from DmMDMnxn)
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 propertyUSBEnter Enables the "Output#_USBRoutedTo" or "Input#_USBRoutedTo" source selection analogs for as long as the input is 'true'. When the input is 'false', the analogs have no effect. 'true' (level-sensitive) = Enable USB; 'false' = Disable USB This property is not supported by HD-RX-4K-X01 switches
(Inherited from Switch)
Public propertyUserSpecifiedObject Can be assigned anything that user wants.
(Inherited from GenericBase)
Public propertyVideoEnter Enables the "VideoOut#" video source selection analogs for as long as the input is 'true'. When the input is 'false', the analogs have no effect. 'true' (level-sensitive) = Enable video; 'false' = Disable video This property is not supported by HD-RX-4K-X01 switches
(Inherited from Switch)
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 methodApplySystemId If Private Network Mode (PNM) is enabled, applies the System's ID.
(Inherited from DmMDMnxn)
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 methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor of the device.
(Inherited from GenericDevice)
Public methodFrontPanelLockOff Unlocks the front panel.
(Inherited from DmMDMnxn)
Public methodFrontPanelLockOn Locks out the front panel.
(Inherited from DmMDMnxn)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(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 methodSaveSettings Saves the switcher's non-volatile settings to NVRAM.
(Inherited from DmMDMnxn)
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 eventDMInputChange Handle DM Input Events EventIds for this event are located in the DMInputEventIds class.
(Inherited from Switch)
Public eventDMOutputChange Handle DM Output Events EventIds for this event are located in the DMOutputEventIds class.
(Inherited from Switch)
Public eventDMSystemChange Event to handle general switch events EventIds for this event are located in the DMSystemEventIds class.
(Inherited from Switch)
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)
Top
Example
C#
 /// Switcher.
private static DmMd32x32 _switcher;

// Cards
private static Dmc4kzCDsp _dmc4kzDsp;
private static Dmc4kzCoHdSingle _dmc4kzCoHD;
private static Dmc4kCoHdSingle _dmc4kCoHD;
private static Dmc4kzC _dmc4kzHD;

// Receivers
private static DmRmc4kScalerC _dmRmc4kScalar;

// Transmitters
private static DmTx4k302C _tx4k302;
/// Initialization function which sets up the DM switcher object and its base attributes.
public static bool InitializeDevice(CrestronControlSystem controlSystem)
{
    bool returnValue = false;
    try
    {
        // Initialize our DmMd32x32 object with the cp_id and CrestronControlSystem object.
        _switcher = new DmMd32x32(0x04, controlSystem);

        _switcher.Description = "DM switcher 32 x 23";

        // Event handlers for the switcher.
        _switcher.DMInputChange += new DMInputEventHandler(_switcher_DMInputChange);

        _switcher.DMOutputChange += new DMOutputEventHandler(_switcher_DMOutputChange);

        _switcher.DMSystemChange += new DMSystemEventHandler(_switcher_DMSystemChange);

        _switcher.OnlineStatusChange += new OnlineStatusChangeEventHandler(_switcher_OnlineStatusChange);

        // Now it is time to set up our DM I/O cards There is an order in which initialization needs to occur.
        // 1) Instantiate card objects and with their I/O slot number.
        // 2) Set up routes for input cards to their respected output cards.
        // 3) Instantiate Rx/Tx objects with the I/O cards they are physically connected too.
        CardSetup();

        RecieverSetup();

        TransmitterSetup();

        InitializeRoutes();

        // Applies the systems ID if the device is flagged for private network mode.
        // ask ken about this call.
        _switcher.ApplySystemId();

        // Flag our I/O signals as online.
        _switcher.VideoEnter.BoolValue = true;

        _switcher.AudioEnter.BoolValue = true;

        _switcher.USBEnter.BoolValue = true;

        // Register the switcher 
        // Internally, the switcher will register all cards that are physically connected to it.
        // There is no need to manually registered all defined cards.
        eDeviceRegistrationUnRegistrationResponse resp = _switcher.Register();

        // Check if the switcher has been registered.
        if (resp != eDeviceRegistrationUnRegistrationResponse.Success)
        {
            ErrorLog.Error("Unable to register DM switcher: {0}", resp.ToString());
        }
        else
        {
            ErrorLog.Notice("Dm switcher registered. {0}", resp.ToString());
        }
            returnValue = true;
        }
    catch (Exception e)
    {
        ErrorLog.Error("Error while initializing DM switcher: {0}", e.ToString());
    }

    return returnValue;
}


/// Sets up our cards that are within the DM switcher. 
/// Currently using a DMC-4kz-C-DSP, DMC-4k-C, and Dmc-4k-CO-HD.
private static void CardSetup()
{
    try
    {
        // ADD COMMENTS ABOUT SLOT NUMBER RELATION.

        // Initialize card objects, each are assigned a slot number and given the Dm Switcher it is attached to.

        //IMPORTANT: In this example we are letting the DM switcher class handle all card registration. Do not register each card.
        // Input cards follow numbering on the back panel of the device.
        _dmc4kzDsp = new Dmc4kzCDsp(8, _switcher);
        _dmc4kzHD = new Dmc4kzC(23, _switcher); 

        // Output cards given the slot number they are connected to the DM switcher in and the DM switcher object.
        // Output cards have a different numbering than input cards. They are in in units of two. 
        // So instead of 32 slots numbering it is a 16 slot numbering system where each physical card is two device cards.
        // For more information check the specs for your specific DM switcher device.
        _dmc4kzCoHD = new Dmc4kzCoHdSingle(13, _switcher);
        _dmc4kCoHD = new Dmc4kCoHdSingle(12, _switcher);

    } 
    catch(Exception e)
    {
        ErrorLog.Error("Error while initializing cards: {0}", e.Message);
    }
}

/// Sets up the routing between input cards and output cards. These routes are hard coded as an example. 
/// Change to whatever specific routing configuration needed.
/// NOTE: Video can also be routed in the same way. However, for this example audio is only covered.
private static void InitializeRoutes()
{
    try
    {
        // Assign our audio output to the audio input on card.
        // Will trigger the Input change event on the switcher.
        _switcher.Outputs["outputSlot"].AudioOut = _switcher.Inputs["inputSlot"];
        _switcher.Outputs["outputSlot"].VideoOut = _switcher.Inputs["inputSlot"];


        // Assign our audio / video output audio input on card.
        // Will trigger the Input change event on the switcher.
        _switcher.Outputs["outputSlot"].AudioOut = _switcher.Inputs["inputSlot"];
        _switcher.Outputs["outputSlot"].VideoOut = _switcher.Inputs["inputSlot"];
    }
    catch (Exception e)
    {
        ErrorLog.Notice("Error while initializing input / output routing: {0}", e.Message);
    }
}


/// Set up for receivers connected to the DM Output cards. 
/// Receivers are output endpoints.
private static void RecieverSetup()
{
    try
    {
        // Initialize the object with a IPID and the output card physically connected to the reciever.  
        _dmRmc4kScalar = new DmRmc4kScalerC(0x06, _switcher.Outputs[24]);

        _dmRmc4kScalar.Description = "Rmc 4k scalar output 24";

        // sets up supporting functionality for transmitting serial data over comm port 1.
        RecieverSerialSetup();
    }
    catch (Exception e)
    {
        ErrorLog.Error("Error while initalizing recievers: {0}", e.Message);
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also