AJA NTV2 SDK
17.1.1.1245
NTV2 SDK 17.1.1.1245
|
This class is a collection of widget input-to-output connections that can be applied all-at-once to an NTV2 device. Call AddConnection to connect a widget input (specified by NTV2InputXptID) to a widget's output (specified by NTV2OutputXptID). Call the CNTV2Card::ApplySignalRoute function to apply this route to the device. More...
#include <ntv2signalrouter.h>
Classes | |
struct | PrintCodeConfig |
Public Member Functions | |
virtual bool | AddConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput=NTV2_XptBlack) |
Adds a connection between a widget's signal input (sink) and another widget's signal output (source). More... | |
virtual bool | RemoveConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput) |
Removes the connection between the specified input (signal sink) and output (signal source). More... | |
virtual bool | HasConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput) const |
Answers true if I contain a connection between the specified input (signal sink) and output (signal source). More... | |
virtual bool | HasInput (const NTV2InputXptID inSignalInput) const |
Answers true if I contain a connection that involves the given input (signal sink). More... | |
virtual NTV2OutputXptID | GetConnectedOutput (const NTV2InputXptID inSignalInput) const |
virtual void | Reset (void) |
Resets me, erasing any/all existing connections. More... | |
virtual bool | ResetFromRegisters (const NTV2InputXptIDSet &inInputXpts, const NTV2RegisterReads &inRegReads) |
Resets me, erasing any/all existing connections, then rebuilding my connections from the given register values. More... | |
virtual bool | ResetFrom (const NTV2XptConnections &inConnections) |
Resets me, replacing any/all existing connections with the given connections. More... | |
virtual ULWord | GetNumberOfConnections (void) const |
virtual bool | IsEmpty (void) const |
virtual NTV2XptConnections | GetConnections (void) const |
virtual bool | GetRegisterWrites (NTV2RegisterWrites &outRegWrites) const |
Returns a sequence of NTV2RegInfo values that can be written to an NTV2 device using its WriteRegisters function. More... | |
virtual bool | Compare (const CNTV2SignalRouter &inRHS, NTV2XptConnections &outNew, NTV2XptConnections &outChanged, NTV2XptConnections &outMissing) const |
Compares me with another routing, and returns three connection mappings as a result of the comparison: those that are new, changed, and missing. More... | |
virtual bool | operator== (const CNTV2SignalRouter &inRHS) const |
virtual bool | operator!= (const CNTV2SignalRouter &inRHS) const |
virtual std::ostream & | Print (std::ostream &inOutStream, const bool inForRetailDisplay=false) const |
Prints me in a human-readable format to the given output stream. More... | |
virtual bool | PrintCode (std::string &outCode, const PrintCodeConfig &inConfig=PrintCodeConfig()) const |
Prints me as source code to the given output stream. More... | |
Static Public Member Functions | |
static bool | GetRouteROMInfoFromReg (const ULWord inROMRegNum, const ULWord inROMRegValue, NTV2InputXptID &outInputXpt, NTV2OutputXptIDSet &outOutputXpts, const bool inAppendOutputXpts=false) |
Answers with the NTV2InputXptID and NTV2OutputXptIDSet for the given ROM register value. More... | |
static bool | GetPossibleConnections (const NTV2RegReads &inROMRegisters, NTV2PossibleConnections &outConnections) |
Answers with the implemented crosspoint connections as obtained from the given ROM registers. More... | |
static bool | MakeRouteROMRegisters (NTV2RegReads &outROMRegisters) |
Prepares an initialized, zeroed NTV2RegReads that's prepared to read all ROM registers from a device. More... | |
static std::string | NTV2InputCrosspointIDToString (const NTV2InputXptID inInputXpt) |
Returns a string containing the most compact human-readable form for a given input crosspoint. More... | |
static std::string | NTV2OutputCrosspointIDToString (const NTV2OutputXptID inOutputXpt) |
Returns a string containing the most compact human-readable form for a given output crosspoint. More... | |
static NTV2InputXptID | StringToNTV2InputCrosspointID (const std::string &inStr) |
Returns a string containing the most compact human-readable form for a given input crosspoint. More... | |
static NTV2OutputXptID | StringToNTV2OutputCrosspointID (const std::string &inStr) |
Returns the output crosspoint that corresponds to the given string. More... | |
static bool | GetWidgetIDs (const NTV2DeviceID inDeviceID, NTV2WidgetIDSet &outWidgets) |
Returns the widget IDs supported by the given device. More... | |
static bool | GetWidgetsForOutput (const NTV2OutputXptID inOutputXpt, NTV2WidgetIDSet &outWidgetIDs) |
Returns the widgets that "own" the specified output crosspoint. More... | |
static bool | GetWidgetForOutput (const NTV2OutputXptID inOutputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND) |
Returns the widget that "owns" the specified output crosspoint. More... | |
static bool | GetWidgetsForInput (const NTV2InputXptID inInputXpt, NTV2WidgetIDSet &outWidgetIDs) |
Returns the widgets that "own" the specified input crosspoint. More... | |
static bool | GetWidgetForInput (const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND) |
Returns the widget that "owns" the specified input crosspoint. More... | |
static bool | GetWidgetInputs (const NTV2WidgetID inWidgetID, NTV2InputXptIDSet &outInputs) |
Returns the input crosspoints known to be "owned" by the given widget. More... | |
static bool | GetAllWidgetInputs (const NTV2DeviceID inDeviceID, NTV2InputXptIDSet &outInputs) |
Returns all known widget input crosspoints for the given device. More... | |
static bool | GetAllRoutingRegInfos (const NTV2InputXptIDSet &inInputs, NTV2RegisterWrites &outRegInfos) |
Returns all routing registers for the given set of input crosspoints. More... | |
static bool | GetWidgetOutputs (const NTV2WidgetID inWidgetID, NTV2OutputXptIDSet &outOutputs) |
Returns the output crosspoints known to be "owned" by the given widget. More... | |
static bool | GetConnectionsFromRegs (const NTV2InputXptIDSet &inInputXptIDs, const NTV2RegisterReads &inRegValues, NTV2XptConnections &outConnections) |
Converts a set of crosspoint registers into a set of crosspoint connections. More... | |
static bool | IsRGBOnlyInputXpt (const NTV2InputXptID inInputXpt) |
static bool | IsYUVOnlyInputXpt (const NTV2InputXptID inInputXpt) |
static bool | IsKeyInputXpt (const NTV2InputXptID inInputXpt) |
static NTV2Channel | WidgetIDToChannel (const NTV2WidgetID inWidgetID) |
static NTV2WidgetID | WidgetIDFromTypeAndChannel (const NTV2WidgetType inWidgetType, const NTV2Channel inChannel) |
static NTV2WidgetType | WidgetIDToType (const NTV2WidgetID inWidgetID) |
static bool | IsSDIWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsSDIInputWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsSDIOutputWidgetType (const NTV2WidgetType inWidgetType) |
static bool | Is3GSDIWidgetType (const NTV2WidgetType inWidgetType) |
static bool | Is12GSDIWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsDualLinkWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsDualLinkInWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsDualLinkOutWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsHDMIWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsHDMIInWidgetType (const NTV2WidgetType inWidgetType) |
static bool | IsHDMIOutWidgetType (const NTV2WidgetType inWidgetType) |
static bool | CompareConnections (const NTV2XptConnections &inLHS, const NTV2XptConnections &inRHS, NTV2XptConnections &outNew, NTV2XptConnections &outRemoved) |
Compares two sets of crosspoint connections. More... | |
static bool | CreateFromString (const std::string &inString, NTV2XptConnections &outConnections) |
Decodes a given string into a map of crosspoint connections. More... | |
static bool | CreateFromString (const std::string &inString, CNTV2SignalRouter &outRouter) |
Sets the router from the given string. More... | |
static bool | ToCodeString (std::string &outCode, const NTV2XptConnections &inConnections, const PrintCodeConfig &inConfig=PrintCodeConfig()) |
Converts the given map of crosspoint connections into source code. More... | |
static bool | IsInitialized (void) |
static bool | Initialize (void) |
Explicitly allocates and initializes the Routing Expert singleton. More... | |
static bool | Deinitialize (void) |
Explicitly deinitializes and deallocates the Routing Expert singleton. More... | |
This class is a collection of widget input-to-output connections that can be applied all-at-once to an NTV2 device. Call AddConnection to connect a widget input (specified by NTV2InputXptID) to a widget's output (specified by NTV2OutputXptID). Call the CNTV2Card::ApplySignalRoute function to apply this route to the device.
Definition at line 55 of file ntv2signalrouter.h.
|
virtual |
Adds a connection between a widget's signal input (sink) and another widget's signal output (source).
[in] | inSignalInput | Specifies the widget signal input (sink) as an NTV2InputXptID. |
[in] | inSignalOutput | Specifies the widget signal output (source) as an NTV2OutputXptID. If not specified, uses NTV2_XptBlack. |
Definition at line 62 of file ntv2signalrouter.cpp.
|
virtual |
Compares me with another routing, and returns three connection mappings as a result of the comparison: those that are new, changed, and missing.
[in] | inRHS | The CNTV2SignalRouter that I'm being compared with. |
[out] | outNew | Receives the new connections (those that I have, but RHS doesn't). |
[out] | outChanged | Receives the changed connections, where only the output crosspoint changed. The output crosspoint of these changed connections will be those from "inRHS" – not the new ones. |
[out] | outMissing | Receives the deleted connections (those that RHS has, but I don't). |
Definition at line 164 of file ntv2signalrouter.cpp.
|
static |
Compares two sets of crosspoint connections.
[in] | inLHS | Specifies the input crosspoints. |
[in] | inRHS | Specifies the crosspoint register values. |
[out] | outNew | Receives the new connections found in the RHS that aren't in the LHS. |
[out] | outRemoved | Receives the deleted connections not found in the RHS that are in the LHS. |
Definition at line 632 of file ntv2signalrouter.cpp.
|
static |
Sets the router from the given string.
[in] | inString | Specifies the string to be parsed. |
[out] | outRouter | The CNTV2SignalRouter to be cleared and set from what is parsed from the string. It will be empty if this function fails. |
|
static |
Decodes a given string into a map of crosspoint connections.
[in] | inString | Specifies the string to be parsed. It can contain the pnemonics that CNTV2SignalRouter::PrintCode generates, or a simple C++ code snippet that contains one or more "device.Connect(...)" calls. |
[out] | outConnections | Receives the connections from what is successfully parsed from the string. It will be empty if this function fails. |
|
static |
Explicitly deinitializes and deallocates the Routing Expert singleton.
Definition at line 333 of file ntv2signalrouter.cpp.
|
static |
Returns all routing registers for the given set of input crosspoints.
[in] | inInputs | Specifies the input crosspoints. |
[out] | outRegInfos | Receives the NTV2RegInfo collection (empty upon failure). |
Definition at line 473 of file ntv2signalrouter.cpp.
|
static |
Returns all known widget input crosspoints for the given device.
[in] | inDeviceID | Specifies the NTV2DeviceID of the device of interest. |
[out] | outInputs | Receives the NTV2InputXptIDSet (or empty upon failure). |
Definition at line 456 of file ntv2signalrouter.cpp.
|
virtual |
[in] | inSignalInput | Specifies the widget signal input (sink) of interest. |
Definition at line 76 of file ntv2signalrouter.cpp.
|
inlinevirtual |
Definition at line 142 of file ntv2signalrouter.h.
|
static |
Converts a set of crosspoint registers into a set of crosspoint connections.
[in] | inInputXptIDs | Specifies the input crosspoints. |
[in] | inRegValues | Specifies the crosspoint register values. |
[out] | outConnections | Receives the connections found in the given register values. |
Definition at line 605 of file ntv2signalrouter.cpp.
|
inlinevirtual |
Definition at line 131 of file ntv2signalrouter.h.
|
static |
Answers with the implemented crosspoint connections as obtained from the given ROM registers.
[in] | inROMRegisters | The ROM register numbers and values. |
[out] | outConnections | Receives the legal implemented connections/routes. |
Definition at line 1064 of file ntv2signalrouter.cpp.
|
virtual |
Returns a sequence of NTV2RegInfo values that can be written to an NTV2 device using its WriteRegisters function.
[out] | outRegWrites | Receives a sequence of NTV2ReadWriteRegisterSingle values. |
Definition at line 132 of file ntv2signalrouter.cpp.
|
static |
Answers with the NTV2InputXptID and NTV2OutputXptIDSet for the given ROM register value.
[in] | inROMRegNum | Specifies the ROM register number. |
[in] | inROMRegValue | Specifies the ROM register value. |
[out] | outInputXpt | Receives the input crosspoint associated with the ROM register. |
[out] | outOutputXpts | Receives the valid (implemented) output crosspoint routes. |
[in] | inAppendOutputXpts | If true, appends output crosspoints to the output set; otherwise clears the output crosspoint set (the default). |
Definition at line 1029 of file ntv2signalrouter.cpp.
|
static |
Returns the widget that "owns" the specified input crosspoint.
[in] | inInputXpt | Specifies the input crosspoint of interest. |
[out] | outWidgetID | Receives the NTV2WidgetID of the widget that "owns" the input crosspoint (or NTV2_WIDGET_INVALID upon failure). |
[in] | inDeviceID | Optionally specifies a device ID to resolve any ambiguity if more than one NTV2WidgetID is associated with the given NTV2InputXptID. Defaults to DEVICE_ID_NOTFOUND, which returns the first match. |
Definition at line 398 of file ntv2signalrouter.cpp.
|
static |
Returns the widget that "owns" the specified output crosspoint.
[in] | inOutputXpt | Specifies the output crosspoint of interest. |
[out] | outWidgetID | Receives the NTV2WidgetID of the widget that "owns" the output crosspoint (or NTV2_WIDGET_INVALID upon failure). |
[in] | inDeviceID | Optionally specifies a device ID to resolve any ambiguity if more than one NTV2WidgetID is associated with the given NTV2OutputXptID. Defaults to DEVICE_ID_NOTFOUND. |
Definition at line 426 of file ntv2signalrouter.cpp.
|
static |
Returns the widget IDs supported by the given device.
[in] | inDeviceID | Specifies the NTV2DeviceID of the NTV2 device of interest. |
[out] | outWidgets | Receives the NTV2WidgetIDSet of widgets that are supported by the given device. |
Definition at line 379 of file ntv2signalrouter.cpp.
|
static |
Returns the input crosspoints known to be "owned" by the given widget.
[in] | inWidgetID | Specifies the NTV2WidgetID of the widget of interest. |
[out] | outInputs | Receives the set of NTV2InputXptIDSet that are "owned" by the widget (or empty upon failure). |
Definition at line 448 of file ntv2signalrouter.cpp.
|
static |
Returns the output crosspoints known to be "owned" by the given widget.
[in] | inWidgetID | Specifies the NTV2WidgetID of the widget of interest. |
[out] | outOutputs | Receives the set of NTV2OutputXptIDSet that are "owned" by the widget (or empty upon failure). |
Definition at line 490 of file ntv2signalrouter.cpp.
|
static |
Returns the widgets that "own" the specified input crosspoint.
[in] | inInputXpt | Specifies the input crosspoint of interest. |
[out] | outWidgetIDs | Receives the NTV2WidgetIDSet containing the widgets that "own" the input crosspoint (or an empty set upon failure). |
Definition at line 389 of file ntv2signalrouter.cpp.
|
static |
Returns the widgets that "own" the specified output crosspoint.
[in] | inOutputXpt | Specifies the output crosspoint of interest. |
[out] | outWidgetIDs | Receives the NTV2WidgetIDSet containing the widgets that "own" the output crosspoint (or an empty set upon failure). |
Definition at line 417 of file ntv2signalrouter.cpp.
|
virtual |
Answers true if I contain a connection between the specified input (signal sink) and output (signal source).
[in] | inSignalInput | Specifies the widget signal input (sink) as an NTV2InputXptID. |
[in] | inSignalOutput | Specifies the widget signal output (source) as an NTV2OutputXptID. |
Definition at line 83 of file ntv2signalrouter.cpp.
|
virtual |
Answers true if I contain a connection that involves the given input (signal sink).
[in] | inSignalInput | Specifies the widget signal input (sink) of interest as an NTV2InputXptID. |
Definition at line 70 of file ntv2signalrouter.cpp.
|
static |
Explicitly allocates and initializes the Routing Expert singleton.
Definition at line 325 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 563 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 557 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 575 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 581 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 569 of file ntv2signalrouter.cpp.
|
inlinevirtual |
Definition at line 137 of file ntv2signalrouter.h.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 593 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 599 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 587 of file ntv2signalrouter.cpp.
|
static |
Definition at line 339 of file ntv2signalrouter.cpp.
|
static |
[in] | inInputXpt | Specifies the input crosspoint ID of interest. |
Definition at line 509 of file ntv2signalrouter.cpp.
|
static |
[in] | inInputXpt | Specifies the input crosspoint ID of interest. |
Definition at line 497 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 545 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 551 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
Definition at line 539 of file ntv2signalrouter.cpp.
|
static |
[in] | inInputXpt | Specifies the input crosspoint ID of interest. |
Definition at line 503 of file ntv2signalrouter.cpp.
|
static |
Prepares an initialized, zeroed NTV2RegReads that's prepared to read all ROM registers from a device.
[out] | outROMRegisters | Receives the prepared NTV2RegReads. |
Definition at line 1081 of file ntv2signalrouter.cpp.
|
static |
Returns a string containing the most compact human-readable form for a given input crosspoint.
[in] | inInputXpt | Specifies the NTV2InputXptID of interest. |
Definition at line 347 of file ntv2signalrouter.cpp.
|
static |
Returns a string containing the most compact human-readable form for a given output crosspoint.
[in] | inOutputXpt | Specifies the NTV2OutputXptID of interest. |
Definition at line 355 of file ntv2signalrouter.cpp.
|
inlinevirtual |
[in] | inRHS | The CNTV2SignalRouter that I'll be compared with. |
Definition at line 180 of file ntv2signalrouter.h.
|
inlinevirtual |
[in] | inRHS | The CNTV2SignalRouter that I'll be compared with. |
Definition at line 173 of file ntv2signalrouter.h.
|
virtual |
Prints me in a human-readable format to the given output stream.
inOutStream | Specifies the output stream that is to receive the human-readable data. | |
[in] | inForRetailDisplay | Specify true to use human-readable names in the display; otherwise false to use names found in the SDK. |
Definition at line 200 of file ntv2signalrouter.cpp.
|
virtual |
Prints me as source code to the given output stream.
[out] | outCode | Receives the generated source code. |
[in] | inConfig | Specifies how the source code will be generated. If unspecified, uses the PrintCodeConfig's default settings. |
Definition at line 219 of file ntv2signalrouter.cpp.
|
virtual |
Removes the connection between the specified input (signal sink) and output (signal source).
[in] | inSignalInput | Specifies the widget signal input (sink) as an NTV2InputXptID. |
[in] | inSignalOutput | Specifies the widget signal output (source) as an NTV2OutputXptID. |
Definition at line 92 of file ntv2signalrouter.cpp.
|
inlinevirtual |
Resets me, erasing any/all existing connections.
Definition at line 108 of file ntv2signalrouter.h.
|
inlinevirtual |
Resets me, replacing any/all existing connections with the given connections.
[in] | inConnections | Specifies the new routing connections. |
Definition at line 125 of file ntv2signalrouter.h.
|
virtual |
Resets me, erasing any/all existing connections, then rebuilding my connections from the given register values.
[in] | inInputXpts | Specifies the input crosspoints of interest (perhaps obtained from CNTV2SignalRouter::GetAllWidgetInputs). |
[in] | inRegReads | Specifies the routing registers/values (perhaps obtained from CNTV2Card::ReadRegisters). |
Definition at line 108 of file ntv2signalrouter.cpp.
|
static |
Returns a string containing the most compact human-readable form for a given input crosspoint.
[in] | inStr | Specifies the string to convert into an NTV2InputXptID. |
Definition at line 363 of file ntv2signalrouter.cpp.
|
static |
Returns the output crosspoint that corresponds to the given string.
[in] | inStr | Specifies the string to convert into an NTV2OutputXptID. |
Definition at line 371 of file ntv2signalrouter.cpp.
|
static |
Converts the given map of crosspoint connections into source code.
[out] | outCode | Receives the generated source code. |
[in] | inConnections | Receives the connections from what is successfully parsed from the string. It will be empty if this function fails. |
[in] | inConfig | Specifies how the source code will be generated. If unspecified, uses the PrintCodeConfig's default settings. |
Definition at line 226 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetType | Specifies the widget type of interest. |
[in] | inChannel | Specifies the channel of interest. |
Definition at line 523 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetID | Specifies the widget ID of interest. |
Definition at line 515 of file ntv2signalrouter.cpp.
|
static |
[in] | inWidgetID | Specifies the widget ID of interest. |
Definition at line 531 of file ntv2signalrouter.cpp.