AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
A generic user-space buffer object that has an address and a length. Used most often to share an arbitrary-sized chunk of host memory with the NTV2 kernel driver through a CNTV2DriverInterface::NTV2Message call. More...
#include <ntv2publicinterface.h>
Public Member Functions | |
bool | RPCEncode (NTV2_RPC_BLOB_TYPE &outBlob) |
bool | RPCDecode (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex) |
Construction & Destruction | |
NTV2Buffer (const void *pInUserPointer, const size_t inByteCount) | |
Constructs me from a client-supplied address and size. More... | |
NTV2Buffer (const size_t inByteCount=0) | |
Constructs me from a client-specified byte count. In this case, I assume full responsibility for automatically freeing the memory I allocate. More... | |
NTV2Buffer (const NTV2Buffer &inObj) | |
Constructs me from another NTV2Buffer instance. More... | |
~NTV2Buffer () | |
My destructor. If I'm responsible for the memory, I free it here. More... | |
Inquiry | |
void * | GetHostPointer (void) const |
ULWord64 | GetRawHostPointer (void) const |
ULWord | GetByteCount (void) const |
bool | IsAllocatedBySDK (void) const |
bool | IsProvidedByClient (void) const |
bool | IsPageAligned (void) const |
bool | IsNULL (void) const |
operator bool () const | |
operator size_t () const | |
void * | GetHostAddress (const ULWord inByteOffset, const bool inFromEnd=false) const |
template<typename T > | |
bool | Find (const T &inValue, int &inOutIndex) const |
Searches me for the given scalar value of type T starting at a given index position. More... | |
ULWordSet & | FindAll (ULWordSet &outOffsets, const NTV2Buffer &inValue) const |
bool | IsContentEqual (const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const |
bool | NextDifference (const NTV2Buffer &inBuffer, ULWord &byteOffset) const |
Answers with the byte offset to the first or next difference. More... | |
bool | GetRingChangedByteRange (const NTV2Buffer &inBuffer, ULWord &outByteOffsetFirst, ULWord &outByteOffsetLast) const |
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get overwritten in contiguous variable-length chunks, answers with the contiguous byte range that differs between the two. More... | |
Changing | |
bool | Allocate (const size_t inByteCount, const bool inPageAligned=false) |
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsibility for any memory that I allocate. More... | |
bool | Deallocate (void) |
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate). More... | |
template<typename T > | |
bool | Fill (const T &inValue) |
Fills me with the given scalar value. More... | |
template<typename T > | |
bool | Fill (const T &inValue, const NTV2SegmentedXferInfo &inXferInfo) |
Fills a portion of me with the given scalar value. More... | |
bool | Truncate (const size_t inByteCount) |
Truncates me to the given length. No reallocation takes place. More... | |
NTV2Buffer & | operator= (const NTV2Buffer &inRHS) |
Assigns me from another NTV2Buffer instance. More... | |
bool | Set (const void *pInUserPointer, const size_t inByteCount) |
Sets (or resets) me from a client-supplied address and size. More... | |
bool | SetAndFill (const void *pInUserPointer, const size_t inByteCount, const UByte inValue) |
Sets (or resets) me from a client-supplied address and size. More... | |
bool | SetFrom (const NTV2Buffer &inBuffer) |
Replaces my contents from the given memory buffer without resizing me. More... | |
bool | SetFromHexString (const std::string &inStr) |
Replaces my contents from the given hex-encoded string, resizing me if necessary. More... | |
bool | CopyFrom (const void *pInSrcBuffer, const ULWord inByteCount) |
Replaces my contents from the given memory buffer, resizing me to the new byte count. More... | |
bool | CopyFrom (const NTV2Buffer &inSrcBuffer, const ULWord inSrcByteOffset, const ULWord inDstByteOffset, const ULWord inByteCount) |
Copies bytes from the given memory buffer into me. More... | |
bool | CopyFrom (const NTV2Buffer &inSrcBuffer, const NTV2SegmentedXferInfo &inXferInfo) |
Copies data segments from a given buffer into me. More... | |
bool | SwapWith (NTV2Buffer &inBuffer) |
Swaps my underlying buffer with another's. More... | |
bool | ByteSwap64 (void) |
Byte-swaps my contents 64-bits at a time. More... | |
bool | ByteSwap32 (void) |
Byte-swaps my contents 32-bits at a time. More... | |
bool | ByteSwap16 (void) |
Byte-swaps my contents 16-bits at a time. More... | |
Debugging/Printing | |
std::ostream & | Print (std::ostream &inOutStream) const |
Prints a human-readable representation of me into the given output stream. More... | |
std::string | AsString (UWord inDumpMaxBytes=0) const |
bool | toHexString (std::string &outStr, const size_t inLineBreakInterval=0) const |
Converts my contents into a hex-encoded string. More... | |
std::ostream & | Dump (std::ostream &inOutputStream=std::cout, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const |
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream. More... | |
std::string & | Dump (std::string &inOutputString, const size_t inStartByteOffset=0, const size_t inByteCount=0, const size_t inRadix=16, const size_t inBytesPerGroup=4, const size_t inGroupsPerLine=8, const size_t inAddressRadix=0, const bool inShowAscii=false, const size_t inAddrOffset=0) const |
Dumps me in hex/octal/decimal, with/without Ascii, into the given string. More... | |
Data Access | |
template<typename T > | |
operator const T * () const | |
template<typename T > | |
operator T* () const | |
NTV2Buffer & | Segment (NTV2Buffer &outPtr, const ULWord inByteOffset, const ULWord inByteCount) const |
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer. More... | |
uint8_t | U8 (const int inIndex) const |
uint8_t & | U8 (const int inIndex) |
int8_t | I8 (const int inIndex) const |
int8_t & | I8 (const int inIndex) |
uint16_t | U16 (const int inIndex) const |
uint16_t & | U16 (const int inIndex) |
int16_t | I16 (const int inIndex) const |
int16_t & | I16 (const int inIndex) |
uint32_t | U32 (const int inIndex) const |
uint32_t & | U32 (const int inIndex) |
int32_t | I32 (const int inIndex) const |
int32_t & | I32 (const int inIndex) |
uint64_t | U64 (const int inIndex) const |
uint64_t & | U64 (const int inIndex) |
int64_t | I64 (const int inIndex) const |
int64_t & | I64 (const int inIndex) |
float | FL (const int inIndex) const |
float & | FL (const int inIndex) |
double | DBL (const int inIndex) const |
double & | DBL (const int inIndex) |
Vector Conversion | |
bool | GetU64s (ULWord64Sequence &outU64s, const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const |
Answers with my contents as a vector of unsigned 16-bit values. More... | |
ULWord64Sequence | GetU64s (const size_t inU64Offset=0, const size_t inMaxSize=16, const bool inByteSwap=false) const |
bool | GetU32s (ULWordSequence &outU32s, const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const |
Answers with my contents as a vector of unsigned 32-bit values. More... | |
ULWordSequence | GetU32s (const size_t inU32Offset=0, const size_t inMaxSize=32, const bool inByteSwap=false) const |
bool | GetU16s (UWordSequence &outU16s, const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const |
Answers with my contents as a vector of unsigned 16-bit values. More... | |
UWordSequence | GetU16s (const size_t inU16Offset=0, const size_t inMaxSize=64, const bool inByteSwap=false) const |
bool | GetU8s (UByteSequence &outU8s, const size_t inU8Offset=0, const size_t inMaxSize=128) const |
Answers with my contents as a vector of unsigned 8-bit values. More... | |
UByteSequence | GetU8s (const size_t inU8Offset=0, const size_t inMaxSize=128) const |
bool | AppendU8s (UByteSequence &outU8s) const |
Appends my contents to an existing UByteSequence. More... | |
bool | GetString (std::string &outString, const size_t inU8Offset=0, const size_t inMaxSize=128) const |
Answers with my contents as a character string. More... | |
std::string | GetString (const size_t inU8Offset=0, const size_t inMaxSize=128) const |
bool | PutU64s (const ULWord64Sequence &inU64s, const size_t inU64Offset=0, const bool inByteSwap=false) |
Copies a vector of unsigned 64-bit values into me. More... | |
bool | PutU32s (const ULWordSequence &inU32s, const size_t inU32Offset=0, const bool inByteSwap=false) |
Copies a vector of unsigned 32-bit values into me. More... | |
bool | PutU16s (const UWordSequence &inU16s, const size_t inU16Offset=0, const bool inByteSwap=false) |
Copies a vector of unsigned 16-bit values into me. More... | |
bool | PutU8s (const UByteSequence &inU8s, const size_t inU8Offset=0) |
Copies a vector of unsigned 8-bit values into me. More... | |
Static Public Member Functions | |
Default Page Size | |
static size_t | DefaultPageSize (void) |
static bool | SetDefaultPageSize (const size_t inNewSize) |
Changes the default page size for use in future page-aligned allocations. More... | |
static size_t | HostPageSize (void) |
A generic user-space buffer object that has an address and a length. Used most often to share an arbitrary-sized chunk of host memory with the NTV2 kernel driver through a CNTV2DriverInterface::NTV2Message call.
Definition at line 5993 of file ntv2publicinterface.h.
|
explicit |
Constructs me from a client-supplied address and size.
[in] | pInUserPointer | Specifies the user-space virtual memory address. The client is entirely responsible for it. Ignored if inByteCount is zero. |
[in] | inByteCount | Specifies the byte count. Ignored if pInUserPointer is NULL. |
Definition at line 1495 of file ntv2publicinterface.cpp.
NTV2Buffer::NTV2Buffer | ( | const size_t | inByteCount = 0 | ) |
Constructs me from a client-specified byte count. In this case, I assume full responsibility for automatically freeing the memory I allocate.
[in] | inByteCount | Optionally specifies the size of the allocated buffer, in bytes. Defaults to zero. If non-zero, causes Allocate to be called, and if successful, automatically zeroes the buffer. If zero (the default), I don't allocate anything, and my host pointer will be NULL. |
Definition at line 1510 of file ntv2publicinterface.cpp.
|
explicit |
Constructs me from another NTV2Buffer instance.
[in] | inObj | NTV2Buffer instance to "deep" copy into me. |
Definition at line 1528 of file ntv2publicinterface.cpp.
NTV2Buffer::~NTV2Buffer | ( | ) |
My destructor. If I'm responsible for the memory, I free it here.
Definition at line 1572 of file ntv2publicinterface.cpp.
bool NTV2Buffer::Allocate | ( | const size_t | inByteCount, |
const bool | inPageAligned = false |
||
) |
Allocates (or re-allocates) my user-space storage using the given byte count. I assume full responsibility for any memory that I allocate.
[in] | inByteCount | Specifies the number of bytes to allocate. Specifying zero is the same as calling Set(NULL, 0). |
[in] | inPageAligned | Optionally specifies page alignment. If true, allocates a page-aligned block. If false (default), uses operator new. |
Definition at line 1630 of file ntv2publicinterface.cpp.
bool NTV2Buffer::AppendU8s | ( | UByteSequence & | outU8s | ) | const |
Appends my contents to an existing UByteSequence.
[out] | outU8s | The vector to be appended to. |
Definition at line 643 of file ntv2publicinterface.cpp.
string NTV2Buffer::AsString | ( | UWord | inDumpMaxBytes = 0 | ) | const |
inDumpMaxBytes | If non-zero, includes a hex dump of my contents up to the number of specified bytes (64 maximum). |
Definition at line 326 of file ntv2publicinterface.cpp.
bool NTV2Buffer::ByteSwap16 | ( | void | ) |
Byte-swaps my contents 16-bits at a time.
Definition at line 1602 of file ntv2publicinterface.cpp.
bool NTV2Buffer::ByteSwap32 | ( | void | ) |
Byte-swaps my contents 32-bits at a time.
Definition at line 1590 of file ntv2publicinterface.cpp.
bool NTV2Buffer::ByteSwap64 | ( | void | ) |
Byte-swaps my contents 64-bits at a time.
Definition at line 1578 of file ntv2publicinterface.cpp.
bool NTV2Buffer::CopyFrom | ( | const NTV2Buffer & | inSrcBuffer, |
const NTV2SegmentedXferInfo & | inXferInfo | ||
) |
Copies data segments from a given buffer into me.
[in] | inSrcBuffer | Specifies the source memory buffer to be copied into me. |
[in] | inXferInfo | The segmented transfer info. |
Definition at line 1752 of file ntv2publicinterface.cpp.
bool NTV2Buffer::CopyFrom | ( | const NTV2Buffer & | inSrcBuffer, |
const ULWord | inSrcByteOffset, | ||
const ULWord | inDstByteOffset, | ||
const ULWord | inByteCount | ||
) |
Copies bytes from the given memory buffer into me.
[in] | inSrcBuffer | Specifies the source memory buffer to be copied into me. |
[in] | inSrcByteOffset | Specifies the offset, in bytes, at which reading will commence in the source buffer. |
[in] | inDstByteOffset | Specifies the offset, in bytes, at which writing will commence in me. |
[in] | inByteCount | Specifies the total number of bytes to copy. |
Definition at line 1731 of file ntv2publicinterface.cpp.
bool NTV2Buffer::CopyFrom | ( | const void * | pInSrcBuffer, |
const ULWord | inByteCount | ||
) |
Replaces my contents from the given memory buffer, resizing me to the new byte count.
[in] | pInSrcBuffer | Specifies the memory buffer whose contents are to be copied into my own. |
[in] | inByteCount | Specifies the number of bytes to be copied. |
Definition at line 1718 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6533 of file ntv2publicinterface.h.
|
inline |
Definition at line 6532 of file ntv2publicinterface.h.
bool NTV2Buffer::Deallocate | ( | void | ) |
Deallocates my user-space storage (if I own it – i.e. from a prior call to Allocate).
Definition at line 1664 of file ntv2publicinterface.cpp.
|
static |
Definition at line 2007 of file ntv2publicinterface.cpp.
std::ostream& NTV2Buffer::Dump | ( | std::ostream & | inOutputStream = std::cout , |
const size_t | inStartByteOffset = 0 , |
||
const size_t | inByteCount = 0 , |
||
const size_t | inRadix = 16 , |
||
const size_t | inBytesPerGroup = 4 , |
||
const size_t | inGroupsPerLine = 8 , |
||
const size_t | inAddressRadix = 0 , |
||
const bool | inShowAscii = false , |
||
const size_t | inAddrOffset = 0 |
||
) | const |
Dumps me in hex/octal/decimal, with/without Ascii, to the given output stream.
inOutputStream | Output stream that will receive the dump. Defaults to std::cout. |
inStartByteOffset | The starting offset, in bytes, where the dump will start. |
inByteCount | The number of bytes to be dumped. If zero, all bytes will be dumped. |
inRadix | Specifies the radix of the dumped memory values. 16=hex, 10=decimal, 8=octal, 2=binary – all others disallowed. |
inBytesPerGroup | Number of bytes to dump per contiguous group of numbers. Defaults to 4. |
inGroupsPerLine | Number of contiguous groups of numbers to dump per output line. If zero, no grouping is done, and address & ASCII display is suppressed. Defaults to 8. |
inAddressRadix | Specifies the radix of the address column. 0=omit, 2=binary, 8=octal, 10=decimal, 16=hex – all others disallowed. Defaults to 0. |
inShowAscii | If True, show ASCII characters; otherwise no ASCII characters. Overridden to false if inGroupsPerLine is zero. Defaults to false. |
inAddrOffset | Specifies a value to be added to the addresses that appear in the dump. Ignored if inGroupsPerLine is zero. |
std::string& NTV2Buffer::Dump | ( | std::string & | inOutputString, |
const size_t | inStartByteOffset = 0 , |
||
const size_t | inByteCount = 0 , |
||
const size_t | inRadix = 16 , |
||
const size_t | inBytesPerGroup = 4 , |
||
const size_t | inGroupsPerLine = 8 , |
||
const size_t | inAddressRadix = 0 , |
||
const bool | inShowAscii = false , |
||
const size_t | inAddrOffset = 0 |
||
) | const |
Dumps me in hex/octal/decimal, with/without Ascii, into the given string.
inOutputString | String that will receive the dump. Appends the dump to the end of whatever is already in the string. |
inStartByteOffset | The starting offset, in bytes, where the dump will start. |
inByteCount | The number of bytes to be dumped. If zero, all bytes will be dumped. |
inRadix | Specifies the radix of the dumped memory values. 16=hex, 10=decimal, 8=octal, 2=binary – all others disallowed. |
inBytesPerGroup | Number of bytes to dump per contiguous group of numbers. Defaults to 4. |
inGroupsPerLine | Number of contiguous groups of numbers to dump per output line. If zero, no grouping is done, and address & ASCII display is suppressed. Defaults to 8. |
inAddressRadix | Specifies the radix of the address column. 0=omit, 2=binary, 8=octal, 10=decimal, 16=hex – all others disallowed. Defaults to 0. |
inShowAscii | If True, show ASCII characters; otherwise no ASCII characters. Overridden to false if inGroupsPerLine is zero. Defaults to false. |
inAddrOffset | Specifies a value to be added to the addresses that appear in the dump. Ignored if inGroupsPerLine is zero. |
|
inline |
Fills me with the given scalar value.
[in] | inValue | The scalar value to fill me with. |
Definition at line 6218 of file ntv2publicinterface.h.
|
inline |
Fills a portion of me with the given scalar value.
[in] | inValue | The scalar value. |
[in] | inXferInfo | Describes the (destination) portion of me to be filled. |
Definition at line 6235 of file ntv2publicinterface.h.
|
inline |
Searches me for the given scalar value of type T starting at a given index position.
[in] | inValue | Specifies the scalar value to be searched for. |
inOutIndex | On entry, specifies where searching begins. On exit, receives the index of the matching value. Negative indexes search backward from the end of the buffer, where -1 is the last T in the buffer (with the highest physical memory address). |
Definition at line 6118 of file ntv2publicinterface.h.
set< ULWord > & NTV2Buffer::FindAll | ( | ULWordSet & | outOffsets, |
const NTV2Buffer & | inValue | ||
) | const |
[out] | outOffsets | Receives the byte offsets to every occurrence in my buffer. |
[in] | inValue | Specifies the data to search for. |
Definition at line 1826 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6531 of file ntv2publicinterface.h.
|
inline |
Definition at line 6530 of file ntv2publicinterface.h.
|
inline |
Definition at line 6066 of file ntv2publicinterface.h.
[in] | inByteOffset | Specifies the offset from the start (or end) of my memory buffer. Must be less than my size (see GetByteCount). |
[in] | inFromEnd | Specify 'true' to reference the end of my buffer. Specify 'false' (the default) to reference the start of my buffer. |
Definition at line 1686 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6049 of file ntv2publicinterface.h.
|
inline |
Definition at line 6061 of file ntv2publicinterface.h.
bool NTV2Buffer::GetRingChangedByteRange | ( | const NTV2Buffer & | inBuffer, |
ULWord & | outByteOffsetFirst, | ||
ULWord & | outByteOffsetLast | ||
) | const |
Assuming my contents and the contents of the given buffer comprise ring buffers that periodically get overwritten in contiguous variable-length chunks, answers with the contiguous byte range that differs between the two.
[in] | inBuffer | Specifies the memory buffer whose contents are to be compared with mine. Contents are assumed to comprise a ring buffer, where data periodically gets overwritten in chunks. |
[out] | outByteOffsetFirst | Receives the offset, in bytes, from the start of the buffer, of the first byte of the contiguous range that's different. Zero indicates the first byte in the buffer. If equal to NTV2Buffer::GetByteCount(), then both buffers are identical. If greater than 'outByteOffsetLast', then a wrap condition exists (see Note). |
[out] | outByteOffsetLast | Receives the offset, in bytes, from the start of the buffer, of the last byte of the contiguous range that's different. Zero indicates the first byte in the buffer. If equal to NTV2Buffer::GetByteCount(), then both buffers are identical. If less than 'outByteOffsetFirst', a wrap condition exists (see Note). |
Definition at line 1926 of file ntv2publicinterface.cpp.
|
inline |
[in] | inU8Offset | The starting offset, in bytes, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 8-bit values to be returned. Use zero for unlimited. The actual number of returned 8-bit values may be less than this, depending on my size. Defaults to 128. |
Definition at line 6681 of file ntv2publicinterface.h.
bool NTV2Buffer::GetString | ( | std::string & | outString, |
const size_t | inU8Offset = 0 , |
||
const size_t | inMaxSize = 128 |
||
) | const |
Answers with my contents as a character string.
[out] | outString | Receives the character string copied from my contents. |
[in] | inU8Offset | The starting offset, in bytes, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 8-bit values to be returned. Use zero for unlimited. The actual number of returned 8-bit values may be less than this, depending on my size. Defaults to 128. |
Definition at line 662 of file ntv2publicinterface.cpp.
|
inline |
[in] | inU16Offset | The starting offset, in 16-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 16-bit values to be returned. Use zero for unlimited. The actual number of returned 16-bit values may be less than this, depending on my size. Defaults to 64. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 6628 of file ntv2publicinterface.h.
bool NTV2Buffer::GetU16s | ( | UWordSequence & | outU16s, |
const size_t | inU16Offset = 0 , |
||
const size_t | inMaxSize = 64 , |
||
const bool | inByteSwap = false |
||
) | const |
Answers with my contents as a vector of unsigned 16-bit values.
[out] | outU16s | Receives my contents as a vector of unsigned 16-bit values. |
[in] | inU16Offset | The starting offset, in 16-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 16-bit values to be returned. Use zero for unlimited. The actual number of returned 16-bit values may be less than this, depending on my size. Defaults to 64. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 573 of file ntv2publicinterface.cpp.
|
inline |
[in] | inU32Offset | The starting offset, in 32-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 32-bit values to be returned. Use zero for unlimited. The actual number of returned 32-bit values may be less than this, depending on my size. Defaults to 32. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 6598 of file ntv2publicinterface.h.
bool NTV2Buffer::GetU32s | ( | ULWordSequence & | outU32s, |
const size_t | inU32Offset = 0 , |
||
const size_t | inMaxSize = 32 , |
||
const bool | inByteSwap = false |
||
) | const |
Answers with my contents as a vector of unsigned 32-bit values.
[out] | outU32s | Receives my contents as a vector of unsigned 32-bit values. |
[in] | inU32Offset | The starting offset, in 32-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 32-bit values to be returned. Use zero for unlimited. The actual number of returned 32-bit values may be less than this, depending on my size. Defaults to 32. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 536 of file ntv2publicinterface.cpp.
|
inline |
[in] | inU64Offset | The starting offset, in 64-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 64-bit values to be returned. Use zero for unlimited. The actual number of returned 64-bit values may be less than this, depending on my size. Defaults to 16. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 6568 of file ntv2publicinterface.h.
bool NTV2Buffer::GetU64s | ( | ULWord64Sequence & | outU64s, |
const size_t | inU64Offset = 0 , |
||
const size_t | inMaxSize = 16 , |
||
const bool | inByteSwap = false |
||
) | const |
Answers with my contents as a vector of unsigned 16-bit values.
[out] | outU64s | Receives my contents as a vector of unsigned 64-bit values. |
[in] | inU64Offset | The starting offset, in 64-bit words, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 64-bit values to be returned. Use zero for unlimited. The actual number of returned 64-bit values may be less than this, depending on my size. Defaults to 16. |
[in] | inByteSwap | Specifies if the resulting values will be byte-swapped or not. Specify 'true' to byte-swap; specify 'false' to return the normal, unswapped values. Defaults to 'false'. |
Definition at line 499 of file ntv2publicinterface.cpp.
|
inline |
[in] | inU8Offset | The starting offset, in bytes, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 8-bit values to be returned. Use zero for unlimited. The actual number of returned 8-bit values may be less than this, depending on my size. Defaults to 128. |
Definition at line 6650 of file ntv2publicinterface.h.
bool NTV2Buffer::GetU8s | ( | UByteSequence & | outU8s, |
const size_t | inU8Offset = 0 , |
||
const size_t | inMaxSize = 128 |
||
) | const |
Answers with my contents as a vector of unsigned 8-bit values.
[out] | outU8s | Receives my contents as a vector of unsigned 8-bit values. |
[in] | inU8Offset | The starting offset, in bytes, where copying will commence. |
[in] | inMaxSize | Specifies the maximum number of 8-bit values to be returned. Use zero for unlimited. The actual number of returned 8-bit values may be less than this, depending on my size. Defaults to 128. |
Definition at line 610 of file ntv2publicinterface.cpp.
|
static |
Definition at line 2020 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6521 of file ntv2publicinterface.h.
|
inline |
Definition at line 6520 of file ntv2publicinterface.h.
|
inline |
Definition at line 6525 of file ntv2publicinterface.h.
|
inline |
Definition at line 6524 of file ntv2publicinterface.h.
|
inline |
Definition at line 6529 of file ntv2publicinterface.h.
|
inline |
Definition at line 6528 of file ntv2publicinterface.h.
|
inline |
Definition at line 6517 of file ntv2publicinterface.h.
|
inline |
Definition at line 6516 of file ntv2publicinterface.h.
|
inline |
Definition at line 6072 of file ntv2publicinterface.h.
bool NTV2Buffer::IsContentEqual | ( | const NTV2Buffer & | inBuffer, |
const ULWord | inByteOffset = 0 , |
||
const ULWord | inByteCount = 0xFFFFFFFF |
||
) | const |
[in] | inBuffer | Specifies the memory buffer whose contents are to be compared with mine. |
[in] | inByteOffset | Specifies the byte offset to start comparing. Defaults to the first byte. |
[in] | inByteCount | Specifies the maximum number of bytes to compare. Defaults to 0xFFFFFFFF (entire buffer). |
Definition at line 1851 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6088 of file ntv2publicinterface.h.
|
inline |
Definition at line 6083 of file ntv2publicinterface.h.
|
inline |
Definition at line 6078 of file ntv2publicinterface.h.
bool NTV2Buffer::NextDifference | ( | const NTV2Buffer & | inBuffer, |
ULWord & | byteOffset | ||
) | const |
Answers with the byte offset to the first or next difference.
[in] | inBuffer | Specifies the memory buffer whose contents are to be compared with mine. The buffer sizes must match. |
byteOffset | On entry, specifies the byte offset where comparing starts (use zero to find the first difference); on exit, receives the byte offset of the next difference found (or 0xFFFFFFFF if identical). |
Definition at line 1897 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6093 of file ntv2publicinterface.h.
|
inline |
Definition at line 6481 of file ntv2publicinterface.h.
|
inline |
Definition at line 6098 of file ntv2publicinterface.h.
|
inline |
Definition at line 6486 of file ntv2publicinterface.h.
NTV2Buffer & NTV2Buffer::operator= | ( | const NTV2Buffer & | inRHS | ) |
Assigns me from another NTV2Buffer instance.
[in] | inRHS | Specifies the NTV2Buffer instance to assign ("deep" copy) to me. |
Definition at line 1556 of file ntv2publicinterface.cpp.
ostream & NTV2Buffer::Print | ( | std::ostream & | inOutStream | ) | const |
Prints a human-readable representation of me into the given output stream.
inOutStream | The output stream to receive my human-readable representation. |
Definition at line 319 of file ntv2publicinterface.cpp.
bool NTV2Buffer::PutU16s | ( | const UWordSequence & | inU16s, |
const size_t | inU16Offset = 0 , |
||
const bool | inByteSwap = false |
||
) |
Copies a vector of unsigned 16-bit values into me.
[in] | inU16s | The vector of unsigned 16-bit values to be copied into me. |
[in] | inU16Offset | Specifies my starting offset (of 16-bit values) at which the vector values will be written. Defaults to zero. |
[in] | inByteSwap | Specifies if the 16-bit values will be byte-swapped or not before being written into me. Specify 'true' to byte-swap; otherwise specify 'false'. Defaults to 'false'. |
Definition at line 758 of file ntv2publicinterface.cpp.
bool NTV2Buffer::PutU32s | ( | const ULWordSequence & | inU32s, |
const size_t | inU32Offset = 0 , |
||
const bool | inByteSwap = false |
||
) |
Copies a vector of unsigned 32-bit values into me.
[in] | inU32s | The vector of unsigned 32-bit values to be copied into me. |
[in] | inU32Offset | Specifies my starting offset (of 32-bit values) at which the vector values will be written. Defaults to zero. |
[in] | inByteSwap | Specifies if the 32-bit values will be byte-swapped or not before being written into me. Specify 'true' to byte-swap; otherwise specify 'false'. Defaults to 'false'. |
Definition at line 730 of file ntv2publicinterface.cpp.
bool NTV2Buffer::PutU64s | ( | const ULWord64Sequence & | inU64s, |
const size_t | inU64Offset = 0 , |
||
const bool | inByteSwap = false |
||
) |
Copies a vector of unsigned 64-bit values into me.
[in] | inU64s | The vector of unsigned 64-bit values to be copied into me. |
[in] | inU64Offset | Specifies my starting offset (of 64-bit values) at which the vector values will be written. Defaults to zero. |
[in] | inByteSwap | Specifies if the 64-bit values will be byte-swapped or not before being written into me. Specify 'true' to byte-swap; otherwise specify 'false'. Defaults to 'false'. |
Definition at line 702 of file ntv2publicinterface.cpp.
bool NTV2Buffer::PutU8s | ( | const UByteSequence & | inU8s, |
const size_t | inU8Offset = 0 |
||
) |
Copies a vector of unsigned 8-bit values into me.
[in] | inU8s | The vector of unsigned 8-bit values to be copied into me. |
[in] | inU8Offset | Specifies my starting byte offset at which the vector values will be written. Defaults to zero. |
Definition at line 786 of file ntv2publicinterface.cpp.
bool NTV2Buffer::RPCDecode | ( | const NTV2_RPC_BLOB_TYPE & | inBlob, |
size_t & | inOutIndex | ||
) |
Definition at line 3575 of file ntv2publicinterface.cpp.
bool NTV2Buffer::RPCEncode | ( | NTV2_RPC_BLOB_TYPE & | outBlob | ) |
Definition at line 3566 of file ntv2publicinterface.cpp.
NTV2Buffer & NTV2Buffer::Segment | ( | NTV2Buffer & | outPtr, |
const ULWord | inByteOffset, | ||
const ULWord | inByteCount | ||
) | const |
Resets an NTV2Buffer instance to reference a contiguous segment (portion) of my memory buffer.
[out] | outPtr | The NTV2Buffer to be reset to my sub-segment. Note this receives a reference my segment, not a copy of it. |
[in] | inByteOffset | Specifies the offset, in bytes, where the segment starts. |
[in] | inByteCount | Specifies the segment length, in bytes. |
Definition at line 487 of file ntv2publicinterface.cpp.
bool NTV2Buffer::Set | ( | const void * | pInUserPointer, |
const size_t | inByteCount | ||
) |
Sets (or resets) me from a client-supplied address and size.
[in] | pInUserPointer | Specifies the user-space virtual memory address. The client is entirely responsible for it. Ignored if inByteCount is zero. |
[in] | inByteCount | Specifies the byte count. Ignored if pInUserPointer is NULL. |
Definition at line 1614 of file ntv2publicinterface.cpp.
bool NTV2Buffer::SetAndFill | ( | const void * | pInUserPointer, |
const size_t | inByteCount, | ||
const UByte | inValue | ||
) |
Sets (or resets) me from a client-supplied address and size.
[in] | pInUserPointer | Specifies the user-space virtual memory address. The client is entirely responsible for it. Ignored if inByteCount is zero. |
[in] | inByteCount | Specifies the byte count. Ignored if pInUserPointer is NULL. |
[in] | inValue | Specifies the value to fill the buffer with. |
Definition at line 1624 of file ntv2publicinterface.cpp.
|
static |
Changes the default page size for use in future page-aligned allocations.
[in] | inNewSize | The new page size value, in bytes. Must be a power of 2. |
Definition at line 2012 of file ntv2publicinterface.cpp.
bool NTV2Buffer::SetFrom | ( | const NTV2Buffer & | inBuffer | ) |
Replaces my contents from the given memory buffer without resizing me.
[in] | inBuffer | Specifies the memory buffer whose contents are to be copied into my own. If this buffer is larger than I am, I am not resized; instead, only those bytes that fit in me will be copied. |
Definition at line 1701 of file ntv2publicinterface.cpp.
bool NTV2Buffer::SetFromHexString | ( | const std::string & | inStr | ) |
Replaces my contents from the given hex-encoded string, resizing me if necessary.
[in] | inStr | Specifies the hex-encoded string whose contents will be decoded and used to resize and fill me. Any whitespace characters are skipped and ignored. All other characters must be a hexadecimal digit (upper or lower case). |
Definition at line 1780 of file ntv2publicinterface.cpp.
bool NTV2Buffer::SwapWith | ( | NTV2Buffer & | inBuffer | ) |
Swaps my underlying buffer with another's.
[in] | inBuffer | Specifies the NTV2Buffer I'll swap buffers with. |
Definition at line 1807 of file ntv2publicinterface.cpp.
bool NTV2Buffer::toHexString | ( | std::string & | outStr, |
const size_t | inLineBreakInterval = 0 |
||
) | const |
Converts my contents into a hex-encoded string.
[out] | outStr | Receives the hexadecimal-encoded string representation of my contents. |
[in] | inLineBreakInterval | Optionally inserts a newline into the resulting string at the specified byte count interval. Defaults to zero (no newlines are inserted). |
Definition at line 344 of file ntv2publicinterface.cpp.
bool NTV2Buffer::Truncate | ( | const size_t | inByteCount | ) |
Truncates me to the given length. No reallocation takes place.
[in] | inByteCount | Specifies my new length. Specify zero to Deallocate. Otherwise must be less than my current length. |
Definition at line 1544 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6519 of file ntv2publicinterface.h.
|
inline |
Definition at line 6518 of file ntv2publicinterface.h.
|
inline |
Definition at line 6523 of file ntv2publicinterface.h.
|
inline |
Definition at line 6522 of file ntv2publicinterface.h.
|
inline |
Definition at line 6527 of file ntv2publicinterface.h.
|
inline |
Definition at line 6526 of file ntv2publicinterface.h.
|
inline |
[in] | inIndex | Specifies the zero-based index position (e.g. 0 is first value at start of my memory). If negative, indexes from the end of my memory (e.g. -1 is last value). |
Definition at line 6514 of file ntv2publicinterface.h.
|
inline |
[in] | inIndex | Specifies the zero-based index position (e.g. 0 is first value at start of my memory). If negative, indexes from the end of my memory (e.g. -1 is last value). |
Definition at line 6506 of file ntv2publicinterface.h.