AJA NTV2 SDK  17.5.0.1492
NTV2 SDK 17.5.0.1492
ntv2signalrouter.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
7 #include "ntv2signalrouter.h"
8 #include "ntv2routingexpert.h"
9 #include "ntv2debug.h"
10 #include "ntv2utils.h"
11 #include "ntv2devicefeatures.hh"
12 #include "ntv2registerexpert.h"
13 #include "ajabase/system/debug.h"
14 #include "ajabase/common/common.h"
15 #include <memory.h>
16 #include <stdio.h>
17 #include <assert.h>
18 #include <algorithm>
19 
20 using namespace std;
21 
22 // Logging helpers
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__)
35 
36 static NTV2StringList & Tokenize (const string & inString, NTV2StringList & outTokens, const string & inDelimiters = " ", bool inTrimEmpty = false)
37 {
38  string::size_type pos (0), lastPos (0);
39  outTokens.clear ();
40  while (true)
41  {
42  pos = inString.find_first_of (inDelimiters, lastPos);
43  if (pos == string::npos)
44  {
45  pos = inString.length ();
46  if (pos != lastPos || !inTrimEmpty)
47  outTokens.push_back (NTV2StringList::value_type (inString.data () + lastPos, NTV2StringList::size_type(pos - lastPos)));
48  break;
49  }
50  else
51  {
52  if (pos != lastPos || !inTrimEmpty)
53  outTokens.push_back (NTV2StringList::value_type (inString.data () + lastPos, NTV2StringList::size_type(pos - lastPos)));
54  }
55  lastPos = pos + 1;
56  }
57  return outTokens;
58 }
59 
61 
62 bool CNTV2SignalRouter::AddConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput)
63 {
64  mConnections.insert (NTV2SignalConnection (inSignalInput, inSignalOutput));
65  SRiDBG(NTV2InputCrosspointIDToString(inSignalInput) << ", " << NTV2OutputCrosspointIDToString(inSignalOutput) << ": " << *this);
66  return true;
67 }
68 
69 
70 bool CNTV2SignalRouter::HasInput (const NTV2InputXptID inSignalInput) const
71 {
72  return mConnections.find (inSignalInput) != mConnections.end ();
73 }
74 
75 
77 {
78  NTV2XptConnectionsConstIter it(mConnections.find(inSignalInput));
79  return it != mConnections.end() ? it->second : NTV2_XptBlack;
80 }
81 
82 
83 bool CNTV2SignalRouter::HasConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput) const
84 {
85  NTV2XptConnectionsConstIter iter (mConnections.find (inSignalInput));
86  if (iter == mConnections.end())
87  return false;
88  return iter->second == inSignalOutput;
89 }
90 
91 
92 bool CNTV2SignalRouter::RemoveConnection (const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput)
93 {
94  NTV2XptConnectionsIter iter (mConnections.find (inSignalInput));
95  if (iter == mConnections.end())
96  return false; // Not in map
97  if (iter->second != inSignalOutput)
98  return false; // No match
99  mConnections.erase (iter);
100  return true;
101 }
102 
103 
104 static const ULWord sSignalRouterRegMasks[] = { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 };
105 static const ULWord sSignalRouterRegShifts[] = { 0, 8, 16, 24 };
106 
107 
109 {
110  Reset();
111  for (NTV2InputXptIDSetConstIter it(inInputs.begin()); it != inInputs.end(); ++it)
112  {
113  uint32_t regNum(0), maskNdx(0);
115  NTV2RegisterReadsConstIter iter (::FindFirstMatchingRegisterNumber(regNum, inRegReads));
116  if (iter == inRegReads.end())
117  continue;
118 
119  NTV2_ASSERT(iter->registerNumber == regNum);
120  NTV2_ASSERT(iter->registerMask == 0xFFFFFFFF);
121  NTV2_ASSERT(iter->registerShift == 0);
122  NTV2_ASSERT(maskNdx < 4);
123  const uint32_t regValue (iter->registerValue & sSignalRouterRegMasks[maskNdx]);
124  const NTV2OutputXptID outputXpt (NTV2OutputXptID(regValue >> sSignalRouterRegShifts[maskNdx]));
125  if (outputXpt != NTV2_XptBlack)
126  mConnections.insert(NTV2SignalConnection (*it, outputXpt));
127  } // for each NTV2InputXptID
128  return true;
129 }
130 
131 
133 {
134  outRegWrites.clear ();
135 
136  for (NTV2XptConnectionsConstIter iter (mConnections.begin ()); iter != mConnections.end (); ++iter)
137  {
138  const NTV2InputXptID inputXpt(iter->first);
139  const NTV2OutputXptID outputXpt(iter->second);
140  uint32_t regNum(0), ndx(999);
141 
142  if (!CNTV2RegisterExpert::GetCrosspointSelectGroupRegisterInfo (inputXpt, regNum, ndx) || !regNum || ndx > 3)
143  {
144  outRegWrites.clear();
145  return false;
146  }
147 
148  const NTV2RegInfo regInfo (regNum, outputXpt, sSignalRouterRegMasks[ndx], sSignalRouterRegShifts[ndx]);
149  try
150  {
151  outRegWrites.push_back (regInfo);
152  }
153  catch (const bad_alloc &)
154  {
155  outRegWrites.clear ();
156  return false;
157  }
158  }
159  SRiDBG(outRegWrites);
160  return true;
161 }
162 
163 
165  NTV2XptConnections & outChanged, NTV2XptConnections & outMissing) const
166 {
167  outNew.clear(); outChanged.clear(); outMissing.clear();
168  // Check that my connections are also in RHS:
169  for (NTV2XptConnectionsConstIter it(mConnections.begin()); it != mConnections.end(); ++it)
170  {
171  const NTV2SignalConnection & connection (*it);
172  const NTV2InputXptID inputXpt(connection.first);
173  const NTV2OutputXptID outputXpt(connection.second);
174  if (inRHS.HasConnection(inputXpt, outputXpt))
175  ;
176  else if (inRHS.HasInput(inputXpt))
177  outChanged.insert(NTV2Connection(inputXpt, inRHS.GetConnectedOutput(inputXpt))); // Connection changed from this
178  else
179  outNew.insert(connection); // Connection is new in me, not in RHS
180  }
181 
182  // Check that RHS' connections are also in me...
183  const NTV2XptConnections connectionsRHS(inRHS.GetConnections());
184  for (NTV2XptConnectionsConstIter it(connectionsRHS.begin()); it != connectionsRHS.end(); ++it)
185  {
186  const NTV2SignalConnection & connectionRHS (*it);
187  const NTV2InputXptID inputXpt(connectionRHS.first);
188  const NTV2OutputXptID outputXpt(connectionRHS.second);
189  NTV2XptConnectionsConstIter pFind (mConnections.find(inputXpt));
190  if (pFind == mConnections.end()) // If not found in me...
191  outMissing.insert(connectionRHS); // ...in RHS, but missing in me
192  else if (pFind->second != outputXpt) // If output xpt differs...
193  outChanged.insert(connectionRHS); // ...then 'connection' is changed (in RHS, not in me)
194  }
195 
196  return outNew.empty() && outChanged.empty() && outMissing.empty(); // Return true if identical
197 }
198 
199 
200 ostream & CNTV2SignalRouter::Print (ostream & oss, const bool inForRetailDisplay) const
201 {
202  if (inForRetailDisplay)
203  {
204  oss << mConnections.size() << " routing entries:" << endl;
205  for (NTV2XptConnectionsConstIter iter (mConnections.begin()); iter != mConnections.end(); ++iter)
206  oss << ::NTV2InputCrosspointIDToString(iter->first, inForRetailDisplay)
207  << " <== " << ::NTV2OutputCrosspointIDToString(iter->second, inForRetailDisplay) << endl;
208  }
209  else
210  oss << mConnections;
211  return oss;
212 }
213 
214 
215 bool CNTV2SignalRouter::PrintCode (string & outCode, const PrintCodeConfig & inConfig) const
216 {
217  return ToCodeString(outCode, mConnections, inConfig);
218 
219 } // PrintCode
220 
221 
222 bool CNTV2SignalRouter::ToCodeString (string & outCode, const NTV2XptConnections & inConnections,
223  const PrintCodeConfig & inConfig)
224 {
225  ostringstream oss;
226 
227  outCode.clear ();
228 
229  if (inConfig.mShowComments)
230  {
231  oss << inConfig.mPreCommentText << DEC(inConnections.size()) << " routing ";
232  oss << ((inConnections.size () == 1) ? "entry:" : "entries:");
233  oss << inConfig.mPostCommentText << inConfig.mLineBreakText;
234  }
235 
236  if (inConfig.mShowDeclarations)
237  {
238  if (inConfig.mUseRouter)
239  oss << inConfig.mPreClassText << "CNTV2SignalRouter" << inConfig.mPostClassText
240  << "\t"<< inConfig.mPreVariableText << inConfig.mRouterVarName<< inConfig.mPostVariableText;
241  else
242  oss << inConfig.mPreClassText << "CNTV2Card" << inConfig.mPostClassText
243  << "\t" << inConfig.mPreVariableText << inConfig.mDeviceVarName<< inConfig.mPostVariableText;
244  oss << ";" << inConfig.mLineBreakText;
245  }
246 
247  const string varName (inConfig.mUseRouter ? inConfig.mRouterVarName : inConfig.mDeviceVarName);
248  const string variableNameText (inConfig.mPreVariableText + varName + inConfig.mPostVariableText);
249  const string funcName (inConfig.mUseRouter ? "AddConnection" : "Connect");
250  const string functionCallText (inConfig.mPreFunctionText + funcName + inConfig.mPostFunctionText);
251  for (NTV2XptConnectionsConstIter iter (inConnections.begin ()); iter != inConnections.end (); ++iter)
252  {
253  const string inXptStr (inConfig.mPreXptText + ::NTV2InputCrosspointIDToString(iter->first, false) + inConfig.mPostXptText);
254  const string outXptStr (inConfig.mPreXptText + ::NTV2OutputCrosspointIDToString(iter->second, false) + inConfig.mPostXptText);
255 
256  oss << variableNameText << "." << functionCallText << " (" << inXptStr << ", " << outXptStr << ");";
257 
258  if (inConfig.mShowComments)
259  {
260  NTV2XptConnectionsConstIter pNew(inConfig.mNew.find(iter->first));
261  NTV2XptConnectionsConstIter pChanged(inConfig.mChanged.find(iter->first));
262  if (pNew != inConfig.mNew.end() && pNew->second == iter->second)
263  oss << inConfig.mFieldBreakText << inConfig.mPreCommentText << "New" << inConfig.mPostCommentText;
264  else if (pChanged != inConfig.mChanged.end() && pChanged->second != iter->second)
265  oss << inConfig.mFieldBreakText << inConfig.mPreCommentText << "Changed from "
266  << ::NTV2OutputCrosspointIDToString(pChanged->second, false) << inConfig.mPostCommentText;
267  }
268  oss << inConfig.mLineBreakText;
269  } // for each connection
270 
271  if (inConfig.mShowComments)
272  for (NTV2XptConnectionsConstIter pGone(inConfig.mMissing.begin()); pGone != inConfig.mMissing.end(); ++pGone)
273  if (inConnections.find(pGone->first) == inConnections.end())
274  {
275  if (inConfig.mUseRouter)
276  oss << inConfig.mPreCommentText << varName << "." << "RemoveConnection" << " ("
277  << ::NTV2InputCrosspointIDToString(pGone->first, false)
278  << ", " << ::NTV2OutputCrosspointIDToString(pGone->second, false)
279  << ");" << inConfig.mPostCommentText
280  << inConfig.mFieldBreakText << inConfig.mPreCommentText << "Deleted" << inConfig.mPostCommentText
281  << inConfig.mLineBreakText;
282  else
283  oss << inConfig.mPreCommentText << varName << "." << "Disconnect" << " ("
284  << ::NTV2InputCrosspointIDToString(pGone->first, false)
285  << ");" << inConfig.mPostCommentText << inConfig.mFieldBreakText
286  << inConfig.mPreCommentText
287  << "From " << ::NTV2OutputCrosspointIDToString(pGone->second, false)
288  << inConfig.mPostCommentText << inConfig.mLineBreakText;
289  }
290 
291  outCode = oss.str();
292  return true;
293 }
294 
295 
297  : mShowComments (true),
298  mShowDeclarations (true),
299  mUseRouter (false),
300  mPreCommentText ("// "),
301  mPostCommentText (),
302  mPreClassText (),
303  mPostClassText (),
304  mPreVariableText (),
305  mPostVariableText (),
306  mPreXptText (),
307  mPostXptText (),
308  mPreFunctionText (),
309  mPostFunctionText (),
310  mDeviceVarName ("device"),
311  mRouterVarName ("router"),
312  mLineBreakText ("\n"),
313  mFieldBreakText ("\t"),
314  mNew (),
315  mChanged (),
316  mMissing ()
317 {
318 }
319 
320 
321 bool CNTV2SignalRouter::Initialize (void) // STATIC
322 {
325  return pExpert ? true : false;
326 } // Initialize
327 
328 
329 bool CNTV2SignalRouter::Deinitialize (void) // STATIC
330 {
332 }
333 
334 
335 bool CNTV2SignalRouter::IsInitialized (void) // STATIC
336 {
339  return pExpert ? true : false;
340 }
341 
342 
344 {
347  return pExpert ? pExpert->InputXptToString(inInputXpt) : string();
348 }
349 
350 
352 {
355  return pExpert ? pExpert->OutputXptToString(inOutputXpt) : string();
356 }
357 
358 
360 {
363  return pExpert ? pExpert->StringToInputXpt(inStr) : NTV2_INPUT_CROSSPOINT_INVALID;
364 }
365 
366 
368 {
371  return pExpert ? pExpert->StringToOutputXpt(inStr) : NTV2_OUTPUT_CROSSPOINT_INVALID;
372 }
373 
374 
375 bool CNTV2SignalRouter::GetWidgetIDs (const NTV2DeviceID inDeviceID, NTV2WidgetIDSet & outWidgets) // STATIC
376 {
377  outWidgets.clear();
378  for (NTV2WidgetID widgetID(NTV2WidgetID(NTV2_WIDGET_FIRST)); NTV2_IS_VALID_WIDGET(widgetID); widgetID = NTV2WidgetID(widgetID+1))
379  if (::NTV2DeviceCanDoWidget (inDeviceID, widgetID))
380  outWidgets.insert(widgetID);
381  return !outWidgets.empty();
382 }
383 
384 
385 bool CNTV2SignalRouter::GetWidgetsForInput (const NTV2InputXptID inInputXpt, NTV2WidgetIDSet & outWidgetIDs) // STATIC
386 {
387  outWidgetIDs.clear();
390  return pExpert ? pExpert->GetWidgetsForInput(inInputXpt, outWidgetIDs) : false;
391 }
392 
393 
394 bool CNTV2SignalRouter::GetWidgetForInput (const NTV2InputXptID inInputXpt, NTV2WidgetID & outWidgetID, const NTV2DeviceID inDeviceID) // STATIC
395 {
396  outWidgetID = NTV2_WIDGET_INVALID;
397  NTV2WidgetIDSet wgts;
398  if (!GetWidgetsForInput(inInputXpt, wgts))
399  return false;
400  if (inDeviceID == DEVICE_ID_NOTFOUND)
401  outWidgetID = *(wgts.begin());
402  else
403  for (NTV2WidgetIDSetConstIter it(wgts.begin()); it != wgts.end(); ++it)
404  if (::NTV2DeviceCanDoWidget(inDeviceID, *it))
405  {
406  outWidgetID = *it;
407  break;
408  }
409  return outWidgetID != NTV2_WIDGET_INVALID;
410 }
411 
412 
413 bool CNTV2SignalRouter::GetWidgetsForOutput (const NTV2OutputXptID inOutputXpt, NTV2WidgetIDSet & outWidgetIDs) // STATIC
414 {
415  outWidgetIDs.clear();
418  return pExpert ? pExpert->GetWidgetsForOutput(inOutputXpt, outWidgetIDs) : false;
419 }
420 
421 
422 bool CNTV2SignalRouter::GetWidgetForOutput (const NTV2OutputXptID inOutputXpt, NTV2WidgetID & outWidgetID, const NTV2DeviceID inDeviceID) // STATIC
423 {
424  outWidgetID = NTV2_WIDGET_INVALID;
425  NTV2WidgetIDSet wgts;
426  {
428  if (!GetWidgetsForOutput(inOutputXpt, wgts))
429  return false;
430  }
431  if (inDeviceID == DEVICE_ID_NOTFOUND)
432  outWidgetID = *(wgts.begin());
433  else
434  for (NTV2WidgetIDSetConstIter it(wgts.begin()); it != wgts.end(); ++it)
435  if (::NTV2DeviceCanDoWidget(inDeviceID, *it))
436  {
437  outWidgetID = *it;
438  break;
439  }
440  return outWidgetID != NTV2_WIDGET_INVALID;
441 }
442 
443 
444 bool CNTV2SignalRouter::GetWidgetInputs (const NTV2WidgetID inWidgetID, NTV2InputXptIDSet & outInputs) // STATIC
445 {
446  outInputs.clear();
448  return pExpert ? pExpert->GetWidgetInputs(inWidgetID, outInputs) : false;
449 }
450 
451 
452 bool CNTV2SignalRouter::GetAllWidgetInputs (const NTV2DeviceID inDeviceID, NTV2InputXptIDSet & outInputs) // STATIC
453 {
454  outInputs.clear();
455  NTV2WidgetIDSet widgetIDs;
456  if (!GetWidgetIDs (inDeviceID, widgetIDs))
457  return false; // Fail
458 
459  for (NTV2WidgetIDSetConstIter iter(widgetIDs.begin()); iter != widgetIDs.end (); ++iter)
460  {
461  NTV2InputXptIDSet inputs;
462  CNTV2SignalRouter::GetWidgetInputs (*iter, inputs);
463  for (NTV2InputXptIDSetConstIter it(inputs.begin()); it != inputs.end(); ++it)
464  {
466  if (!::NTV2DeviceCanDo425Mux(inDeviceID))
467  if (!::NTV2DeviceCanDo8KVideo(inDeviceID))
468  if (::NTV2InputCrosspointIDToString(*it, false).find("DS2") != string::npos) // is DS2 input?
469  continue; // do not include FrameStore DS2 inputs for IP25G
470  outInputs.insert(*it);
471  }
472  }
473  return true;
474 }
475 
476 
477 bool CNTV2SignalRouter::GetAllRoutingRegInfos (const NTV2InputXptIDSet & inInputs, NTV2RegisterWrites & outRegInfos) // STATIC
478 {
479  outRegInfos.clear();
480 
481  set<uint32_t> regNums;
482  uint32_t regNum(0), maskNdx(0);
483  for (NTV2InputXptIDSetConstIter it(inInputs.begin()); it != inInputs.end(); ++it)
485  if (regNums.find(regNum) == regNums.end())
486  regNums.insert(regNum);
487  for (set<uint32_t>::const_iterator iter(regNums.begin()); iter != regNums.end(); ++iter)
488  outRegInfos.push_back(NTV2RegInfo(*iter));
489 
490  return true;
491 }
492 
493 
494 bool CNTV2SignalRouter::GetWidgetOutputs (const NTV2WidgetID inWidgetID, NTV2OutputXptIDSet & outOutputs) // STATIC
495 {
496  outOutputs.clear();
498  return pExpert ? pExpert->GetWidgetOutputs(inWidgetID, outOutputs) : false;
499 }
500 
501 bool CNTV2SignalRouter::GetAllWidgetOutputs (const NTV2DeviceID inDeviceID, NTV2OutputXptIDSet & outOutputs) // STATIC
502 {
503  outOutputs.clear();
504  NTV2WidgetIDSet widgetIDs;
505  if (!GetWidgetIDs (inDeviceID, widgetIDs))
506  return false; // Fail
507 
508  for (NTV2WidgetIDSetConstIter iter(widgetIDs.begin()); iter != widgetIDs.end (); ++iter)
509  {
510  NTV2OutputXptIDSet outputs;
511  CNTV2SignalRouter::GetWidgetOutputs (*iter, outputs);
512  for (NTV2OutputXptIDSetConstIter it(outputs.begin()); it != outputs.end(); ++it)
513  {
515  if (!::NTV2DeviceCanDo425Mux(inDeviceID))
516  if (!::NTV2DeviceCanDo8KVideo(inDeviceID))
517  if (::NTV2OutputCrosspointIDToString(*it, false).find("DS2") != string::npos) // is DS2 output?
518  continue; // do not include FrameStore DS2 outputs for IP25G
519  outOutputs.insert(*it);
520  }
521  }
522  return true;
523 }
524 
526 {
528  return pExpert ? pExpert->IsRGBOnlyInputXpt(inInputXpt) : false;
529 }
530 
532 {
534  return pExpert ? pExpert->IsYUVOnlyInputXpt(inInputXpt) : false;
535 }
536 
538 {
540  return pExpert ? pExpert->IsKeyInputXpt(inInputXpt) : false;
541 }
542 
544 {
546  if (pExpert)
547  return pExpert->WidgetIDToChannel(inWidgetID);
548  return NTV2_CHANNEL_INVALID;
549 }
550 
552 {
554  if (pExpert)
555  return pExpert->WidgetIDFromTypeAndChannel(inWidgetType, inChannel);
556  return NTV2_WIDGET_INVALID;
557 }
558 
560 {
562  if (pExpert)
563  return pExpert->WidgetIDToType(inWidgetID);
564  return NTV2WidgetType_Invalid;
565 }
566 
568 {
570  return pExpert ? pExpert->IsSDIWidget(inWidgetType) : false;
571 }
572 
574 {
576  return pExpert ? pExpert->IsSDIInWidget(inWidgetType) : false;
577 }
578 
580 {
582  return pExpert ? pExpert->IsSDIOutWidget(inWidgetType) : false;
583 }
584 
586 {
588  return pExpert ? pExpert->Is3GSDIWidget(inWidgetType) : false;
589 }
590 
592 {
594  return pExpert ? pExpert->Is12GSDIWidget(inWidgetType) : false;
595 }
596 
598 {
600  return pExpert ? pExpert->IsDualLinkWidget(inWidgetType) : false;
601 }
602 
604 {
606  return pExpert ? pExpert->IsDualLinkInWidget(inWidgetType) : false;
607 }
608 
610 {
612  return pExpert ? pExpert->IsDualLinkOutWidget(inWidgetType) : false;
613 }
614 
616 {
618  return pExpert ? pExpert->IsHDMIWidget(inWidgetType) : false;
619 }
620 
622 {
624  return pExpert ? pExpert->IsHDMIInWidget(inWidgetType) : false;
625 }
626 
628 {
630  return pExpert ? pExpert->IsHDMIOutWidget(inWidgetType) : false;
631 }
632 
633 bool CNTV2SignalRouter::GetConnectionsFromRegs (const NTV2InputXptIDSet & inInputXptIDs, const NTV2RegisterReads & inRegValues, NTV2XptConnections & outConnections)
634 {
635  outConnections.clear();
636  for (NTV2InputXptIDSetConstIter it(inInputXptIDs.begin()); it != inInputXptIDs.end(); ++it)
637  {
638  uint32_t regNum(0), maskNdx(0);
640  NTV2RegisterReadsConstIter iter (::FindFirstMatchingRegisterNumber(regNum, inRegValues));
641  if (iter == inRegValues.end())
642  continue;
643 
644  if (iter->registerNumber != regNum)
645  return false; // Register numbers must match here
646  if (iter->registerMask != 0xFFFFFFFF)
647  return false; // Mask must be 0xFFFFFFFF
648  if (iter->registerShift)
649  return false; // Shift must be zero
650  NTV2_ASSERT(maskNdx < 4);
651  const uint32_t regValue (iter->registerValue & sSignalRouterRegMasks[maskNdx]);
652  const NTV2OutputXptID outputXpt (NTV2OutputXptID(regValue >> sSignalRouterRegShifts[maskNdx]));
653  if (outputXpt != NTV2_XptBlack)
654  outConnections.insert(NTV2SignalConnection (*it, outputXpt));
655  } // for each NTV2InputXptID
656  return true;
657 }
658 
659 
661  const NTV2XptConnections & inRHS,
662  NTV2XptConnections & outNew,
663  NTV2XptConnections & outMissing)
664 {
665  outNew.clear(); outMissing.clear();
666  // Check that LHS connections are also in RHS:
667  for (NTV2XptConnectionsConstIter it(inLHS.begin()); it != inLHS.end(); ++it)
668  {
669  const NTV2SignalConnection & LHSconnection(*it);
670  const NTV2InputXptID inputXpt(LHSconnection.first);
671  const NTV2OutputXptID outputXpt(LHSconnection.second);
672  NTV2XptConnectionsConstIter RHSit(inRHS.find(inputXpt));
673  if (RHSit == inRHS.end())
674  outMissing.insert(LHSconnection); // LHSConnection's inputXpt missing from RHS
675  else if (RHSit->second == outputXpt)
676  ; // LHS's input xpt connected to same output xpt as RHS
677  else
678  {
679  outMissing.insert(LHSconnection); // LHS connection missing from RHS
680  outNew.insert(*RHSit); // RHS connection is new
681  }
682  }
683 
684  // Check that RHS connections are also in LHS...
685  for (NTV2XptConnectionsConstIter it(inRHS.begin()); it != inRHS.end(); ++it)
686  {
687  const NTV2SignalConnection & connectionRHS (*it);
688  const NTV2InputXptID inputXpt(connectionRHS.first);
689  const NTV2OutputXptID outputXpt(connectionRHS.second);
690  NTV2XptConnectionsConstIter LHSit(inLHS.find(inputXpt));
691  if (LHSit == inLHS.end()) // If RHS input xpt not in LHS...
692  outNew.insert(connectionRHS); // ...then RHS connection is new
693  else if (LHSit->second != outputXpt) // Else if output xpt changed...
694  // Should've already been handled in previous for loop
695  NTV2_ASSERT(outMissing.find(LHSit->first) != outMissing.end() && outNew.find(LHSit->first) != outNew.end());
696  }
697 
698  return outNew.empty() && outMissing.empty(); // Return true if identical
699 }
700 
701 
702 bool CNTV2SignalRouter::CreateFromString (const string & inString, NTV2XptConnections & outConnections) // STATIC
703 {
704  NTV2StringList lines;
705  string stringToParse(inString); aja::strip(aja::lower(stringToParse));
706  aja::replace(stringToParse, " ", "");
707  aja::replace(stringToParse, "\t", "");
708  aja::replace(stringToParse, "&lt;","<"); // in case uuencoded
709 
710  outConnections.clear();
711  if (Tokenize(stringToParse, lines, "\n\r", true).empty()) // Split the string at line breaks
712  {
713  SRWARN("No lines resulted from input string '" << stringToParse << "'");
714  return true; // Nothing there
715  }
716 
717  if (lines.front().find("<==") != string::npos)
718  {
719 // SRDBG(lines.size() << " lines");
720  for (NTV2StringListConstIter pEachLine(lines.begin()); pEachLine != lines.end(); ++pEachLine)
721  {
722 // SRDBG(" line '" << *pEachLine << "'");
723  size_t pos (pEachLine->find("<=="));
724  if (pos == string::npos)
725  {SRFAIL("Parse error: '<==' missing in line '" << *pEachLine << "'"); return false;}
726  string leftPiece (pEachLine->substr(0, pos)); aja::strip(leftPiece);
727  string rightPiece (pEachLine->substr(pos + 3, pEachLine->length())); aja::strip(rightPiece);
728  NTV2InputXptID inputXpt (StringToNTV2InputCrosspointID(leftPiece));
729  NTV2OutputXptID outputXpt (StringToNTV2OutputCrosspointID(rightPiece));
730  //SRDBG(" L'" << leftPiece << "', R'" << rightPiece << "'");
731  if (inputXpt == NTV2_INPUT_CROSSPOINT_INVALID)
732  {SRFAIL("Parse error: invalid input crosspoint from '" << leftPiece << "' from line '" << *pEachLine << "'"); return false;}
733  if (outConnections.find(inputXpt) != outConnections.end())
734  SRWARN("Overwriting " << ::NTV2InputCrosspointIDToString(inputXpt) << "-" << ::NTV2OutputCrosspointIDToString(outConnections[inputXpt])
735  << " with " << ::NTV2InputCrosspointIDToString(inputXpt) << "-" << ::NTV2OutputCrosspointIDToString(outputXpt));
736  outConnections.insert(NTV2Connection(inputXpt, outputXpt));
737  } // for each line
738  }
739  else if (lines.front().find("connect(") != string::npos)
740  {
741  for (NTV2StringListConstIter pLine(lines.begin()); pLine != lines.end(); ++pLine)
742  {
743  string line(*pLine); aja::strip(line);
744  if (line.empty())
745  continue;
746 // SRDBG(" line '" << line << "'");
747  size_t openParenPos(line.find("(")), closedParenPos(line.find(");"));
748  if (openParenPos == string::npos || closedParenPos == string::npos || openParenPos > closedParenPos)
749  {SRFAIL("Parse error: '(' or ');' missing in line '" << line << "'"); return false;}
750  string remainder(line.substr(openParenPos+1, closedParenPos - openParenPos - 1));
751  NTV2StringList xptNames;
752  aja::split(remainder, ',', xptNames);
753  if (xptNames.size() < 2 || xptNames.size() > 2)
754  {SRFAIL("Parse error: " << DEC(xptNames.size()) << " 'Connect' parameter(s) found, expected 2"); return false;}
755  NTV2InputXptID inputXpt (StringToNTV2InputCrosspointID(xptNames.at(0)));
756  NTV2OutputXptID outputXpt (StringToNTV2OutputCrosspointID(xptNames.at(1)));
757  //SRDBG(" L'" << xptNames.at(0) << "', R'" << xptNames.at(1) << "'");
758  if (inputXpt == NTV2_INPUT_CROSSPOINT_INVALID)
759  {SRFAIL("Parse error: invalid input crosspoint from '" << xptNames.at(0) << "' from line '" << *pLine << "'"); return false;}
760  if (outputXpt == NTV2_OUTPUT_CROSSPOINT_INVALID)
761  {SRFAIL("Parse error: invalid output crosspoint from '" << xptNames.at(1) << "' from line '" << *pLine << "'"); return false;}
762  if (outConnections.find(inputXpt) != outConnections.end())
763  SRWARN("Overwriting " << ::NTV2InputCrosspointIDToString(inputXpt) << "-" << ::NTV2OutputCrosspointIDToString(outConnections[inputXpt])
764  << " with " << ::NTV2InputCrosspointIDToString(inputXpt) << "-" << ::NTV2OutputCrosspointIDToString(outputXpt));
765  outConnections.insert(NTV2Connection(inputXpt, outputXpt));
766  } // for each line
767  }
768  else
769  {SRFAIL("Unable to parse '" << lines.front() << "' -- expected '.contains(' or '<=='"); return false;}
770  SRINFO(DEC(outConnections.size()) << " connection(s) created from input string");
771  return true;
772 }
773 
774 
775 bool CNTV2SignalRouter::CreateFromString (const string & inString, CNTV2SignalRouter & outRouter) // STATIC
776 {
777  NTV2XptConnections connections;
778  outRouter.Reset();
779  if (!CreateFromString(inString, connections))
780  return false;
781  return outRouter.ResetFrom(connections);
782 }
783 
785 
786 
787 
789 
790 NTV2InputXptID GetFrameStoreInputXptFromChannel (const NTV2Channel inChannel, const bool inIsBInput)
791 {
796  if (NTV2_IS_VALID_CHANNEL (inChannel))
797  return inIsBInput ? gFrameBufferBInputs [inChannel] : gFrameBufferInputs [inChannel];
798  else
800 }
801 
802 
803 NTV2InputXptID GetCSCInputXptFromChannel (const NTV2Channel inChannel, const bool inIsKeyInput)
804 {
809  if (NTV2_IS_VALID_CHANNEL(inChannel))
810  return inIsKeyInput ? gCSCKeyInput[inChannel] : gCSCVideoInput[inChannel];
811  else
813 }
814 
815 
817 {
820  return NTV2_IS_VALID_CHANNEL(inLUT) ? gLUTInput[inLUT] : NTV2_INPUT_CROSSPOINT_INVALID;
821 }
822 
823 
824 NTV2InputXptID GetDLInInputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB)
825 {
830  if (NTV2_IS_VALID_CHANNEL(inChannel))
831  return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
832  else
834 }
835 
837 {
840  if (NTV2_IS_VALID_CHANNEL(inChannel))
841  return gDLOutInputs[inChannel];
842  else
844 }
845 
846 
847 NTV2OutputXptID GetCSCOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsKey, const bool inIsRGB)
848 {
855  if (NTV2_IS_VALID_CHANNEL(inChannel))
856  {
857  if (inIsKey)
858  return gCSCKeyOutputs[inChannel];
859  else
860  return inIsRGB ? gCSCRGBOutputs[inChannel] : gCSCYUVOutputs[inChannel];
861  }
862  else
864 }
865 
867 {
870  return NTV2_IS_VALID_CHANNEL(inLUT) ? gLUTRGBOutputs[inLUT] : NTV2_OUTPUT_CROSSPOINT_INVALID;
871 }
872 
873 NTV2OutputXptID GetFrameStoreOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsRGB, const bool inIs425)
874 {
883  if (NTV2_IS_VALID_CHANNEL(inChannel))
884  if (inIs425)
885  return inIsRGB ? gFrameBufferRGB425Outputs[inChannel] : gFrameBufferYUV425Outputs[inChannel];
886  else
887  return inIsRGB ? gFrameBufferRGBOutputs[inChannel] : gFrameBufferYUVOutputs[inChannel];
888  else
890 }
891 
892 
893 NTV2OutputXptID GetInputSourceOutputXpt (const NTV2InputSource inInputSource, const bool inIsSDI_DS2, const bool inIsHDMI_RGB, const UWord inHDMI_Quadrant)
894 {
895  static const NTV2OutputXptID gHDMIInputOutputs [4][4] = { { NTV2_XptHDMIIn1, NTV2_XptHDMIIn1Q2, NTV2_XptHDMIIn1Q3, NTV2_XptHDMIIn1Q4 },
899  static const NTV2OutputXptID gHDMIInputRGBOutputs [4][4] = { { NTV2_XptHDMIIn1RGB, NTV2_XptHDMIIn1Q2RGB, NTV2_XptHDMIIn1Q3RGB, NTV2_XptHDMIIn1Q4RGB },
903 
904  if (NTV2_INPUT_SOURCE_IS_SDI (inInputSource))
906  else if (NTV2_INPUT_SOURCE_IS_HDMI (inInputSource))
907  {
908  NTV2Channel channel = ::NTV2InputSourceToChannel (inInputSource);
909  if (inHDMI_Quadrant < 4)
910  return inIsHDMI_RGB ? gHDMIInputRGBOutputs [channel][inHDMI_Quadrant] : gHDMIInputOutputs [channel][inHDMI_Quadrant];
911  else
913  }
914  else if (NTV2_INPUT_SOURCE_IS_ANALOG (inInputSource))
915  return NTV2_XptAnalogIn;
916  else
918 }
919 
920 
921 NTV2OutputXptID GetSDIInputOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsDS2)
922 {
923  static const NTV2OutputXptID gSDIInputOutputs [] = { NTV2_XptSDIIn1, NTV2_XptSDIIn2, NTV2_XptSDIIn3, NTV2_XptSDIIn4,
927  if (NTV2_IS_VALID_CHANNEL(inChannel))
928  return inIsDS2 ? gSDIInputDS2Outputs[inChannel] : gSDIInputOutputs[inChannel];
929  else
931 }
932 
933 NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsLinkB)
934 {
939  if (NTV2_IS_VALID_CHANNEL(inChannel))
940  return inIsLinkB ? gDLOutDS2Outputs[inChannel] : gDLOutOutputs[inChannel];
941  else
943 }
944 
946 {
949  if (NTV2_IS_VALID_CHANNEL(inChannel))
950  return gDLInOutputs[inChannel];
951  else
953 }
954 
955 
956 NTV2InputXptID GetOutputDestInputXpt (const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2, const UWord inHDMI_Quadrant)
957 {
959  if (NTV2_OUTPUT_DEST_IS_SDI(inOutputDest))
960  return ::GetSDIOutputInputXpt (::NTV2OutputDestinationToChannel(inOutputDest), inIsSDI_DS2);
961  else if (NTV2_OUTPUT_DEST_IS_HDMI(inOutputDest))
962  return inHDMI_Quadrant > 3 ? NTV2_XptHDMIOutInput : gHDMIOutputInputs[inHDMI_Quadrant];
963  else if (NTV2_OUTPUT_DEST_IS_ANALOG(inOutputDest))
964  return NTV2_XptAnalogOutInput;
965  else
967 }
968 
969 
970 NTV2InputXptID GetSDIOutputInputXpt (const NTV2Channel inChannel, const bool inIsDS2)
971 {
976  if (NTV2_IS_VALID_CHANNEL (inChannel))
977  return inIsDS2 ? gSDIOutputDS2Inputs [inChannel] : gSDIOutputInputs [inChannel];
978  else
980 }
981 
982 
983 NTV2OutputXptID GetMixerOutputXptFromChannel (const NTV2Channel inChannel, const bool inIsKey)
984 {
989  if (NTV2_IS_VALID_CHANNEL(inChannel))
990  return inIsKey ? gMixerKeyYUVOutputs[inChannel] : gMixerVidYUVOutputs[inChannel];
991  else
993 }
994 
995 
996 NTV2InputXptID GetMixerFGInputXpt (const NTV2Channel inChannel, const bool inIsKey)
997 {
1002  if (NTV2_IS_VALID_CHANNEL(inChannel))
1003  return inIsKey ? gMixerFGKeyInputs[inChannel] : gMixerFGVideoInputs[inChannel];
1004  else
1006 }
1007 
1008 
1009 NTV2InputXptID GetMixerBGInputXpt (const NTV2Channel inChannel, const bool inIsKey)
1010 {
1015  if (NTV2_IS_VALID_CHANNEL(inChannel))
1016  return inIsKey ? gMixerBGKeyInputs[inChannel] : gMixerBGVideoInputs[inChannel];
1017  else
1019 }
1020 
1021 NTV2InputXptID GetTSIMuxInputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB)
1022 {
1027  if (NTV2_IS_VALID_CHANNEL(inChannel))
1028  return inLinkB ? gDLBInputs[inChannel] : gDLInputs[inChannel];
1029  else
1031 }
1032 
1033 NTV2OutputXptID GetTSIMuxOutputXptFromChannel (const NTV2Channel inChannel, const bool inLinkB, const bool inIsRGB)
1034 {
1043  if (NTV2_IS_VALID_CHANNEL(inChannel))
1044  {
1045  if (inLinkB)
1046  return inIsRGB ? gMuxBRGBOutputs[inChannel] : gMuxBYUVOutputs[inChannel];
1047  else
1048  return inIsRGB ? gMuxARGBOutputs[inChannel] : gMuxAYUVOutputs[inChannel];
1049  }
1050  else
1052 }
1054 
1055 
1056 // static
1057 bool CNTV2SignalRouter::GetRouteROMInfoFromReg (const ULWord inRegNum, const ULWord inRegVal,
1058  NTV2InputXptID & outInputXpt, NTV2OutputXptIDSet & outOutputXpts, const bool inAppendOutputXpts)
1059 {
1060  static const ULWord firstROMReg(kRegFirstValidXptROMRegister);
1061  static const ULWord firstInpXpt(NTV2_FIRST_INPUT_CROSSPOINT);
1062  if (!inAppendOutputXpts)
1063  outOutputXpts.clear();
1064  outInputXpt = NTV2_INPUT_CROSSPOINT_INVALID;
1065  if (inRegNum < uint32_t(kRegFirstValidXptROMRegister))
1066  return false;
1067  if (inRegNum >= uint32_t(kRegInvalidValidXptROMRegister))
1068  return false;
1069 
1070  const ULWord regOffset(inRegNum - firstROMReg);
1071  const ULWord bitOffset((regOffset % 4) * 32);
1072  outInputXpt = NTV2InputXptID(firstInpXpt + regOffset / 4UL); // 4 regs per inputXpt
1073  if (!inRegVal)
1074  return true; // No bits set
1075 
1077  NTV2_ASSERT(pExpert);
1078  for (UWord bitNdx(0); bitNdx < 32; bitNdx++)
1079  if (inRegVal & ULWord(1UL << bitNdx))
1080  {
1081  const NTV2OutputXptID yuvOutputXpt (NTV2OutputXptID((bitOffset + bitNdx) & 0x0000007F));
1082  const NTV2OutputXptID rgbOutputXpt (NTV2OutputXptID(yuvOutputXpt | 0x80));
1083  if (pExpert && pExpert->IsOutputXptValid(yuvOutputXpt))
1084  outOutputXpts.insert(yuvOutputXpt);
1085  if (pExpert && pExpert->IsOutputXptValid(rgbOutputXpt))
1086  outOutputXpts.insert(rgbOutputXpt);
1087  }
1088  return true;
1089 }
1090 
1091 // static
1093 {
1094  outConnections.clear();
1095  for (NTV2RegReadsConstIter iter(inROMRegs.begin()); iter != inROMRegs.end(); ++iter)
1096  {
1097  if (iter->registerNumber < kRegFirstValidXptROMRegister || iter->registerNumber >= kRegInvalidValidXptROMRegister)
1098  continue; // Skip -- not a ROM reg
1100  NTV2OutputXptIDSet outputXpts;
1101  if (GetRouteROMInfoFromReg (iter->registerNumber, iter->registerValue, inputXpt, outputXpts, true))
1102  for (NTV2OutputXptIDSetConstIter it(outputXpts.begin()); it != outputXpts.end(); ++it)
1103  outConnections.insert(NTV2Connection(inputXpt, *it));
1104  }
1105  return !outConnections.empty();
1106 }
1107 
1108 // static
1110 {
1111  outROMRegs.clear();
1112  for (uint32_t regNum(kRegFirstValidXptROMRegister); regNum < kRegInvalidValidXptROMRegister; regNum++)
1113  outROMRegs.push_back(NTV2RegInfo(regNum));
1114  return true;
1115 }
1116 
1117 
1119 
1120 ostream & operator << (ostream & oss, const CNTV2SignalRouter & inObj)
1121 {
1122  return inObj.Print(oss);
1123 }
1124 
1125 
1126 ostream & operator << (ostream & oss, const NTV2OutputXptIDSet & inObj)
1127 {
1128  NTV2OutputXptIDSetConstIter iter(inObj.begin());
1129  while (iter != inObj.end())
1130  {
1131  oss << ::NTV2OutputCrosspointIDToString(*iter, false);
1132  if (++iter == inObj.end())
1133  break;
1134  oss << ", ";
1135  }
1136  return oss;
1137 }
1138 
1139 ostream & operator << (ostream & oss, const NTV2InputXptIDSet & inObj)
1140 {
1141  NTV2InputXptIDSetConstIter iter(inObj.begin());
1142  while (iter != inObj.end())
1143  {
1144  oss << ::NTV2InputCrosspointIDToString(*iter, false);
1145  if (++iter == inObj.end())
1146  break;
1147  oss << ", ";
1148  }
1149  return oss;
1150 }
1151 
1153 {
1154  registerNum = inRHS.registerNumber;
1155  mask = inRHS.registerMask;
1156  shift = inRHS.registerShift;
1157  value = inRHS.registerValue;
1158  return *this;
1159 }
1160 
1161 ostream & operator << (ostream & inOutStream, const NTV2WidgetIDSet & inObj)
1162 {
1163  for (NTV2WidgetIDSetConstIter iter (inObj.begin ()); iter != inObj.end (); )
1164  {
1165  inOutStream << ::NTV2WidgetIDToString (*iter, true);
1166  if (++iter != inObj.end ())
1167  inOutStream << ",";
1168  }
1169  return inOutStream;
1170 }
1171 
1172 ostream & operator << (ostream & oss, const NTV2XptConnection & inObj)
1173 {
1174  oss << ::NTV2InputCrosspointIDToString(inObj.first) << " <== " << ::NTV2OutputCrosspointIDToString(inObj.second);
1175  return oss;
1176 }
1177 
1178 ostream & operator << (ostream & oss, const NTV2XptConnections & inObj)
1179 {
1180  for (NTV2XptConnectionsConstIter it(inObj.begin()); it != inObj.end(); )
1181  {
1182  oss << *it;
1183  if (++it != inObj.end())
1184  oss << endl;
1185  }
1186  return oss;
1187 }
1188 
NTV2_XptFrameBuffer6YUV
@ NTV2_XptFrameBuffer6YUV
Definition: ntv2enums.h:2608
NTV2_XptFrameBuffer8_DS2RGB
@ NTV2_XptFrameBuffer8_DS2RGB
Definition: ntv2enums.h:2666
CNTV2RegisterExpert::GetCrosspointSelectGroupRegisterInfo
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.
Definition: ntv2registerexpert.cpp:4731
SRFAIL
#define SRFAIL(__x__)
Definition: ntv2signalrouter.cpp:30
NTV2_XptFrameBuffer4YUV
@ NTV2_XptFrameBuffer4YUV
Definition: ntv2enums.h:2563
NTV2_XptDualLinkIn3DSInput
@ NTV2_XptDualLinkIn3DSInput
Definition: ntv2enums.h:2806
SRINFO
#define SRINFO(__x__)
Definition: ntv2signalrouter.cpp:33
NTV2_XptMixer4BGKeyInput
@ NTV2_XptMixer4BGKeyInput
Definition: ntv2enums.h:2837
NTV2_XptMixer3FGVidInput
@ NTV2_XptMixer3FGVidInput
Definition: ntv2enums.h:2836
CNTV2SignalRouter::PrintCodeConfig::mShowComments
bool mShowComments
If true, show comments in the generated code.
Definition: ntv2signalrouter.h:194
FindFirstMatchingRegisterNumber
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...
Definition: ntv2publicinterface.cpp:3573
CNTV2SignalRouter::NTV2OutputCrosspointIDToString
static std::string NTV2OutputCrosspointIDToString(const NTV2OutputXptID inOutputXpt)
Returns a string containing the most compact human-readable form for a given output crosspoint.
Definition: ntv2signalrouter.cpp:351
NTV2_XptHDMIOutInput
@ NTV2_XptHDMIOutInput
Definition: ntv2enums.h:2841
CNTV2SignalRouter::WidgetIDToChannel
static NTV2Channel WidgetIDToChannel(const NTV2WidgetID inWidgetID)
Definition: ntv2signalrouter.cpp:543
NTV2_XptHDMIIn2
@ NTV2_XptHDMIIn2
Definition: ntv2enums.h:2667
NTV2_Xpt425Mux1AInput
@ NTV2_Xpt425Mux1AInput
Definition: ntv2enums.h:2850
NTV2_XptSDIIn5DS2
@ NTV2_XptSDIIn5DS2
Definition: ntv2enums.h:2600
NTV2InputSourceToChannel
NTV2Channel NTV2InputSourceToChannel(const NTV2InputSource inInputSource)
Converts a given NTV2InputSource to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5112
NTV2_XptDualLinkOut7Input
@ NTV2_XptDualLinkOut7Input
Definition: ntv2enums.h:2823
NTV2_Xpt425Mux2BRGB
@ NTV2_Xpt425Mux2BRGB
Definition: ntv2enums.h:2642
NTV2_XptDuallinkOut8DS2
@ NTV2_XptDuallinkOut8DS2
Definition: ntv2enums.h:2634
NTV2WidgetType_Invalid
@ NTV2WidgetType_Invalid
Definition: ntv2enums.h:3067
NTV2RegReadsConstIter
NTV2RegWritesConstIter NTV2RegReadsConstIter
A handy const (read-only) iterator for iterating over the contents of an NTV2RegisterReads instance.
Definition: ntv2publicinterface.h:4073
NTV2_Xpt425Mux1ARGB
@ NTV2_Xpt425Mux1ARGB
Definition: ntv2enums.h:2636
NTV2RoutingEntry
Definition: ntv2publicinterface.h:4102
GetSDIOutputInputXpt
NTV2InputXptID GetSDIOutputInputXpt(const NTV2Channel inChannel, const bool inIsDS2)
Definition: ntv2signalrouter.cpp:970
NTV2_Xpt425Mux1BRGB
@ NTV2_Xpt425Mux1BRGB
Definition: ntv2enums.h:2638
NTV2_XptFrameBuffer1_DS2YUV
@ NTV2_XptFrameBuffer1_DS2YUV
Definition: ntv2enums.h:2651
NTV2_XptSDIOut4InputDS2
@ NTV2_XptSDIOut4InputDS2
Definition: ntv2enums.h:2792
GetOutputDestInputXpt
NTV2InputXptID GetOutputDestInputXpt(const NTV2OutputDestination inOutputDest, const bool inIsSDI_DS2, const UWord inHDMI_Quadrant)
Definition: ntv2signalrouter.cpp:956
NTV2OutputDestination
NTV2OutputDestination
Identifies a specific video output destination.
Definition: ntv2enums.h:1310
GetLUTInputXptFromChannel
NTV2InputXptID GetLUTInputXptFromChannel(const NTV2Channel inLUT)
Definition: ntv2signalrouter.cpp:816
NTV2_XptMixer2KeyYUV
@ NTV2_XptMixer2KeyYUV
Definition: ntv2enums.h:2556
CNTV2SignalRouter::PrintCodeConfig::mFieldBreakText
std::string mFieldBreakText
Text to use for field breaks.
Definition: ntv2signalrouter.h:210
CNTV2SignalRouter::PrintCodeConfig::mChanged
NTV2XptConnections mChanged
Optional, to show changed connections.
Definition: ntv2signalrouter.h:212
CNTV2SignalRouter::PrintCodeConfig::mLineBreakText
std::string mLineBreakText
Text to use for line breaks.
Definition: ntv2signalrouter.h:209
NTV2_XptSDIIn3DS2
@ NTV2_XptSDIIn3DS2
Definition: ntv2enums.h:2574
NTV2_XptDualLinkIn2DSInput
@ NTV2_XptDualLinkIn2DSInput
Definition: ntv2enums.h:2804
NTV2_XptFrameBuffer2RGB
@ NTV2_XptFrameBuffer2RGB
Definition: ntv2enums.h:2535
NTV2InputXptIDSet
std::set< NTV2InputXptID > NTV2InputXptIDSet
A collection of distinct NTV2InputXptID values.
Definition: ntv2signalrouter.h:26
NTV2_XptMixer2BGKeyInput
@ NTV2_XptMixer2BGKeyInput
Definition: ntv2enums.h:2829
GetFrameStoreInputXptFromChannel
NTV2InputXptID GetFrameStoreInputXptFromChannel(const NTV2Channel inChannel, const bool inIsBInput)
Definition: ntv2signalrouter.cpp:790
kRegInvalidValidXptROMRegister
@ kRegInvalidValidXptROMRegister
Definition: ntv2publicinterface.h:848
NTV2_XptMixer2FGKeyInput
@ NTV2_XptMixer2FGKeyInput
Definition: ntv2enums.h:2831
NTV2_XptLUT7Input
@ NTV2_XptLUT7Input
Definition: ntv2enums.h:2779
NTV2_XptSDIOut3InputDS2
@ NTV2_XptSDIOut3InputDS2
Definition: ntv2enums.h:2790
NTV2_XptDuallinkOut7
@ NTV2_XptDuallinkOut7
Definition: ntv2enums.h:2631
NTV2_XptSDIIn6DS2
@ NTV2_XptSDIIn6DS2
Definition: ntv2enums.h:2601
aja::strip
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
NTV2_XptCSC2KeyYUV
@ NTV2_XptCSC2KeyYUV
Definition: ntv2enums.h:2538
NTV2XptConnectionsConstIter
NTV2XptConnections::const_iterator NTV2XptConnectionsConstIter
Definition: ntv2signalrouter.h:40
NTV2_XptCSC7VidInput
@ NTV2_XptCSC7VidInput
Definition: ntv2enums.h:2769
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1343
NTV2_XptCSC5KeyInput
@ NTV2_XptCSC5KeyInput
Definition: ntv2enums.h:2766
NTV2_XptDuallinkOut1
@ NTV2_XptDuallinkOut1
Definition: ntv2enums.h:2531
SRiDBG
#define SRiDBG(__x__)
Definition: ntv2signalrouter.cpp:29
NTV2_XptDualLinkIn1Input
@ NTV2_XptDualLinkIn1Input
Definition: ntv2enums.h:2801
AJARefPtr
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
Definition: ajarefptr.h:89
CNTV2SignalRouter::IsSDIInputWidgetType
static bool IsSDIInputWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:573
NTV2_XptSDIOut5InputDS2
@ NTV2_XptSDIOut5InputDS2
Definition: ntv2enums.h:2794
NTV2WidgetType
NTV2WidgetType
Definition: ntv2enums.h:3021
aja::split
void split(const std::string &str, const char delim, std::vector< std::string > &elems)
Definition: common.cpp:350
GetInputSourceOutputXpt
NTV2OutputXptID GetInputSourceOutputXpt(const NTV2InputSource inInputSource, const bool inIsSDI_DS2, const bool inIsHDMI_RGB, const UWord inHDMI_Quadrant)
Definition: ntv2signalrouter.cpp:893
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
NTV2_XptCSC4VidInput
@ NTV2_XptCSC4VidInput
Definition: ntv2enums.h:2763
NTV2_XptFrameBuffer3_DS2YUV
@ NTV2_XptFrameBuffer3_DS2YUV
Definition: ntv2enums.h:2655
NTV2_FIRST_INPUT_CROSSPOINT
@ NTV2_FIRST_INPUT_CROSSPOINT
Originally 0x01. Changed to 0x00 in SDK 17.1.
Definition: ntv2enums.h:2740
CNTV2SignalRouter::GetConnectionsFromRegs
static bool GetConnectionsFromRegs(const NTV2InputXptIDSet &inInputXptIDs, const NTV2RegisterReads &inRegValues, NTV2XptConnections &outConnections)
Converts a set of crosspoint registers into a set of crosspoint connections.
Definition: ntv2signalrouter.cpp:633
NTV2_XptSDIIn1DS2
@ NTV2_XptSDIIn1DS2
Definition: ntv2enums.h:2553
NTV2_Xpt425Mux3ARGB
@ NTV2_Xpt425Mux3ARGB
Definition: ntv2enums.h:2644
CNTV2SignalRouter::HasConnection
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...
Definition: ntv2signalrouter.cpp:83
CNTV2SignalRouter::GetWidgetOutputs
static bool GetWidgetOutputs(const NTV2WidgetID inWidgetID, NTV2OutputXptIDSet &outOutputs)
Returns the output crosspoints known to be "owned" by the given widget.
Definition: ntv2signalrouter.cpp:494
NTV2_XptMixer3BGKeyInput
@ NTV2_XptMixer3BGKeyInput
Definition: ntv2enums.h:2833
CNTV2SignalRouter::CompareConnections
static bool CompareConnections(const NTV2XptConnections &inLHS, const NTV2XptConnections &inRHS, NTV2XptConnections &outNew, NTV2XptConnections &outRemoved)
Compares two sets of crosspoint connections.
Definition: ntv2signalrouter.cpp:660
NTV2_XptSDIIn2DS2
@ NTV2_XptSDIIn2DS2
Definition: ntv2enums.h:2554
NTV2_XptDualLinkIn8Input
@ NTV2_XptDualLinkIn8Input
Definition: ntv2enums.h:2815
NTV2_XptDualLinkIn5DSInput
@ NTV2_XptDualLinkIn5DSInput
Definition: ntv2enums.h:2810
NTV2_XptDuallinkOut7DS2
@ NTV2_XptDuallinkOut7DS2
Definition: ntv2enums.h:2632
NTV2_XptFrameBuffer8YUV
@ NTV2_XptFrameBuffer8YUV
Definition: ntv2enums.h:2612
NTV2_XptFrameBuffer4_DS2YUV
@ NTV2_XptFrameBuffer4_DS2YUV
Definition: ntv2enums.h:2657
NTV2_XptFrameBuffer3YUV
@ NTV2_XptFrameBuffer3YUV
Definition: ntv2enums.h:2561
NTV2_XptFrameBuffer3DS2Input
@ NTV2_XptFrameBuffer3DS2Input
Definition: ntv2enums.h:2746
NTV2_XptLUT3Input
@ NTV2_XptLUT3Input
Definition: ntv2enums.h:2775
NTV2_XptCSC7KeyYUV
@ NTV2_XptCSC7KeyYUV
Definition: ntv2enums.h:2625
CNTV2SignalRouter::PrintCodeConfig::mUseRouter
bool mUseRouter
If true, use calls to CNTV2DeviceRouter instead of CNTV2Card.
Definition: ntv2signalrouter.h:196
NTV2_Xpt425Mux2AYUV
@ NTV2_Xpt425Mux2AYUV
Definition: ntv2enums.h:2639
CNTV2SignalRouter::PrintCodeConfig::mPreFunctionText
std::string mPreFunctionText
Function name prefix text.
Definition: ntv2signalrouter.h:205
CNTV2SignalRouter::PrintCodeConfig::mPostClassText
std::string mPostClassText
Class postfix text.
Definition: ntv2signalrouter.h:200
NTV2_XptMixer4KeyYUV
@ NTV2_XptMixer4KeyYUV
Definition: ntv2enums.h:2618
NTV2OutputDestinationToChannel
NTV2Channel NTV2OutputDestinationToChannel(const NTV2OutputDestination inOutputDest)
Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.
Definition: ntv2utils.cpp:5220
CNTV2SignalRouter::GetRegisterWrites
virtual bool GetRegisterWrites(NTV2RegisterWrites &outRegWrites) const
Returns a sequence of NTV2RegInfo values that can be written to an NTV2 device using its WriteRegiste...
Definition: ntv2signalrouter.cpp:132
CNTV2SignalRouter::PrintCodeConfig::mRouterVarName
std::string mRouterVarName
Name to use for CNTV2DeviceRouter variable.
Definition: ntv2signalrouter.h:208
NTV2XptConnection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnection
Definition: ntv2signalrouter.h:38
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
NTV2_XptFrameBuffer7_DS2RGB
@ NTV2_XptFrameBuffer7_DS2RGB
Definition: ntv2enums.h:2664
NTV2_Xpt425Mux2BYUV
@ NTV2_Xpt425Mux2BYUV
Definition: ntv2enums.h:2641
SRWARN
#define SRWARN(__x__)
Definition: ntv2signalrouter.cpp:31
NTV2_WIDGET_INVALID
@ NTV2_WIDGET_INVALID
Definition: ntv2enums.h:3016
NTV2_XptMixer3FGKeyInput
@ NTV2_XptMixer3FGKeyInput
Definition: ntv2enums.h:2835
NTV2_XptSDIOut7Input
@ NTV2_XptSDIOut7Input
Definition: ntv2enums.h:2797
CNTV2SignalRouter::IsInitialized
static bool IsInitialized(void)
Definition: ntv2signalrouter.cpp:335
NTV2_XptDuallinkIn7
@ NTV2_XptDuallinkIn7
Definition: ntv2enums.h:2691
NTV2_XptCSC6VidYUV
@ NTV2_XptCSC6VidYUV
Definition: ntv2enums.h:2620
NTV2_XptFrameBuffer1RGB
@ NTV2_XptFrameBuffer1RGB
Definition: ntv2enums.h:2526
CNTV2SignalRouter::PrintCodeConfig::mPostVariableText
std::string mPostVariableText
Variable postfix text.
Definition: ntv2signalrouter.h:202
NTV2_XptDuallinkOut6DS2
@ NTV2_XptDuallinkOut6DS2
Definition: ntv2enums.h:2630
NTV2_XptHDMIOutQ3Input
@ NTV2_XptHDMIOutQ3Input
Definition: ntv2enums.h:2844
NTV2_XptSDIOut2InputDS2
@ NTV2_XptSDIOut2InputDS2
Definition: ntv2enums.h:2788
NTV2_XptFrameBuffer4Input
@ NTV2_XptFrameBuffer4Input
Definition: ntv2enums.h:2747
CNTV2SignalRouter::Initialize
static bool Initialize(void)
Explicitly allocates and initializes the Routing Expert singleton.
Definition: ntv2signalrouter.cpp:321
NTV2_XptSDIOut8InputDS2
@ NTV2_XptSDIOut8InputDS2
Definition: ntv2enums.h:2800
NTV2InputXptID
enum NTV2InputCrosspointID NTV2InputXptID
NTV2_XptFrameBuffer3Input
@ NTV2_XptFrameBuffer3Input
Definition: ntv2enums.h:2745
NTV2_XptHDMIIn2Q2
@ NTV2_XptHDMIIn2Q2
Definition: ntv2enums.h:2669
NTV2_OUTPUT_CROSSPOINT_INVALID
@ NTV2_OUTPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2698
NTV2_XptDualLinkOut5Input
@ NTV2_XptDualLinkOut5Input
Definition: ntv2enums.h:2821
GetDLInOutputXptFromChannel
NTV2OutputXptID GetDLInOutputXptFromChannel(const NTV2Channel inChannel)
Definition: ntv2signalrouter.cpp:945
NTV2_XptSDIOut4Input
@ NTV2_XptSDIOut4Input
Definition: ntv2enums.h:2791
CNTV2SignalRouter::GetAllRoutingRegInfos
static bool GetAllRoutingRegInfos(const NTV2InputXptIDSet &inInputs, NTV2RegisterWrites &outRegInfos)
Returns all routing registers for the given set of input crosspoints.
Definition: ntv2signalrouter.cpp:477
NTV2_XptFrameBuffer6_DS2RGB
@ NTV2_XptFrameBuffer6_DS2RGB
Definition: ntv2enums.h:2662
NTV2_XptCSC5KeyYUV
@ NTV2_XptCSC5KeyYUV
Definition: ntv2enums.h:2569
NTV2_XptMixer4BGVidInput
@ NTV2_XptMixer4BGVidInput
Definition: ntv2enums.h:2838
CNTV2SignalRouter::Is12GSDIWidgetType
static bool Is12GSDIWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:591
NTV2RoutingEntry::operator=
NTV2RoutingEntry & operator=(const NTV2RegInfo &inRHS)
Assigns an NTV2RegInfo to me.
Definition: ntv2signalrouter.cpp:1152
ntv2debug.h
NTV2_XptCSC7VidYUV
@ NTV2_XptCSC7VidYUV
Definition: ntv2enums.h:2623
CNTV2SignalRouter::IsHDMIOutWidgetType
static bool IsHDMIOutWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:627
NTV2_XptCSC1VidInput
@ NTV2_XptCSC1VidInput
Definition: ntv2enums.h:2757
NTV2_Xpt425Mux3AInput
@ NTV2_Xpt425Mux3AInput
Definition: ntv2enums.h:2854
NTV2_XptCSC4KeyInput
@ NTV2_XptCSC4KeyInput
Definition: ntv2enums.h:2764
GetSDIInputOutputXptFromChannel
NTV2OutputXptID GetSDIInputOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsDS2)
Definition: ntv2signalrouter.cpp:921
NTV2_XptCSC6KeyInput
@ NTV2_XptCSC6KeyInput
Definition: ntv2enums.h:2768
NTV2_XptFrameBuffer3RGB
@ NTV2_XptFrameBuffer3RGB
Definition: ntv2enums.h:2562
NTV2_XptMixer2VidYUV
@ NTV2_XptMixer2VidYUV
Definition: ntv2enums.h:2555
NTV2_XptSDIIn4DS2
@ NTV2_XptSDIIn4DS2
Definition: ntv2enums.h:2575
NTV2_XptFrameBuffer7DS2Input
@ NTV2_XptFrameBuffer7DS2Input
Definition: ntv2enums.h:2754
RoutingExpert::DisposeInstance
static bool DisposeInstance(void)
Definition: ntv2routingexpert.cpp:37
NTV2_XptCSC3KeyInput
@ NTV2_XptCSC3KeyInput
Definition: ntv2enums.h:2762
NTV2_XptHDMIIn2Q2RGB
@ NTV2_XptHDMIIn2Q2RGB
Definition: ntv2enums.h:2670
NTV2DeviceCanDo425Mux
bool NTV2DeviceCanDo425Mux(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:845
NTV2_Xpt425Mux2BInput
@ NTV2_Xpt425Mux2BInput
Definition: ntv2enums.h:2853
CNTV2SignalRouter::PrintCodeConfig::mPostCommentText
std::string mPostCommentText
Comment postfix text.
Definition: ntv2signalrouter.h:198
NTV2_CHANNEL_INVALID
@ NTV2_CHANNEL_INVALID
Definition: ntv2enums.h:1354
NTV2_XptLUT2Input
@ NTV2_XptLUT2Input
Definition: ntv2enums.h:2774
NTV2_XptDualLinkIn7DSInput
@ NTV2_XptDualLinkIn7DSInput
Definition: ntv2enums.h:2814
NTV2_XptFrameBuffer6Input
@ NTV2_XptFrameBuffer6Input
Definition: ntv2enums.h:2751
NTV2_XptDualLinkIn3Input
@ NTV2_XptDualLinkIn3Input
Definition: ntv2enums.h:2805
NTV2_XptHDMIIn2Q4RGB
@ NTV2_XptHDMIIn2Q4RGB
Definition: ntv2enums.h:2674
CNTV2SignalRouter::HasInput
virtual bool HasInput(const NTV2InputXptID inSignalInput) const
Answers true if I contain a connection that involves the given input (signal sink).
Definition: ntv2signalrouter.cpp:70
ntv2signalrouter.h
Declares CNTV2SignalRouter class.
CNTV2SignalRouter::NTV2InputCrosspointIDToString
static std::string NTV2InputCrosspointIDToString(const NTV2InputXptID inInputXpt)
Returns a string containing the most compact human-readable form for a given input crosspoint.
Definition: ntv2signalrouter.cpp:343
NTV2_XptCSC6KeyYUV
@ NTV2_XptCSC6KeyYUV
Definition: ntv2enums.h:2622
NTV2_XptFrameBuffer2_DS2YUV
@ NTV2_XptFrameBuffer2_DS2YUV
Definition: ntv2enums.h:2653
NTV2_XptMixer4FGVidInput
@ NTV2_XptMixer4FGVidInput
Definition: ntv2enums.h:2840
NTV2_XptDualLinkIn7Input
@ NTV2_XptDualLinkIn7Input
Definition: ntv2enums.h:2813
NTV2_XptLUT1Input
@ NTV2_XptLUT1Input
Definition: ntv2enums.h:2773
CNTV2SignalRouter::ToCodeString
static bool ToCodeString(std::string &outCode, const NTV2XptConnections &inConnections, const PrintCodeConfig &inConfig=PrintCodeConfig())
Converts the given map of crosspoint connections into source code.
Definition: ntv2signalrouter.cpp:222
NTV2WidgetIDSetConstIter
NTV2WidgetIDSet::const_iterator NTV2WidgetIDSetConstIter
An iterator for iterating over a read-only NTV2WidgetIDSet.
Definition: ntv2signalrouter.h:33
NTV2_XptFrameBuffer4_DS2RGB
@ NTV2_XptFrameBuffer4_DS2RGB
Definition: ntv2enums.h:2658
NTV2InputXptIDSetConstIter
NTV2InputXptIDSet::const_iterator NTV2InputXptIDSetConstIter
A const iterator for iterating over an NTV2InputXptIDSet.
Definition: ntv2signalrouter.h:27
NTV2_XptFrameBuffer1_DS2RGB
@ NTV2_XptFrameBuffer1_DS2RGB
Definition: ntv2enums.h:2652
CNTV2SignalRouter::IsSDIOutputWidgetType
static bool IsSDIOutputWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:579
ntv2routingexpert.h
Declares RoutingExpert class used by CNTV2SignalRouter.
NTV2_XptCSC3VidRGB
@ NTV2_XptCSC3VidRGB
Definition: ntv2enums.h:2581
aja::lower
std::string & lower(std::string &str)
Definition: common.cpp:436
CNTV2SignalRouter::GetConnectedOutput
virtual NTV2OutputXptID GetConnectedOutput(const NTV2InputXptID inSignalInput) const
Definition: ntv2signalrouter.cpp:76
NTV2_XptFrameBuffer2_DS2RGB
@ NTV2_XptFrameBuffer2_DS2RGB
Definition: ntv2enums.h:2654
NTV2_XptFrameBuffer7Input
@ NTV2_XptFrameBuffer7Input
Definition: ntv2enums.h:2753
NTV2_XptHDMIIn1Q2RGB
@ NTV2_XptHDMIIn1Q2RGB
Definition: ntv2enums.h:2591
NTV2_XptFrameBuffer1Input
@ NTV2_XptFrameBuffer1Input
Definition: ntv2enums.h:2741
NTV2_XptCSC3KeyYUV
@ NTV2_XptCSC3KeyYUV
Definition: ntv2enums.h:2582
CNTV2SignalRouter::GetConnections
virtual NTV2XptConnections GetConnections(void) const
Definition: ntv2signalrouter.h:143
NTV2_XptDuallinkOut3
@ NTV2_XptDuallinkOut3
Definition: ntv2enums.h:2576
NTV2_XptDualLinkIn2Input
@ NTV2_XptDualLinkIn2Input
Definition: ntv2enums.h:2803
NTV2_XptCSC4VidRGB
@ NTV2_XptCSC4VidRGB
Definition: ntv2enums.h:2584
NTV2_XptCSC1VidYUV
@ NTV2_XptCSC1VidYUV
Definition: ntv2enums.h:2521
NTV2_XptSDIIn7
@ NTV2_XptSDIIn7
Definition: ntv2enums.h:2602
GetTSIMuxInputXptFromChannel
NTV2InputXptID GetTSIMuxInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
Definition: ntv2signalrouter.cpp:1021
NTV2_XptFrameBuffer7_DS2YUV
@ NTV2_XptFrameBuffer7_DS2YUV
Definition: ntv2enums.h:2663
NTV2_XptLUT6Out
@ NTV2_XptLUT6Out
Definition: ntv2enums.h:2693
CNTV2SignalRouter::PrintCodeConfig::mPreCommentText
std::string mPreCommentText
Comment prefix text.
Definition: ntv2signalrouter.h:197
aja::replace
std::string & replace(std::string &str, const std::string &from, const std::string &to)
Definition: common.cpp:110
CNTV2SignalRouter::GetRouteROMInfoFromReg
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.
Definition: ntv2signalrouter.cpp:1057
NTV2_XptCSC5VidRGB
@ NTV2_XptCSC5VidRGB
Definition: ntv2enums.h:2568
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
Tokenize
static NTV2StringList & Tokenize(const string &inString, NTV2StringList &outTokens, const string &inDelimiters=" ", bool inTrimEmpty=false)
Definition: ntv2signalrouter.cpp:36
NTV2DeviceCanDoWidget
bool NTV2DeviceCanDoWidget(const NTV2DeviceID inDeviceID, const NTV2WidgetID inWidgetID)
Definition: ntv2devicefeatures.hpp:31733
CNTV2SignalRouter::CreateFromString
static bool CreateFromString(const std::string &inString, NTV2XptConnections &outConnections)
Decodes a given string into a map of crosspoint connections.
NTV2_OUTPUT_DEST_IS_HDMI
#define NTV2_OUTPUT_DEST_IS_HDMI(_dest_)
Definition: ntv2enums.h:1330
NTV2_XptLUT5Out
@ NTV2_XptLUT5Out
Definition: ntv2enums.h:2686
NTV2_XptCSC4VidYUV
@ NTV2_XptCSC4VidYUV
Definition: ntv2enums.h:2583
NTV2_XptSDIIn3
@ NTV2_XptSDIIn3
Definition: ntv2enums.h:2572
NTV2_XptSDIIn8
@ NTV2_XptSDIIn8
Definition: ntv2enums.h:2603
NTV2_XptMixer1FGKeyInput
@ NTV2_XptMixer1FGKeyInput
Definition: ntv2enums.h:2827
NTV2_XptSDIIn7DS2
@ NTV2_XptSDIIn7DS2
Definition: ntv2enums.h:2604
CNTV2SignalRouter::IsRGBOnlyInputXpt
static bool IsRGBOnlyInputXpt(const NTV2InputXptID inInputXpt)
Definition: ntv2signalrouter.cpp:525
NTV2_XptHDMIIn1Q2
@ NTV2_XptHDMIIn1Q2
Definition: ntv2enums.h:2590
NTV2_XptFrameBuffer1YUV
@ NTV2_XptFrameBuffer1YUV
Definition: ntv2enums.h:2525
NTV2WidgetType_FrameStore
@ NTV2WidgetType_FrameStore
Definition: ntv2enums.h:3023
NTV2_XptSDIOut2Input
@ NTV2_XptSDIOut2Input
Definition: ntv2enums.h:2787
NTV2_XptDuallinkOut2DS2
@ NTV2_XptDuallinkOut2DS2
Definition: ntv2enums.h:2566
NTV2_XptDuallinkOut1DS2
@ NTV2_XptDuallinkOut1DS2
Definition: ntv2enums.h:2565
NTV2_XptDuallinkOut4DS2
@ NTV2_XptDuallinkOut4DS2
Definition: ntv2enums.h:2579
CNTV2SignalRouter::PrintCodeConfig::mPostFunctionText
std::string mPostFunctionText
Function name postfix text.
Definition: ntv2signalrouter.h:206
GetLUTOutputXptFromChannel
NTV2OutputXptID GetLUTOutputXptFromChannel(const NTV2Channel inLUT)
Definition: ntv2signalrouter.cpp:866
NTV2_XptFrameBuffer8_DS2YUV
@ NTV2_XptFrameBuffer8_DS2YUV
Definition: ntv2enums.h:2665
CNTV2SignalRouter::PrintCodeConfig::mShowDeclarations
bool mShowDeclarations
If true, show variable declarations in the generated code.
Definition: ntv2signalrouter.h:195
CNTV2SignalRouter::Is3GSDIWidgetType
static bool Is3GSDIWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:585
NTV2_XptHDMIIn4RGB
@ NTV2_XptHDMIIn4RGB
Definition: ntv2enums.h:2678
NTV2RegisterReadsConstIter
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Definition: ntv2publicinterface.h:4073
NTV2_XptLUT4Out
@ NTV2_XptLUT4Out
Definition: ntv2enums.h:2685
sSignalRouterRegMasks
static const ULWord sSignalRouterRegMasks[]
Definition: ntv2signalrouter.cpp:104
CNTV2SignalRouter::PrintCodeConfig::mNew
NTV2XptConnections mNew
Optional, to show new connections.
Definition: ntv2signalrouter.h:211
operator<<
ostream & operator<<(ostream &oss, const CNTV2SignalRouter &inObj)
Definition: ntv2signalrouter.cpp:1120
CNTV2SignalRouter::PrintCodeConfig::mPostXptText
std::string mPostXptText
Crosspoint variable postfix text.
Definition: ntv2signalrouter.h:204
NTV2InputCrosspointIDToString
std::string NTV2InputCrosspointIDToString(const NTV2InputCrosspointID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:5879
NTV2_XptDuallinkIn5
@ NTV2_XptDuallinkIn5
Definition: ntv2enums.h:2689
NTV2_Xpt425Mux4BRGB
@ NTV2_Xpt425Mux4BRGB
Definition: ntv2enums.h:2650
NTV2_OUTPUT_DEST_IS_ANALOG
#define NTV2_OUTPUT_DEST_IS_ANALOG(_dest_)
Definition: ntv2enums.h:1331
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2RegisterReads
NTV2RegWrites NTV2RegisterReads
Definition: ntv2publicinterface.h:4072
GetTSIMuxOutputXptFromChannel
NTV2OutputXptID GetTSIMuxOutputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB, const bool inIsRGB)
Definition: ntv2signalrouter.cpp:1033
NTV2_XptCSC7VidRGB
@ NTV2_XptCSC7VidRGB
Definition: ntv2enums.h:2624
NTV2_XptFrameBuffer6_DS2YUV
@ NTV2_XptFrameBuffer6_DS2YUV
Definition: ntv2enums.h:2661
NTV2_XptCSC8VidInput
@ NTV2_XptCSC8VidInput
Definition: ntv2enums.h:2771
NTV2_XptDualLinkOut4Input
@ NTV2_XptDualLinkOut4Input
Definition: ntv2enums.h:2820
NTV2_XptHDMIIn1Q4RGB
@ NTV2_XptHDMIIn1Q4RGB
Definition: ntv2enums.h:2595
NTV2_XptCSC8VidRGB
@ NTV2_XptCSC8VidRGB
Definition: ntv2enums.h:2627
NTV2_XptCSC3VidInput
@ NTV2_XptCSC3VidInput
Definition: ntv2enums.h:2761
ntv2utils.h
Declares numerous NTV2 utility functions.
NTV2_XptLUT2Out
@ NTV2_XptLUT2Out
Definition: ntv2enums.h:2680
NTV2_XptLUT8Input
@ NTV2_XptLUT8Input
Definition: ntv2enums.h:2780
NTV2_XptFrameBuffer8DS2Input
@ NTV2_XptFrameBuffer8DS2Input
Definition: ntv2enums.h:2756
NTV2_XptMixer2FGVidInput
@ NTV2_XptMixer2FGVidInput
Definition: ntv2enums.h:2832
NTV2_INPUT_SOURCE_IS_HDMI
#define NTV2_INPUT_SOURCE_IS_HDMI(_inpSrc_)
Definition: ntv2enums.h:1272
CNTV2SignalRouter::StringToNTV2InputCrosspointID
static NTV2InputXptID StringToNTV2InputCrosspointID(const std::string &inStr)
Returns a string containing the most compact human-readable form for a given input crosspoint.
Definition: ntv2signalrouter.cpp:359
NTV2_XptHDMIIn2Q3RGB
@ NTV2_XptHDMIIn2Q3RGB
Definition: ntv2enums.h:2672
NTV2_XptFrameBuffer5_DS2RGB
@ NTV2_XptFrameBuffer5_DS2RGB
Definition: ntv2enums.h:2660
NTV2OutputXptIDSet
std::set< NTV2OutputXptID > NTV2OutputXptIDSet
A collection of distinct NTV2OutputXptID values.
Definition: ntv2signalrouter.h:18
NTV2_Xpt425Mux4AYUV
@ NTV2_Xpt425Mux4AYUV
Definition: ntv2enums.h:2647
CNTV2SignalRouter::PrintCodeConfig::mDeviceVarName
std::string mDeviceVarName
Name to use for CNTV2Card variable.
Definition: ntv2signalrouter.h:207
NTV2_XptSDIOut1InputDS2
@ NTV2_XptSDIOut1InputDS2
Definition: ntv2enums.h:2786
NTV2_XptAnalogIn
@ NTV2_XptAnalogIn
Definition: ntv2enums.h:2544
NTV2_XptFrameBuffer1DS2Input
@ NTV2_XptFrameBuffer1DS2Input
Definition: ntv2enums.h:2742
NTV2_XptSDIIn6
@ NTV2_XptSDIIn6
Definition: ntv2enums.h:2599
NTV2Connection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2Connection
This links an NTV2InputXptID and an NTV2OutputXptID.
Definition: ntv2signalrouter.h:38
NTV2_Xpt425Mux2ARGB
@ NTV2_Xpt425Mux2ARGB
Definition: ntv2enums.h:2640
NTV2WidgetID
NTV2WidgetID
Definition: ntv2enums.h:2895
NTV2_Xpt425Mux1AYUV
@ NTV2_Xpt425Mux1AYUV
Definition: ntv2enums.h:2635
CNTV2SignalRouter::PrintCodeConfig::mPreClassText
std::string mPreClassText
Class prefix text.
Definition: ntv2signalrouter.h:199
GetDLInInputXptFromChannel
NTV2InputXptID GetDLInInputXptFromChannel(const NTV2Channel inChannel, const bool inLinkB)
Definition: ntv2signalrouter.cpp:824
NTV2_Xpt425Mux3BInput
@ NTV2_Xpt425Mux3BInput
Definition: ntv2enums.h:2855
NTV2_XptHDMIOutQ1Input
@ NTV2_XptHDMIOutQ1Input
Definition: ntv2enums.h:2842
NTV2_Xpt425Mux1BYUV
@ NTV2_Xpt425Mux1BYUV
Definition: ntv2enums.h:2637
CNTV2SignalRouter
This class is a collection of widget input-to-output connections that can be applied all-at-once to a...
Definition: ntv2signalrouter.h:56
CNTV2SignalRouter::WidgetIDFromTypeAndChannel
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
Definition: ntv2signalrouter.cpp:551
NTV2_XptSDIIn8DS2
@ NTV2_XptSDIIn8DS2
Definition: ntv2enums.h:2605
NTV2StringList
std::vector< std::string > NTV2StringList
Definition: ntv2utils.h:1143
RoutingExpert::GetInstance
static RoutingExpertPtr GetInstance(const bool inCreateIfNecessary=true)
Definition: ntv2routingexpert.cpp:29
NTV2_XptLUT4Input
@ NTV2_XptLUT4Input
Definition: ntv2enums.h:2776
NTV2_XptBlack
@ NTV2_XptBlack
Definition: ntv2enums.h:2516
NTV2_INPUT_CROSSPOINT_INVALID
@ NTV2_INPUT_CROSSPOINT_INVALID
Definition: ntv2enums.h:2875
NTV2_XptHDMIIn4
@ NTV2_XptHDMIIn4
Definition: ntv2enums.h:2677
NTV2_OUTPUT_DEST_IS_SDI
#define NTV2_OUTPUT_DEST_IS_SDI(_dest_)
Definition: ntv2enums.h:1332
NTV2_XptFrameBuffer4DS2Input
@ NTV2_XptFrameBuffer4DS2Input
Definition: ntv2enums.h:2748
NTV2_XptCSC1KeyYUV
@ NTV2_XptCSC1KeyYUV
Definition: ntv2enums.h:2533
GetMixerFGInputXpt
NTV2InputXptID GetMixerFGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
Definition: ntv2signalrouter.cpp:996
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1357
NTV2RegInfo::registerValue
ULWord registerValue
My register value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3979
NTV2_XptMixer3VidYUV
@ NTV2_XptMixer3VidYUV
Definition: ntv2enums.h:2614
NTV2_XptSDIOut5Input
@ NTV2_XptSDIOut5Input
Definition: ntv2enums.h:2793
CNTV2SignalRouter::Compare
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...
Definition: ntv2signalrouter.cpp:164
NTV2_XptSDIIn2
@ NTV2_XptSDIIn2
Definition: ntv2enums.h:2518
NTV2_XptHDMIIn2RGB
@ NTV2_XptHDMIIn2RGB
Definition: ntv2enums.h:2668
CNTV2SignalRouter::GetWidgetIDs
static bool GetWidgetIDs(const NTV2DeviceID inDeviceID, NTV2WidgetIDSet &outWidgets)
Returns the widget IDs supported by the given device.
Definition: ntv2signalrouter.cpp:375
NTV2_XptDuallinkIn6
@ NTV2_XptDuallinkIn6
Definition: ntv2enums.h:2690
CNTV2SignalRouter::GetAllWidgetInputs
static bool GetAllWidgetInputs(const NTV2DeviceID inDeviceID, NTV2InputXptIDSet &outInputs)
Returns all supported widget input crosspoints for the given device.
Definition: ntv2signalrouter.cpp:452
CNTV2SignalRouter::IsDualLinkOutWidgetType
static bool IsDualLinkOutWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:609
CNTV2SignalRouter::IsHDMIWidgetType
static bool IsHDMIWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:615
NTV2InputSource
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1253
AJAAutoLock
Definition: lock.h:89
ntv2devicefeatures.hh
Declares NTV2DeviceCanDo... and NTV2DeviceGetNum... functions. This module is included at compile tim...
CNTV2SignalRouter::ResetFromRegisters
virtual bool ResetFromRegisters(const NTV2InputXptIDSet &inInputXpts, const NTV2RegisterReads &inRegReads)
Resets me, erasing any/all existing connections, then rebuilding my connections from the given regist...
Definition: ntv2signalrouter.cpp:108
NTV2_XptDualLinkIn4Input
@ NTV2_XptDualLinkIn4Input
Definition: ntv2enums.h:2807
NTV2_XptCSC4KeyYUV
@ NTV2_XptCSC4KeyYUV
Definition: ntv2enums.h:2585
NTV2_XptSDIOut8Input
@ NTV2_XptSDIOut8Input
Definition: ntv2enums.h:2799
NTV2_XptLUT5Input
@ NTV2_XptLUT5Input
Definition: ntv2enums.h:2777
NTV2_XptFrameBuffer8RGB
@ NTV2_XptFrameBuffer8RGB
Definition: ntv2enums.h:2613
NTV2_XptCSC8KeyInput
@ NTV2_XptCSC8KeyInput
Definition: ntv2enums.h:2772
NTV2_XptMixer1FGVidInput
@ NTV2_XptMixer1FGVidInput
Definition: ntv2enums.h:2828
CNTV2SignalRouter::GetWidgetForOutput
static bool GetWidgetForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified output crosspoint.
Definition: ntv2signalrouter.cpp:422
NTV2_XptFrameBuffer8Input
@ NTV2_XptFrameBuffer8Input
Definition: ntv2enums.h:2755
NTV2_XptHDMIIn2Q3
@ NTV2_XptHDMIIn2Q3
Definition: ntv2enums.h:2671
NTV2_XptMixer4FGKeyInput
@ NTV2_XptMixer4FGKeyInput
Definition: ntv2enums.h:2839
CNTV2SignalRouter::GetWidgetsForInput
static bool GetWidgetsForInput(const NTV2InputXptID inInputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified input crosspoint.
Definition: ntv2signalrouter.cpp:385
GetMixerOutputXptFromChannel
NTV2OutputXptID GetMixerOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey)
Definition: ntv2signalrouter.cpp:983
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5647
NTV2_XptHDMIIn1Q4
@ NTV2_XptHDMIIn1Q4
Definition: ntv2enums.h:2594
NTV2_XptFrameBuffer6RGB
@ NTV2_XptFrameBuffer6RGB
Definition: ntv2enums.h:2609
NTV2_XptDualLinkIn6DSInput
@ NTV2_XptDualLinkIn6DSInput
Definition: ntv2enums.h:2812
NTV2_XptLUT3Out
@ NTV2_XptLUT3Out
Definition: ntv2enums.h:2684
NTV2_XptFrameBuffer2Input
@ NTV2_XptFrameBuffer2Input
Definition: ntv2enums.h:2743
false
#define false
Definition: ntv2devicefeatures.h:25
NTV2_XptDualLinkIn8DSInput
@ NTV2_XptDualLinkIn8DSInput
Definition: ntv2enums.h:2816
NTV2_XptFrameBuffer4RGB
@ NTV2_XptFrameBuffer4RGB
Definition: ntv2enums.h:2564
NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
Definition: ntv2publicinterface.h:3977
NTV2OutputXptIDSetConstIter
NTV2OutputXptIDSet::const_iterator NTV2OutputXptIDSetConstIter
A const iterator for iterating over an NTV2OutputXptIDSet.
Definition: ntv2signalrouter.h:19
common.h
Private include file for all ajabase sources.
NTV2_XptMixer1BGVidInput
@ NTV2_XptMixer1BGVidInput
Definition: ntv2enums.h:2826
NTV2_XptDuallinkIn8
@ NTV2_XptDuallinkIn8
Definition: ntv2enums.h:2692
NTV2RegisterWrites
std::vector< NTV2RegInfo > NTV2RegisterWrites
Definition: ntv2publicinterface.h:4069
NTV2_Xpt425Mux4ARGB
@ NTV2_Xpt425Mux4ARGB
Definition: ntv2enums.h:2648
NTV2SignalConnection
std::pair< NTV2InputXptID, NTV2OutputXptID > NTV2SignalConnection
Definition: ntv2signalrouter.h:38
NTV2_XptMixer3BGVidInput
@ NTV2_XptMixer3BGVidInput
Definition: ntv2enums.h:2834
NTV2_XptHDMIIn1
@ NTV2_XptHDMIIn1
Definition: ntv2enums.h:2545
NTV2RegInfo::registerNumber
ULWord registerNumber
My register number to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3978
NTV2_XptHDMIIn1RGB
@ NTV2_XptHDMIIn1RGB
Definition: ntv2enums.h:2546
NTV2_XptCSC7KeyInput
@ NTV2_XptCSC7KeyInput
Definition: ntv2enums.h:2770
gRoutingExpertLock
static AJALock gRoutingExpertLock
Definition: ntv2routingexpert.h:141
CNTV2SignalRouter::IsDualLinkWidgetType
static bool IsDualLinkWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:597
GetMixerBGInputXpt
NTV2InputXptID GetMixerBGInputXpt(const NTV2Channel inChannel, const bool inIsKey)
Definition: ntv2signalrouter.cpp:1009
CNTV2SignalRouter::Print
virtual std::ostream & Print(std::ostream &inOutStream, const bool inForRetailDisplay=false) const
Prints me in a human-readable format to the given output stream.
Definition: ntv2signalrouter.cpp:200
NTV2_XptDualLinkOut3Input
@ NTV2_XptDualLinkOut3Input
Definition: ntv2enums.h:2819
NTV2XptConnections
std::map< NTV2InputXptID, NTV2OutputXptID > NTV2XptConnections
Definition: ntv2signalrouter.h:39
NTV2_XptDuallinkIn3
@ NTV2_XptDuallinkIn3
Definition: ntv2enums.h:2687
NTV2_XptFrameBuffer2YUV
@ NTV2_XptFrameBuffer2YUV
Definition: ntv2enums.h:2534
std
Definition: json.hpp:5362
CNTV2SignalRouter::IsDualLinkInWidgetType
static bool IsDualLinkInWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:603
CNTV2SignalRouter::WidgetIDToType
static NTV2WidgetType WidgetIDToType(const NTV2WidgetID inWidgetID)
Definition: ntv2signalrouter.cpp:559
NTV2_XptFrameBuffer5RGB
@ NTV2_XptFrameBuffer5RGB
Definition: ntv2enums.h:2607
NTV2_XptFrameBuffer5DS2Input
@ NTV2_XptFrameBuffer5DS2Input
Definition: ntv2enums.h:2750
kRegFirstValidXptROMRegister
@ kRegFirstValidXptROMRegister
Definition: ntv2publicinterface.h:845
NTV2RegInfo::registerShift
ULWord registerShift
My register shift value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3981
NTV2_XptFrameBuffer5_DS2YUV
@ NTV2_XptFrameBuffer5_DS2YUV
Definition: ntv2enums.h:2659
NTV2_XptSDIIn1
@ NTV2_XptSDIIn1
Definition: ntv2enums.h:2517
CNTV2SignalRouter::PrintCodeConfig::mPreXptText
std::string mPreXptText
Crosspoint variable prefix text.
Definition: ntv2signalrouter.h:203
CNTV2SignalRouter::PrintCode
virtual bool PrintCode(std::string &outCode, const PrintCodeConfig &inConfig=PrintCodeConfig()) const
Prints me as source code to the given output stream.
Definition: ntv2signalrouter.cpp:215
NTV2_XptFrameBuffer7YUV
@ NTV2_XptFrameBuffer7YUV
Definition: ntv2enums.h:2610
NTV2_XptDualLinkIn5Input
@ NTV2_XptDualLinkIn5Input
Definition: ntv2enums.h:2809
CNTV2SignalRouter::GetAllWidgetOutputs
static bool GetAllWidgetOutputs(const NTV2DeviceID inDeviceID, NTV2OutputXptIDSet &outOutputs)
Returns all supported widget output crosspoints for the given device.
Definition: ntv2signalrouter.cpp:501
NTV2_XptSDIOut6Input
@ NTV2_XptSDIOut6Input
Definition: ntv2enums.h:2795
NTV2_XptMixer2BGVidInput
@ NTV2_XptMixer2BGVidInput
Definition: ntv2enums.h:2830
CNTV2SignalRouter::StringToNTV2OutputCrosspointID
static NTV2OutputXptID StringToNTV2OutputCrosspointID(const std::string &inStr)
Returns the output crosspoint that corresponds to the given string.
Definition: ntv2signalrouter.cpp:367
sSignalRouterRegShifts
static const ULWord sSignalRouterRegShifts[]
Definition: ntv2signalrouter.cpp:105
NTV2_XptDuallinkOut6
@ NTV2_XptDuallinkOut6
Definition: ntv2enums.h:2629
GetCSCOutputXptFromChannel
NTV2OutputXptID GetCSCOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsKey, const bool inIsRGB)
Definition: ntv2signalrouter.cpp:847
NTV2_XptDuallinkOut5DS2
@ NTV2_XptDuallinkOut5DS2
Definition: ntv2enums.h:2587
NTV2_XptDualLinkIn6Input
@ NTV2_XptDualLinkIn6Input
Definition: ntv2enums.h:2811
NTV2_XptHDMIIn1Q3
@ NTV2_XptHDMIIn1Q3
Definition: ntv2enums.h:2592
CNTV2SignalRouter::GetWidgetInputs
static bool GetWidgetInputs(const NTV2WidgetID inWidgetID, NTV2InputXptIDSet &outInputs)
Returns the input crosspoints known to be "owned" by the given widget.
Definition: ntv2signalrouter.cpp:444
NTV2PossibleConnections
std::multimap< NTV2InputXptID, NTV2OutputXptID > NTV2PossibleConnections
A map of zero or more one-to-many possible NTV2InputXptID to NTV2OutputXptID connections.
Definition: ntv2signalrouter.h:41
NTV2_XptCSC5VidYUV
@ NTV2_XptCSC5VidYUV
Definition: ntv2enums.h:2567
NTV2_XptDuallinkIn4
@ NTV2_XptDuallinkIn4
Definition: ntv2enums.h:2688
NTV2_XptCSC2VidRGB
@ NTV2_XptCSC2VidRGB
Definition: ntv2enums.h:2537
NTV2_XptDualLinkOut6Input
@ NTV2_XptDualLinkOut6Input
Definition: ntv2enums.h:2822
NTV2_XptDualLinkOut2Input
@ NTV2_XptDualLinkOut2Input
Definition: ntv2enums.h:2818
GetDLOutInputXptFromChannel
NTV2InputXptID GetDLOutInputXptFromChannel(const NTV2Channel inChannel)
Definition: ntv2signalrouter.cpp:836
CNTV2SignalRouter::GetWidgetForInput
static bool GetWidgetForInput(const NTV2InputXptID inInputXpt, NTV2WidgetID &outWidgetID, const NTV2DeviceID inDeviceID=DEVICE_ID_NOTFOUND)
Returns the widget that "owns" the specified input crosspoint.
Definition: ntv2signalrouter.cpp:394
NTV2_XptDualLinkIn4DSInput
@ NTV2_XptDualLinkIn4DSInput
Definition: ntv2enums.h:2808
true
#define true
Definition: ntv2devicefeatures.h:26
NTV2_XptFrameBuffer6DS2Input
@ NTV2_XptFrameBuffer6DS2Input
Definition: ntv2enums.h:2752
NTV2_XptHDMIOutQ4Input
@ NTV2_XptHDMIOutQ4Input
Definition: ntv2enums.h:2845
NTV2_Xpt425Mux4BInput
@ NTV2_Xpt425Mux4BInput
Definition: ntv2enums.h:2857
CNTV2SignalRouter::IsYUVOnlyInputXpt
static bool IsYUVOnlyInputXpt(const NTV2InputXptID inInputXpt)
Definition: ntv2signalrouter.cpp:531
NTV2StringListConstIter
NTV2StringList::const_iterator NTV2StringListConstIter
Definition: ntv2utils.h:1145
NTV2RegInfo::registerMask
ULWord registerMask
My register mask value to use in a ReadRegister or WriteRegister call.
Definition: ntv2publicinterface.h:3980
NTV2_XptCSC3VidYUV
@ NTV2_XptCSC3VidYUV
Definition: ntv2enums.h:2580
NTV2_XptHDMIIn2Q4
@ NTV2_XptHDMIIn2Q4
Definition: ntv2enums.h:2673
NTV2_WIDGET_FIRST
#define NTV2_WIDGET_FIRST
Identifies firmware widgets that logically can have zero or more signal inputs (identified by NTV2Inp...
Definition: ntv2enums.h:2894
CNTV2SignalRouter::IsHDMIInWidgetType
static bool IsHDMIInWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:621
CNTV2SignalRouter::PrintCodeConfig::PrintCodeConfig
PrintCodeConfig()
Default constructor sets the following default settings:
Definition: ntv2signalrouter.cpp:296
NTV2_XptHDMIOutQ2Input
@ NTV2_XptHDMIOutQ2Input
Definition: ntv2enums.h:2843
NTV2_XptFrameBuffer5Input
@ NTV2_XptFrameBuffer5Input
Definition: ntv2enums.h:2749
CNTV2SignalRouter::RemoveConnection
virtual bool RemoveConnection(const NTV2InputXptID inSignalInput, const NTV2OutputXptID inSignalOutput)
Removes the connection between the specified input (signal sink) and output (signal source).
Definition: ntv2signalrouter.cpp:92
CNTV2SignalRouter::PrintCodeConfig
Definition: ntv2signalrouter.h:192
GetFrameStoreOutputXptFromChannel
NTV2OutputXptID GetFrameStoreOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsRGB, const bool inIs425)
Definition: ntv2signalrouter.cpp:873
NTV2_XptLUT1Out
@ NTV2_XptLUT1Out
Definition: ntv2enums.h:2520
CNTV2SignalRouter::IsSDIWidgetType
static bool IsSDIWidgetType(const NTV2WidgetType inWidgetType)
Definition: ntv2signalrouter.cpp:567
NTV2_Xpt425Mux4AInput
@ NTV2_Xpt425Mux4AInput
Definition: ntv2enums.h:2856
NTV2_XptCSC1VidRGB
@ NTV2_XptCSC1VidRGB
Definition: ntv2enums.h:2522
NTV2_XptLUT7Out
@ NTV2_XptLUT7Out
Definition: ntv2enums.h:2694
NTV2_INPUT_SOURCE_IS_SDI
#define NTV2_INPUT_SOURCE_IS_SDI(_inpSrc_)
Definition: ntv2enums.h:1274
NTV2_XptSDIIn4
@ NTV2_XptSDIIn4
Definition: ntv2enums.h:2573
NTV2OutputXptID
enum NTV2OutputCrosspointID NTV2OutputXptID
NTV2_XptDuallinkIn1
@ NTV2_XptDuallinkIn1
Definition: ntv2enums.h:2679
NTV2_XptCSC8VidYUV
@ NTV2_XptCSC8VidYUV
Definition: ntv2enums.h:2626
NTV2_IS_VALID_WIDGET
#define NTV2_IS_VALID_WIDGET(__w__)
Definition: ntv2enums.h:3019
NTV2RegReads
NTV2RegWrites NTV2RegReads
An ordered sequence of zero or more NTV2RegInfo structs intended for ReadRegister.
Definition: ntv2publicinterface.h:4072
CNTV2SignalRouter::Deinitialize
static bool Deinitialize(void)
Explicitly deinitializes and deallocates the Routing Expert singleton.
Definition: ntv2signalrouter.cpp:329
NTV2_XptFrameBuffer3_DS2RGB
@ NTV2_XptFrameBuffer3_DS2RGB
Definition: ntv2enums.h:2656
NTV2_XptDuallinkIn2
@ NTV2_XptDuallinkIn2
Definition: ntv2enums.h:2683
NTV2_XptSDIOut7InputDS2
@ NTV2_XptSDIOut7InputDS2
Definition: ntv2enums.h:2798
NTV2_Xpt425Mux3AYUV
@ NTV2_Xpt425Mux3AYUV
Definition: ntv2enums.h:2643
NTV2_XptCSC2VidYUV
@ NTV2_XptCSC2VidYUV
Definition: ntv2enums.h:2536
GetCSCInputXptFromChannel
NTV2InputXptID GetCSCInputXptFromChannel(const NTV2Channel inChannel, const bool inIsKeyInput)
Definition: ntv2signalrouter.cpp:803
NTV2_XptCSC6VidRGB
@ NTV2_XptCSC6VidRGB
Definition: ntv2enums.h:2621
CNTV2SignalRouter::MakeRouteROMRegisters
static bool MakeRouteROMRegisters(NTV2RegReads &outROMRegisters)
Prepares an initialized, zeroed NTV2RegReads that's prepared to read all ROM registers from a device.
Definition: ntv2signalrouter.cpp:1109
NTV2_XptMixer4VidYUV
@ NTV2_XptMixer4VidYUV
Definition: ntv2enums.h:2617
NTV2DeviceCanDo8KVideo
bool NTV2DeviceCanDo8KVideo(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1029
NTV2OutputCrosspointIDToString
std::string NTV2OutputCrosspointIDToString(const NTV2OutputCrosspointID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:6022
NTV2_XptDuallinkOut5
@ NTV2_XptDuallinkOut5
Definition: ntv2enums.h:2586
NTV2_XptFrameBuffer5YUV
@ NTV2_XptFrameBuffer5YUV
Definition: ntv2enums.h:2606
NTV2_XptSDIIn5
@ NTV2_XptSDIIn5
Definition: ntv2enums.h:2598
NTV2_XptDuallinkOut8
@ NTV2_XptDuallinkOut8
Definition: ntv2enums.h:2633
NTV2_XptMixer1BGKeyInput
@ NTV2_XptMixer1BGKeyInput
Definition: ntv2enums.h:2825
NTV2_XptCSC5VidInput
@ NTV2_XptCSC5VidInput
Definition: ntv2enums.h:2765
CNTV2SignalRouter::ResetFrom
virtual bool ResetFrom(const NTV2XptConnections &inConnections)
Resets me, replacing any/all existing connections with the given connections.
Definition: ntv2signalrouter.h:126
NTV2_INPUT_SOURCE_IS_ANALOG
#define NTV2_INPUT_SOURCE_IS_ANALOG(_inpSrc_)
Definition: ntv2enums.h:1273
NTV2_XptCSC2KeyInput
@ NTV2_XptCSC2KeyInput
Definition: ntv2enums.h:2760
NTV2_XptMixer3KeyYUV
@ NTV2_XptMixer3KeyYUV
Definition: ntv2enums.h:2615
CNTV2SignalRouter::GetWidgetsForOutput
static bool GetWidgetsForOutput(const NTV2OutputXptID inOutputXpt, NTV2WidgetIDSet &outWidgetIDs)
Returns the widgets that "own" the specified output crosspoint.
Definition: ntv2signalrouter.cpp:413
CNTV2SignalRouter::Reset
virtual void Reset(void)
Resets me, erasing any/all existing connections.
Definition: ntv2signalrouter.h:109
NTV2_XptFrameBuffer2DS2Input
@ NTV2_XptFrameBuffer2DS2Input
Definition: ntv2enums.h:2744
NTV2_XptMixer1VidYUV
@ NTV2_XptMixer1VidYUV
Definition: ntv2enums.h:2539
ntv2registerexpert.h
Declares the CNTV2RegisterExpert class.
NTV2_XptCSC8KeyYUV
@ NTV2_XptCSC8KeyYUV
Definition: ntv2enums.h:2628
NTV2WidgetIDToString
std::string NTV2WidgetIDToString(const NTV2WidgetID inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:6227
NTV2_Xpt425Mux3BRGB
@ NTV2_Xpt425Mux3BRGB
Definition: ntv2enums.h:2646
NTV2_Xpt425Mux3BYUV
@ NTV2_Xpt425Mux3BYUV
Definition: ntv2enums.h:2645
NTV2_XptMixer1KeyYUV
@ NTV2_XptMixer1KeyYUV
Definition: ntv2enums.h:2540
NTV2_XptCSC2VidInput
@ NTV2_XptCSC2VidInput
Definition: ntv2enums.h:2759
CNTV2SignalRouter::AddConnection
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).
Definition: ntv2signalrouter.cpp:62
NTV2_XptFrameBuffer7RGB
@ NTV2_XptFrameBuffer7RGB
Definition: ntv2enums.h:2611
NTV2_XptAnalogOutInput
@ NTV2_XptAnalogOutInput
Definition: ntv2enums.h:2858
CNTV2SignalRouter::GetPossibleConnections
static bool GetPossibleConnections(const NTV2RegReads &inROMRegisters, NTV2PossibleConnections &outConnections)
Answers with the implemented crosspoint connections as obtained from the given ROM registers.
Definition: ntv2signalrouter.cpp:1092
NTV2_XptLUT6Input
@ NTV2_XptLUT6Input
Definition: ntv2enums.h:2778
memory.h
Declares the AJAMemory class.
DEVICE_ID_NOTFOUND
@ DEVICE_ID_NOTFOUND
Invalid or "not found".
Definition: ntv2enums.h:92
NTV2_XptLUT8Out
@ NTV2_XptLUT8Out
Definition: ntv2enums.h:2695
NTV2_XptSDIOut1Input
@ NTV2_XptSDIOut1Input
Definition: ntv2enums.h:2785
NTV2_XptCSC1KeyInput
@ NTV2_XptCSC1KeyInput
Definition: ntv2enums.h:2758
NTV2WidgetIDSet
std::set< NTV2WidgetID > NTV2WidgetIDSet
A collection of distinct NTV2WidgetID values.
Definition: ntv2signalrouter.h:32
NTV2_Xpt425Mux1BInput
@ NTV2_Xpt425Mux1BInput
Definition: ntv2enums.h:2851
NTV2_XptHDMIIn1Q3RGB
@ NTV2_XptHDMIIn1Q3RGB
Definition: ntv2enums.h:2593
CNTV2SignalRouter::PrintCodeConfig::mMissing
NTV2XptConnections mMissing
Optional, to show deleted connections.
Definition: ntv2signalrouter.h:213
debug.h
Declares the AJADebug class.
NTV2_XptSDIOut6InputDS2
@ NTV2_XptSDIOut6InputDS2
Definition: ntv2enums.h:2796
CNTV2SignalRouter::IsKeyInputXpt
static bool IsKeyInputXpt(const NTV2InputXptID inInputXpt)
Definition: ntv2signalrouter.cpp:537
NTV2_XptSDIOut3Input
@ NTV2_XptSDIOut3Input
Definition: ntv2enums.h:2789
NTV2_XptDuallinkOut4
@ NTV2_XptDuallinkOut4
Definition: ntv2enums.h:2578
NTV2_XptDualLinkIn1DSInput
@ NTV2_XptDualLinkIn1DSInput
Definition: ntv2enums.h:2802
NTV2_Xpt425Mux2AInput
@ NTV2_Xpt425Mux2AInput
Definition: ntv2enums.h:2852
GetDLOutOutputXptFromChannel
NTV2OutputXptID GetDLOutOutputXptFromChannel(const NTV2Channel inChannel, const bool inIsLinkB)
Definition: ntv2signalrouter.cpp:933
NTV2_XptDuallinkOut2
@ NTV2_XptDuallinkOut2
Definition: ntv2enums.h:2551
NTV2_Xpt425Mux4BYUV
@ NTV2_Xpt425Mux4BYUV
Definition: ntv2enums.h:2649
NTV2_XptDualLinkOut1Input
@ NTV2_XptDualLinkOut1Input
Definition: ntv2enums.h:2817
NTV2_XptHDMIIn3RGB
@ NTV2_XptHDMIIn3RGB
Definition: ntv2enums.h:2676
NTV2_XptDuallinkOut3DS2
@ NTV2_XptDuallinkOut3DS2
Definition: ntv2enums.h:2577
NTV2_XptHDMIIn3
@ NTV2_XptHDMIIn3
Definition: ntv2enums.h:2675
NTV2_XptCSC6VidInput
@ NTV2_XptCSC6VidInput
Definition: ntv2enums.h:2767
NTV2_XptDualLinkOut8Input
@ NTV2_XptDualLinkOut8Input
Definition: ntv2enums.h:2824
CNTV2SignalRouter::PrintCodeConfig::mPreVariableText
std::string mPreVariableText
Variable prefix text.
Definition: ntv2signalrouter.h:201