AJA NTV2 SDK  18.1.0.2439
NTV2 SDK 18.1.0.2439
NTV2RegInfo Class Reference

Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions. More...

#include <ntv2publicinterface.h>

Public Member Functions

 NTV2RegInfo (const ULWord inRegNum=0, const ULWord inValue=0, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
 Constructs a valid NTV2RegInfo from the given optional parameters. More...
 
void Set (const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
 Sets me from the given parameters. More...
 
void MakeInvalid (void)
 Invalidates me, setting my register number, value, mask and shift values to 0xFFFFFFFF. More...
 
bool IsValid (void) const
 
bool operator== (const NTV2RegInfo &inRHS) const
 
bool operator< (const NTV2RegInfo &inRHS) const
 
std::ostream & Print (std::ostream &outputStream, const bool inAsCode=false) const
 Renders me to the given output stream in a human-readable format. More...
 
std::ostream & PrintCode (std::ostream &outputStream, const int inRadix=16, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID, const std::string &sCard="card") const
 Renders me to the given output stream as source code using a "WriteRegister" function call. More...
 
std::ostream & PrintLog (std::ostream &outputStream, const NTV2DeviceID inDeviceID=DEVICE_ID_INVALID) const
 Renders me to the given output stream in "supportlog" format. More...
 
bool ImportFromLog (const NTV2StringList &inLogLines)
 Resets me using the given "Number:" and "Value:" lines from the support log. More...
 
ULWord regNum (void) const
 
ULWord value (void) const
 
ULWord mask (void) const
 
ULWord shift (void) const
 
ULWord offset (void) const
 
NTV2RegInfo & setRegNum (const ULWord val)
 
NTV2RegInfo & setValue (const ULWord val)
 
NTV2RegInfo & setMask (const ULWord val)
 
NTV2RegInfo & setShift (const ULWord val)
 

Public Attributes

ULWord registerNumber
 My register number to use in a ReadRegister or WriteRegister call. More...
 
ULWord registerValue
 My register value to use in a ReadRegister or WriteRegister call. More...
 
ULWord registerMask
 My register mask value to use in a ReadRegister or WriteRegister call. More...
 
ULWord registerShift
 My register shift value to use in a ReadRegister or WriteRegister call. More...
 

Detailed Description

Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.

Definition at line 4072 of file ntv2publicinterface.h.

Constructor & Destructor Documentation

◆ NTV2RegInfo()

NTV2RegInfo::NTV2RegInfo ( const ULWord  inRegNum = 0,
const ULWord  inValue = 0,
const ULWord  inMask = 0xFFFFFFFF,
const ULWord  inShift = 0 
)
inline

Constructs a valid NTV2RegInfo from the given optional parameters.

Parameters
[in]inRegNumSpecifies the register number to use. If not specified, defaults to zero.
[in]inValueSpecifies the register value to use. If not specified, defaults to zero.
[in]inMaskSpecifies the bit mask to use. If not specified, defaults to 0xFFFFFFFF.
[in]inShiftSpecifies the shift to use. If not specified, defaults to zero.

Definition at line 4086 of file ntv2publicinterface.h.

Member Function Documentation

◆ ImportFromLog()

bool NTV2RegInfo::ImportFromLog ( const NTV2StringList &  inLogLines)

Resets me using the given "Number:" and "Value:" lines from the support log.

Parameters
[in]inLogLinesA string sequence that provides at least 2 lines from a "supportlog": one containing " Number: " followed by a decimal register number; another containing " Value: " with an 8-digit hexadecimal number immdiately following " : 0x" on that same line.
Returns
True if successful; otherwise false.

Definition at line 3589 of file ntv2publicinterface.cpp.

◆ IsValid()

bool NTV2RegInfo::IsValid ( void  ) const
inline
Returns
True if I'm considered "valid" – i.e. non-zero mask and < 32 bits of shift; or false if all my values are 0xFFFFFFFF, or if my mask is zero, or my shift > 31.

Definition at line 4114 of file ntv2publicinterface.h.

◆ MakeInvalid()

void NTV2RegInfo::MakeInvalid ( void  )
inline

Invalidates me, setting my register number, value, mask and shift values to 0xFFFFFFFF.

Definition at line 4107 of file ntv2publicinterface.h.

◆ mask()

ULWord NTV2RegInfo::mask ( void  ) const
inline

Definition at line 4170 of file ntv2publicinterface.h.

◆ offset()

ULWord NTV2RegInfo::offset ( void  ) const
inline

Definition at line 4172 of file ntv2publicinterface.h.

◆ operator<()

bool NTV2RegInfo::operator< ( const NTV2RegInfo &  inRHS) const
Returns
True if I'm less than the right-hand-side NTV2RegInfo.
Parameters
[in]inRHSSpecifies the right-hand-side NTV2RegInfo that will be compared to me.
Note
To synthesize the other comparison operators (!=, <=, >, >=), in client code, add "#include <utility>", and "using namespace std::rel_ops;".

Definition at line 3512 of file ntv2publicinterface.cpp.

◆ operator==()

bool NTV2RegInfo::operator== ( const NTV2RegInfo &  inRHS) const
inline
Returns
True if I'm identical to the right-hand-side NTV2RegInfo.
Parameters
[in]inRHSSpecifies the right-hand-side NTV2RegInfo that will be compared to me.
Note
To synthesize the other comparison operators (!=, <=, >, >=), in client code, add "#include <utility>", and "using namespace std::rel_ops;".

Definition at line 4123 of file ntv2publicinterface.h.

◆ Print()

ostream & NTV2RegInfo::Print ( std::ostream &  outputStream,
const bool  inAsCode = false 
) const

Renders me to the given output stream in a human-readable format.

Parameters
outputStreamSpecifies the output stream in which to Print my contents.
inAsCodeDeprecated as of SDK 16.0 – use PrintCode instead. Defaults to false. If true, renders me as source code.
Returns
The output stream.

Definition at line 3521 of file ntv2publicinterface.cpp.

◆ PrintCode()

ostream & NTV2RegInfo::PrintCode ( std::ostream &  outputStream,
const int  inRadix = 16,
const NTV2DeviceID  inDeviceID = DEVICE_ID_INVALID,
const std::string &  sCard = "card" 
) const

Renders me to the given output stream as source code using a "WriteRegister" function call.

Parameters
outputStreamSpecifies the output stream to write into.
[in]inRadixOptionally specifies the radix to use for the register value. Defaults to hexadecimal (base 16).
[in]inDeviceIDOptionally specifies the NTV2DeviceID for properly interpreting my register values.
[in]inCNTV2CardNameOptionally specifies the CNTV2Card identifier name. Defaults to "card".
Returns
The output stream.

Definition at line 3534 of file ntv2publicinterface.cpp.

◆ PrintLog()

ostream & NTV2RegInfo::PrintLog ( std::ostream &  outputStream,
const NTV2DeviceID  inDeviceID = DEVICE_ID_INVALID 
) const

Renders me to the given output stream in "supportlog" format.

Parameters
outputStreamSpecifies the output stream to write into.
[in]inDeviceIDOptionally specifies the NTV2DeviceID for properly interpreting my register value.
Returns
The output stream.

Definition at line 3575 of file ntv2publicinterface.cpp.

◆ regNum()

ULWord NTV2RegInfo::regNum ( void  ) const
inline

Definition at line 4168 of file ntv2publicinterface.h.

◆ Set()

void NTV2RegInfo::Set ( const ULWord  inRegNum,
const ULWord  inValue,
const ULWord  inMask = 0xFFFFFFFF,
const ULWord  inShift = 0 
)
inline

Sets me from the given parameters.

Parameters
[in]inRegNumSpecifies the register number to use.
[in]inValueSpecifies the register value to use.
[in]inMaskSpecifies the bit mask to use. If not specified, defaults to 0xFFFFFFFF.
[in]inShiftSpecifies the shift to use. If not specified, defaults to zero.

Definition at line 4101 of file ntv2publicinterface.h.

◆ setMask()

NTV2RegInfo& NTV2RegInfo::setMask ( const ULWord  val)
inline

Definition at line 4175 of file ntv2publicinterface.h.

◆ setRegNum()

NTV2RegInfo& NTV2RegInfo::setRegNum ( const ULWord  val)
inline

Definition at line 4173 of file ntv2publicinterface.h.

◆ setShift()

NTV2RegInfo& NTV2RegInfo::setShift ( const ULWord  val)
inline

Definition at line 4176 of file ntv2publicinterface.h.

◆ setValue()

NTV2RegInfo& NTV2RegInfo::setValue ( const ULWord  val)
inline

Definition at line 4174 of file ntv2publicinterface.h.

◆ shift()

ULWord NTV2RegInfo::shift ( void  ) const
inline

Definition at line 4171 of file ntv2publicinterface.h.

◆ value()

ULWord NTV2RegInfo::value ( void  ) const
inline

Definition at line 4169 of file ntv2publicinterface.h.

Member Data Documentation

◆ registerMask

ULWord NTV2RegInfo::registerMask

My register mask value to use in a ReadRegister or WriteRegister call.

Definition at line 4075 of file ntv2publicinterface.h.

◆ registerNumber

ULWord NTV2RegInfo::registerNumber

My register number to use in a ReadRegister or WriteRegister call.

Definition at line 4073 of file ntv2publicinterface.h.

◆ registerShift

ULWord NTV2RegInfo::registerShift

My register shift value to use in a ReadRegister or WriteRegister call.

Definition at line 4076 of file ntv2publicinterface.h.

◆ registerValue

ULWord NTV2RegInfo::registerValue

My register value to use in a ReadRegister or WriteRegister call.

Definition at line 4074 of file ntv2publicinterface.h.


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