AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
CNTV2Bitfile Class Reference

Instances of me can parse a bitfile. More...

#include <ntv2bitfile.h>

Public Member Functions

 CNTV2Bitfile ()
 My constructor. More...
 
virtual ~CNTV2Bitfile ()
 My destructor. More...
 
virtual bool Open (const std::string &inBitfilePath)
 Opens the bitfile at the given path, then parses its header. More...
 
virtual void Close (void)
 Closes bitfile (if open) and resets me. More...
 
virtual std::string ParseHeaderFromBuffer (const uint8_t *inBitfileBuffer, const size_t inBufferSize)
 Parse a bitfile header that's stored in a buffer. More...
 
virtual std::string ParseHeaderFromBuffer (const NTV2Buffer &inBitfileBuffer)
 Parse a bitfile header that's stored in a buffer. More...
 
virtual const std::string & GetDate (void) const
 
virtual const std::string & GetTime (void) const
 
virtual std::string GetDesignName (void) const
 
virtual const std::string & GetPartName (void) const
 
virtual const std::string & GetLastError (void) const
 
virtual bool IsTandem (void) const
 
virtual bool IsPartial (void) const
 
virtual bool IsClear (void) const
 
virtual bool IsCompress (void) const
 
virtual ULWord GetDesignID (void) const
 
virtual ULWord GetDesignVersion (void) const
 
virtual ULWord GetBitfileID (void) const
 
virtual ULWord GetBitfileVersion (void) const
 
virtual ULWord GetUserID (void) const
 Answers with the design user ID, as extracted from the bitfile. More...
 
virtual bool CanFlashDevice (const NTV2DeviceID inDeviceID) const
 
virtual NTV2DeviceID GetDeviceID (void) const
 
virtual size_t GetProgramStreamLength (void) const
 
virtual size_t GetFileStreamLength (void) const
 
virtual size_t GetProgramByteStream (NTV2Buffer &outBuffer)
 Retrieves the program bitstream. More...
 
virtual size_t GetFileByteStream (NTV2Buffer &outBuffer)
 Retrieves the file bitstream. More...
 

Static Public Member Functions

static NTV2DeviceID ConvertToDeviceID (const ULWord inDesignID, const ULWord inBitfileID)
 
static ULWord ConvertToDesignID (const NTV2DeviceID inDeviceID)
 
static ULWord ConvertToBitfileID (const NTV2DeviceID inDeviceID)
 
static std::string GetPrimaryHardwareDesignName (const NTV2DeviceID inDeviceID)
 
static NTV2DeviceID GetDeviceIDFromHardwareDesignName (const std::string &inDesignName)
 

Protected Member Functions

virtual void SetLastError (const std::string &inStr, const bool inAppend=false)
 

Detailed Description

Instances of me can parse a bitfile.

Definition at line 86 of file ntv2bitfile.h.

Constructor & Destructor Documentation

◆ CNTV2Bitfile()

CNTV2Bitfile::CNTV2Bitfile ( )

My constructor.

Definition at line 303 of file ntv2bitfile.cpp.

◆ ~CNTV2Bitfile()

CNTV2Bitfile::~CNTV2Bitfile ( )
virtual

My destructor.

Definition at line 308 of file ntv2bitfile.cpp.

Member Function Documentation

◆ CanFlashDevice()

bool CNTV2Bitfile::CanFlashDevice ( const NTV2DeviceID  inDeviceID) const
virtual
Returns
True if the bitfile can be flashed onto the device; otherwise false.

Definition at line 546 of file ntv2bitfile.cpp.

◆ Close()

void CNTV2Bitfile::Close ( void  )
virtual

Closes bitfile (if open) and resets me.

Definition at line 313 of file ntv2bitfile.cpp.

◆ ConvertToBitfileID()

ULWord CNTV2Bitfile::ConvertToBitfileID ( const NTV2DeviceID  inDeviceID)
static

