AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2bitfilemanager.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef NTV2BITMANAGER_H
9 #define NTV2BITMANAGER_H
10 
11 #include <string>
12 #include <vector>
13 #include <fstream>
14 #ifdef AJALinux
15  #include <stdint.h>
16  #include <stdlib.h>
17 #endif
18 #include "ntv2publicinterface.h"
19 
23 #define NTV2_BITFILE_FLAG_TANDEM BIT(0)
24 #define NTV2_BITFILE_FLAG_PARTIAL BIT(1)
25 #define NTV2_BITFILE_FLAG_CLEAR BIT(2)
26 
27 
32 {
33  std::string bitfilePath;
34  std::string designName;
41 };
42 
43 typedef std::vector <NTV2BitfileInfo> NTV2BitfileInfoList;
44 typedef NTV2BitfileInfoList::iterator NTV2BitfileInfoListIter;
45 typedef NTV2BitfileInfoList::const_iterator NTV2BitfileInfoListConstIter;
46 
47 
53 {
54 public:
59 
63  virtual ~CNTV2BitfileManager ();
64 
70  virtual bool AddFile (const std::string & inBitfilePath);
71 
77  virtual bool AddDirectory (const std::string & inDirectory);
78 
82  virtual void Clear (void);
83 
88  virtual size_t GetNumBitfiles (void);
89 
94  virtual inline const NTV2BitfileInfoList & GetBitfileInfoList (void) const {return _bitfileList;}
95 
107  virtual bool GetBitStream (NTV2Buffer & outBitstream,
108  const ULWord inDesignID,
109  const ULWord inDesignVersion,
110  const ULWord inBitfileID,
111  const ULWord inBitfileVersion,
112  const ULWord inBitfileFlags);
113 
114 private:
115 
121  bool ReadBitstream (const size_t inIndex);
122 
123  typedef std::vector <NTV2Buffer> NTV2BitstreamList;
124  typedef NTV2BitstreamList::iterator NTV2BitstreamListIter;
125 
126  NTV2BitfileInfoList _bitfileList;
127  NTV2BitstreamList _bitstreamList;
128 }; // CNTV2BitfileManager
129 
130 #endif // NTV2BITMANAGER_H
NTV2BitfileInfo::designVersion
ULWord designVersion
Version of this core.
Definition: ntv2bitfilemanager.h:36
NTV2BitfileInfo::designName
std::string designName
The design name for this bitfile.
Definition: ntv2bitfilemanager.h:34
NTV2Buffer
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
Definition: ntv2publicinterface.h:6022
NTV2BitfileInfo::deviceID
NTV2DeviceID deviceID
The NTV2DeviceID for this firmware core+personality.
Definition: ntv2bitfilemanager.h:40
NTV2BitfileInfo
Bitfile information.
Definition: ntv2bitfilemanager.h:31
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
NTV2BitfileInfo::designID
ULWord designID
Identifies the firmware core (the design base common to all its personalities).
Definition: ntv2bitfilemanager.h:35
NTV2BitfileInfo::bitfileID
ULWord bitfileID
Identifies the firmware personality.
Definition: ntv2bitfilemanager.h:37
CNTV2BitfileManager
I manage and cache any number of bitfiles for any number of NTV2 devices/designs.
Definition: ntv2bitfilemanager.h:52
CNTV2BitfileManager::GetBitfileInfoList
virtual const NTV2BitfileInfoList & GetBitfileInfoList(void) const
Returns an NTV2BitfileInfoList standard C++ vector.
Definition: ntv2bitfilemanager.h:94
NTV2BitfileInfo::bitfilePath
std::string bitfilePath
The path where this bitfile was found.
Definition: ntv2bitfilemanager.h:33
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
NTV2BitfileInfoListIter
NTV2BitfileInfoList::iterator NTV2BitfileInfoListIter
Definition: ntv2bitfilemanager.h:44
NTV2BitfileInfo::bitfileVersion
ULWord bitfileVersion
Version of this personality.
Definition: ntv2bitfilemanager.h:38
NTV2BitfileInfoList
std::vector< NTV2BitfileInfo > NTV2BitfileInfoList
Definition: ntv2bitfilemanager.h:43
NTV2BitfileInfo::bitfileFlags
ULWord bitfileFlags
Definition: ntv2bitfilemanager.h:39
NTV2BitfileInfoListConstIter
NTV2BitfileInfoList::const_iterator NTV2BitfileInfoListConstIter
Definition: ntv2bitfilemanager.h:45
AJAExport
#define AJAExport
Definition: export.h:33
ntv2publicinterface.h
Declares enums and structs used by all platform drivers and the SDK.