|
AJA NTV2 SDK
17.0.1.1246
NTV2 SDK 17.0.1.1246
|
Go to the documentation of this file.
23 #define HEX16(__x__) "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec
24 #define INSTP(_p_) HEX16(uint64_t(_p_))
25 #define SRiFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
26 #define SRiWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
27 #define SRiNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
28 #define SRiINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
29 #define SRiDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
30 #define SRFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
31 #define SRWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
32 #define SRNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
33 #define SRINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
34 #define SRDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
38 string::size_type pos (0), lastPos (0);
42 pos = inString.find_first_of (inDelimiters, lastPos);
43 if (pos == string::npos)
45 pos = inString.length ();
46 if (pos != lastPos || !inTrimEmpty)
47 outTokens.push_back (NTV2StringList::value_type (inString.data () + lastPos, NTV2StringList::size_type(pos - lastPos)));
52 if (pos != lastPos || !inTrimEmpty)
53 outTokens.push_back (NTV2StringList::value_type (inString.data () + lastPos, NTV2StringList::size_type(pos - lastPos)));
72 return mConnections.find (inSignalInput) != mConnections.end ();
86 if (iter == mConnections.end())
88 return iter->second == inSignalOutput;
94 NTV2XptConnectionsIter iter (mConnections.find (inSignalInput));
95 if (iter == mConnections.end())
97 if (iter->second != inSignalOutput)
99 mConnections.erase (iter);
113 uint32_t regNum(0), maskNdx(0);
116 if (iter == inRegReads.end())
134 outRegWrites.clear ();
140 uint32_t regNum(0), ndx(999);
144 outRegWrites.clear();
151 outRegWrites.push_back (regInfo);
153 catch (
const bad_alloc &)
155 outRegWrites.clear ();
167 outNew.clear(); outChanged.clear(); outMissing.clear();
179 outNew.insert(connection);
190 if (pFind == mConnections.end())
191 outMissing.insert(connectionRHS);
192 else if (pFind->second != outputXpt)
193 outChanged.insert(connectionRHS);
196 return outNew.empty() && outChanged.empty() && outMissing.empty();
202 if (inForRetailDisplay)
204 inOutStream << mConnections.size() <<
" routing entries:" << endl;
221 return ToCodeString(outCode, mConnections, inConfig);
236 oss << ((inConnections.size () == 1) ?
"entry:" :
"entries:");
253 const string funcName (inConfig.
mUseRouter ?
"AddConnection" :
"Connect");
260 oss << variableNameText <<
"." << functionCallText <<
" (" << inXptStr <<
", " << outXptStr <<
");";
266 if (pNew != inConfig.
mNew.end() && pNew->second == iter->second)
268 else if (pChanged != inConfig.
mChanged.end() && pChanged->second != iter->second)
277 if (inConnections.find(pGone->first) == inConnections.end())
280 oss << inConfig.
mPreCommentText << varName <<
"." <<
"RemoveConnection" <<
" ("
287 oss << inConfig.
mPreCommentText << varName <<
"." <<
"Disconnect" <<
" ("
301 : mShowComments (
true),
302 mShowDeclarations (
true),
304 mPreCommentText (
"// "),
309 mPostVariableText (),
313 mPostFunctionText (),
314 mDeviceVarName (
"device"),
315 mRouterVarName (
"router"),
316 mLineBreakText (
"\n"),
317 mFieldBreakText (
"\t"),
329 return pExpert ?
true :
false;
343 return pExpert ?
true :
false;
351 return pExpert ? pExpert->InputXptToString(inInputXpt) : string();
359 return pExpert ? pExpert->OutputXptToString(inOutputXpt) : string();
384 outWidgets.insert(widgetID);
385 return !outWidgets.empty();
391 outWidgetIDs.clear();
394 return pExpert ? pExpert->GetWidgetsForInput(inInputXpt, outWidgetIDs) :
false;
405 outWidgetID = *(wgts.begin());
419 outWidgetIDs.clear();
422 return pExpert ? pExpert->GetWidgetsForOutput(inOutputXpt, outWidgetIDs) :
false;
436 outWidgetID = *(wgts.begin());
452 return pExpert ? pExpert->GetWidgetInputs(inWidgetID, outInputs) :
false;
467 outInputs.insert(inputs.begin(), inputs.end());
477 set<uint32_t> regNums;
478 uint32_t regNum(0), maskNdx(0);
481 if (regNums.find(regNum) == regNums.end())
482 regNums.insert(regNum);
483 for (set<uint32_t>::const_iterator iter(regNums.begin()); iter != regNums.end(); ++iter)
494 return pExpert ? pExpert->GetWidgetOutputs(inWidgetID, outOutputs) :
false;
500 return pExpert ? pExpert->IsRGBOnlyInputXpt(inInputXpt) :
false;
506 return pExpert ? pExpert->IsYUVOnlyInputXpt(inInputXpt) :
false;
512 return pExpert ? pExpert->IsKeyInputXpt(inInputXpt) :
false;
519 return pExpert->WidgetIDToChannel(inWidgetID);
527 return pExpert->WidgetIDFromTypeAndChannel(inWidgetType, inChannel);
535 return pExpert->WidgetIDToType(inWidgetID);
542 return pExpert ? pExpert->IsSDIWidget(inWidgetType) :
false;
548 return pExpert ? pExpert->IsSDIInWidget(inWidgetType) :
false;
554 return pExpert ? pExpert->IsSDIOutWidget(inWidgetType) :
false;
560 return pExpert ? pExpert->Is3GSDIWidget(inWidgetType) :
false;
566 return pExpert ? pExpert->Is12GSDIWidget(inWidgetType) :
false;
572 return pExpert ? pExpert->IsDualLinkWidget(inWidgetType) :
false;
578 return pExpert ? pExpert->IsDualLinkInWidget(inWidgetType) :
false;
584 return pExpert ? pExpert->IsDualLinkOutWidget(inWidgetType) :
false;
590 return pExpert ? pExpert->IsHDMIWidget(inWidgetType) :
false;
596 return pExpert ? pExpert->IsHDMIInWidget(inWidgetType) :
false;
602 return pExpert ? pExpert->IsHDMIOutWidget(inWidgetType) :
false;
607 outConnections.clear();
610 uint32_t regNum(0), maskNdx(0);
613 if (iter == inRegValues.end())
616 if (iter->registerNumber != regNum)
618 if (iter->registerMask != 0xFFFFFFFF)
620 if (iter->registerShift)
637 outNew.clear(); outMissing.clear();
645 if (RHSit == inRHS.end())
646 outMissing.insert(LHSconnection);
647 else if (RHSit->second == outputXpt)
651 outMissing.insert(LHSconnection);
652 outNew.insert(*RHSit);
663 if (LHSit == inLHS.end())
664 outNew.insert(connectionRHS);
665 else if (LHSit->second != outputXpt)
667 NTV2_ASSERT(outMissing.find(LHSit->first) != outMissing.end() && outNew.find(LHSit->first) != outNew.end());
670 return outNew.empty() && outMissing.empty();
682 outConnections.clear();
683 if (
Tokenize(stringToParse, lines,
"\n\r",
true).empty())
685 SRWARN(
"No lines resulted from input string '" << stringToParse <<
"'");
689 if (lines.front().find(
"<==") != string::npos)
695 size_t pos (pEachLine->find(
"<=="));
696 if (pos == string::npos)
697 {
SRFAIL(
"Parse error: '<==' missing in line '" << *pEachLine <<
"'");
return false;}
698 string leftPiece (pEachLine->substr(0, pos));
aja::strip(leftPiece);
699 string rightPiece (pEachLine->substr(pos + 3, pEachLine->length()));
aja::strip(rightPiece);
704 {
SRFAIL(
"Parse error: invalid input crosspoint from '" << leftPiece <<
"' from line '" << *pEachLine <<
"'");
return false;}
705 if (outConnections.find(inputXpt) != outConnections.end())
711 else if (lines.front().find(
"connect(") != string::npos)
719 size_t openParenPos(line.find(
"(")), closedParenPos(line.find(
");"));
720 if (openParenPos == string::npos || closedParenPos == string::npos || openParenPos > closedParenPos)
721 {
SRFAIL(
"Parse error: '(' or ');' missing in line '" << line <<
"'");
return false;}
722 string remainder(line.substr(openParenPos+1, closedParenPos - openParenPos - 1));
725 if (xptNames.size() < 2 || xptNames.size() > 2)
726 {
SRFAIL(
"Parse error: " <<
DEC(xptNames.size()) <<
" 'Connect' parameter(s) found, expected 2");
return false;}
731 {
SRFAIL(
"Parse error: invalid input crosspoint from '" << xptNames.at(0) <<
"' from line '" << *pLine <<
"'");
return false;}
733 {
SRFAIL(
"Parse error: invalid output crosspoint from '" << xptNames.at(1) <<
"' from line '" << *pLine <<
"'");
return false;}
734 if (outConnections.find(inputXpt) != outConnections.end())
741 {
SRFAIL(
"Unable to parse '" << lines.front() <<
"' -- expected '.contains(' or '<=='");
return false;}
742 SRINFO(
DEC(outConnections.size()) <<
" connection(s) created from input string");
769 return inIsBInput ? gFrameBufferBInputs [inChannel] : gFrameBufferInputs [inChannel];
782 return inIsKeyInput ? gCSCKeyInput[inChannel] : gCSCVideoInput[inChannel];
803 return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
813 return gDLOutInputs[inChannel];
830 return gCSCKeyOutputs[inChannel];
832 return inIsRGB ? gCSCRGBOutputs[inChannel] : gCSCYUVOutputs[inChannel];
857 return inIsRGB ? gFrameBufferRGB425Outputs[inChannel] : gFrameBufferYUV425Outputs[inChannel];
859 return inIsRGB ? gFrameBufferRGBOutputs[inChannel] : gFrameBufferYUVOutputs[inChannel];
881 if (inHDMI_Quadrant < 4)
882 return inIsHDMI_RGB ? gHDMIInputRGBOutputs [channel][inHDMI_Quadrant] : gHDMIInputOutputs [channel][inHDMI_Quadrant];
900 return inIsDS2 ? gSDIInputDS2Outputs[inChannel] : gSDIInputOutputs[inChannel];
912 return inIsLinkB ? gDLOutDS2Outputs[inChannel] : gDLOutOutputs[inChannel];
922 return gDLInOutputs[inChannel];
949 return inIsDS2 ? gSDIOutputDS2Inputs [inChannel] : gSDIOutputInputs [inChannel];
962 return inIsKey ? gMixerKeyYUVOutputs[inChannel] : gMixerVidYUVOutputs[inChannel];
975 return inIsKey ? gMixerFGKeyInputs[inChannel] : gMixerFGVideoInputs[inChannel];
988 return inIsKey ? gMixerBGKeyInputs[inChannel] : gMixerBGVideoInputs[inChannel];
1000 return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
1018 return inIsRGB ? gMuxBRGBOutputs[inChannel] : gMuxBYUVOutputs[inChannel];
1020 return inIsRGB ? gMuxARGBOutputs[inChannel] : gMuxAYUVOutputs[inChannel];
1034 if (!inAppendOutputXpts)
1035 outOutputXpts.clear();
1042 const ULWord regOffset(inRegNum - firstROMReg);
1043 const ULWord bitOffset((regOffset % 4) * 32);
1050 for (
UWord bitNdx(0); bitNdx < 32; bitNdx++)
1051 if (inRegVal &
ULWord(1UL << bitNdx))
1055 if (pExpert && pExpert->IsOutputXptValid(yuvOutputXpt))
1056 outOutputXpts.insert(yuvOutputXpt);
1057 if (pExpert && pExpert->IsOutputXptValid(rgbOutputXpt))
1058 outOutputXpts.insert(rgbOutputXpt);
1066 outConnections.clear();
1077 return !outConnections.empty();
1094 inObj.
Print (inOutStream);
1102 while (iter != inObj.end())
1106 if (iter == inObj.end())
1108 inOutStream <<
", ";
1116 while (iter != inObj.end())
1120 if (iter == inObj.end())
1122 inOutStream <<
", ";
1141 if (++iter != inObj.end ())
1152 if (++it != inObj.end())
1153 inOutStream <<
", ";
@ NTV2_XptFrameBuffer6YUV
@ NTV2_XptFrameBuffer8_DS2RGB
static bool GetCrosspointSelectGroupRegisterInfo(const NTV2InputCrosspointID inInputXpt, uint32_t &outXptRegNum, uint32_t &outMaskIndex)
Answers with the crosspoint select register and mask information for a given widget input.
@ NTV2_XptFrameBuffer4YUV
@ NTV2_XptDualLinkIn3DSInput
@ NTV2_XptMixer4BGKeyInput
@ NTV2_XptMixer3FGVidInput
bool mShowComments
If true, show comments in the generated code.
NTV2RegReadsConstIter FindFirstMatchingRegisterNumber(const uint32_t inRegNum, const NTV2RegReads &inRegInfos)
Returns a const iterator to the first entry in the NTV2RegInfo collection with a matching register nu...
static std::string NTV2OutputCrosspointIDToString(const NTV2OutputXptID inOutputXpt)
Returns a string containing the most compact human-readable form for a given output crosspoint.
static NTV2Channel WidgetIDToChannel(const NTV2WidgetID inWidgetID)
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
@ NTV2_XptDualLinkOut7Input
@ NTV2_XptDuallinkOut8DS2
NTV2InputXptID GetFrameBufferInputXptFromChannel(const NTV2Channel inChannel, const bool inIsBInput)
NTV2RegWritesConstIter NTV2RegReadsConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterReads instance.
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inChannel, const bool inIsDS2)
@ NTV2_XptFrameBuffer1_DS2YUV
@ NTV2_XptSDIOut4InputDS2
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2, const UWord inHDMI_Quadrant)
NTV2OutputDestination
Identifies a specific video output destination.
NTV2InputXptID GetLUTInputXptFromChannel(const NTV2Channel inLUT)
std::string mFieldBreakText
Text to use for field breaks.
NTV2XptConnections mChanged
Optional, to show changed connections.
std::string mLineBreakText
Text to use for line breaks.
@ NTV2_XptDualLinkIn2DSInput
@ NTV2_XptFrameBuffer2RGB
std::set< NTV2InputXptID > NTV2InputXptIDSet
A collection of distinct NTV2InputXptID values.
@ NTV2_XptMixer2BGKeyInput
@ kRegInvalidValidXptROMRegister
@ NTV2_XptMixer2FGKeyInput
@ NTV2_XptSDIOut3InputDS2
std::string & strip(std::string &str, const std::string &ws)
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
NTV2XptConnections::const_iterator NTV2XptConnectionsConstIter
NTV2Channel
These enum values are mostly used to identify a specific Frame Store. They're also commonly used to i...
@ NTV2_XptDualLinkIn1Input
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
static bool IsSDIInputWidgetType(const NTV2WidgetType inWidgetType)
@ NTV2_XptSDIOut5InputDS2
void split(const std::string &str, const char delim, std::vector< std::string > &elems)
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2, const bool inIsHDMI_RGB, const UWord inHDMI_Quadrant)
#define NTV2_ASSERT(_expr_)
@ NTV2_XptFrameBuffer3_DS2YUV
@ NTV2_FIRST_INPUT_CROSSPOINT
static bool GetConnectionsFromRegs(const NTV2InputXptIDSet &inInputXptIDs, const NTV2RegisterReads &inRegValues, NTV2XptConnections &outConnections)
Converts a set of crosspoint registers into a set of crosspoint connections.
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 s...
static bool GetWidgetOutputs(const NTV2WidgetID inWidgetID, NTV2OutputXptIDSet &outOutputs)
Returns the output crosspoints known to be "owned" by the given widget.
@ NTV2_XptMixer3BGKeyInput
static bool CompareConnections(const NTV2XptConnections &inLHS, const NTV2XptConnections &inRHS, NTV2XptConnections &outNew, NTV2XptConnections &outRemoved)
Compares two sets of crosspoint connections.
@ NTV2_XptDualLinkIn8Input
@ NTV2_XptDualLinkIn5DSInput
@ NTV2_XptDuallinkOut7DS2
@ NTV2_XptFrameBuffer8YUV
@ NTV2_XptFrameBuffer4_DS2YUV
@ NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3DS2Input
bool mUseRouter
If true, use calls to CNTV2DeviceRouter instead of CNTV2Card.
std::string mPreFunctionText
Function name prefix text.
std::string mPostClassText
Class postfix text.
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
NTV2OutputXptID GetFrameBufferOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsRGB, const bool inIs425)
virtual bool GetRegisterWrites(NTV2RegisterWrites &outRegWrites) const
Returns a sequence of NTV2RegInfo values that can be written to an NTV2 device using its WriteRegiste...
std::string mRouterVarName
Name to use for CNTV2DeviceRouter variable.
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
@ NTV2_XptFrameBuffer7_DS2RGB
@ NTV2_XptMixer3FGKeyInput
static bool IsInitialized(void)
@ NTV2_XptFrameBuffer1RGB
std::string mPostVariableText
Variable postfix text.
@ NTV2_XptDuallinkOut6DS2
@ NTV2_XptSDIOut2InputDS2
@ NTV2_XptFrameBuffer4Input
static bool Initialize(void)
Explicitly allocates and initializes the Routing Expert singleton.
@ NTV2_XptSDIOut8InputDS2
enum NTV2InputCrosspointID NTV2InputXptID
@ NTV2_XptFrameBuffer3Input
@ NTV2_OUTPUT_CROSSPOINT_INVALID
@ NTV2_XptDualLinkOut5Input
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inChannel)
static bool GetAllRoutingRegInfos(const NTV2InputXptIDSet &inInputs, NTV2RegisterWrites &outRegInfos)
Returns all routing registers for the given set of input crosspoints.
@ NTV2_XptFrameBuffer6_DS2RGB
@ NTV2_XptMixer4BGVidInput
static bool Is12GSDIWidgetType(const NTV2WidgetType inWidgetType)
NTV2RoutingEntry & operator=(const NTV2RegInfo &inRHS)
Assigns an NTV2RegInfo to me.
static bool IsHDMIOutWidgetType(const NTV2WidgetType inWidgetType)
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsDS2)
@ NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer7DS2Input
static bool DisposeInstance(void)
std::string mPostCommentText
Comment postfix text.
@ NTV2_XptDualLinkIn7DSInput
@ NTV2_XptFrameBuffer6Input
@ NTV2_XptDualLinkIn3Input
virtual bool HasInput(const NTV2InputXptID inSignalInput) const
Answers true if I contain a connection that involves the given input (signal sink).
Declares CNTV2SignalRouter class.
static std::string NTV2InputCrosspointIDToString(const NTV2InputXptID inInputXpt)
Returns a string containing the most compact human-readable form for a given input crosspoint.
@ NTV2_XptFrameBuffer2_DS2YUV
@ NTV2_XptMixer4FGVidInput
@ NTV2_XptDualLinkIn7Input
static bool ToCodeString(std::string &outCode, const NTV2XptConnections &inConnections, const PrintCodeConfig &inConfig=PrintCodeConfig())
Converts the given map of crosspoint connections into source code.
NTV2WidgetIDSet::const_iterator NTV2WidgetIDSetConstIter
An iterator for iterating over a read-only NTV2WidgetIDSet.
@ NTV2_XptFrameBuffer4_DS2RGB
NTV2InputXptIDSet::const_iterator NTV2InputXptIDSetConstIter
A const iterator for iterating over an NTV2InputXptIDSet.
@ NTV2_XptFrameBuffer1_DS2RGB
static bool IsSDIOutputWidgetType(const NTV2WidgetType inWidgetType)
Declares RoutingExpert class used by CNTV2SignalRouter.
std::string & lower(std::string &str)
virtual NTV2OutputXptID GetConnectedOutput(const NTV2InputXptID inSignalInput) const
@ NTV2_XptFrameBuffer2_DS2RGB
@ NTV2_XptFrameBuffer7Input
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
@ NTV2_XptFrameBuffer1Input
virtual NTV2XptConnections GetConnections(void) const
@ NTV2_XptDualLinkIn2Input
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
@ NTV2_XptFrameBuffer7_DS2YUV
std::string mPreCommentText
Comment prefix text.
std::string & replace(std::string &str, const std::string &from, const std::string &to)
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.
static NTV2StringList & Tokenize(const string &inString, NTV2StringList &outTokens, const string &inDelimiters=" ", bool inTrimEmpty=false)
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
static bool CreateFromString(const std::string &inString, NTV2XptConnections &outConnections)
Decodes a given string into a map of crosspoint connections.
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
@ NTV2_XptMixer1FGKeyInput
static bool IsRGBOnlyInputXpt(const NTV2InputXptID inInputXpt)
@ NTV2_XptFrameBuffer1YUV
@ NTV2_XptDuallinkOut2DS2
@ NTV2_XptDuallinkOut1DS2
@ NTV2_XptDuallinkOut4DS2
std::string mPostFunctionText
Function name postfix text.
NTV2OutputXptID GetLUTOutputXptFromChannel(const NTV2Channel inLUT)
@ NTV2_XptFrameBuffer8_DS2YUV
bool mShowDeclarations
If true, show variable declarations in the generated code.
static bool Is3GSDIWidgetType(const NTV2WidgetType inWidgetType)
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
static const ULWord sSignalRouterRegMasks[]
NTV2XptConnections mNew
Optional, to show new connections.
std::string mPostXptText
Crosspoint variable postfix text.
std::string NTV2InputCrosspointIDToString(const NTV2InputCrosspointID inValue, const bool inForRetailDisplay=false)
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
NTV2RegWrites NTV2RegisterReads
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB, const bool inIsRGB)
@ NTV2_XptFrameBuffer6_DS2YUV
@ NTV2_XptDualLinkOut4Input
Declares numerous NTV2 utility functions.
@ NTV2_XptFrameBuffer8DS2Input
@ NTV2_XptMixer2FGVidInput
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
static NTV2InputXptID StringToNTV2InputCrosspointID(const std::string &inStr)
Returns a string containing the most compact human-readable form for a given input crosspoint.
@ NTV2_XptFrameBuffer5_DS2RGB
std::set< NTV2OutputXptID > NTV2OutputXptIDSet
A collection of distinct NTV2OutputXptID values.
std::string mDeviceVarName
Name to use for CNTV2Card variable.
@ NTV2_XptSDIOut1InputDS2
@ NTV2_XptFrameBuffer1DS2Input
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
std::string mPreClassText
Class prefix text.
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
This class is a collection of widget input-to-output connections that can be applied all-at-once to a...
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
std::vector< std::string > NTV2StringList
static RoutingExpertPtr GetInstance(const bool inCreateIfNecessary=true)
struct NTV2RegInfo NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
@ NTV2_INPUT_CROSSPOINT_INVALID
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
@ NTV2_XptFrameBuffer4DS2Input
NTV2InputXptID GetMixerFGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
#define NTV2_IS_VALID_CHANNEL(__x__)
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...
static bool GetWidgetIDs(const NTV2DeviceID inDeviceID, NTV2WidgetIDSet &outWidgets)
Returns the widget IDs supported by the given device.
static bool GetAllWidgetInputs(const NTV2DeviceID inDeviceID, NTV2InputXptIDSet &outInputs)
Returns all known widget input crosspoints for the given device.
static bool IsDualLinkOutWidgetType(const NTV2WidgetType inWidgetType)
static bool IsHDMIWidgetType(const NTV2WidgetType inWidgetType)
NTV2InputSource
Identifies a specific video input source.
Declares NTV2DeviceCanDo... and NTV2DeviceGetNum... functions. This module is included at compile tim...
virtual bool ResetFromRegisters(const NTV2InputXptIDSet &inInputXpts, const NTV2RegisterReads &inRegReads)
Resets me, erasing any/all existing connections, then rebuilding my connections from the given regist...
@ NTV2_XptDualLinkIn4Input
@ NTV2_XptFrameBuffer8RGB
@ NTV2_XptMixer1FGVidInput
static bool GetWidgetForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified output crosspoint.
@ NTV2_XptFrameBuffer8Input
@ NTV2_XptMixer4FGKeyInput
static bool GetWidgetsForInput(const NTV2InputXptID inInputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified input crosspoint.
NTV2OutputXptID GetMixerOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey)
@ NTV2_XptFrameBuffer6RGB
@ NTV2_XptDualLinkIn6DSInput
@ NTV2_XptFrameBuffer2Input
@ NTV2_XptDualLinkIn8DSInput
@ NTV2_XptFrameBuffer4RGB
NTV2OutputXptIDSet::const_iterator NTV2OutputXptIDSetConstIter
A const iterator for iterating over an NTV2OutputXptIDSet.
Private include file for all ajabase sources.
@ NTV2_XptMixer1BGVidInput
std::vector< NTV2RegInfo > NTV2RegisterWrites
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2SignalConnection
@ NTV2_XptMixer3BGVidInput
static AJALock gRoutingExpertLock
static bool IsDualLinkWidgetType(const NTV2WidgetType inWidgetType)
NTV2InputXptID GetMixerBGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
virtual std::ostream & Print(std::ostream &inOutStream, const bool inForRetailDisplay=false) const
Prints me in a human-readable format to the given output stream.
@ NTV2_XptDualLinkOut3Input
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
@ NTV2_XptFrameBuffer2YUV
static bool IsDualLinkInWidgetType(const NTV2WidgetType inWidgetType)
static NTV2WidgetType WidgetIDToType(const NTV2WidgetID inWidgetID)
@ NTV2_XptFrameBuffer5RGB
@ NTV2_XptFrameBuffer5DS2Input
@ kRegFirstValidXptROMRegister
@ NTV2_XptFrameBuffer5_DS2YUV
std::string mPreXptText
Crosspoint variable prefix text.
virtual bool PrintCode(std::string &outCode, const PrintCodeConfig &inConfig=PrintCodeConfig()) const
Prints me as source code to the given output stream.
@ NTV2_XptFrameBuffer7YUV
@ NTV2_XptDualLinkIn5Input
@ NTV2_XptMixer2BGVidInput
static NTV2OutputXptID StringToNTV2OutputCrosspointID(const std::string &inStr)
Returns the output crosspoint that corresponds to the given string.
static const ULWord sSignalRouterRegShifts[]
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey, const bool inIsRGB)
@ NTV2_XptDuallinkOut5DS2
@ NTV2_XptDualLinkIn6Input
static bool GetWidgetInputs(const NTV2WidgetID inWidgetID, NTV2InputXptIDSet &outInputs)
Returns the input crosspoints known to be "owned" by the given widget.
std::multimap< NTV2InputXptID, NTV2OutputXptID > NTV2PossibleConnections
A map of zero or more one-to-many possible NTV2InputXptID to NTV2OutputXptID connections.
@ NTV2_XptDualLinkOut6Input
@ NTV2_XptDualLinkOut2Input
NTV2InputXptID GetDLOutInputXptFromChannel(const NTV2Channel inChannel)
static bool GetWidgetForInput(const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified input crosspoint.
@ NTV2_XptDualLinkIn4DSInput
@ NTV2_XptFrameBuffer6DS2Input
static bool IsYUVOnlyInputXpt(const NTV2InputXptID inInputXpt)
NTV2StringList::const_iterator NTV2StringListConstIter
#define NTV2_WIDGET_FIRST
Identifies firmware widgets that logically can have zero or more signal inputs (identified by NTV2Inp...
static bool IsHDMIInWidgetType(const NTV2WidgetType inWidgetType)
PrintCodeConfig()
Default constructor sets the following default settings:
@ NTV2_XptFrameBuffer5Input
virtual bool RemoveConnection(const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput)
Removes the connection between the specified input (signal sink) and output (signal source).
static bool IsSDIWidgetType(const NTV2WidgetType inWidgetType)
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
enum NTV2OutputCrosspointID NTV2OutputXptID
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
#define NTV2_IS_VALID_WIDGET(__w__)
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
static bool Deinitialize(void)
Explicitly deinitializes and deallocates the Routing Expert singleton.
@ NTV2_XptFrameBuffer3_DS2RGB
@ NTV2_XptSDIOut7InputDS2
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inChannel, const bool inIsKeyInput)
static bool MakeRouteROMRegisters(NTV2RegReads &outROMRegisters)
Prepares an initialized, zeroed NTV2RegReads that's prepared to read all ROM registers from a device.
std::string NTV2OutputCrosspointIDToString(const NTV2OutputCrosspointID inValue, const bool inForRetailDisplay=false)
@ NTV2_XptFrameBuffer5YUV
ostream & operator<<(ostream &inOutStream, const CNTV2SignalRouter &inObj)
@ NTV2_XptMixer1BGKeyInput
virtual bool ResetFrom(const NTV2XptConnections &inConnections)
Resets me, replacing any/all existing connections with the given connections.
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
static bool GetWidgetsForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified output crosspoint.
virtual void Reset(void)
Resets me, erasing any/all existing connections.
@ NTV2_XptFrameBuffer2DS2Input
Declares the CNTV2RegisterExpert class.
std::string NTV2WidgetIDToString(const NTV2WidgetID inValue, const bool inCompactDisplay=false)
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).
@ NTV2_XptFrameBuffer7RGB
static bool GetPossibleConnections(const NTV2RegReads &inROMRegisters, NTV2PossibleConnections &outConnections)
Answers with the implemented crosspoint connections as obtained from the given ROM registers.
Declares the AJAMemory class.
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
std::set< NTV2WidgetID > NTV2WidgetIDSet
A collection of distinct NTV2WidgetID values.
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
NTV2XptConnections mMissing
Optional, to show deleted connections.
Declares the AJADebug class.
@ NTV2_XptSDIOut6InputDS2
static bool IsKeyInputXpt(const NTV2InputXptID inInputXpt)
@ NTV2_XptDualLinkIn1DSInput
NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsLinkB)
@ NTV2_XptDualLinkOut1Input
@ NTV2_XptDuallinkOut3DS2
@ NTV2_XptDualLinkOut8Input
std::string mPreVariableText
Variable prefix text.