Definition at line 799 of file ntv2bitfile.cpp.

◆ ConvertToDesignID()

ULWord CNTV2Bitfile::ConvertToDesignID ( const NTV2DeviceID  inDeviceID)
static

Definition at line 794 of file ntv2bitfile.cpp.

◆ ConvertToDeviceID()

NTV2DeviceID CNTV2Bitfile::ConvertToDeviceID ( const ULWord  inDesignID,
const ULWord  inBitfileID 
)
static

Definition at line 789 of file ntv2bitfile.cpp.

◆ GetBitfileID()

virtual ULWord CNTV2Bitfile::GetBitfileID ( void  ) const
inlinevirtual
Returns
A ULWord containing the design ID as extracted from the bitfile.

Definition at line 184 of file ntv2bitfile.h.

◆ GetBitfileVersion()

virtual ULWord CNTV2Bitfile::GetBitfileVersion ( void  ) const
inlinevirtual
Returns
A ULWord containing the design version as extracted from the bitfile.

Definition at line 189 of file ntv2bitfile.h.

◆ GetDate()

virtual const std::string& CNTV2Bitfile::GetDate ( void  ) const
inlinevirtual
Returns
A string containing the extracted bitfile build date.

Definition at line 129 of file ntv2bitfile.h.

◆ GetDesignID()

virtual ULWord CNTV2Bitfile::GetDesignID ( void  ) const
inlinevirtual
Returns
A ULWord containing the design design ID as extracted from the bitfile.

Definition at line 174 of file ntv2bitfile.h.

◆ GetDesignName()

virtual std::string CNTV2Bitfile::GetDesignName ( void  ) const
inlinevirtual
Returns
A string containing the extracted bitfile design name.

Definition at line 139 of file ntv2bitfile.h.

◆ GetDesignVersion()

virtual ULWord CNTV2Bitfile::GetDesignVersion ( void  ) const
inlinevirtual
Returns
A ULWord containing the design version as extracted from the bitfile.

Definition at line 179 of file ntv2bitfile.h.

◆ GetDeviceID()

NTV2DeviceID CNTV2Bitfile::GetDeviceID ( void  ) const
virtual
Returns
My instrinsic NTV2DeviceID.

Definition at line 782 of file ntv2bitfile.cpp.

◆ GetDeviceIDFromHardwareDesignName()

NTV2DeviceID CNTV2Bitfile::GetDeviceIDFromHardwareDesignName ( const std::string &  inDesignName)
static

Definition at line 805 of file ntv2bitfile.cpp.

◆ GetFileByteStream()

size_t CNTV2Bitfile::GetFileByteStream ( NTV2Buffer outBuffer)
virtual

Retrieves the file bitstream.

Parameters
[out]outBufferSpecifies the buffer that will receive the data. This method will Allocate storage if IsNULL or IsAllocatedBySDK.
Returns
Number of bytes copied to the outBuffer, or zero upon failure.

Definition at line 421 of file ntv2bitfile.cpp.

◆ GetFileStreamLength()

virtual size_t CNTV2Bitfile::GetFileStreamLength ( void  ) const
inlinevirtual
Returns
File stream length in bytes, or zero if error/invalid.

Definition at line 215 of file ntv2bitfile.h.

◆ GetLastError()

virtual const std::string& CNTV2Bitfile::GetLastError ( void  ) const
inlinevirtual
Returns
A string containing the error message, if any, from the last function that could fail.

Definition at line 149 of file ntv2bitfile.h.

◆ GetPartName()

virtual const std::string& CNTV2Bitfile::GetPartName ( void  ) const
inlinevirtual
Returns
A string containing the extracted bitfile part name.

Definition at line 144 of file ntv2bitfile.h.

◆ GetPrimaryHardwareDesignName()

string CNTV2Bitfile::GetPrimaryHardwareDesignName ( const NTV2DeviceID  inDeviceID)
static

