Click or drag to resize

Dmb4KOHD Class

DM Output Blade : DMB-4K-O-HD. 8-Channel 4K Scaling HDMI Output Blade for DM Switchers.

This class will trigger DMOutputChange, DeviceInformationChange, OutputChange, AttributeChange and CecChange events.

Inheritance Hierarchy

Namespace: Crestron.SimplSharpPro.DM.Blades
Assembly: Crestron.SimplSharpPro.DM (in Crestron.SimplSharpPro.DM.dll) Version: 2.21.121
Syntax
C#
public sealed class Dmb4KOHD : DmOutputBlade

The Dmb4KOHD type exposes the following members.

Constructors
 NameDescription
Public methodDmb4KOHD Constructor to generate a new DMB-4K-O-HD blade. This device will be attached to a blade based DM switcher.
Top
Properties
 NameDescription
Public propertyCards Collection of output cards.
Public propertyName The name of this blade.
(Inherited from DmBladeBaseT)
Public propertyNumber Property to get the blade number.
(Inherited from DmBladeBaseT)
Public propertyOutputs Collection of DM Outputs apart of this blade.
(Inherited from DmOutputBlade)
Public propertySwitcher Reference back to the switcher this blade is apart of.
(Inherited from DmBladeBaseT)
Public propertyType Property to get the type of DM Blade this object represents.
(Inherited from DmBladeBaseT)
Top
Methods
 NameDescription
Public methodDispose Remove this blade from the switcher.
(Inherited from DmBladeBaseT)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToString String representation of this DM Blade.
(Inherited from DmBladeBaseT)
Top
Fields
 NameDescription
Protected fieldInputOrOutputs Collection to contain references to the blade's I/O ports.
(Inherited from DmBladeBaseT)
Top
Example
C#
static Dmb4KOHD _dmb4kOHd;
static DmMd64x64 _dmSwitcher;

public ControlSystemDmb4kOHd()
{
    //Register console commands
    CrestronConsole.AddNewConsoleCommand(CreateDeviceCmd, "CreateDevice", "This is a DMB-4K-O-HD CreateDevice command", ConsoleAccessLevelEnum.AccessOperator);
    CrestronConsole.AddNewConsoleCommand(SetDisplayModeCmd, "SetDisplayMode", "This is a DMB-4K-O-HD SetDisplayMode command", ConsoleAccessLevelEnum.AccessOperator);
}

//Method to set the Output Scaler Display Mode for Card 1.
public void SetDisplayModeCmd(String args)
{
    if (args == "0")
    {
        _dmb4kOHd.Cards[1].Hdmi4kOutput.Scaler.DisplayMode = EndpointScalerOutput.eDisplayMode.Maintain;
    }
    else if (args == "1")
    {
        _dmb4kOHd.Cards[1].Hdmi4kOutput.Scaler.DisplayMode = EndpointScalerOutput.eDisplayMode.Stretch;
    }
    else if (args == "2")
    {
        _dmb4kOHd.Cards[1].Hdmi4kOutput.Scaler.DisplayMode = EndpointScalerOutput.eDisplayMode.OneToOne;
    }
    else if (args == "3")
    {
        _dmb4kOHd.Cards[1].Hdmi4kOutput.Scaler.DisplayMode = EndpointScalerOutput.eDisplayMode.Zoom;
    }
    else
    {
        _dmb4kOHd.Cards[1].Hdmi4kOutput.Scaler.DisplayMode = EndpointScalerOutput.eDisplayMode.None;
    }
}

public void CreateDeviceCmd(String args)
{
    //For Switcher
    _dmSwitcher = new DmMd64x64(0x20, this);
    _dmb4kOHd = new Dmb4KOHD(1, _dmSwitcher);

    //Register the DM Switcher with the Control System
    _dmSwitcher.Register();

    foreach (var card in _dmb4kOHd.Cards)
    {
        card.Hdmi4kOutput.StreamCec.CecChange += DmbHdmi4kOutputCard_StreamCecEventHandler;
        card.Hdmi4kOutput.Scaler.OutputChange += DmbHdmi4kOutputCard_ScalerEventHandler;
        card.Hdmi4kOutput.connectedDevice.DeviceInformationChange += DmbHdmi4kOutputCard_DeviceInfoEventHandler;
        card.SourceVideoAttributes.AttributeChange += DmbHdmi4kOutputCard_SourceVideoAttributeEventHandler;
    }

    _dmSwitcher.DMOutputChange += Dmb4kIC_OutputSigChangeEventHandler;
}

//Method to handle the DMOutput ConnectedDevice sig change events
static void DmbHdmi4kOutputCard_DeviceInfoEventHandler(ConnectedDeviceInformation connectedDevice, ConnectedDeviceEventArgs args)
{
    if (args.EventId == ConnectedDeviceEventIds.ManufacturerEventId)
    {
        CrestronConsole.PrintLine("{0} Manufacturer Event Occurred, Manufacturer is {1}", connectedDevice.ToString(), connectedDevice.Manufacturer.StringValue);
    }
}

//Method to handle the DMOutput Scaler sig change events
static void DmbHdmi4kOutputCard_ScalerEventHandler(EndpointScalerOutput scalerOutput, ScalerOutputEventArgs args)
{
    if (args.EventId == ScalerOutputEventIds.UnderscanModeFeedbackEventId)
    {
        CrestronConsole.PrintLine("{0} Underscan Mode Feedback Event Occurred, UnderscanModeFeedback is {1}\r\n", scalerOutput.ToString(), scalerOutput.UnderscanModeFeedback);
    }
}

//Method to handle Blade HDMI port Source VideoAttributes sig change events
static void DmbHdmi4kOutputCard_SourceVideoAttributeEventHandler(object sender, GenericEventArgs args)
{
    if (args.EventId == VideoAttributeEventIds.HorizontalResolutionFeedbackEventId)
    {
        CrestronConsole.PrintLine("{0} device Horizontal Resolution Feedback Event Occurred, HorizontalResolutionFeedback value is {1}\r\n", sender.ToString(), ((VideoAttributesEnhanced)sender).HorizontalResolutionFeedback.UShortValue);
    }
}

//Method to handle Blade HDMI port Cec sig change events
static void DmbHdmi4kOutputCard_StreamCecEventHandler(Cec cecDevice, CecEventArgs args)
{
    if (args.EventId == CecEventIds.CecMessageReceivedEventId)
    {
        CrestronConsole.PrintLine("{0} Message Received Event Occurred, Received Message is {1}\r\n", cecDevice.ToString(), cecDevice.Send.StringValue);
    }
}

//Method to handle Blade DM Output sig change events
static void Dmb4kIC_OutputSigChangeEventHandler(Switch device, DMOutputEventArgs args)
{
    if (args.EventId == DMOutputEventIds.OnlineFeedbackEventId)
    {
        CrestronConsole.PrintLine("Online Feedback event occurred for {0}, OnlineFeedback status is {1}", device.ToString(), device.Inputs[args.Number].OnlineFeedback.BoolValue);
    }
    else if (args.EventId == DMOutputEventIds.PresentFeedbackEventId)
    {
        CrestronConsole.PrintLine("Present Feedback event occurred for {0}, PresentFeedback status is {1}", device.ToString(), device.Inputs[args.Number].PresentFeedback.BoolValue);
    }
    else if (args.EventId == DMOutputEventIds.TemperatureEventId)
    {
        CrestronConsole.PrintLine("Temperature event occurred for {0}, TemperatureFeedback value is {1}", device.ToString(), _dmb4kOHd.Cards[args.Number].TemperatureFeedback.UShortValue);
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also