AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2registerexpert.cpp File Reference

Implements the CNTV2RegisterExpert class. More...

#include "ntv2registerexpert.h"
#include "ntv2devicefeatures.hh"
#include "ntv2utils.h"
#include "ntv2debug.h"
#include "ntv2endian.h"
#include "ntv2vpid.h"
#include "ntv2bitfile.h"
#include "ntv2signalrouter.h"
#include "ajabase/common/common.h"
#include "ajabase/system/lock.h"
#include "ajabase/common/ajarefptr.h"
#include "ajabase/system/debug.h"
#include <algorithm>
#include <sstream>
#include <iterator>
#include <iomanip>
#include <map>
#include <math.h>
#include <ctype.h>
#include <unistd.h>
Include dependency graph for ntv2registerexpert.cpp:

Go to the source code of this file.

Classes

class  RegisterExpert
 

Macros

#define LOGGING_MAPPINGS   (AJADebug::IsActive(AJA_DebugUnit_Enumeration))
 
#define HEX16(__x__)   "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec
 
#define INSTP(_p_)   HEX16(uint64_t(_p_))
 
#define REiFAIL(__x__)   AJA_sERROR (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define REiWARN(__x__)   AJA_sWARNING(AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define REiNOTE(__x__)   AJA_sNOTICE (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define REiINFO(__x__)   AJA_sINFO (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define REiDBG(__x__)   AJA_sDEBUG (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define DEF_REGNAME(_num_)   DefineRegName(_num_, #_num_)
 
#define DEF_REG(_num_, _dec_, _rw_, _c1_, _c2_, _c3_)   DefineRegister((_num_), #_num_, _dec_, _rw_, _c1_, _c2_, _c3_)
 

Typedefs

typedef AJARefPtr< RegisterExpertRegisterExpertPtr
 

Enumerations

enum  NTV4FrameStoreRegs {
  regNTV4FS_FIRST, regNTV4FS_LineLengthPitch = regNTV4FS_FIRST, regNTV4FS_ROIVHSize, regNTV4FS_ROIF1StartAddr,
  regNTV4FS_ROIF2StartAddr, regNTV4FS_ROIF1VHOffsets, regNTV4FS_ROIF2VHOffsets, regNTV4FS_DisplayHorzPixelsPerLine,
  regNTV4FS_DisplayFID, regNTV4FS_F1ActiveLines, regNTV4FS_F2ActiveLines, regNTV4FS_RasterControl,
  regNTV4FS_RasterPixelSkip, regNTV4FS_RasterVideoFill_YCb_GB, regNTV4FS_RasterVideoFill_Cr_AR, regNTV4FS_RasterROIFillAlpha,
  regNTV4FS_Status, regNTV4FS_RasterOutputTimingPreset, regNTV4FS_RasterVTotalLines, regNTV4FS_RasterSmpteFramePulse,
  regNTV4FS_RasterOddLineStartAddress, regNTV4FS_RasterOffsetBlue, regNTV4FS_RasterOffsetRed, regNTV4FS_RasterOffsetAlpha,
  regNTV4FS_InputSourceSelect = 63, regNTV4FS_LAST = regNTV4FS_InputSourceSelect, regNTV4FS_REGISTER_COUNT
}
 

Functions

static const string sSpace (" ")
 
static const ULWord kNTV4FrameStoreFirstRegNum (0x0000D000/sizeof(ULWord))
 
static const ULWord kNumNTV4FrameStoreRegisters (regNTV4FS_REGISTER_COUNT)
 
static uint32_t gInstanceTally (0)
 
static uint32_t gLivingInstances (0)
 

Variables

static const string gChlClasses []
 
static const string sNull
 
static const std::string sNTV4FrameStoreRegNames []
 
static RegisterExpertPtr gpRegExpert
 
static AJALock gRegExpertGuardMutex
 

Detailed Description

Implements the CNTV2RegisterExpert class.

Definition in file ntv2registerexpert.cpp.

Macro Definition Documentation

◆ DEF_REG