Definition at line 464 of file ntv2bitfile.cpp.

◆ GetProgramByteStream()

size_t CNTV2Bitfile::GetProgramByteStream ( NTV2Buffer outBuffer)
virtual

Retrieves the program bitstream.

Parameters
[out]outBufferSpecifies the buffer that will receive the data. This method will Allocate storage if IsNULL or IsAllocatedBySDK.
Returns
Number of bytes copied to the outBuffer, or zero upon failure.

Definition at line 377 of file ntv2bitfile.cpp.

◆ GetProgramStreamLength()

virtual size_t CNTV2Bitfile::GetProgramStreamLength ( void  ) const
inlinevirtual
Returns
Program stream length in bytes, or zero if error/invalid.

Definition at line 210 of file ntv2bitfile.h.

◆ GetTime()

virtual const std::string& CNTV2Bitfile::GetTime ( void  ) const
inlinevirtual
Returns
A string containing the extracted bitfile build time.

Definition at line 134 of file ntv2bitfile.h.

◆ GetUserID()

virtual ULWord CNTV2Bitfile::GetUserID ( void  ) const
inlinevirtual

Answers with the design user ID, as extracted from the bitfile.

Returns
A ULWord containing the design user ID.

Definition at line 195 of file ntv2bitfile.h.

◆ IsClear()

virtual bool CNTV2Bitfile::IsClear ( void  ) const
inlinevirtual
Returns
True if the bitfile header includes clear flag; otherwise false.

Definition at line 164 of file ntv2bitfile.h.

◆ IsCompress()

virtual bool CNTV2Bitfile::IsCompress ( void  ) const
inlinevirtual
Returns
True if the bitfile header includes compress flag; otherwise false.

Definition at line 169 of file ntv2bitfile.h.

◆ IsPartial()

virtual bool CNTV2Bitfile::IsPartial ( void  ) const
inlinevirtual
Returns
True if the bitfile header includes partial flag; otherwise false.

Definition at line 159 of file ntv2bitfile.h.

◆ IsTandem()

virtual bool CNTV2Bitfile::IsTandem ( void  ) const
inlinevirtual
Returns
True if the bitfile header includes tandem flag; otherwise false.

Definition at line 154 of file ntv2bitfile.h.

◆ Open()

bool CNTV2Bitfile::Open ( const std::string &  inBitfilePath)
virtual

Opens the bitfile at the given path, then parses its header.

Parameters
[in]inBitfilePathSpecifies the path name of the bitfile to be parsed.
Returns
True if open & parse succeeds; otherwise false.

Definition at line 322 of file ntv2bitfile.cpp.

◆ ParseHeaderFromBuffer() [1/2]

string CNTV2Bitfile::ParseHeaderFromBuffer ( const NTV2Buffer inBitfileBuffer)
virtual

Parse a bitfile header that's stored in a buffer.

Parameters
[in]inBitfileBufferSpecifies the buffer of the bitfile to be parsed.
Returns
A std::string containing parsing errors. It will be empty if successful.

Definition at line 367 of file ntv2bitfile.cpp.

◆ ParseHeaderFromBuffer() [2/2]

string CNTV2Bitfile::ParseHeaderFromBuffer ( const uint8_t *  inBitfileBuffer,
const size_t  inBufferSize 
)
virtual

Parse a bitfile header that's stored in a buffer.

Parameters
[in]inBitfileBufferSpecifies the buffer of the bitfile to be parsed.
[in]inBufferSizeSpecifies the size of the buffer to be parsed.
Returns
A std::string containing parsing errors. It will be empty if successful.

Definition at line 361 of file ntv2bitfile.cpp.

◆ SetLastError()

void CNTV2Bitfile::SetLastError ( const std::string &  inStr,
const bool  inAppend = false 
)
protectedvirtual

Definition at line 347 of file ntv2bitfile.cpp.


The documentation for this class was generated from the following files: