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 oss << mConnections.size() <<
" routing entries:" << endl;
217 return ToCodeString(outCode, mConnections, inConfig);
232 oss << ((inConnections.size () == 1) ?
"entry:" :
"entries:");
249 const string funcName (inConfig.
mUseRouter ?
"AddConnection" :
"Connect");
256 oss << variableNameText <<
"." << functionCallText <<
" (" << inXptStr <<
", " << outXptStr <<
");";
262 if (pNew != inConfig.
mNew.end() && pNew->second == iter->second)
264 else if (pChanged != inConfig.
mChanged.end() && pChanged->second != iter->second)
273 if (inConnections.find(pGone->first) == inConnections.end())
276 oss << inConfig.
mPreCommentText << varName <<
"." <<
"RemoveConnection" <<
" (" 283 oss << inConfig.
mPreCommentText << varName <<
"." <<
"Disconnect" <<
" (" 300 return pExpert ?
true :
false;
314 return pExpert ?
true :
false;
322 return pExpert ? pExpert->InputXptToString(inInputXpt) : string();
330 return pExpert ? pExpert->OutputXptToString(inOutputXpt) : string();
355 outWidgets.insert(widgetID);
356 return !outWidgets.empty();
362 outWidgetIDs.clear();
365 return pExpert ? pExpert->GetWidgetsForInput(inInputXpt, outWidgetIDs) :
false;
373 if (!GetWidgetsForInput(inInputXpt, wgts))
376 outWidgetID = *(wgts.begin());
390 outWidgetIDs.clear();
393 return pExpert ? pExpert->GetWidgetsForOutput(inOutputXpt, outWidgetIDs) :
false;
403 if (!GetWidgetsForOutput(inOutputXpt, wgts))
407 outWidgetID = *(wgts.begin());
423 return pExpert ? pExpert->GetWidgetInputs(inWidgetID, outInputs) :
false;
431 if (!GetWidgetIDs (inDeviceID, widgetIDs))
445 outInputs.insert(*it);
456 set<uint32_t> regNums;
457 uint32_t regNum(0), maskNdx(0);
460 if (regNums.find(regNum) == regNums.end())
461 regNums.insert(regNum);
462 for (set<uint32_t>::const_iterator iter(regNums.begin()); iter != regNums.end(); ++iter)
473 return pExpert ? pExpert->GetWidgetOutputs(inWidgetID, outOutputs) :
false;
480 if (!GetWidgetIDs (inDeviceID, widgetIDs))
494 outOutputs.insert(*it);
503 return pExpert ? pExpert->IsRGBOnlyInputXpt(inInputXpt) :
false;
509 return pExpert ? pExpert->IsYUVOnlyInputXpt(inInputXpt) :
false;
515 return pExpert ? pExpert->IsKeyInputXpt(inInputXpt) :
false;
522 return pExpert->WidgetIDToChannel(inWidgetID);
530 return pExpert->WidgetIDFromTypeAndChannel(inWidgetType, inChannel);
538 return pExpert->WidgetIDToType(inWidgetID);
545 return pExpert ? pExpert->IsSDIWidget(inWidgetType) :
false;
551 return pExpert ? pExpert->IsSDIInWidget(inWidgetType) :
false;
557 return pExpert ? pExpert->IsSDIOutWidget(inWidgetType) :
false;
563 return pExpert ? pExpert->Is3GSDIWidget(inWidgetType) :
false;
569 return pExpert ? pExpert->Is12GSDIWidget(inWidgetType) :
false;
575 return pExpert ? pExpert->IsDualLinkWidget(inWidgetType) :
false;
581 return pExpert ? pExpert->IsDualLinkInWidget(inWidgetType) :
false;
587 return pExpert ? pExpert->IsDualLinkOutWidget(inWidgetType) :
false;
593 return pExpert ? pExpert->IsHDMIWidget(inWidgetType) :
false;
599 return pExpert ? pExpert->IsHDMIInWidget(inWidgetType) :
false;
605 return pExpert ? pExpert->IsHDMIOutWidget(inWidgetType) :
false;
610 outConnections.clear();
613 uint32_t regNum(0), maskNdx(0);
616 if (iter == inRegValues.end())
619 if (iter->registerNumber != regNum)
621 if (iter->registerMask != 0xFFFFFFFF)
623 if (iter->registerShift)
640 outNew.clear(); outMissing.clear();
648 if (RHSit == inRHS.end())
649 outMissing.insert(LHSconnection);
650 else if (RHSit->second == outputXpt)
654 outMissing.insert(LHSconnection);
655 outNew.insert(*RHSit);
666 if (LHSit == inLHS.end())
667 outNew.insert(connectionRHS);
668 else if (LHSit->second != outputXpt)
670 NTV2_ASSERT(outMissing.find(LHSit->first) != outMissing.end() && outNew.find(LHSit->first) != outNew.end());
673 return outNew.empty() && outMissing.empty();
685 outConnections.clear();
686 if (
Tokenize(stringToParse, lines,
"\n\r",
true).empty())
688 SRWARN(
"No lines resulted from input string '" << stringToParse <<
"'");
692 if (lines.front().find(
"<==") != string::npos)
698 size_t pos (pEachLine->find(
"<=="));
699 if (pos == string::npos)
700 {
SRFAIL(
"Parse error: '<==' missing in line '" << *pEachLine <<
"'");
return false;}
701 string leftPiece (pEachLine->substr(0, pos));
aja::strip(leftPiece);
702 string rightPiece (pEachLine->substr(pos + 3, pEachLine->length()));
aja::strip(rightPiece);
703 NTV2InputXptID inputXpt (StringToNTV2InputCrosspointID(leftPiece));
704 NTV2OutputXptID outputXpt (StringToNTV2OutputCrosspointID(rightPiece));
707 {
SRFAIL(
"Parse error: invalid input crosspoint from '" << leftPiece <<
"' from line '" << *pEachLine <<
"'");
return false;}
708 if (outConnections.find(inputXpt) != outConnections.end())
714 else if (lines.front().find(
"connect(") != string::npos)
721 if (line.find(
"//") == 0)
724 size_t openParenPos(line.find(
"(")), closedParenPos(line.find(
");"));
725 if (openParenPos == string::npos || closedParenPos == string::npos || openParenPos > closedParenPos)
726 {
SRFAIL(
"Parse error: '(' or ');' missing in line '" << line <<
"'");
return false;}
727 string remainder(line.substr(openParenPos+1, closedParenPos - openParenPos - 1));
730 if (xptNames.size() < 2 || xptNames.size() > 2)
731 {
SRFAIL(
"Parse error: " <<
DEC(xptNames.size()) <<
" 'Connect' parameter(s) found, expected 2");
return false;}
732 NTV2InputXptID inputXpt (StringToNTV2InputCrosspointID(xptNames.at(0)));
733 NTV2OutputXptID outputXpt (StringToNTV2OutputCrosspointID(xptNames.at(1)));
736 {
SRFAIL(
"Parse error: invalid input crosspoint from '" << xptNames.at(0) <<
"' from line '" << *pLine <<
"'");
return false;}
738 {
SRFAIL(
"Parse error: invalid output crosspoint from '" << xptNames.at(1) <<
"' from line '" << *pLine <<
"'");
return false;}
739 if (outConnections.find(inputXpt) != outConnections.end())
746 {
SRFAIL(
"Unable to parse '" << lines.front() <<
"' -- expected '.contains(' or '<=='");
return false;}
747 SRINFO(
DEC(outConnections.size()) <<
" connection(s) created from input string");
769 outConnections.clear();
770 if (
Tokenize(stringToParse, lines,
"\n\r",
true).empty())
772 SRWARN(
"No lines resulted from input string '" << stringToParse <<
"'");
776 if (lines.front().find(
"<==") != string::npos)
779 for (
size_t lineNum(0); lineNum < lines.size(); lineNum++)
781 const string & line (lines.at(lineNum));
783 size_t pos (line.find(
"<=="));
784 if (pos == string::npos)
785 {
SRFAIL(
"Parse error: '<==' missing in line '" << line <<
"'");
return false;}
786 string leftPiece (line.substr(0, pos));
aja::strip(leftPiece);
787 string rightPiece (line.substr(pos + 3, line.length()));
aja::strip(rightPiece);
789 NTV2InputXptID inputXpt (StringToNTV2InputCrosspointID(leftPiece));
791 {
SRFAIL(
"Parse error: invalid input crosspoint from '" << leftPiece <<
"' from line '" << line <<
"'");
return false;}
793 if (rightPiece.find(
",") != string::npos)
796 for (
size_t n(0);
n < rtPieces.size();
n++)
798 string s(rtPieces.at(
n));
799 outputXpt = StringToNTV2OutputCrosspointID(
aja::strip(s));
801 {
SRWARN(
"Skipped invalid output crosspoint from '" << s <<
"' in line '" << line <<
"'");
continue;}
807 outputXpt = StringToNTV2OutputCrosspointID(rightPiece);
809 {
SRWARN(
"Skipped invalid output crosspoint from '" << rightPiece <<
"' in line '" << line <<
"'");
continue;}
815 {
SRFAIL(
"Unable to parse '" << lines.front() <<
"' -- expected '<=='");
return false;}
816 SRINFO(
DEC(outConnections.size()) <<
" potential connection(s) created from input string");
834 return inIsBInput ? gFrameBufferBInputs [inChannel] : gFrameBufferInputs [inChannel];
847 return inIsKeyInput ? gCSCKeyInput[inChannel] : gCSCVideoInput[inChannel];
868 return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
878 return gDLOutInputs[inChannel];
895 return gCSCKeyOutputs[inChannel];
897 return inIsRGB ? gCSCRGBOutputs[inChannel] : gCSCYUVOutputs[inChannel];
922 return inIsRGB ? gFrameBufferRGB425Outputs[inChannel] : gFrameBufferYUV425Outputs[inChannel];
924 return inIsRGB ? gFrameBufferRGBOutputs[inChannel] : gFrameBufferYUVOutputs[inChannel];
946 if (inHDMI_Quadrant < 4)
947 return inIsHDMI_RGB ? gHDMIInputRGBOutputs [channel][inHDMI_Quadrant] : gHDMIInputOutputs [channel][inHDMI_Quadrant];
965 return inIsDS2 ? gSDIInputDS2Outputs[inChannel] : gSDIInputOutputs[inChannel];
977 return inIsLinkB ? gDLOutDS2Outputs[inChannel] : gDLOutOutputs[inChannel];
987 return gDLInOutputs[inChannel];
1014 return inIsDS2 ? gSDIOutputDS2Inputs [inChannel] : gSDIOutputInputs [inChannel];
1027 return inIsKey ? gMixerKeyYUVOutputs[inChannel] : gMixerVidYUVOutputs[inChannel];
1040 return inIsKey ? gMixerFGKeyInputs[inChannel] : gMixerFGVideoInputs[inChannel];
1053 return inIsKey ? gMixerBGKeyInputs[inChannel] : gMixerBGVideoInputs[inChannel];
1065 return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
1083 return inIsRGB ? gMuxBRGBOutputs[inChannel] : gMuxBYUVOutputs[inChannel];
1085 return inIsRGB ? gMuxARGBOutputs[inChannel] : gMuxAYUVOutputs[inChannel];
1099 if (!inAppendOutputXpts)
1100 outOutputXpts.clear();
1107 const ULWord regOffset(inRegNum - firstROMReg);
1108 const ULWord bitOffset((regOffset % 4) * 32);
1115 for (
UWord bitNdx(0); bitNdx < 32; bitNdx++)
1116 if (inRegVal &
ULWord(1UL << bitNdx))
1120 if (pExpert && pExpert->IsOutputXptValid(yuvOutputXpt))
1121 outOutputXpts.insert(yuvOutputXpt);
1122 if (pExpert && pExpert->IsOutputXptValid(rgbOutputXpt))
1123 outOutputXpts.insert(rgbOutputXpt);
1131 outConnections.clear();
1138 if (GetRouteROMInfoFromReg (iter->registerNumber, iter->registerValue, inputXpt, outputXpts,
true))
1142 return !outConnections.empty();
1159 return inObj.
Print(oss);
1166 while (iter != inObj.end())
1169 if (++iter == inObj.end())
1179 while (iter != inObj.end())
1182 if (++iter == inObj.end())
1203 if (++iter != inObj.end ())
1220 if (++it != inObj.end())
1233 if (ixpt != it->first)
1239 if (++it == inObj.end())
1241 if (ixpt == it->first)
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
NTV2XptConnections::const_iterator NTV2XptConnectionsConstIter
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
static bool Deinitialize(void)
Explicitly deinitializes and deallocates the Routing Expert singleton.
static bool IsKeyInputXpt(const NTV2InputXptID inInputXpt)
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inChannel)
static const ULWord sSignalRouterRegShifts[]
NTV2InputXptIDSet::const_iterator NTV2InputXptIDSetConstIter
A const iterator for iterating over an NTV2InputXptIDSet.
std::string mPostCommentText
Comment postfix text.
Declares the AJAMemory class.
std::string NTV2WidgetIDToString(const NTV2WidgetID inValue, const bool inCompactDisplay=false)
virtual void Reset(void)
Resets me, erasing any/all existing connections.
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
NTV2RegWritesConstIter NTV2RegReadsConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterReads instance...
static bool GetPossibleConnections(const NTV2RegReads &inROMRegisters, NTV2PossibleConnections &outConnections)
Answers with the implemented crosspoint connections as obtained from the given ROM registers...
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)...
NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsLinkB)
Declares CNTV2SignalRouter class.
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...
NTV2OutputDestination
Identifies a specific video output destination.
Declares the AJADebug class.
ostream & operator<<(ostream &oss, const CNTV2SignalRouter &inObj)
NTV2OutputXptID GetLUTOutputXptFromChannel(const NTV2Channel inLUT)
static bool IsHDMIOutWidgetType(const NTV2WidgetType inWidgetType)
NTV2InputXptID GetDLOutInputXptFromChannel(const NTV2Channel inChannel)
NTV2StringList::const_iterator NTV2StringListConstIter
bool NTV2DeviceCanDo425Mux(const NTV2DeviceID inDeviceID)
virtual bool GetRegisterWrites(NTV2RegisterWrites &outRegWrites) const
Returns a sequence of NTV2RegInfo values that can be written to an NTV2 device using its WriteRegiste...
static std::string NTV2InputCrosspointIDToString(const NTV2InputXptID inInputXpt)
Returns a string containing the most compact human-readable form for a given input crosspoint...
if(!(riid==IID_IUnknown) &&!(riid==IID_IClassFactory))
static bool Initialize(void)
Explicitly allocates and initializes the Routing Expert singleton.
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
std::string mFieldBreakText
Text to use for field breaks.
static bool CompareConnections(const NTV2XptConnections &inLHS, const NTV2XptConnections &inRHS, NTV2XptConnections &outNew, NTV2XptConnections &outRemoved)
Compares two sets of crosspoint connections.
static bool GetWidgetOutputs(const NTV2WidgetID inWidgetID, NTV2OutputXptIDSet &outOutputs)
Returns the output crosspoints known to be "owned" by the given widget.
static bool IsSDIOutputWidgetType(const NTV2WidgetType inWidgetType)
NTV2XptConnections mNew
Optional, to show new connections.
static bool Is12GSDIWidgetType(const NTV2WidgetType inWidgetType)
std::string mRouterVarName
Name to use for CNTV2SignalRouter variable.
virtual NTV2XptConnections GetConnections(void) const
NTV2InputXptID GetMixerFGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
NTV2OutputXptIDSet::const_iterator NTV2OutputXptIDSetConstIter
A const iterator for iterating over an NTV2OutputXptIDSet.
This class is a collection of widget input-to-output connections that can be applied all-at-once to a...
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_)
std::string mDeviceVarName
Name to use for CNTV2Card variable.
static bool IsInitialized(void)
#define NTV2_ASSERT(_expr_)
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Declares RoutingExpert class used by CNTV2SignalRouter.
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
bool mShowDeclarations
If true, show variable declarations in the generated code.
std::string NTV2InputCrosspointIDToString(const NTV2InputCrosspointID inValue, const bool inForRetailDisplay=false)
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...
NTV2InputXptID GetFrameStoreInputXptFromChannel(const NTV2Channel inChannel, const bool inIsBInput)
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
NTV2InputXptID GetLUTInputXptFromChannel(const NTV2Channel inLUT)
static bool GetAllRoutingRegInfos(const NTV2InputXptIDSet &inInputs, NTV2RegisterWrites &outRegInfos)
Returns all routing registers for the given set of input crosspoints.
NTV2XptConnections mChanged
Optional, to show changed connections.
std::set< NTV2WidgetID > NTV2WidgetIDSet
A collection of distinct NTV2WidgetID values.
virtual NTV2OutputXptID GetConnectedOutput(const NTV2InputXptID inSignalInput) const
bool mUseRouter
If true, use calls to CNTV2SignalRouter instead of CNTV2Card.
std::string mPostClassText
Class postfix text.
void split(const std::string &str, const char delim, std::vector< std::string > &elems)
static NTV2StringList & Tokenize(const string &inString, NTV2StringList &outTokens, const string &inDelimiters=" ", bool inTrimEmpty=false)
NTV2InputXptID GetMixerBGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
std::string mPreFunctionText
Function name prefix text.
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB, const bool inIsRGB)
NTV2RegWrites NTV2RegisterReads
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2, const bool inIsHDMI_RGB, const UWord inHDMI_Quadrant)
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
virtual bool HasInput(const NTV2InputXptID inSignalInput) const
Answers true if I contain a connection that involves the given input (signal sink).
static bool IsRGBOnlyInputXpt(const NTV2InputXptID inInputXpt)
static NTV2InputXptID StringToNTV2InputCrosspointID(const std::string &inStr)
Returns a string containing the most compact human-readable form for a given input crosspoint...
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2SignalConnection
NTV2XptConnections connections
std::string mPreXptText
Crosspoint variable prefix text.
static const ULWord sSignalRouterRegMasks[]
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...
static bool ToCodeString(std::string &outCode, const NTV2XptConnections &inConnections, const PrintCodeConfig &inConfig=PrintCodeConfig())
Converts the given map of crosspoint connections into source code.
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inChannel, const bool inIsKeyInput)
std::string mPostXptText
Crosspoint variable postfix text.
Declares NTV2DeviceCanDo... and NTV2DeviceGetNum... functions. This module is included at compile tim...
static bool Is3GSDIWidgetType(const NTV2WidgetType inWidgetType)
NTV2RoutingEntry & operator=(const NTV2RegInfo &inRHS)
Assigns an NTV2RegInfo to me.
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
#define NTV2_IS_VALID_OutputCrosspointID(__s__)
NTV2PossibleConnections::const_iterator NTV2PossibleConnectionsConstIter
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
#define NTV2_IS_VALID_CHANNEL(__x__)
static bool GetAllWidgetInputs(const NTV2DeviceID inDeviceID, NTV2InputXptIDSet &outInputs)
Returns all supported widget input crosspoints for the given device.
static bool IsDualLinkInWidgetType(const NTV2WidgetType inWidgetType)
NTV2InputSource
Identifies a specific video input source.
virtual bool PrintCode(std::string &outCode, const PrintCodeConfig &inConfig=PrintCodeConfig()) const
Prints me as source code to the given output stream.
Originally 0x01. Changed to 0x00 in SDK 17.1.
static bool DisposeInstance(void)
std::string mPostVariableText
Variable postfix text.
std::string & strip(std::string &str, const std::string &ws)
NTV2WidgetIDSet::const_iterator NTV2WidgetIDSetConstIter
An iterator for iterating over a read-only NTV2WidgetIDSet.
std::string mPreVariableText
Variable prefix text.
static bool GetWidgetForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified output crosspoint.
static bool GetWidgetForInput(const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified input crosspoint.
Declares numerous NTV2 utility functions.
virtual std::ostream & Print(std::ostream &inOutStream, const bool inForRetailDisplay=false) const
Prints me in a human-readable format to the given output stream.
std::set< NTV2InputXptID > NTV2InputXptIDSet
A collection of distinct NTV2InputXptID values.
std::string mPreCommentText
Comment prefix text.
virtual bool RemoveConnection(const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput)
Removes the connection between the specified input (signal sink) and output (signal source)...
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
static AJALock gRoutingExpertLock
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 IsDualLinkOutWidgetType(const NTV2WidgetType inWidgetType)
virtual bool ResetFromRegisters(const NTV2InputXptIDSet &inInputXpts, const NTV2RegisterReads &inRegReads)
Resets me, erasing any/all existing connections, then rebuilding my connections from the given regist...
std::string mPreClassText
Class prefix text.
static bool MakeRouteROMRegisters(NTV2RegReads &outROMRegisters)
Prepares an initialized, zeroed NTV2RegReads that's prepared to read all ROM registers from a device...
bool NTV2DeviceCanDo8KVideo(const NTV2DeviceID inDeviceID)
std::string mPostFunctionText
Function name postfix text.
NTV2OutputXptID GetFrameStoreOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsRGB, const bool inIs425)
static RoutingExpertPtr GetInstance(const bool inCreateIfNecessary=true)
std::string mLineBreakText
Text to use for line breaks.
static bool GetWidgetsForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified output crosspoint.
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
bool mShowComments
If true, show comments in the generated code.
static bool IsDualLinkWidgetType(const NTV2WidgetType inWidgetType)
static bool IsSDIWidgetType(const NTV2WidgetType inWidgetType)
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey, const bool inIsRGB)
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnection
enum NTV2InputCrosspointID NTV2InputXptID
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inChannel, const bool inIsDS2)
std::multimap< NTV2InputXptID, NTV2OutputXptID > NTV2PossibleConnections
A map of zero or more one-to-many possible NTV2InputXptID to NTV2OutputXptID connections.
static bool IsHDMIWidgetType(const NTV2WidgetType inWidgetType)
Private include file for all ajabase sources.
NTV2OutputXptID GetMixerOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey)
NTV2XptConnections mMissing
Optional, to show deleted connections.
std::string NTV2OutputCrosspointIDToString(const NTV2OutputCrosspointID inValue, const bool inForRetailDisplay=false)
static bool GetWidgetsForInput(const NTV2InputXptID inInputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified input crosspoint.
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
virtual bool ResetFrom(const NTV2XptConnections &inConnections)
Resets me, replacing any/all existing connections with the given connections.
std::vector< std::string > NTV2StringList
static std::string NTV2OutputCrosspointIDToString(const NTV2OutputXptID inOutputXpt)
Returns a string containing the most compact human-readable form for a given output crosspoint...
static bool IsYUVOnlyInputXpt(const NTV2InputXptID inInputXpt)
std::vector< NTV2RegInfo > NTV2RegisterWrites
static NTV2Channel WidgetIDToChannel(const NTV2WidgetID inWidgetID)
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
std::string & lower(std::string &str)
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
#define NTV2_IS_VALID_WIDGET(__w__)
static NTV2WidgetType WidgetIDToType(const NTV2WidgetID inWidgetID)
static bool GetAllWidgetOutputs(const NTV2DeviceID inDeviceID, NTV2OutputXptIDSet &outOutputs)
Returns all supported widget output crosspoints for the given device.
std::string & replace(std::string &str, const std::string &from, const std::string &to)
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsDS2)
static NTV2OutputXptID StringToNTV2OutputCrosspointID(const std::string &inStr)
Returns the output crosspoint that corresponds to the given string.
std::set< NTV2OutputXptID > NTV2OutputXptIDSet
A collection of distinct NTV2OutputXptID values.
static bool GetWidgetInputs(const NTV2WidgetID inWidgetID, NTV2InputXptIDSet &outInputs)
Returns the input crosspoints known to be "owned" by the given widget.
enum NTV2OutputCrosspointID NTV2OutputXptID
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2, const UWord inHDMI_Quadrant)
#define NTV2_WIDGET_FIRST
Identifies firmware widgets that logically can have zero or more signal inputs (identified by NTV2Inp...
Declares the CNTV2RegisterExpert class.
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 bool IsHDMIInWidgetType(const NTV2WidgetType inWidgetType)
static bool IsSDIInputWidgetType(const NTV2WidgetType inWidgetType)