Dmb |
This class will trigger DMOutputChange, DeviceInformationChange, OutputChange, AttributeChange and CecChange events.
public sealed class Dmb4KOHD : DmOutputBlade
The Dmb4KOHD type exposes the following members.
| Name | Description | |
|---|---|---|
| Dmb4KOHD | Constructor to generate a new DMB-4K-O-HD blade. This device will be attached to a blade based DM switcher. |
| Name | Description | |
|---|---|---|
| Cards | Collection of output cards. | |
| Name |
The name of this blade.
(Inherited from DmBladeBaseT) | |
| Number |
Property to get the blade number.
(Inherited from DmBladeBaseT) | |
| Outputs |
Collection of DM Outputs apart of this blade.
(Inherited from DmOutputBlade) | |
| Switcher |
Reference back to the switcher this blade is apart of.
(Inherited from DmBladeBaseT) | |
| Type |
Property to get the type of DM Blade this object represents.
(Inherited from DmBladeBaseT) |
| Name | Description | |
|---|---|---|
| Dispose |
Remove this blade from the switcher.
(Inherited from DmBladeBaseT) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| ToString |
String representation of this DM Blade.
(Inherited from DmBladeBaseT) |
| Name | Description | |
|---|---|---|
| InputOrOutputs |
Collection to contain references to the blade's I/O ports.
(Inherited from DmBladeBaseT) |
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); } }