AJA NTV2 SDK  18.1.0.2262
NTV2 SDK 18.1.0.2262
ntv2card.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
9 #include "ntv2devicefeatures.h"
10 #include "ntv2card.h"
11 #include "ntv2debug.h"
12 #include "ntv2utils.h"
13 #include <sstream>
14 #include "ajabase/common/common.h"
15 #include "ajabase/system/info.h" // for AJASystemInfo
16 
17 using namespace std;
18 
19 
20 // Default Constructor
22  : mDevCap(driverInterface())
23 {
24  _boardOpened = false;
25 }
26 
27 CNTV2Card::CNTV2Card (const UWord inDeviceIndex, const string & inHostName)
28  : mDevCap(driverInterface())
29 {
30  string hostName(inHostName);
31  aja::strip(hostName);
32  _boardOpened = false;
33  bool openOK = hostName.empty() ? CNTV2DriverInterface::Open(inDeviceIndex) : CNTV2DriverInterface::Open(hostName);
34  if (openOK)
35  {
36 #if !defined(NTV2_DEPRECATE_17_2)
37  if (IsBufferSizeSetBySW())
38  {
39  NTV2Framesize fbSize;
41  SetFrameBufferSize (fbSize);
42  }
43  else
44  {
46  NTV2FrameBufferFormat format;
47 
48  GetFrameGeometry (fg);
50 
53  }
54 #endif
55  }
56 }
57 
58 // Destructor
60 {
61  if (IsOpen ())
62  Close ();
63 
64 } // destructor
65 
66 
68 {
69  ULWord status (0);
70  return ReadRegister (kRegStatus, status) ? (status & 0xF) : -1;
71 }
72 
73 
75 {
76  ostringstream oss;
78  return oss.str();
79 }
80 
81 
83 {
86 }
87 
89 {
90  ostringstream oss;
91  if (IsRemote())
92  {
93  const NTV2Dictionary params (ConnectParams());
94  string fName (params.valueForKey(kQParamVDevName)),
95  devNdx (params.valueForKey(kQParamVDevIndex)),
96  model (GetModelName());
97  if (model == "Software" || model == "AJA Device" || model == "(Not Found)" || model == "Unknown" || model == "???")
98  model = fName.empty() ? params.valueForKey(kNTV2PluginRegInfoKey_ShortName) : fName;
99  if (devNdx.empty())
100  {ostringstream tmp; tmp << GetIndexNumber(); devNdx = tmp.str();}
101  oss << model << " - " << devNdx;
102  }
103  else
104  oss << GetModelName() << " - " << GetIndexNumber();
105  return oss.str();
106 }
107 
108 
110 {
111  ULWord numBytes (0);
112  string dateStr, timeStr;
113  ostringstream oss;
114 
115  if (inFPGA == eFPGAVideoProc && GetInstalledBitfileInfo (numBytes, dateStr, timeStr))
116  oss << dateStr << " at " << timeStr;
117  else
118  oss << "Unavailable";
119 
120  return oss.str ();
121 }
122 
123 
125 {
126  ULWord status (0);
127  return ReadRegister (48, status) ? ((status >> 8) & 0xFF) : -1;
128 }
129 
130 
132 {
133  const UWord version (static_cast<UWord>(GetPCIFPGAVersion()));
134  ostringstream oss;
135  oss << hex << version;
136  return oss.str ();
137 }
138 
139 string CNTV2Card::GetDescription (void) const
140 {
141  if (!IsOpen())
142  return string();
143  if (IsRemote())
145 
146  CNTV2Card * pCard = (CNTV2Card*)(this); // Ugly: *sigh* If only most CNTV2Card member functions were 'const'
147  ostringstream oss;
148  string hostName("localhost"), snStr;
150  sysInfo.GetValue(AJA_SystemInfoTag_System_Name, hostName);
151  oss << pCard->GetModelName();
152  if (!pCard->GetSerialNumberString(snStr))
153  snStr.clear();
154  if (!snStr.empty())
155  oss << " '" << snStr << "'";
156  if (!hostName.empty())
157  oss << " on '" << hostName << "'";
158  oss << " at index " << DEC(GetIndexNumber());
159  return oss.str();
160 }
161 
163 {
164  static const string sDriverBuildTypes [] = {"", "b", "a", "d"};
165  UWord versions[4] = {0, 0, 0, 0};
166  ULWord versBits(0);
167  if (!GetDriverVersionComponents (versions[0], versions[1], versions[2], versions[3]))
168  return string(); // fail
169  if (!ReadRegister (kVRegDriverVersion, versBits))
170  return string(); // fail
171 
172  const string & dabr (sDriverBuildTypes[versBits >> 30]); // Bits 31:30 == build type
173  ostringstream oss;
174  oss << DEC(versions[0]) << "." << DEC(versions[1]) << "." << DEC(versions[2]);
175  if (dabr.empty())
176  oss << "." << DEC(versions[3]);
177  else
178  oss << dabr << DEC(versions[3]);
179  return oss.str();
180 
181 } // GetDriverVersionString
182 
183 
184 bool CNTV2Card::GetDriverVersionComponents (UWord & outMajor, UWord & outMinor, UWord & outPoint, UWord & outBuild)
185 {
186  outMajor = outMinor = outPoint = outBuild = 0;
187  ULWord driverVersionULWord (0);
188  if (!ReadRegister (kVRegDriverVersion, driverVersionULWord))
189  return false;
190  if (!driverVersionULWord) // If zero --- pre-15.0 driver?
191  return false;
192 
193  // The normal 15.0+ way of decoding the 32-bit driver version value:
194  outMajor = UWord(NTV2DriverVersionDecode_Major(driverVersionULWord));
195  outMinor = UWord(NTV2DriverVersionDecode_Minor(driverVersionULWord));
196  outPoint = UWord(NTV2DriverVersionDecode_Point(driverVersionULWord));
197  outBuild = UWord(NTV2DriverVersionDecode_Build(driverVersionULWord));
198  return true;
199 }
200 
201 
203 {
204  ULWord serialNum (0);
205  return ReadRegister (kRegReserved54, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
206 }
207 
208 
210 {
211  ULWord serialNum (0);
212  return ReadRegister (kRegReserved55, serialNum) ? serialNum : 0; // Read EEPROM shadow of Serial Number
213 }
214 
216 {
217  const uint64_t lo(GetSerialNumberLow()), hi(GetSerialNumberHigh());
218  const uint64_t result((hi << 32) | lo);
219  return result;
220 }
221 
222 
223 string CNTV2Card::SerialNum64ToString (const uint64_t inSerialNumber) // Class method
224 {
225  return ::SerialNum64ToString(inSerialNumber);
226 } // SerialNum64ToString
227 
228 
229 bool CNTV2Card::GetSerialNumberString (string & outSerialNumberString)
230 {
231  ULWord spiFlashVers(0);
232  const bool hasLPPC(IsSupported(kDeviceHasLPProductCode));
233  if (hasLPPC || (GetNumericParam(kDeviceGetSPIFlashVersion, spiFlashVers) && spiFlashVers >= 6))
234  {
235  // Newer devices use 4 regs: kRegReserved54 thru kRegReserved57
236  ULWord serialArray[] = {0,0,0,0};
237  ReadRegister(hasLPPC ? kRegReserved54 : kRegReserved56, serialArray[0]);
238  ReadRegister(hasLPPC ? kRegReserved55 : kRegReserved57, serialArray[1]);
239  ReadRegister(hasLPPC ? kRegReserved56 : kRegReserved54, serialArray[2]);
240  ReadRegister(hasLPPC ? kRegReserved57 : kRegReserved55, serialArray[3]);
241  outSerialNumberString.clear();
242  for (int serialIndex = 0; serialIndex < 4; serialIndex++)
243  if (serialArray[serialIndex] != 0xffffffff)
244  for (int i = 0; i < 4; i++)
245  {
246  const char tempChar(((serialArray[serialIndex] >> (i*8)) & 0xff));
247  if (tempChar > 0 && tempChar != '.')
248  outSerialNumberString.push_back(tempChar);
249  }
250  }
251  else
252  { // Older devices use 2 regs: kRegReserved54 & kRegReserved55
253  outSerialNumberString = ::SerialNum64ToString(GetSerialNumber());
254  if (outSerialNumberString.empty())
255  {outSerialNumberString = "INVALID?"; return false;}
256 
257  // Prepend 5/6/7 for Io4K+/IoIP/IoX3, respectively...
258  const NTV2DeviceID deviceID (GetDeviceID());
259  if (deviceID == DEVICE_ID_IO4KPLUS)
260  outSerialNumberString = "5" + outSerialNumberString; // Io4K+/DNXIV: prepend "5"
261  else if (deviceID == DEVICE_ID_IOIP_2022 ||
262  deviceID == DEVICE_ID_IOIP_2110 ||
263  deviceID == DEVICE_ID_IOIP_2110_RGB12)
264  outSerialNumberString = "6" + outSerialNumberString; // IoIP: prepend "6"
265  else if (deviceID == DEVICE_ID_IOX3)
266  outSerialNumberString = "7" + outSerialNumberString; // IoX3: prepend "7"
267  }
268  return true;
269 } // GetSerialNumberString
270 
271 
272 bool CNTV2Card::IS_CHANNEL_INVALID (const NTV2Channel inChannel) const
273 {
274  if (!NTV2_IS_VALID_CHANNEL (inChannel))
275  return true;
276  return false;
277 }
278 
279 
280 bool CNTV2Card::IS_OUTPUT_SPIGOT_INVALID (const UWord inOutputSpigot)
281 {
282  if (inOutputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoOutputs)))
283  {
285  if (itms.find(ULWord(NTV2_WgtSDIMonOut1)) != itms.end() && inOutputSpigot == 4)
286  return false; // Io4K Monitor Output exception
287  return true; // Invalid
288  }
289  return false;
290 }
291 
292 
293 bool CNTV2Card::IS_INPUT_SPIGOT_INVALID (const UWord inInputSpigot)
294 {
295  if (inInputSpigot >= UWord(GetNumSupported(kDeviceGetNumVideoInputs)))
296  return true;
297  return false;
298 }
299 
300 bool CNTV2Card::IS_HDMI_INPUT_SPIGOT_INVALID (const UWord inInputHDMIPort)
301 {
302  if (inInputHDMIPort >= UWord(GetNumSupported(kDeviceGetNumHDMIVideoInputs)))
303  return true;
304  return false;
305 }
306 
308 {
310  {
311  ULWord totalFrames = GetNumSupported(kDeviceGetActiveMemorySize) / 0x800000;
314  totalFrames -= 6; // Lop off 48MB for HDMI MultiViewer
315  return totalFrames;
316  }
317  return ::NTV2DeviceGetNumberFrameBuffers(_boardID); // Handle non-stacked-audio devices
318 }
319 
320 bool CNTV2Card::GetInstalledBitfileInfo (ULWord & outNumBytes, std::string & outDateStr, std::string & outTimeStr)
321 {
322  outDateStr.clear ();
323  outTimeStr.clear ();
324  outNumBytes = 0;
325 
326  if (!_boardOpened)
327  return false; // Bail if I'm not open
328 
329  BITFILE_INFO_STRUCT bitFileInfo;
330  ::memset (&bitFileInfo, 0, sizeof (bitFileInfo));
331  bitFileInfo.whichFPGA = eFPGAVideoProc;
332 
333  // Call the OS specific method...
335  return false;
336 
337  // Fill in our OS independent data structure...
338  outDateStr = reinterpret_cast <char *> (&bitFileInfo.dateStr [0]);
339  outTimeStr = reinterpret_cast <char *> (&bitFileInfo.timeStr [0]);
340  outNumBytes = bitFileInfo.numBytes;
341  return true;
342 }
343 
345 {
346  ostringstream oss;
347  // format like: "date time name"
348  oss << inBitFileInfo.dateStr << " " << inBitFileInfo.timeStr << " ";
350  oss << "DNxIV";
351  else
352  oss << ::NTV2BitfileTypeToString(NTV2BitfileType(inBitFileInfo.bitFileType), true);
353  return oss.str();
354 }
355 
356 bool CNTV2Card::IsFailSafeBitfileLoaded (bool & outIsSafeBoot)
357 {
358  outIsSafeBoot = false;
360  return false;
361  return CNTV2DriverInterface::ReadRegister(kRegCPLDVersion, outIsSafeBoot, BIT(4), 4);
362 }
363 
364 
365 bool CNTV2Card::CanWarmBootFPGA (bool & outCanWarmBoot)
366 {
367  outCanWarmBoot = false; // Definitely can't
369  return false;
370 
371  ULWord version(0);
372  if (!ReadRegister(kRegCPLDVersion, version, BIT(0)|BIT(1)))
373  return false; // Fail
374  if (version != 3)
375  outCanWarmBoot = true; // Definitely can
376  return true;
377 }
378 
379 
381 {
383  ULWord audioCtlReg (0); // The Audio Control Register tells us what's connected
384 
385  if (IsOpen () && ReadRegister (kRegAud1Control, audioCtlReg))
386  {
387  const bool bPhonyKBox (false); // For debugging
388 
389  switch (_boardID)
390  {
391  case DEVICE_ID_KONA3G:
393  case DEVICE_ID_IO4K:
394  case DEVICE_ID_KONA4:
395  case DEVICE_ID_KONA4UFC:
396  case DEVICE_ID_KONA5:
398  case DEVICE_ID_KONA5_8K:
401  case DEVICE_ID_KONA5_OE1:
403  // Do we have a K3G-Box?
404  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
405  result = NTV2_K3GBox;
406  else
407  result = NTV2_BreakoutCableBNC;
408  break;
410  // Do we have a KL-Box?
411  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
412  result = NTV2_KLBox;
413  else
414  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
415  break;
416  case DEVICE_ID_KONALHI:
417  // Do we have a KLHi-Box?
418  if ((audioCtlReg & kK2RegMaskKBoxDetect) || bPhonyKBox)
419  result = NTV2_KLHiBox;
420  else
421  result = NTV2_BreakoutCableXLR; // no BNC breakout cable available
422  break;
423  case DEVICE_ID_KONAX:
424  case DEVICE_ID_KONAX_4CH:
425  // Do we have a BOB?
427  result = NTV2_BreakoutBoard;
428  break;
429  default:
430  break;
431  }
432  }
433  return result;
434 }
435 
437 {
439  return false;
440  uint32_t portIP(0);
441  int ipOctet(0);
442  ostringstream tempString;
443  ReadRegister(kRegLPRJ45IP, portIP);
444  if (portIP == 0)
445  return false;
446 
447  outURLString.clear();
448  tempString << "http://";
449  ipOctet = (portIP & 0xFF000000) >> 24;
450  tempString << ipOctet << ".";
451  ipOctet = (portIP & 0x00FF0000) >> 16;
452  tempString << ipOctet << ".";
453  ipOctet = (portIP & 0x0000FF00) >> 8;
454  tempString << ipOctet << ".";
455  ipOctet = (portIP & 0x000000FF);
456  tempString << ipOctet;
457 
458  outURLString = tempString.str();
459  return true;
460 }
461 
463 {
465  return false;
466  uint32_t portIP(0);
467  int ipOctet(0);
468  ostringstream tempString;
469  ReadRegister(kRegLPTunnelIP, portIP);
470  if (portIP == 0)
471  return false;
472 
473  outURLString.clear();
474  tempString << "http://";
475  ipOctet = (portIP & 0xFF000000) >> 24;
476  tempString << ipOctet << ".";
477  ipOctet = (portIP & 0x00FF0000) >> 16;
478  tempString << ipOctet << ".";
479  ipOctet = (portIP & 0x0000FF00) >> 8;
480  tempString << ipOctet << ".";
481  ipOctet = (portIP & 0x000000FF);
482  tempString << ipOctet;
483 
484  outURLString = tempString.str();
485  return true;
486 }
487 
488 int CNTV2Card::GetSFPConfigurationURLStrings(std::vector<std::string> & OutSFPURLStrings)
489 {
491  if (!IsSupported(kDeviceHasLPProductCode) || numSFPs == 0)
492  return 0;
493 
494  for (ULWord ndx(0); ndx < numSFPs; ndx++)
495  {
496  uint32_t portIP(0);
497  int ipOctet(0);
498  ostringstream tempString;
499  ReadRegister(kRegLPSFP1IP + ndx, portIP);
500  if (portIP == 0)
501  return false;
502 
503  tempString << "http://";
504  ipOctet = (portIP & 0xFF000000) >> 24;
505  tempString << ipOctet << ".";
506  ipOctet = (portIP & 0x00FF0000) >> 16;
507  tempString << ipOctet << ".";
508  ipOctet = (portIP & 0x0000FF00) >> 8;
509  tempString << ipOctet << ".";
510  ipOctet = (portIP & 0x000000FF);
511  tempString << ipOctet;
512 
513  OutSFPURLStrings.push_back(tempString.str());
514  }
515  return int(OutSFPURLStrings.size());
516 }
517 
518 #if !defined(NTV2_DEPRECATE_16_3)
521  NTV2FrameGeometry inFrameGeometry,
522  NTV2Standard inStandard)
523  {
524  return ::NTV2DeviceCanDoFormat (GetDeviceID(), inFrameRate, inFrameGeometry, inStandard);
525  }
526 
528  {
529  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID()); // Revisit for 2MB granularity
530  }
531 
533  {
534  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID()); // Revisit for 2MB granularity
535  }
536 
538  {
539  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID()); // Revisit for 2MB granularity
540  }
541 
543  {
544  return ::NTV2DeviceGetFrameBufferSize (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
545  }
546 
548  {
549  return ::NTV2DeviceGetNumberFrameBuffers (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
550  }
551 
553  {
554  return ::NTV2DeviceGetAudioFrameBuffer (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
555  }
556 
558  {
559  return ::NTV2DeviceGetAudioFrameBuffer2 (GetDeviceID(), inFrameGeometry, inFBFormat); // Revisit for 2MB granularity
560  }
561 
564  return itms.find(ULWord(inVideoFormat)) != itms.end();
565  }
566 
569  return itms.find(ULWord(inFBFormat)) != itms.end();
570  }
571 
573  {
575  return wgtIDs.find(inWidgetID) != wgtIDs.end();
576  }
577 
580  return itms.find(ULWord(inConversionMode)) != itms.end();
581  }
582 
585  return itms.find(ULWord(inDSKMode)) != itms.end();
586  }
587 
590  return itms.find(ULWord(inInputSource)) != itms.end();
591  }
592 #endif // !defined(NTV2_DEPRECATE_16_3)
593 
594 
596 
597 
598 bool DeviceCapabilities::CanDoWidget (const NTV2WidgetType inWgtType, const UWord index0)
599 {
600  return CanDoWidget(CNTV2SignalRouter::WidgetIDFromTypeAndChannel(inWgtType, NTV2Channel(index0)));
601 }
602 
603 
605 
606 
607 bool SDRAMAuditor::AssessDevice (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
608 {
609  mFrameTags.clear();
610  mDeviceID = DEVICE_ID_INVALID;
611  mNumFrames = 0;
612  mIntrinsicSize = 0;
613  if (!inDevice.IsOpen())
614  return false;
615 
616  mDeviceID = inDevice.GetDeviceID();
617  const ULWord totalBytes(::NTV2DeviceGetActiveMemorySize(mDeviceID));
618  mNumFrames = UWord(totalBytes / m8MB);
619  if (totalBytes % m8MB)
620  {mNumFrames++; cerr << DEC(totalBytes % m8MB) << " leftover/spare bytes -- last frame is partial frame" << endl;}
621  for (UWord frm(0); frm < mNumFrames; frm++)
622  mFrameTags.insert(FrameTag(frm, NTV2StringSet()));
623 
624  return TagAudioBuffers(inDevice, inMarkStoppedAudioBuffersFree) && TagVideoFrames(inDevice);
625 }
626 
627 ostream & SDRAMAuditor::RawDump (ostream & oss) const
628 {
629  for (FrameTagsConstIter it(mFrameTags.begin()); it != mFrameTags.end(); ++it)
630  {
631  const NTV2StringSet & tags(it->second);
632  oss << DEC0N(it->first,3) << ": " << aja::join(tags, ", ") << endl;
633  }
634  return oss;
635 }
636 
638 {
639  ULWordSet result; // Coalesce all regions into this one sorted set
640  for (size_t ndx(0); ndx < inRgn1.size(); ndx++)
641  if (result.find(inRgn1.at(ndx)) == result.end())
642  result.insert(inRgn1.at(ndx));
643  for (size_t ndx(0); ndx < inRgn2.size(); ndx++)
644  if (result.find(inRgn2.at(ndx)) == result.end())
645  result.insert(inRgn2.at(ndx));
646  for (size_t ndx(0); ndx < inRgn3.size(); ndx++)
647  if (result.find(inRgn3.at(ndx)) == result.end())
648  result.insert(inRgn3.at(ndx));
649  return result;
650 }
651 
652 ostream & SDRAMAuditor::DumpBlocks (ostream & oss) const
653 {
654  ULWordSequence badBlks, freeBlks, goodBlks;
655  GetRegions (freeBlks, goodBlks, badBlks);
656  ULWordSet rgns (CoalesceRegions(freeBlks, goodBlks, badBlks)); // Coalesce all regions into this one sorted set
657 
658  for (ULWordSetConstIter it(rgns.begin()); it != rgns.end(); ++it)
659  {
660  const ULWord rgnInfo(*it);
661  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
662  NTV2StringSet tags;
663  GetTagsForFrameIndex (startBlk, tags);
664  if (numBlks > 1)
665  oss << "Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3) << " : ";
666  else
667  oss << "Frm " << DEC0N(startBlk,3) << " : ";
668  if (tags.empty())
669  oss << "{free}";
670  else
671  oss << aja::join(tags, ", ");
672  oss << endl;
673  }
674  return oss;
675 }
676 
677 bool SDRAMAuditor::GetRegions (ULWordSequence & outFree, ULWordSequence & outUsed, ULWordSequence & outBad) const
678 {
679  outFree.clear(); outUsed.clear(); outBad.clear();
680  FrameTagsConstIter it(mFrameTags.begin());
681  if (it == mFrameTags.end())
682  return true;
683  UWord frmStart(it->first), lastFrm(frmStart);
684  NTV2StringSet runTags(it->second);
685  while (++it != mFrameTags.end())
686  {
687  const NTV2StringSet & tags(it->second);
688  if (tags != runTags)
689  { // End of current run, start of new run
690  if (runTags.empty())
691  {
692  if (frmStart != lastFrm)
693  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
694  else
695  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
696  }
697  else if (runTags.size() > 1)
698  {
699  if (frmStart != lastFrm)
700  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
701  else
702  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
703  }
704  else
705  {
706  if (frmStart != lastFrm)
707  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
708  else
709  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
710  }
711  frmStart = lastFrm = it->first;
712  runTags = tags;
713  }
714  else
715  lastFrm = it->first; // Continue current run
716  }
717  if (runTags.empty())
718  {
719  if (frmStart != lastFrm)
720  outFree.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
721  else
722  outFree.push_back((ULWord(frmStart) << 16) | ULWord(1));
723  }
724  else if (runTags.size() > 1)
725  {
726  if (frmStart != lastFrm)
727  outBad.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
728  else
729  outBad.push_back((ULWord(frmStart) << 16) | ULWord(1));
730  }
731  else
732  {
733  if (frmStart != lastFrm)
734  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(lastFrm-frmStart+1));
735  else
736  outUsed.push_back((ULWord(frmStart) << 16) | ULWord(1));
737  }
738  return true;
739 }
740 
741 bool SDRAMAuditor::GetTagsForFrameIndex (const UWord inIndex, NTV2StringSet & outTags) const
742 {
743  outTags.clear();
744  FrameTagsConstIter it(mFrameTags.find(inIndex));
745  if (it == mFrameTags.end())
746  return false;
747  outTags = it->second;
748  return true;
749 }
750 
751 size_t SDRAMAuditor::GetTagCount (const UWord inIndex) const
752 {
753  FrameTagsConstIter it(mFrameTags.find(inIndex));
754  if (it == mFrameTags.end())
755  return 0;
756  return it->second.size();
757 }
758 
759 bool SDRAMAuditor::TranslateRegions (ULWordSequence & outDestRgns, const ULWordSequence & inSrcRgns, const bool inIsQuad, const bool inIsQuadQuad) const
760 {
761  outDestRgns.clear();
762  if (inIsQuad && inIsQuadQuad)
763  return false; // Can't be both
764  if (inSrcRgns.empty())
765  return true; // Empty list, not an error
766  const UWord _8MB_frames_per_dest_frame(UWord(GetIntrinsicFrameByteCount() / m8MB) * (inIsQuad?4:1) * (inIsQuadQuad?16:1)); // Should result in 1/4/16 or 2/8/32
767  if (!_8MB_frames_per_dest_frame)
768  return false; // Ordinarily won't happen, but possible with "ntv2:" (fake/software) "devices" having small SDRAM complement
769  if (_8MB_frames_per_dest_frame == 1)
770  {outDestRgns = inSrcRgns; return true;} // Same
771 
772  // For each region...
773  for (size_t ndx(0); ndx < inSrcRgns.size(); ndx++)
774  { const ULWord val(inSrcRgns.at(ndx));
775  ULWord startBlkOffset(val >> 16), lengthBlks(val & 0x0000FFFF); // <== These are in 8MB block units
776  startBlkOffset = startBlkOffset / _8MB_frames_per_dest_frame + (startBlkOffset % _8MB_frames_per_dest_frame ? 1 : 0);
777  lengthBlks = lengthBlks / _8MB_frames_per_dest_frame;
778  outDestRgns.push_back((startBlkOffset << 16) | lengthBlks);
779  }
780  return true;
781 }
782 
783 bool SDRAMAuditor::TagAudioBuffers (CNTV2Card & inDevice, const bool inMarkStoppedAudioBuffersFree)
784 {
785  ULWord addr(0);
786  bool isReading(false), isWriting(false);
787  const UWord numAudSystems(UWord(inDevice.GetNumSupported(kDeviceGetNumBufferedAudioSystems)));
788  for (NTV2AudioSystem audSys(NTV2_AUDIOSYSTEM_1); audSys < NTV2AudioSystem(numAudSystems); audSys = NTV2AudioSystem(audSys+1))
789  if (inDevice.GetAudioMemoryOffset (0, addr, audSys))
790  { ostringstream tag;
791  tag << "Aud" << DEC(audSys+1);
792  if (inDevice.IsAudioOutputRunning(audSys, isReading) && isReading)
793  tag << " Read";
794  if (inDevice.IsAudioInputRunning(audSys, isWriting) && isWriting)
795  tag << " Write";
796  TagMemoryBlock(addr, m8MB, inMarkStoppedAudioBuffersFree && !isReading && !isWriting ? string() : tag.str());
797  }
798  return true;
799 }
800 
802 {
803  const UWord numChannels (UWord(inDevice.GetNumSupported(kDeviceGetNumVideoChannels)) + (inDevice.HasMultiRasterWidget() ? 1 : 0));
804  NTV2ChannelSet skipChannels;
805  for (NTV2Channel chan(NTV2_CHANNEL1); chan < NTV2Channel(numChannels); chan = NTV2Channel(chan+1))
806  {
807  AUTOCIRCULATE_STATUS acStatus;
808  bool isEnabled(false), isMultiFormat(false), isQuad(false), isQuadQuad(false), isSquares(false), isTSI(false);
809  ostringstream tag;
810  uint64_t addr(0), len(0);
811  if (skipChannels.find(chan) != skipChannels.end())
812  continue; // Skip this channel/framestore
813  if (inDevice.AutoCirculateGetStatus (chan, acStatus) && !acStatus.IsStopped())
814  {
815  uint64_t tmp(0);
816  inDevice.GetDeviceFrameInfo(acStatus.GetStartFrame(), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, tmp);
817  inDevice.GetDeviceFrameInfo(acStatus.GetEndFrame(), chan, tmp, len);
818  tag << "AC" << DEC(chan+1) << (acStatus.IsInput() ? " Write" : " Read");
819  TagMemoryBlock(addr, tmp + len - addr, tag.str());
820  } // if GetStatus succeeded
821  else if (inDevice.IsChannelEnabled(chan, isEnabled) && isEnabled)
822  {
824  inDevice.GetMode(chan, mode);
825  ULWord frameNum(0);
826  if (NTV2_IS_INPUT_MODE(mode))
827  inDevice.GetInputFrame(chan, frameNum);
828  else
829  inDevice.GetOutputFrame(chan, frameNum);
830  inDevice.GetDeviceFrameInfo (UWord(frameNum), chan, mIntrinsicSize, isMultiFormat, isQuad, isQuadQuad, isSquares, isTSI, addr, len);
831  if (inDevice.IsMultiRasterWidgetChannel(chan))
832  tag << "MR" << DEC(chan+1); // MultiRaster Viewer
833  else
834  tag << "Ch" << DEC(chan+1);
835  tag << (NTV2_IS_INPUT_MODE(mode) ? " Write" : " Read");
836  TagMemoryBlock(addr, len, tag.str());
837  }
838  if (isSquares && chan == NTV2_CHANNEL1)
839  {skipChannels.insert(NTV2_CHANNEL2); skipChannels.insert(NTV2_CHANNEL3); skipChannels.insert(NTV2_CHANNEL4);}
840  else if (isSquares && chan == NTV2_CHANNEL5)
841  {skipChannels.insert(NTV2_CHANNEL6); skipChannels.insert(NTV2_CHANNEL7); skipChannels.insert(NTV2_CHANNEL8);}
842  else if (isQuad && !isQuadQuad && isTSI)
843  {
844  if (chan == NTV2_CHANNEL1)
845  skipChannels.insert(NTV2_CHANNEL2);
846  else if (chan == NTV2_CHANNEL3)
847  skipChannels.insert(NTV2_CHANNEL4);
848  else if (chan == NTV2_CHANNEL5)
849  skipChannels.insert(NTV2_CHANNEL6);
850  else if (chan == NTV2_CHANNEL7)
851  skipChannels.insert(NTV2_CHANNEL8);
852  }
853  } // for each device channel
854  if (!mIntrinsicSize)
855  {
857  inDevice.GetFrameBufferSize(NTV2_CHANNEL1, frmsz);
858  mIntrinsicSize = ::NTV2FramesizeToByteCount(frmsz);
859  }
860  return true;
861 }
862 
863 bool SDRAMAuditor::TagMemoryBlock (const ULWord inStartAddr, const ULWord inByteLength, const string & inTag)
864 {
865  if (inStartAddr % m8MB)
866  return false;
867  if (inByteLength % m8MB)
868  return false;
869  if (inTag.empty())
870  return false;
871  const UWord startFrm(UWord(inStartAddr / m8MB)), frmCnt(UWord(inByteLength / m8MB));
872  for (UWord frm(0); frm < frmCnt; frm++)
873  {
874  UWord frameNum(startFrm + frm);
875  NTV2StringSet & tags(mFrameTags[frameNum]);
876  if (tags.find(inTag) == tags.end())
877  {
878  tags.insert(inTag);
879  if (frameNum >= mNumFrames)
880  tags.insert("Invalid");
881  }
882  }
883  return true;
884 }
virtual bool DeviceCanDoVideoFormat(const NTV2VideoFormat inVF)
Definition: ntv2card.cpp:562
virtual bool GetNumericParam(const ULWord inParamID, ULWord &outValue)
size_t GetTagCount(const UWord inIndex) const
Definition: ntv2card.cpp:751
virtual bool SetFrameBufferSize(const NTV2Framesize inSize)
Sets the device&#39;s intrinsic frame buffer size.
virtual Word GetPCIFPGAVersion(void)
Definition: ntv2card.cpp:124
#define NTV2_IS_INPUT_MODE(__mode__)
Definition: ntv2enums.h:1251
virtual bool IsSupported(const NTV2BoolParamID inParamID)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
Definition: ntv2enums.h:3898
#define kQParamVDevIndex
Device index number for .vdev virtual device.
Definition: ntv2nubaccess.h:46
virtual bool GetLPTunnelConfigurationURLString(std::string &outURLString)
Definition: ntv2card.cpp:462
virtual bool IS_OUTPUT_SPIGOT_INVALID(const UWord inOutputSpigot)
Definition: ntv2card.cpp:280
virtual ULWord DeviceGetAudioFrameBuffer2(void)
Definition: ntv2card.cpp:537
static NTV2Buffer NULL_POINTER
Used for default empty NTV2Buffer parameters – do not modify.
Definition: ntv2card.h:6593
virtual bool DeviceCanDoWidget(const NTV2WidgetID inWgtID)
Definition: ntv2card.cpp:572
#define DEC0N(__x__, __n__)
See Io IP.
Definition: ntv2enums.h:41
The number of video channels supported on the device.
virtual bool DeviceCanDoFrameBufferFormat(const NTV2PixelFormat inPF)
Definition: ntv2card.cpp:567
See KONA 5.
Definition: ntv2enums.h:55
I interrogate and control an AJA video/audio capture/playout device.
Definition: ntv2card.h:28
NTV2FrameBufferFormat
Identifies a particular video frame buffer pixel format. See Device Frame Buffer Formats for details...
Definition: ntv2enums.h:221
#define BIT(_x_)
Definition: ajatypes.h:596
virtual ULWord GetSerialNumberHigh(void)
Definition: ntv2card.cpp:209
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:607
See KONA LHe Plus.
Definition: ntv2enums.h:77
std::string valueForKey(const std::string &inKey) const
virtual bool DeviceCanDoConversionMode(const NTV2ConversionMode inCM)
Definition: ntv2card.cpp:578
See KONA 5.
Definition: ntv2enums.h:56
ULWord NTV2DeviceGetActiveMemorySize(const NTV2DeviceID inDeviceID)
True if device can warm-boot to load updated firmware.
virtual UWord GetIndexNumber(void) const
enum _NTV2VideoFormat NTV2VideoFormat
Identifies a particular video format.
The number of independent Audio Systems on the device.
bool TranslateRegions(ULWordSequence &outRgns, const ULWordSequence &inRgns, const bool inIsQuad, const bool inIsQuadQuad) const
Translates an 8MB-chunked list of regions into another list of regions with frame indexes and sizes e...
Definition: ntv2card.cpp:759
Identifies the NTV2DSKMode enumerated type.
virtual bool IsMultiRasterWidgetChannel(const NTV2Channel inChannel)
True if device can report if its "fail-safe" firmware is loaded/running.
Identifies the AES/EBU audio breakout cable that has XLR connectors.
Definition: ntv2enums.h:3109
#define kQParamVDevName
Device name, if not specified in .vdev file, then base name of .vdev file.
Definition: ntv2nubaccess.h:44
#define kNTV2PluginRegInfoKey_ShortName
Plugin short name.
Definition: ntv2nubaccess.h:76
virtual bool GetOutputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current output frame number for the given FrameStore (expressed as an NTV2Channel)...
virtual bool Close(void)
Closes me, releasing host resources that may have been allocated in a previous Open call...
static bool isEnabled(CNTV2Card &device, const NTV2Channel inChannel)
virtual bool IS_INPUT_SPIGOT_INVALID(const UWord inInputSpigot)
Definition: ntv2card.cpp:293
virtual bool Open(const UWord inDeviceIndex)
Opens a local/physical AJA device so it can be monitored/controlled.
virtual bool DeviceCanDoFormat(const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2card.cpp:520
virtual Word GetDeviceVersion(void)
Answers with this device&#39;s version number.
Definition: ntv2card.cpp:67
Identifies the NTV2VideoFormat enumerated type.
See KONA 4 (Quad Mode).
Definition: ntv2enums.h:48
Identifies the NTV2InputSource enumerated type.
virtual bool GetFrameBufferSize(const NTV2Channel inChannel, NTV2Framesize &outValue)
Answers with the frame size currently being used on the device.
Definition: json.hpp:5362
ULWord NTV2DeviceGetAudioFrameBuffer2(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
virtual bool IsAudioInputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the capture side of the given NTV2AudioSystem is currently running...
Definition: ntv2audio.cpp:1231
virtual ULWord GetFrameBufferSize(void) const
std::ostream & RawDump(std::ostream &oss) const
Dumps a human-readable list of regions into the given stream.
Definition: ntv2card.cpp:627
uint32_t ULWord
Definition: ajatypes.h:236
virtual bool AutoCirculateGetStatus(const NTV2Channel inChannel, AUTOCIRCULATE_STATUS &outStatus)
Returns the current AutoCirculate status for the given channel.
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They&#39;re also commonly use...
Definition: ntv2enums.h:1359
virtual NTV2Dictionary ConnectParams(void) const
See Io 4K Plus.
Definition: ntv2enums.h:37
#define NTV2DriverVersionDecode_Major(__vers__)
NTV2WidgetType
Definition: ntv2enums.h:3050
#define NTV2DriverVersionDecode_Point(__vers__)
virtual bool GetInstalledBitfileInfo(ULWord &outNumBytes, std::string &outDateStr, std::string &outTimeStr)
Returns the bitfile size and time/date stamp from the header of the bitfile that&#39;s currently installe...
Definition: ntv2card.cpp:320
The number of SDI video outputs on the device.
See KONA 3G (Quad Mode).
Definition: ntv2enums.h:47
ULWordSet::const_iterator ULWordSetConstIter
virtual bool IsRemote(void) const
NTV2XilinxFPGA
Definition: ntv2enums.h:3849
virtual bool HasMultiRasterWidget(void)
Definition: ntv2card.h:6841
NTV2FrameRate
Identifies a particular video frame rate.
Definition: ntv2enums.h:414
I&#39;m the base class that undergirds the platform-specific derived classes (from which CNTV2Card is ult...
virtual std::string GetPCIFPGAVersionString(void)
Definition: ntv2card.cpp:131
virtual bool IsAudioOutputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the playout side of the given NTV2AudioSystem is currently running...
Definition: ntv2audio.cpp:1132
NTV2Standard
Identifies a particular video standard.
Definition: ntv2enums.h:167
virtual std::string GetDescription(void) const
Definition: ntv2card.cpp:139
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
static ULWordSet CoalesceRegions(const ULWordSequence &inRgn1, const ULWordSequence &inRgn2, const ULWordSequence &inRgn3)
Definition: ntv2card.cpp:637
virtual bool IsFailSafeBitfileLoaded(bool &outIsFailSafe)
Answers whether or not the "fail-safe" (aka "safe-boot") bitfile is currently loaded and running in t...
Definition: ntv2card.cpp:356
NTV2DeviceID _boardID
My cached device ID.
int16_t Word
Definition: ajatypes.h:233
static std::string SerialNum64ToString(const uint64_t inSerialNumber)
Returns a string containing the decoded, human-readable device serial number.
Definition: ntv2card.cpp:223
See Io 4K (Quad Mode).
Definition: ntv2enums.h:36
virtual bool IsOpen(void) const
The invalid mode.
Definition: ntv2enums.h:1247
See KONA LHi.
Definition: ntv2enums.h:78
bool _boardOpened
True if I&#39;m open and connected to the device.
std::set< std::string > NTV2StringSet
NTV2BreakoutType
Identifies the Breakout Boxes and Cables that may be attached to an AJA NTV2 device.
Definition: ntv2enums.h:3106
#define AJA_NULL
Definition: ajatypes.h:180
virtual std::string GetBitfileInfoString(const BITFILE_INFO_STRUCT &inBitFileInfo)
Generates and returns an info string with date, time and name for the given inBifFileInfo.
Definition: ntv2card.cpp:344
True if device has attached breakout board. (New in SDK 17.0)
virtual bool GetSerialNumberString(std::string &outSerialNumberString)
Answers with a string that contains my human-readable serial number.
Definition: ntv2card.cpp:229
virtual std::string GetDisplayName(void)
Answers with this device&#39;s display name.
Definition: ntv2card.cpp:88
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device...
See KONA 5.
Definition: ntv2enums.h:54
ULWord NTV2FramesizeToByteCount(const NTV2Framesize inFrameSize)
Converts the given NTV2Framesize value into an exact byte count.
Definition: ntv2utils.cpp:5290
bool IsStopped(void) const
True if device uses a "stacked" arrangement of its audio buffers.
std::set< ULWord > ULWordSet
A collection of unique ULWord (uint32_t) values.
virtual std::string GetDriverVersionString(void)
Answers with this device&#39;s driver&#39;s version as a human-readable string.
Definition: ntv2card.cpp:162
virtual bool DeviceCanDoDSKMode(const NTV2DSKMode inDSKM)
Definition: ntv2card.cpp:583
virtual bool GetInputFrame(const NTV2Channel inChannel, ULWord &outValue)
Answers with the current input frame index number for the given FrameStore. This identifies which par...
virtual std::string GetDeviceVersionString(void)
Answers with this device&#39;s version number as a human-readable string.
Definition: ntv2card.cpp:74
virtual bool IS_HDMI_INPUT_SPIGOT_INVALID(const UWord inInputHDMIPort)
Definition: ntv2card.cpp:300
virtual bool GetDeviceFrameInfo(const UWord inFrameNumber, const NTV2Channel inChannel, uint64_t &outAddress, uint64_t &outLength)
Answers with the address and size of the given frame.
Definition: ntv2dma.cpp:375
virtual bool GetLPExternalConfigurationURLString(std::string &outURLString)
Definition: ntv2card.cpp:436
bool GetRegions(ULWordSequence &outFree, ULWordSequence &outUsed, ULWordSequence &outBad) const
Answers with the lists of free, in-use and conflicting 8MB memory blocks. Each ULWord represents a re...
Definition: ntv2card.cpp:677
Specifies channel or FrameStore 8 (or the 8th item).
Definition: ntv2enums.h:1368
Specifies channel or FrameStore 2 (or the 2nd item).
Definition: ntv2enums.h:1362
virtual NTV2DeviceID GetDeviceID(void)
NTV2BitfileType
Definition: ntv2enums.h:3371
static NTV2WidgetID WidgetIDFromTypeAndChannel(const NTV2WidgetType inWidgetType, const NTV2Channel inChannel)
True if device has a local processor handling the product code. (New in SDK 18.1) ...
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
virtual std::string GetDescription(void) const
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device...
NTV2Framesize
Kona2/Xena2 specific enums.
Definition: ntv2enums.h:2119
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1373
virtual bool DeviceCanDoInputSource(const NTV2InputSource inSrc)
Definition: ntv2card.cpp:588
See KONA 5.
Definition: ntv2enums.h:50
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
virtual bool DriverGetBitFileInformation(BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile)
defined(NTV2_DEPRECATE_17_2)
NTV2Mode
Used to identify the mode of a widget_framestore, or the direction of an AutoCirculate stream: either...
Definition: ntv2enums.h:1241
uint16_t GetEndFrame(void) const
virtual std::string GetModelName(void)
Answers with this device&#39;s model name.
Definition: ntv2card.cpp:82
virtual int GetSFPConfigurationURLStrings(std::vector< std::string > &sfpURLStrings)
Definition: ntv2card.cpp:488
NTV2InputSource
Identifies a specific video input source.
Definition: ntv2enums.h:1264
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Definition: ntv2utils.cpp:4608
bool TagVideoFrames(CNTV2Card &inDevice)
Definition: ntv2card.cpp:801
std::string & strip(std::string &str, const std::string &ws)
Definition: common.cpp:461
virtual bool GetFrameBufferFormat(NTV2Channel inChannel, NTV2FrameBufferFormat &outValue)
Returns the current frame buffer format for the given FrameStore on the AJA device.
#define DEC(__x__)
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:350
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
This identifies the first Audio System.
Definition: ntv2enums.h:3900
The total number of audio systems on the device that can read/write audio buffer memory. Includes host audio system, if present. (New in SDK 17.0)
virtual bool GetFrameGeometry(NTV2FrameGeometry &outValue, NTV2Channel inChannel=NTV2_CHANNEL1)
Declares numerous NTV2 utility functions.
True if device supports 12G routing crosspoints.
bool TagAudioBuffers(CNTV2Card &inDevice, const bool inMarkStoppedAudioBuffersFree)
Definition: ntv2card.cpp:783
virtual uint64_t GetSerialNumber(void)
Answers with my serial number.
Definition: ntv2card.cpp:215
virtual ULWord GetNumSupported(const NTV2NumericParamID inParamID)
Declares the AJASystemInfo class.
virtual ULWord DeviceGetFrameBufferSize(void)
Definition: ntv2card.cpp:527
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
See Io X3.
Definition: ntv2enums.h:43
NTV2WidgetID
Definition: ntv2enums.h:2912
uint16_t UWord
Definition: ajatypes.h:234
#define NTV2DriverVersionDecode_Build(__vers__)
Specifies channel or FrameStore 1 (or the first item).
Definition: ntv2enums.h:1361
ULWord NTV2DeviceGetAudioFrameBuffer(NTV2DeviceID boardID, NTV2FrameGeometry frameGeometry, NTV2FrameBufferFormat frameFormat)
See Io IP.
Definition: ntv2enums.h:40
virtual NTV2BreakoutType GetBreakoutHardware(void)
Definition: ntv2card.cpp:380
A simple (not thread-safe) set of key/value pairs. (New in SDK 16.3)
bool CanDoWidget(const NTV2WidgetID inWgtID)
virtual ULWordSet GetSupportedItems(const NTV2EnumsID inEnumsID)
Identifies the AES/EBU audio breakout cable that has BNC connectors.
Definition: ntv2enums.h:3110
NTV2DSKMode
Definition: ntv2enums.h:3502
virtual bool IsChannelEnabled(const NTV2Channel inChannel, bool &outEnabled)
Answers whether or not the given FrameStore is enabled.
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:741
See KONA 5.
Definition: ntv2enums.h:51
#define NTV2DriverVersionDecode_Minor(__vers__)
The SPI-flash version on the device. (New in SDK 17.1)
virtual bool IS_CHANNEL_INVALID(const NTV2Channel inChannel) const
Definition: ntv2card.cpp:272
Declares the CNTV2Card class.
bool NTV2DeviceCanDoFormat(const NTV2DeviceID inDevID, const NTV2FrameRate inFR, const NTV2FrameGeometry inFG, const NTV2Standard inStd)
Definition: ntv2utils.cpp:4158
Specifies channel or FrameStore 4 (or the 4th item).
Definition: ntv2enums.h:1364
Specifies channel or FrameStore 5 (or the 5th item).
Definition: ntv2enums.h:1365
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Private include file for all ajabase sources.
virtual ULWord DeviceGetNumberFrameBuffers(void)
Definition: ntv2card.cpp:307
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
virtual bool CanWarmBootFPGA(bool &outCanWarmBoot)
Answers whether or not the FPGA can be reloaded without powering off.
Definition: ntv2card.cpp:365
bool TagMemoryBlock(const ULWord inStartAddr, const ULWord inByteLength, const std::string &inTag)
True if device has a microphone input connector.
std::string SerialNum64ToString(const uint64_t &inSerNum)
Definition: ntv2utils.cpp:7891
std::string NTV2BitfileTypeToString(const NTV2BitfileType inValue, const bool inCompactDisplay=false)
Definition: ntv2utils.cpp:7597
virtual AJAStatus GetValue(const AJASystemInfoTag inTag, std::string &outValue) const
Answers with the host system info value string for the given AJASystemInfoTag.
Definition: info.cpp:153
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
NTV2ConversionMode
Definition: ntv2enums.h:3717
No identifiable breakout hardware appears to be attached.
Definition: ntv2enums.h:3108
See KONA X™.
Definition: ntv2enums.h:82
virtual ULWord DeviceGetAudioFrameBuffer(void)
Definition: ntv2card.cpp:532
Identifies the NTV2PixelFormat enumerated type.
std::ostream & DumpBlocks(std::ostream &oss) const
Dumps all 8MB blocks/frames and their tags, if any, into the given stream.
Definition: ntv2card.cpp:652
The number of 25Gbps SFPs on the device. (New in SDK 18.1)
Specifies channel or FrameStore 6 (or the 6th item).
Definition: ntv2enums.h:1366
Identifies the NTV2ConversionMode enumerated type.
See KONA 3G (UFC Mode).
Definition: ntv2enums.h:46
virtual bool IsBufferSizeSetBySW(void)
defined(NTV2_DEPRECATE_17_2)
virtual std::string GetFPGAVersionString(const NTV2XilinxFPGA inFPGA=eFPGAVideoProc)
Definition: ntv2card.cpp:109
CNTV2Card()
My default constructor.
Definition: ntv2card.cpp:21
Specifies channel or FrameStore 7 (or the 7th item).
Definition: ntv2enums.h:1367
See KONA X™.
Definition: ntv2enums.h:80
See KONA 4 (UFC Mode).
Definition: ntv2enums.h:49
virtual ULWord GetSerialNumberLow(void)
Definition: ntv2card.cpp:202
Identifies the NTV2AudioWidgetID enumerated type.
virtual bool GetDriverVersionComponents(UWord &outMajor, UWord &outMinor, UWord &outPoint, UWord &outBuild)
Answers with the individual version components of this device&#39;s driver.
Definition: ntv2card.cpp:184
The number of SDI video inputs on the device.
uint16_t GetStartFrame(void) const
Declares device capability functions.
Packed driver version – use NTV2DriverVersionEncode, NTV2DriverVersionDecode* macros to encode/decod...
virtual ~CNTV2Card()
My destructor.
Definition: ntv2card.cpp:59
The size, in bytes, of the device&#39;s active RAM available for video and audio.
Specifies channel or FrameStore 3 (or the 3rd item).
Definition: ntv2enums.h:1363
See KONA 5.
Definition: ntv2enums.h:52
virtual bool GetMode(const NTV2Channel inChannel, NTV2Mode &outValue)
Answers with the current NTV2Mode of the given FrameStore on the AJA device.
The number of HDMI video inputs on the device.
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=(0))
Answers with the byte offset in device SDRAM into the specified Audio System&#39;s audio buffer...
Definition: ntv2audio.cpp:1800