![]() |
AJA NTV2 SDK
18.1.0.2145
NTV2 SDK 18.1.0.2145
|
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.). More...
#include <ntv2publicinterface.h>
Public Member Functions | |
| ULWordSet & | FindAll (ULWordSet &outOffsets, const NTV2Buffer &inValue) const |
| bool | RPCEncode (NTV2_RPC_BLOB_TYPE &outBlob, bool fillBuffer=true) |
| bool | RPCDecode (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex, bool fillBuffer=true) |
| bool | RPCDecodeNoAllocate (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 |
| size_t | 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 & | Find (ULWordSet &outOffsets, const NTV2Buffer &inValue, const size_t inLimit=0) const |
| Searches me for any number of occurrences of a given byte sequence. More... | |
| bool | IsContentEqual (const NTV2Buffer &inBuffer, const ULWord inByteOffset=0, const ULWord inByteCount=0xFFFFFFFF) const |
| bool | NextDifference (const NTV2Buffer &inBuffer, ULWord &byteOffset) const |
| Iterates over each byte that differs between myself and the given buffer. 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 source buffer into me (the destination). 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 |
| std::string | AsCode (const size_t inBytesPerWord=4, const std::string &inVarName="", const bool inUseSTL=false, const bool inByteSwap=false) 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) |
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
Definition at line 6250 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 1701 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 1717 of file ntv2publicinterface.cpp.
|
explicit |
Constructs me from another NTV2Buffer instance.
| [in] | inObj | NTV2Buffer instance to "deep" copy into me. |
Definition at line 1735 of file ntv2publicinterface.cpp.
| NTV2Buffer::~NTV2Buffer | ( | ) |
My destructor. If I'm responsible for the memory, I free it here.
Definition at line 1780 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 1840 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 774 of file ntv2publicinterface.cpp.
| string NTV2Buffer::AsCode | ( | const size_t | inBytesPerWord = 4, |
| const std::string & | inVarName = "", |
||
| const bool | inUseSTL = false, |
||
| const bool | inByteSwap = false |
||
| ) | const |
| inBytesPerWord | Word size, in bytes. Must be 1, 2, 4 or 8. Defaults to 4. |
| inVarName | Optionally specifies the variable name to use. |
| inUseSTL | Optionally specifies if std::vector should be used instead of a C-style array. |
| inByteSwap | Optionally specifies if 2/4/8-byte words should be byte-swapped. |
Definition at line 434 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 416 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::ByteSwap16 | ( | void | ) |
Byte-swaps my contents 16-bits at a time.
Definition at line 1810 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::ByteSwap32 | ( | void | ) |
Byte-swaps my contents 32-bits at a time.
Definition at line 1798 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::ByteSwap64 | ( | void | ) |
Byte-swaps my contents 64-bits at a time.
Definition at line 1786 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 1930 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 1943 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::CopyFrom | ( | const NTV2Buffer & | inSrcBuffer, |
| const NTV2SegmentedXferInfo & | inXferInfo | ||
| ) |
Copies data segments from a given source buffer into me (the destination).
| [in] | inSrcBuffer | Specifies the source memory buffer to be copied into me. |
| [in] | inXferInfo | Specifies how segments are transferred. |
Definition at line 1964 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6808 of file ntv2publicinterface.h.
|
inline |
Definition at line 6809 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 1876 of file ntv2publicinterface.cpp.
|
static |
Definition at line 2227 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 6480 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 6502 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 6376 of file ntv2publicinterface.h.
| ULWordSet & NTV2Buffer::Find | ( | ULWordSet & | outOffsets, |
| const NTV2Buffer & | inValue, | ||
| const size_t | inLimit = 0 |
||
| ) | const |
Searches me for any number of occurrences of a given byte sequence.
| [out] | outOffsets | Receives the byte offsets of every occurrence found in me. |
| [in] | inValue | Specifies the NTV2Buffer that contains the byte sequence to search for. |
| [in] | inLimit | Specifies the maximum number of occurrences to report. Zero, the default, means "no limit". |
Definition at line 2042 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 7002 of file ntv2publicinterface.h.
|
inline |
Definition at line 6806 of file ntv2publicinterface.h.
|
inline |
Definition at line 6807 of file ntv2publicinterface.h.
|
inline |
Definition at line 6324 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 1898 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6307 of file ntv2publicinterface.h.
|
inline |
Definition at line 6319 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 2146 of file ntv2publicinterface.cpp.
| 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 793 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 6957 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 704 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 6904 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 667 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 6874 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 630 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 6844 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 741 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 6926 of file ntv2publicinterface.h.
|
static |
Definition at line 2240 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6796 of file ntv2publicinterface.h.
|
inline |
Definition at line 6797 of file ntv2publicinterface.h.
|
inline |
Definition at line 6800 of file ntv2publicinterface.h.
|
inline |
Definition at line 6801 of file ntv2publicinterface.h.
|
inline |
Definition at line 6804 of file ntv2publicinterface.h.
|
inline |
Definition at line 6805 of file ntv2publicinterface.h.
|
inline |
Definition at line 6792 of file ntv2publicinterface.h.
|
inline |
Definition at line 6793 of file ntv2publicinterface.h.
|
inline |
Definition at line 6330 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 2071 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6346 of file ntv2publicinterface.h.
|
inline |
Definition at line 6341 of file ntv2publicinterface.h.
|
inline |
Definition at line 6336 of file ntv2publicinterface.h.
| bool NTV2Buffer::NextDifference | ( | const NTV2Buffer & | inBuffer, |
| ULWord & | byteOffset | ||
| ) | const |
Iterates over each byte that differs between myself and the given buffer.
| [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 begins (use zero to find the first difference); on exit, receives the byte offset of the next difference found (or 0xFFFFFFFF if no further differences found). |
Definition at line 2117 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6351 of file ntv2publicinterface.h.
|
inline |
Definition at line 6757 of file ntv2publicinterface.h.
|
inline |
Definition at line 6356 of file ntv2publicinterface.h.
|
inline |
Definition at line 6762 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 1764 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 409 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 889 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 861 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 833 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 917 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::RPCDecode | ( | const NTV2_RPC_BLOB_TYPE & | inBlob, |
| size_t & | inOutIndex, | ||
| bool | fillBuffer = true |
||
| ) |
Definition at line 3894 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::RPCDecodeNoAllocate | ( | const NTV2_RPC_BLOB_TYPE & | inBlob, |
| size_t & | inOutIndex | ||
| ) |
Definition at line 3912 of file ntv2publicinterface.cpp.
| bool NTV2Buffer::RPCEncode | ( | NTV2_RPC_BLOB_TYPE & | outBlob, |
| bool | fillBuffer = true |
||
| ) |
Definition at line 3885 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 618 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 1822 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 1834 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 2232 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 1913 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 1996 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 2023 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 475 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 1752 of file ntv2publicinterface.cpp.
|
inline |
Definition at line 6794 of file ntv2publicinterface.h.
|
inline |
Definition at line 6795 of file ntv2publicinterface.h.
|
inline |
Definition at line 6798 of file ntv2publicinterface.h.
|
inline |
Definition at line 6799 of file ntv2publicinterface.h.
|
inline |
Definition at line 6802 of file ntv2publicinterface.h.
|
inline |
Definition at line 6803 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 6782 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 6790 of file ntv2publicinterface.h.