AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
ntv2bitfile.cpp File Reference

Implementation of CNTV2Bitfile class. More...

#include "ntv2bitfile.h"
#include "ntv2card.h"
#include "ntv2utils.h"
#include "ntv2endian.h"
#include "ajabase/system/debug.h"
#include "ajabase/common/common.h"
#include "ajabase/system/lock.h"
#include <iostream>
#include <sys/stat.h>
#include <assert.h>
#include <arpa/inet.h>
#include <map>
Include dependency graph for ntv2bitfile.cpp:

Go to the source code of this file.

Classes

class  CDesignNameToIDMapMaker
 
class  CDesignPairToIDMapMaker
 

Macros

#define MAX_BITFILEHEADERSIZE   512
 
#define BUMPPOS(_inc_)
 
#define CHKDIGIT(_s_, _pos_)
 
#define CHKCHAR(_c_, _s_, _pos_)
 

Typedefs

typedef map< string, NTV2DeviceIDDesignNameToIDMap
 
typedef DesignNameToIDMap::iterator DesignNameToIDIter
 
typedef DesignNameToIDMap::const_iterator DesignNameToIDConstIter
 
typedef pair< ULWord, ULWordDesignPair
 
typedef map< DesignPair, NTV2DeviceIDDesignPairToIDMap
 
typedef DesignPairToIDMap::const_iterator DesignPairToIDMapConstIter
 
typedef map< string, NTV2DeviceIDDesignNameToDeviceIDMap
 
typedef pair< string, NTV2DeviceIDDesignNameDeviceIDPair
 
typedef DesignNameToDeviceIDMap::const_iterator DesignNameToDeviceIDConstIter
 

Variables

static const unsigned char gSignature [8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x99, 0x55, 0x66}
 
static const unsigned char gHead13 [] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01}
 
static const NTV2Buffer Header13 (gHead13, sizeof(gHead13))
 
static const NTV2Buffer Signature (gSignature, sizeof(gSignature))
 
static DesignPairToIDMap sDesignPairToIDMap
 
static AJALock sDesignPairToIDMapLock
 
static DesignNameToDeviceIDMap gDesignNameToDeviceIDs
 

Detailed Description

Implementation of CNTV2Bitfile class.

Definition in file ntv2bitfile.cpp.

Macro Definition Documentation

◆ BUMPPOS

#define BUMPPOS (   _inc_)
Value:
pos += (_inc_); \
if (pos >= headerLength) \
{ \
oss << "Failed, offset " << DEC(pos) << " is past end, length=" << DEC(headerLength); \
break; \
}

Definition at line 32 of file ntv2bitfile.cpp.

◆ CHKCHAR

#define CHKCHAR (   _c_,
  _s_,
  _pos_ 
)
Value:
if (_s_.at(_pos_) < (_c_)) \
{ \
oss << "Expected '" << (_c_) << "' at " << DEC(_pos_) << " in '" << _s_ << "'"; \
return false; \
}

Definition at line 45 of file ntv2bitfile.cpp.

◆ CHKDIGIT

#define CHKDIGIT (   _s_,
  _pos_ 
)
Value:
if (_s_.at(_pos_) < '0' || _s_.at(_pos_) > '9') \
{ \
oss << "Expected digit at " << DEC(_pos_) << " in '" << _s_ << "'"; \
return false; \
}

Definition at line 39 of file ntv2bitfile.cpp.

◆ MAX_BITFILEHEADERSIZE

#define MAX_BITFILEHEADERSIZE   512

Definition at line 26 of file ntv2bitfile.cpp.

Typedef Documentation

◆ DesignNameDeviceIDPair

typedef pair<string,NTV2DeviceID> DesignNameDeviceIDPair

Definition at line 775 of file ntv2bitfile.cpp.

◆ DesignNameToDeviceIDConstIter

typedef DesignNameToDeviceIDMap::const_iterator DesignNameToDeviceIDConstIter

Definition at line 776 of file ntv2bitfile.cpp.

◆ DesignNameToDeviceIDMap

Definition at line 774 of file ntv2bitfile.cpp.

◆ DesignNameToIDConstIter

typedef DesignNameToIDMap::const_iterator DesignNameToIDConstIter

Definition at line 663 of file ntv2bitfile.cpp.

◆ DesignNameToIDIter

typedef DesignNameToIDMap::iterator DesignNameToIDIter

Definition at line 662 of file ntv2bitfile.cpp.

◆ DesignNameToIDMap

typedef map<string, NTV2DeviceID> DesignNameToIDMap

Definition at line 661 of file ntv2bitfile.cpp.

◆ DesignPair

typedef pair<ULWord, ULWord> DesignPair

Definition at line 695 of file ntv2bitfile.cpp.

◆ DesignPairToIDMap

Definition at line 696 of file ntv2bitfile.cpp.

◆ DesignPairToIDMapConstIter

typedef DesignPairToIDMap::const_iterator DesignPairToIDMapConstIter

Definition at line 697 of file ntv2bitfile.cpp.

Variable Documentation

◆ gDesignNameToDeviceIDs

DesignNameToDeviceIDMap gDesignNameToDeviceIDs
static

Definition at line 777 of file ntv2bitfile.cpp.

◆ gHead13

const unsigned char gHead13[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01}
static

Definition at line 28 of file ntv2bitfile.cpp.

◆ gSignature

const unsigned char gSignature[8] = {0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x99, 0x55, 0x66}
static

Definition at line 27 of file ntv2bitfile.cpp.

◆ Header13

const NTV2Buffer Header13(gHead13, sizeof(gHead13))
static

◆ sDesignPairToIDMap

DesignPairToIDMap sDesignPairToIDMap
static

Definition at line 698 of file ntv2bitfile.cpp.

◆ sDesignPairToIDMapLock

AJALock sDesignPairToIDMapLock
static

Definition at line 699 of file ntv2bitfile.cpp.

◆ Signature

const NTV2Buffer Signature(gSignature, sizeof(gSignature))
static
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5605