AJA NTV2 SDK  18.1.0.2439
NTV2 SDK 18.1.0.2439
ntv2nub Namespace Reference

Functions

const bool kDisableByteSwap (true)
 
const bool kEnableByteSwapIfNeeded (false)
 
PUSH Functions

These functions are used to encode 8/16/32/64-bit fields of NTV2 objects/structs into a byte sequence to send to a remote machine.

void PUSHU8 (const uint8_t val, RPCBlob &blob)
 Pushes an 8-bit value onto the given byte sequence. More...
 
void PUSHU16 (const uint16_t val, RPCBlob &blob, const bool dontSwap=false)
 Pushes a 16-bit value onto the given byte sequence. More...
 
void PUSHU32 (const uint32_t val, RPCBlob &blob, const bool dontSwap=false)
 Pushes a 32-bit value onto the given byte sequence. More...
 
void PUSHU64 (const uint64_t val, RPCBlob &blob, const bool dontSwap=false)
 Pushes a 64-bit value onto the given byte sequence. More...
 
POP Functions

These functions are used to decode NTV2 objects/structs from a received byte sequence.

bool POPU8 (uint8_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx)
 Pops an 8-bit value off the given byte sequence at the given zero-based index position. More...
 
bool POPU16 (uint16_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
 Pops a 16-bit value off the given byte sequence at the given zero-based index position. More...
 
bool POPU32 (uint32_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
 Pops a 32-bit value off the given byte sequence at the given zero-based index position. More...
 
bool POPU64 (uint64_t &outVal, const RPCBlob &blob, std::size_t &inOutNdx, const bool dontSwap=false)
 Pops a 64-bit value off the given byte sequence at the given zero-based index position. More...
 

Function Documentation

◆ kDisableByteSwap()

const bool ntv2nub::kDisableByteSwap ( true  )

◆ kEnableByteSwapIfNeeded()

const bool ntv2nub::kEnableByteSwapIfNeeded ( false  )

◆ POPU16()

bool ntv2nub::POPU16 ( uint16_t &  outVal,
const RPCBlob &  blob,
std::size_t &  inOutNdx,
const bool  dontSwap = false 
)
inline

Pops a 16-bit value off the given byte sequence at the given zero-based index position.

Parameters
[out]outValReceives the 16-bit value popped from the byte sequence. Unchanged if failed.
[in]blobThe source byte sequence.
[out]inOutNdxOn entry, contains the zero-based index position in the byte sequence from which the 2 bytes comprising the value will be popped. On exit, contains the index position immediately past the popped 2-byte value.
[in]dontSwapIf false, the default, the value is byte-swapped after popping; otherwise the value remains in native byte order.
Returns
True if successful; otherwise false.

Definition at line 128 of file ntv2nubtypes.h.

◆ POPU32()

bool ntv2nub::POPU32 ( uint32_t &  outVal,
const RPCBlob &  blob,
std::size_t &  inOutNdx,
const bool  dontSwap = false 
)
inline

Pops a 32-bit value off the given byte sequence at the given zero-based index position.

Parameters
[out]outValReceives the 32-bit value popped from the byte sequence. Unchanged if failed.
[in]blobThe source byte sequence.
[out]inOutNdxOn entry, contains the zero-based index position in the byte sequence from which the 4 bytes comprising the value will be popped. On exit, contains the index position immediately past the popped 4-byte value.
[in]dontSwapIf false, the default, the value is byte-swapped after popping; otherwise the value remains in native byte order.
Returns
True if successful; otherwise false.

Definition at line 149 of file ntv2nubtypes.h.

◆ POPU64()

bool ntv2nub::POPU64 ( uint64_t &  outVal,
const RPCBlob &  blob,
std::size_t &  inOutNdx,
const bool  dontSwap = false 
)
inline

Pops a 64-bit value off the given byte sequence at the given zero-based index position.

Parameters
[out]outValReceives the 64-bit value popped from the byte sequence. Unchanged if failed.
[in]blobThe source byte sequence.
[out]inOutNdxOn entry, contains the zero-based index position in the byte sequence from which the 8 bytes comprising the value will be popped. On exit, contains the index position immediately past the popped 8-byte value.
[in]dontSwapIf false, the default, the value is byte-swapped after popping; otherwise the value remains in native byte order.
Returns
True if successful; otherwise false.

Definition at line 171 of file ntv2nubtypes.h.

◆ POPU8()

bool ntv2nub::POPU8 ( uint8_t &  outVal,
const RPCBlob &  blob,
std::size_t &  inOutNdx 
)
inline

Pops an 8-bit value off the given byte sequence at the given zero-based index position.

Parameters
[out]outValReceives the 8-bit value popped from the byte sequence.
[in]blobThe source byte sequence.
[out]inOutNdxOn entry, contains the zero-based index position in the byte sequence from which the one byte comprising the value will be popped. On exit, contains the index position immediately past the popped byte value.

Definition at line 110 of file ntv2nubtypes.h.

◆ PUSHU16()

void ntv2nub::PUSHU16 ( const uint16_t  val,
RPCBlob &  blob,
const bool  dontSwap = false 
)
inline

Pushes a 16-bit value onto the given byte sequence.

Parameters
[in]valThe 16-bit value to be appeneded to the byte sequence.
blobA non-const reference to the byte sequence to be appended.
[in]dontSwapIf false, the default, the value is byte-swapped prior to appending, if needed; otherwise it's appended in native byte order.

Definition at line 49 of file ntv2nubtypes.h.

◆ PUSHU32()

void ntv2nub::PUSHU32 ( const uint32_t  val,
RPCBlob &  blob,
const bool  dontSwap = false 
)
inline

Pushes a 32-bit value onto the given byte sequence.

Parameters
[in]valThe 32-bit value to be appeneded to the byte sequence.
blobA non-const reference to the byte sequence to be appended.
[in]dontSwapIf false, the default, the value is byte-swapped prior to appending; otherwise it is appended using the native byte-ordering.

Definition at line 63 of file ntv2nubtypes.h.

◆ PUSHU64()

void ntv2nub::PUSHU64 ( const uint64_t  val,
RPCBlob &  blob,
const bool  dontSwap = false 
)
inline

Pushes a 64-bit value onto the given byte sequence.

Parameters
[in]valThe 64-bit value to be appeneded to the byte sequence.
blobA non-const reference to the byte sequence to be appended.
[in]dontSwapIf false, the default, the value is byte-swapped prior to appending; otherwise it is appended using the native byte-ordering.

Definition at line 78 of file ntv2nubtypes.h.

◆ PUSHU8()

void ntv2nub::PUSHU8 ( const uint8_t  val,
RPCBlob &  blob 
)
inline

Pushes an 8-bit value onto the given byte sequence.

Parameters
[in]valThe 8-bit value to be appeneded to the byte sequence.
blobA non-const reference to the byte sequence to be appended.

Definition at line 37 of file ntv2nubtypes.h.