CardDmps |
public class Dmps3VgaInput : DMInput, IDmCardStreamBase
The CardDmps3VgaInput type exposes the following members.
| Name | Description | |
|---|---|---|
| AudioPort | Property to get the HDMI Analog Input Port | |
| BaseDevice |
The base switcher device this input/output belongs to.
(Inherited from DMInputOutputBase) | |
| Card |
Access to the plugged in card
(Inherited from DMInputOutputBase) | |
| CardInputOutputType |
This will dictate the type of card in the switcher for DMPS systems.
See SwitcherInputs and SwitcherOutputs for more details.
(Inherited from DMInputOutputBase) | |
| Endpoint |
Route endpoint
(Inherited from DMInputOutputBase) | |
| EndpointNameFeedback | The DMInputChange event will trigger with EndpointNameEventId. Text string that identifies the Endpoint name.(Inherited from DMInputOutputBase) | |
| EndpointOnlineFeedback | On an input the DMInputChange event will trigger with EndpointOnlineEventId On an output the DMOutputChange event will trigger with EndpointOnlineEventId Indicates that the Endpoint is connected and detected at the input or output. The output remains 'true' for as long as the Endpoint is detected. When the endpoint is no longer present, the value changes to false.(Inherited from DMInputOutputBase) | |
| HDBaseTDevice |
Get the current HDBaseTBase attached to this DM Input/Output
(Inherited from DMInputOutputBase) | |
| InputOutput |
The input output device that owns a port.
(Inherited from DMInputOutputBase) | |
| IoType |
The type of input or output
(Inherited from DMInputOutputBase) | |
| Name |
Specifies the name of the corresponding input stream. The name is displayed on the LCD front panel and in DM Tools.
The string can consist of a maximum of 32 characters (0-9, -, +, [, ], aA-zZ, and space).
Note that on some switcher inputs (such as the DMPS3) the Name may be a CrestronControlSystem.NullStringInputSig.
(Inherited from DMInput) | |
| NameFeedback |
Reports the name of the corresponding input stream.
Note that on some switcher inputs (such as the DMPS3) the NameFeedback may be a CrestronControlSystem.NullStringInputSig.
(Inherited from DMInput) | |
| Number |
The Number of stream input or output
(Inherited from DMInputOutputBase) | |
| OnDm64 |
Property to indicate that this I/O is on a DM64 based switcher.
(Inherited from DMInputOutputBase) | |
| OnDmps |
Property to indicate that this Input/Output is on a DMPS.
(Inherited from DMInputOutputBase) | |
| OnlineFeedback |
Indicates whether the card is online or offline; that is, whether it is running properly (responding to polls) on the internal network.
The output will remain 'true' for as long as the card is online.
'true' = Card online (running); 'false' = Card offline (not running)
(Inherited from DMInputOutputBase) | |
| Parent |
The parent that a given object was added to.
(Inherited from DMInputOutputBase) | |
| PoDMOverpowerFeedback |
Reports the overpower condition of the corresponding DM input or output.
The property is only supported on DMPS3-4K-200-C, DMPS3-4K-250-C, DMPS3-4K-300-C, and DMPS3-4K-350-C switchers. On other systems this property returns a null signal. On a supported output card the DMOutputChange event will trigger with PoDMOverpowerFeedbackEventId. On a supported input card the DMInputChange event will trigger with PoDMOverpowerFeedbackEventId. (Inherited from DMInputOutputBase) | |
| PresentFeedback |
Indicates whether the card is physically plugged into the card slot on the DM switcher.
The output will remain 'true' for as long as the card is detected.
'true' = Card present; 'false' = Card not installed
(Inherited from DMInputOutputBase) | |
| Type | Get the type of stream this object represents. | |
| USBRoutedTo |
Selects the input or output where the corresponding USB source (connected to an input slot of the switcher) will be routed.
The input has no effect when USB routing is disabled ("USBEnter" = 'false'), or when USB breakaway is disabled ("EnableUSBBreakaway" = 'false').
Valid values are as follows:
null = Break connection, valid DMInput or DMOutput object will assign that object.
For a DMPS3-4K-200-C and DMPS3-4K-250-C, Input USB route is not supported. For a DMPS3-4K-300-C USB can be routed to SwitcherOutputs[3] (eDmps34K300COutputs.Dm1)and SwitcherOutputs[4] (eDmps34K300COutputs.Dm2). For a DMPS3-4K-350-C, USB can be routed to SwitcherOutputs[3] (eDmps34K350COutputs.Dm1)and SwitcherOutputs[4] (eDmps34K350COutputs.Dm2). (Inherited from DMInput) | |
| USBRoutedToFeedback |
Returns the input or output object where the corresponding USB source (connected to an input slot of the switcher) will be routed.
a null return will indicate no assigned connection
(Inherited from DMInput) | |
| UserSpecifiedObject |
Can be assigned anything that user wants.
(Inherited from DMInputOutputBase) | |
| VgaAutoCalibrateFeedback | Indicates that an auto-calibration sequence is in progress. | |
| VgaInputPort | Property to get the VGA Input Port | |
| VgaVideoSourceDetected | Indicates that a signal is present on the VGA input. | |
| VideoDetectedFeedback |
Indicates whether video sync levels are detected at the input.
The output remains 'true' for as long as sync is detected.
'true' = Sync detected; 'false' = Sync not detected
(Inherited from DMInput) |
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| 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) | |
| ToString |
String representation of this DM card.
(Overrides DMInputOutputBaseToString) | |
| VgaAutoCalibrate | Triggers an auto-calibration sequence on the VGA input. Auto-calibration attempts to fit the input video into the video window and automatically adjusts the size, position and phase. Best calibration occurs when the source is a grid pattern and the first and last pixels of each row are white. |
public class ControlSystem : CrestronControlSystem { //Collection of available VGA ports. public List<VgaDviInputPort> VgaPorts = new List<VgaDviInputPort>(); public Random randomNumber = new Random(); //Read in VGA ports and subscribe to events in the constructor. public ControlSystem() { if (SupportsSwitcherInputs == false) {//Check that switcher inputs are available. ErrorLog.Error("No SwitcherInputs Available."); return; } //find all VGA ports for all possible Input types. foreach (var input in SwitcherInputs) { switch (input.CardInputOutputType) { case eCardInputOutputType.Dmps3HdmiVgaInput: VgaPorts.Add((input as Card.Dmps3HdmiVgaInput).VgaInputPort); break; case eCardInputOutputType.Dmps3HdmiVgaBncInput: VgaPorts.Add((input as Card.Dmps3HdmiVgaBncInput).VgaInputPort); break; case (eCardInputOutputType.Dmps3VgaInput): VgaPorts.Add((input as Card.Dmps3VgaInput).VgaInputPort); break; } } //This can be done in the loop above. foreach (VgaDviInputPort vgaPort in VgaPorts) { vgaPort.VideoAttributes.AttributeChange += videoAttributeChange; vgaPort.VideoControls.ControlChange += videoControlsChange; } CrestronConsole.AddNewConsoleCommand(ChangeVgaPortSettings, "ChangeVga", "Change some of the settings of the VGA ports.", ConsoleAccessLevelEnum.AccessOperator); } //Subscription to the Video control feedback of the VGA ports. private void videoControlsChange(object sender, GenericEventArgs args) { var videoControls = sender as VideoControlsEnhanced; if (videoControls == null) return; //Print some information switch (args.EventId) { case (VideoControlsEventIds.BlueFeedbackEventId): CrestronConsole.PrintLine("{0}: Blue = {1}", videoControls.Owner, (short)videoControls.BlueFeedback.UShortValue); break; case(VideoControlsEventIds.GreenFeedbackEventId): CrestronConsole.PrintLine("{0}: Green = {1}", videoControls.Owner, (short)videoControls.GreenFeedback.UShortValue); break; case(VideoControlsEventIds.RedFeedbackEventId): CrestronConsole.PrintLine("{0}: Red = {1}", videoControls.Owner, (short)videoControls.RedFeedback.UShortValue); break; case (VideoControlsEventIds.BrightnessFeedbackEventId): CrestronConsole.PrintLine("{0}: Brightness = {1}", videoControls.Owner, (short)videoControls.BrightnessFeedback.UShortValue); break; case(VideoControlsEventIds.ContrastFeedbackEventId): CrestronConsole.PrintLine("{0}: Contrast = {1}", videoControls.Owner, (short)videoControls.ContrastFeedback.UShortValue); break; } } //Method to change a few VGA settings. private void ChangeVgaPortSettings(string cmdParameters) { foreach (var VgaPort in VgaPorts) { VgaPort.VideoControls.Blue.UShortValue = (ushort) randomNumber.Next(-50, 50); VgaPort.VideoControls.Red.UShortValue = (ushort)randomNumber.Next(-50, 50); VgaPort.VideoControls.Green.UShortValue = (ushort)randomNumber.Next(-50, 50); VgaPort.VideoControls.Brightness.UShortValue = (ushort)randomNumber.Next(-50, 50); VgaPort.VideoControls.Contrast.UShortValue = (ushort)randomNumber.Next(-50, 50); } } //Subscription to the video attribute change feedback for the VGA ports. private void videoAttributeChange(object sender, GenericEventArgs args) { var VideoAttributes = sender as VideoAttributesBasic; if (VideoAttributes == null) return; switch(args.EventId) { case(VideoAttributeEventIds.VerticalResolutionFeedbackEventId): case(VideoAttributeEventIds.HorizontalResolutionFeedbackEventId): case(VideoAttributeEventIds.FramesPerSecondFeedbackEventId): CrestronConsole.PrintLine("{0}: {1}x{2} @ {3}Hz", VideoAttributes.Owner, VideoAttributes.HorizontalResolutionFeedback.UShortValue, VideoAttributes.VerticalResolutionFeedback.UShortValue, VideoAttributes.FramesPerSecondFeedback.UShortValue); break; default: CrestronConsole.PrintLine("AttributeChange: {0} - {1}", VideoAttributes.Owner, args.EventId); break; } } }