KlvLib
1.58
|
IKlvDecoder class. More...
Public Member Functions | |
virtual | ~IKlvDecoder (void) |
Virtual destructor. | |
virtual BOOL | Parse (IKlvItem::KEY_LENGTH outerKeySize, IKlvItem::KEY_LENGTH innerKeySize, char *buf, const size_t size, BOOL fValidateCheckSum=FALSE)=0 |
Decode KLV data. More... | |
virtual IKlvItem ** | GetItemList (int &count)=0 |
Return parsed items list. More... | |
virtual BOOL | ValidateCheckSum (const char *buf, const size_t size)=0 |
Validates checksum. More... | |
virtual void | Purge ()=0 |
Purge an internal parsed items list. More... | |
Related Functions | |
(Note that these are not member functions.) | |
KLVLIB_API IKlvDecoder * | CreateKlvDecoder () |
Creates KlvDecoder instance. More... | |
KLV Decoder class allows KLV Items extraction from the binary data buffer. You should use CreateKlvDecoder() helper function in order to create decoder instance. Once it is created, a Parse( IKlvItem::KEY_LENGTH outerKeySize, IKlvItem::KEY_LENGTH innerKeySize, char* buf, const size_t size, BOOL fValidateCheckSum = TRUE ) method may be used in order to process the data and extact Klv Items. When Parse( IKlvItem::KEY_LENGTH outerKeySize, IKlvItem::KEY_LENGTH innerKeySize, char* buf, const size_t size, BOOL fValidateCheckSum = TRUE ) method returns ( with TRUE return value ), IKlvItem** GetItemList(int& count) method may be used in order to get the list of exacted Klv Items. See Using KlvLib sample or Using KlvLib (16 bytes Keys) sample for more details on how to use the Decoder.
|
pure virtual |
Returns parsed items list. Returns a pointer to the KlvItem list container created from a parsed data buffer.
count | an int&. Number of KLVs in the list. |
|
pure virtual |
Parses the data and returns decoded data buffer and its length.
outerKeySize | an unsigned char. Outer Key size. Ussually 16 bytes. Must be known in order to parse data. |
innerKeySize | an unsigned char. Inner Key size. Ussually 1 - 16 bytes. Must be known in order to parse data. |
buf | a char*. A byte array containing the KLV data |
size | a const size_t. Buffer size |
fValidateCheckSum | a BOOL. If TRUE, the checksum will be validated during the parsing. |
|
pure virtual |
Purges an internal parsed items list.
|
pure virtual |
Validates checksum. The checksum is a running 16-byte sum through the entire buffer starting with the 16 byte Local Data
buf | a const char*. The pointer to the buffer that contains the data. |
size | a const size_t. Buffer size. |
|
related |
Helper function. Instantiates KlvDecoder class