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

Implementation of CNTV2SupportLogger class. More...

#include "ntv2supportlogger.h"
#include "ntv2devicescanner.h"
#include "ntv2devicefeatures.h"
#include "ntv2konaflashprogram.h"
#include "ntv2registerexpert.h"
#include "ntv2registersmb.h"
#include "ntv2rp188.h"
#include "ajabase/common/common.h"
#include "ajabase/persistence/persistence.h"
#include "ajabase/system/info.h"
#include <algorithm>
#include <sstream>
#include <vector>
#include <iterator>
Include dependency graph for ntv2supportlogger.cpp:

Go to the source code of this file.

Classes

struct  registerToLoadString
 

Macros

#define PATH_DELIMITER   "/"
 
#define LoggerSectionToFunctionMacro(_SectionEnum_, _SectionString_, _SectionMethod_)
 

Typedefs

typedef map< NTV2Channel, AUTOCIRCULATE_STATUSChannelToACStatus
 
typedef ChannelToACStatus::const_iterator ChannelToACStatusConstIter
 
typedef pair< NTV2Channel, AUTOCIRCULATE_STATUSChannelToACStatusPair
 
typedef map< uint16_t, NTV2TimeCodeListFrameToTCList
 
typedef FrameToTCList::const_iterator FrameToTCListConstIter
 
typedef pair< uint16_t, NTV2TimeCodeListFrameToTCListPair
 
typedef map< NTV2Channel, FrameToTCListChannelToPerFrameTCList
 
typedef ChannelToPerFrameTCList::const_iterator ChannelToPerFrameTCListConstIter
 
typedef pair< NTV2Channel, FrameToTCListChannelToPerFrameTCListPair
 

Functions

static string makeHeader (ostringstream &oss, const string &inName)
 
static string timecodeToString (const NTV2_RP188 &inRP188)
 
static string appSignatureToString (const ULWord inAppSignature)
 
static string pidToString (const uint32_t inPID)
 
static uint32_t maxSampleCountForNTV2AudioBufferSize (const NTV2AudioBufferSize inBufferSize, const uint16_t inChannelCount)
 
static NTV2VideoFormat getVideoFormat (CNTV2Card &device, const NTV2Channel inChannel)
 
static NTV2PixelFormat getPixelFormat (CNTV2Card &device, const NTV2Channel inChannel)
 
static NTV2Mode getMode (CNTV2Card &device, const NTV2Channel inChannel)
 
static bool isEnabled (CNTV2Card &device, const NTV2Channel inChannel)
 
static ULWord getActiveFrame (CNTV2Card &device, const NTV2Channel inChannel)
 
static string getActiveFrameStr (CNTV2Card &device, const NTV2Channel inChannel)
 
static ULWord readCurrentAudioPosition (CNTV2Card &device, NTV2AudioSystem audioSystem, NTV2Mode mode)
 
static ULWord getNumAudioChannels (CNTV2Card &device, NTV2AudioSystem audioSystem)
 
static ULWord bytesToSamples (CNTV2Card &device, NTV2AudioSystem audioSystem, const ULWord inBytes)
 
static ULWord getCurrentPositionSamples (CNTV2Card &device, NTV2AudioSystem audioSystem, NTV2Mode mode)
 
static ULWord getMaxNumSamples (CNTV2Card &device, NTV2AudioSystem audioSystem)
 
static NTV2Channel findActiveACChannel (CNTV2Card &device, NTV2AudioSystem audioSystem, AUTOCIRCULATE_STATUS &outStatus)
 
static bool detectInputChannelPairs (CNTV2Card &device, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedSource, NTV2AudioChannelPairs &outChannelPairsPresent)
 
static bool getBitfileDate (CNTV2Card &device, string &outDateString, NTV2XilinxFPGA whichFPGA)
 
ostream & operator<< (ostream &outStream, const CNTV2SupportLogger &inData)
 
static string HEX0NStr (const uint32_t inNum, const uint16_t inWidth)
 
static string xHEX0NStr (const uint32_t inNum, const uint16_t inWidth)
 
template<typename T >
string DECStr (const T inT)
 

Variables

const registerToLoadString registerToLoadStrings []
 

Detailed Description

Implementation of CNTV2SupportLogger class.

Definition in file ntv2supportlogger.cpp.

Macro Definition Documentation

◆ LoggerSectionToFunctionMacro

#define LoggerSectionToFunctionMacro (   _SectionEnum_,
  _SectionString_,
  _SectionMethod_ 
)
Value:
if (mSections & _SectionEnum_) \
{ \
makeHeader(oss, _SectionString_); \
if (mPrependMap.find(_SectionEnum_) != mPrependMap.end()) \
oss << mPrependMap.at(_SectionEnum_); \
\
_SectionMethod_(oss); \
\
if (mAppendMap.find(_SectionEnum_) != mAppendMap.end()) \
oss << mAppendMap.at(_SectionEnum_); \
}

Definition at line 384 of file ntv2supportlogger.cpp.

◆ PATH_DELIMITER

#define PATH_DELIMITER   "/"

Definition at line 25 of file ntv2supportlogger.cpp.

Typedef Documentation

◆ ChannelToACStatus

Definition at line 31 of file ntv2supportlogger.cpp.

◆ ChannelToACStatusConstIter

typedef ChannelToACStatus::const_iterator ChannelToACStatusConstIter

Definition at line 32 of file ntv2supportlogger.cpp.

◆ ChannelToACStatusPair

◆ ChannelToPerFrameTCList

