|
AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Go to the documentation of this file.
17 #define DDFAIL(__x__) AJA_sERROR (AJA_DebugUnit_Firmware, AJAFUNC << ": " << __x__)
18 #define DDWARN(__x__) AJA_sWARNING(AJA_DebugUnit_Firmware, AJAFUNC << ": " << __x__)
19 #define DDNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_Firmware, AJAFUNC << ": " << __x__)
20 #define DDINFO(__x__) AJA_sINFO (AJA_DebugUnit_Firmware, AJAFUNC << ": " << __x__)
21 #define DDDBG(__x__) AJA_sDEBUG (AJA_DebugUnit_Firmware, AJAFUNC << ": " << __x__)
34 if (!BitstreamStatus(reg))
45 if (!IsDynamicDevice())
50 const ULWord successes(counts & 0x0000FFFF);
59 if (!IsDynamicDevice())
73 result.push_back(*it);
84 if (currentDeviceID == 0)
89 if (!BitstreamStatus(reg))
95 ULWord currentUserID(0), currentDesignID(0), currentDesignVersion(0), currentBitfileID(0), currentBitfileVersion(0);
97 if (GetRunningFirmwareUserID(currentUserID) && currentUserID)
109 currentBitfileVersion = 0xff;
112 if (!currentDesignID)
119 currentDesignVersion,
121 currentBitfileVersion,
128 if (it->designID == currentDesignID)
129 if (it->designVersion == currentDesignVersion)
133 if (result.find(devID) == result.end())
134 result.insert(devID);
142 return devices.find(inDeviceID) != devices.end();
148 {
DDFAIL(
"Device not open");
return false;}
151 if (!currentDeviceID)
152 {
DDFAIL(
"Current device ID is zero");
return false;}
154 const string oldDevName (GetDisplayName());
158 if (!BitstreamStatus(regs))
159 {
DDFAIL(
"Unable to read current bitstream status for " << oldDevName);
return false;}
162 {
DDFAIL(
"Bitstream version is zero for " << oldDevName);
return false;}
164 ULWord currentUserID(0), currentDesignID(0), currentDesignVersion(0), currentBitfileID(0), currentBitfileVersion(0);
166 if (GetRunningFirmwareUserID(currentUserID) && currentUserID)
178 currentBitfileVersion = 0xff;
181 if (!currentDesignID)
182 {
DDFAIL(
"Current design ID is zero for " << oldDevName);
return false;}
188 currentDesignVersion,
190 currentBitfileVersion,
192 {
DDFAIL(
"GetBitStream 'clear' failed for " << oldDevName);
return false;}
198 currentDesignVersion,
202 {
DDFAIL(
"GetBitStream 'partial' failed for " << oldDevName);
return false;}
205 if (!BitstreamWrite (clearStream,
true,
true))
206 {
DDFAIL(
"BitstreamWrite failed writing 'clear' bitstream for " << oldDevName);
return false;}
208 if (!BitstreamWrite (partialStream,
false,
true))
209 {
DDFAIL(
"BitstreamWrite failed writing 'partial' bitstream for " << oldDevName);
return false;}
virtual bool LoadDynamicDevice(const NTV2DeviceID inDeviceID)
Quickly, dynamically loads the given device ID firmware.
Declares device capability functions.
A generic user-space buffer object that has an address and a length. Used most often to share an arbi...
static ULWord ConvertToBitfileID(const NTV2DeviceID inDeviceID)
#define NTV2_BITFILE_FLAG_CLEAR
This is a clear bitfile.
virtual NTV2DeviceID GetBaseDeviceID()
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
virtual bool AddDynamicDirectory(const std::string &inDirectory)
Adds all bitfiles found in the given host file directory to the list of available dynamic bitfiles.
NTV2DeviceIDSet::const_iterator NTV2DeviceIDSetConstIter
A convenient const iterator for NTV2DeviceIDSet.
#define NTV2_BITFILE_FLAG_PARTIAL
This is a partial bitfile.
#define BITSTREAM_VERSION
Bitstream version register.
virtual bool AddDirectory(const std::string &inDirectory)
Add the bitfile(s) at the given path to the list of bitfiles.
I manage and cache any number of bitfiles for any number of NTV2 devices/designs.
virtual const NTV2BitfileInfoList & GetBitfileInfoList(void) const
Returns an NTV2BitfileInfoList standard C++ vector.
static NTV2DeviceID ConvertToDeviceID(const ULWord inDesignID, const ULWord inBitfileID)
virtual bool IsDynamicFirmwareLoaded(void)
virtual NTV2DeviceIDSet GetDynamicDeviceIDs(void)
virtual NTV2DeviceIDList GetDynamicDeviceList(void)
std::string NTV2DeviceIDToString(const NTV2DeviceID inValue, const bool inForRetailDisplay=false)
Declares the CNTV2Card class.
Declares numerous NTV2 utility functions.
std::vector< NTV2BitfileInfo > NTV2BitfileInfoList
virtual bool CanLoadDynamicDevice(const NTV2DeviceID inDeviceID)
static CNTV2BitfileManager s_BitfileManager
std::vector< ULWord > NTV2ULWordVector
An ordered sequence of ULWords.
virtual bool GetBitStream(NTV2Buffer &outBitstream, const ULWord inDesignID, const ULWord inDesignVersion, const ULWord inBitfileID, const ULWord inBitfileVersion, const ULWord inBitfileFlags)
Retrieves the bitstream specified by design ID & version, and bitfile ID & version....
Declares the CNTV2Bitfile class.
NTV2BitfileInfoList::const_iterator NTV2BitfileInfoListConstIter
virtual bool AddDynamicBitfile(const std::string &inBitfilePath)
Adds the given bitfile to the list of available dynamic bitfiles.
std::set< NTV2DeviceID > NTV2DeviceIDSet
A set of NTV2DeviceIDs.
@ kVRegDynFirmwareUpdateCounts
@ kVRegBaseFirmwareDeviceID
virtual bool AddFile(const std::string &inBitfilePath)
Add the bitfile at the given path to the list of bitfiles.
Declares the CNTV2BitfileManager class that manages Xilinx bitfiles.
std::vector< NTV2DeviceID > NTV2DeviceIDList
An ordered list of NTV2DeviceIDs.
#define xHEX0N(__x__, __n__)
virtual bool IsDynamicDevice(void)
Declares the AJADebug class.