13 #define HEX16(__x__) "0x" << std::hex << std::setw(16) << std::setfill('0') << uint64_t(__x__) << std::dec
14 #define INSTP(_p_) HEX16(uint64_t(_p_))
15 #define SRiFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
16 #define SRiWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
17 #define SRiNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
18 #define SRiINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
19 #define SRiDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
20 #define SRFAIL(__x__) AJA_sERROR (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
21 #define SRWARN(__x__) AJA_sWARNING(AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
22 #define SRNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
23 #define SRINFO(__x__) AJA_sINFO (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
24 #define SRDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_RoutingGeneric, AJAFUNC << ": " << __x__)
52 RoutingExpert::RoutingExpert()
54 InitInputXpt2String();
55 InitOutputXpt2String();
56 InitInputXpt2WidgetIDs();
57 InitOutputXpt2WidgetIDs();
58 InitWidgetIDToChannels();
59 InitWidgetIDToWidgetTypes();
63 #if defined(DUMP_WIDGETID_TO_INPUT_XPTS_MMAP)
68 #endif // defined(DUMP_WIDGETID_TO_INPUT_XPTS_MMAP)
82 return iter != gInputXpt2String.end() ? iter->second : std::string();
90 return iter != gOutputXpt2String.end() ? iter->second : std::string();
108 return iter != gString2OutputXpt.end() ? iter->second :
NTV2_XptBlack;
116 if (iter->first == inWidgetID) {
128 if (iter->first == inWidgetID)
149 outWidgetIDs.clear();
151 iter != gOutputXpt2WidgetIDs.end() && iter->first == inOutputXpt;
153 outWidgetIDs.insert(iter->second);
154 return !outWidgetIDs.empty();
161 outWidgetIDs.clear();
163 while (iter != gInputXpt2WidgetIDs.end() && iter->first == inInputXpt)
165 outWidgetIDs.insert(iter->second);
168 return !outWidgetIDs.empty();
177 while (iter != gWidget2InputXpts.end() && iter->first == inWidgetID)
179 outInputs.insert(iter->second);
182 return !outInputs.empty();
191 while (iter != gWidget2OutputXpts.end() && iter->first == inWidgetID)
193 outOutputs.insert(iter->second);
196 return !outOutputs.empty();
203 return gOutputXpt2WidgetIDs.find(inOutputXpt) != gOutputXpt2WidgetIDs.end();
210 return gRGBOnlyInputXpts.find(inInputXpt) != gRGBOnlyInputXpts.end();
217 return gYUVOnlyInputXpts.find(inInputXpt) != gYUVOnlyInputXpts.end();
224 return gKeyInputXpts.find(inInputXpt) != gKeyInputXpts.end();
231 return gSDIWidgetTypes.find(inWidgetType) != gSDIWidgetTypes.end();
238 return gSDIInWidgetTypes.find(inWidgetType) != gSDIInWidgetTypes.end();
245 return gSDIOutWidgetTypes.find(inWidgetType) != gSDIOutWidgetTypes.end();
252 return gSDI3GWidgetTypes.find(inWidgetType) != gSDI3GWidgetTypes.end();
259 return gSDI12GWidgetTypes.find(inWidgetType) != gSDI12GWidgetTypes.end();
266 return gDualLinkWidgetTypes.find(inWidgetType) != gDualLinkWidgetTypes.end();
273 return gDualLinkInWidgetTypes.find(inWidgetType) != gDualLinkInWidgetTypes.end();
280 return gDualLinkOutWidgetTypes.find(inWidgetType) != gDualLinkOutWidgetTypes.end();
287 return gHDMIWidgetTypes.find(inWidgetType) != gHDMIWidgetTypes.end();
294 return gHDMIInWidgetTypes.find(inWidgetType) != gHDMIInWidgetTypes.end();
301 return gHDMIOutWidgetTypes.find(inWidgetType) != gHDMIOutWidgetTypes.end();
305 #define NTV2SR_ASSIGN_BOTH(enumToStrMap, strToEnumMap, inEnum, inNameStr) \
307 enumToStrMap[inEnum] = inNameStr; \
308 std::string lowerstr_(#inEnum); \
309 strToEnumMap[aja::lower(lowerstr_)] = inEnum; \
312 void RoutingExpert::InitInputXpt2String(
void)
315 std::string lowerstr;
440 std::string lowerStr(iter->second);
aja::lower(lowerStr);
441 gString2InputXpt [lowerStr] = iter->first;
475 void RoutingExpert::InitOutputXpt2String(
void)
655 std::string lowerStr(iter->second);
aja::lower(lowerStr);
656 gString2OutputXpt [lowerStr] = iter->first;
733 void RoutingExpert::InitInputXpt2WidgetIDs(
void)
971 void RoutingExpert::InitOutputXpt2WidgetIDs(
void)
1175 void RoutingExpert::InitWidgetIDToChannels(
void)
1296 void RoutingExpert::InitWidgetIDToWidgetTypes(
void)