Definition at line 37 of file ntv2supportlogger.cpp.

◆ ChannelToPerFrameTCListConstIter

typedef ChannelToPerFrameTCList::const_iterator ChannelToPerFrameTCListConstIter

Definition at line 38 of file ntv2supportlogger.cpp.

◆ ChannelToPerFrameTCListPair

◆ FrameToTCList

typedef map<uint16_t, NTV2TimeCodeList> FrameToTCList

Definition at line 34 of file ntv2supportlogger.cpp.

◆ FrameToTCListConstIter

typedef FrameToTCList::const_iterator FrameToTCListConstIter

Definition at line 35 of file ntv2supportlogger.cpp.

◆ FrameToTCListPair

typedef pair<uint16_t, NTV2TimeCodeList> FrameToTCListPair

Definition at line 36 of file ntv2supportlogger.cpp.

Function Documentation

◆ appSignatureToString()

static string appSignatureToString ( const ULWord  inAppSignature)
static

Definition at line 61 of file ntv2supportlogger.cpp.

◆ bytesToSamples()

static ULWord bytesToSamples ( CNTV2Card device,
NTV2AudioSystem  audioSystem,
const ULWord  inBytes 
)
static

Definition at line 186 of file ntv2supportlogger.cpp.

◆ DECStr()

template<typename T >
string DECStr ( const T  inT)

Definition at line 449 of file ntv2supportlogger.cpp.

◆ detectInputChannelPairs()

static bool detectInputChannelPairs ( CNTV2Card device,
const NTV2AudioSource  inAudioSource,
const NTV2EmbeddedAudioInput  inEmbeddedSource,
NTV2AudioChannelPairs outChannelPairsPresent 
)
static

Definition at line 221 of file ntv2supportlogger.cpp.

◆ findActiveACChannel()

static NTV2Channel findActiveACChannel ( CNTV2Card device,
NTV2AudioSystem  audioSystem,
AUTOCIRCULATE_STATUS outStatus 
)
static

Definition at line 205 of file ntv2supportlogger.cpp.

◆ getActiveFrame()

static ULWord getActiveFrame ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 150 of file ntv2supportlogger.cpp.

◆ getActiveFrameStr()

static string getActiveFrameStr ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 160 of file ntv2supportlogger.cpp.

◆ getBitfileDate()

static bool getBitfileDate ( CNTV2Card device,
string &  outDateString,
NTV2XilinxFPGA  whichFPGA 
)
static

Definition at line 258 of file ntv2supportlogger.cpp.

◆ getCurrentPositionSamples()

static ULWord getCurrentPositionSamples ( CNTV2Card device,
NTV2AudioSystem  audioSystem,
NTV2Mode  mode 
)
static

Definition at line 191 of file ntv2supportlogger.cpp.

◆ getMaxNumSamples()

static ULWord getMaxNumSamples ( CNTV2Card device,
NTV2AudioSystem  audioSystem 
)
static

Definition at line 197 of file ntv2supportlogger.cpp.

◆ getMode()

static NTV2Mode getMode ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 136 of file ntv2supportlogger.cpp.

◆ getNumAudioChannels()

static ULWord getNumAudioChannels ( CNTV2Card device,
NTV2AudioSystem  audioSystem 
)
static

Definition at line 179 of file ntv2supportlogger.cpp.

◆ getPixelFormat()

static NTV2PixelFormat getPixelFormat ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 129 of file ntv2supportlogger.cpp.

◆ getVideoFormat()

static NTV2VideoFormat getVideoFormat ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 122 of file ntv2supportlogger.cpp.

◆ HEX0NStr()

static string HEX0NStr ( const uint32_t  inNum,
const uint16_t  inWidth 
)
inlinestatic

Definition at line 447 of file ntv2supportlogger.cpp.

◆ isEnabled()

static bool isEnabled ( CNTV2Card device,
const NTV2Channel  inChannel 
)
static

Definition at line 143 of file ntv2supportlogger.cpp.

◆ makeHeader()

static string makeHeader ( ostringstream &  oss,
const string &  inName 
)
static

Definition at line 42 of file ntv2supportlogger.cpp.

◆ maxSampleCountForNTV2AudioBufferSize()

static uint32_t maxSampleCountForNTV2AudioBufferSize ( const NTV2AudioBufferSize  inBufferSize,
const uint16_t  inChannelCount 
)
static

Definition at line 106 of file ntv2supportlogger.cpp.

◆ operator<<()

ostream& operator<< ( ostream &  outStream,
const CNTV2SupportLogger inData 
)

Definition at line 303 of file ntv2supportlogger.cpp.

◆ pidToString()

static string pidToString ( const uint32_t  inPID)
static

Definition at line 74 of file ntv2supportlogger.cpp.

◆ readCurrentAudioPosition()

static ULWord readCurrentAudioPosition ( CNTV2Card device,
NTV2AudioSystem  audioSystem,
NTV2Mode  mode 
)
static

Definition at line 169 of file ntv2supportlogger.cpp.

◆ timecodeToString()

static string timecodeToString ( const NTV2_RP188 inRP188)
static

Definition at line 48 of file ntv2supportlogger.cpp.

◆ xHEX0NStr()

static string xHEX0NStr ( const uint32_t  inNum,
const uint16_t  inWidth 
)
inlinestatic

Definition at line 448 of file ntv2supportlogger.cpp.

Variable Documentation

◆ registerToLoadStrings

const registerToLoadString registerToLoadStrings[]

Definition at line 903 of file ntv2supportlogger.cpp.