#define DEF_REG (   _num_,
  _dec_,
  _rw_,
  _c1_,
  _c2_,
  _c3_ 
)    DefineRegister((_num_), #_num_, _dec_, _rw_, _c1_, _c2_, _c3_)

Definition at line 43 of file ntv2registerexpert.cpp.

◆ DEF_REGNAME

#define DEF_REGNAME (   _num_)    DefineRegName(_num_, #_num_)

Definition at line 42 of file ntv2registerexpert.cpp.

◆ HEX16

#define HEX16 (   __x__)    "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec

Definition at line 34 of file ntv2registerexpert.cpp.

◆ INSTP

#define INSTP (   _p_)    HEX16(uint64_t(_p_))

Definition at line 35 of file ntv2registerexpert.cpp.

◆ LOGGING_MAPPINGS

#define LOGGING_MAPPINGS   (AJADebug::IsActive(AJA_DebugUnit_Enumeration))

Definition at line 33 of file ntv2registerexpert.cpp.

◆ REiDBG

#define REiDBG (   __x__)    AJA_sDEBUG (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 40 of file ntv2registerexpert.cpp.

◆ REiFAIL

#define REiFAIL (   __x__)    AJA_sERROR (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 36 of file ntv2registerexpert.cpp.

◆ REiINFO

#define REiINFO (   __x__)    AJA_sINFO (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 39 of file ntv2registerexpert.cpp.

◆ REiNOTE

#define REiNOTE (   __x__)    AJA_sNOTICE (AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 38 of file ntv2registerexpert.cpp.

◆ REiWARN

#define REiWARN (   __x__)    AJA_sWARNING(AJA_DebugUnit_Enumeration, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 37 of file ntv2registerexpert.cpp.

Typedef Documentation

◆ RegisterExpertPtr

Enumeration Type Documentation

◆ NTV4FrameStoreRegs

Enumerator
regNTV4FS_FIRST 
regNTV4FS_LineLengthPitch 
regNTV4FS_ROIVHSize 
regNTV4FS_ROIF1StartAddr 
regNTV4FS_ROIF2StartAddr 
regNTV4FS_ROIF1VHOffsets 
regNTV4FS_ROIF2VHOffsets 
regNTV4FS_DisplayHorzPixelsPerLine 
regNTV4FS_DisplayFID 
regNTV4FS_F1ActiveLines 
regNTV4FS_F2ActiveLines 
regNTV4FS_RasterControl 
regNTV4FS_RasterPixelSkip 
regNTV4FS_RasterVideoFill_YCb_GB 
regNTV4FS_RasterVideoFill_Cr_AR 
regNTV4FS_RasterROIFillAlpha 
regNTV4FS_Status 
regNTV4FS_RasterOutputTimingPreset 
regNTV4FS_RasterVTotalLines 
regNTV4FS_RasterSmpteFramePulse 
regNTV4FS_RasterOddLineStartAddress 
regNTV4FS_RasterOffsetBlue 
regNTV4FS_RasterOffsetRed 
regNTV4FS_RasterOffsetAlpha 
regNTV4FS_InputSourceSelect 
regNTV4FS_LAST 
regNTV4FS_REGISTER_COUNT 

Definition at line 51 of file ntv2registerexpert.cpp.

Function Documentation

◆ gInstanceTally()

static uint32_t gInstanceTally ( )
static

◆ gLivingInstances()

static uint32_t gLivingInstances ( )
static

◆ kNTV4FrameStoreFirstRegNum()

static const ULWord kNTV4FrameStoreFirstRegNum ( 0x0000D000/  sizeofULWord)
static

◆ kNumNTV4FrameStoreRegisters()

static const ULWord kNumNTV4FrameStoreRegisters ( regNTV4FS_REGISTER_COUNT  )
static

◆ sSpace()

static const string sSpace ( " "  )
static

Variable Documentation

◆ gChlClasses

const string gChlClasses[]
static
Initial value:
= { std::string ("kRegClass_Channel1") , std::string ("kRegClass_Channel2") , std::string ("kRegClass_Channel3") , std::string ("kRegClass_Channel4") ,
std::string ("kRegClass_Channel5") , std::string ("kRegClass_Channel6") , std::string ("kRegClass_Channel7") , std::string ("kRegClass_Channel8") }

Definition at line 46 of file ntv2registerexpert.cpp.

◆ gpRegExpert

RegisterExpertPtr gpRegExpert
static

Definition at line 4453 of file ntv2registerexpert.cpp.

◆ gRegExpertGuardMutex

AJALock gRegExpertGuardMutex
static

Definition at line 4454 of file ntv2registerexpert.cpp.

◆ sNTV4FrameStoreRegNames

const std::string sNTV4FrameStoreRegNames[]
static
Initial value:
= { "LineLengthPitch",
"ROIVHSize",
"ROIF1StartAddr",
"ROIF2StartAddr",
"ROIF1VHOffsets",
"ROIF2VHOffsets",
"DisplayHorzPixelsPerLine",
"DisplayFID",
"F1ActiveLines",
"F2ActiveLines",
"RasterControl",
"RasterPixelSkip",
"RasterVideoFill_YCb_GB",
"RasterVideoFill_Cr_AR",
"RasterROIFillAlpha",
"Status",
"RasterOutputTimingPreset",
"RasterVTotalLines",
"RasterSmpteFramePulse",
"RasterOddLineStartAddress",
"RasterOffsetBlue",
"RasterOffsetRed",
"RasterOffsetAlpha"}

Definition at line 82 of file ntv2registerexpert.cpp.

◆ sNull

const string sNull
static

Definition at line 49 of file ntv2registerexpert.cpp.