|
LibLogicalAccess
2.5.0
An Open Source RFID Library
|
#include <tlv.hpp>
Public Member Functions | |
| TLV (uint8_t t) | |
| virtual | ~TLV ()=default |
| TLV (const TLV &)=delete | |
| TLV (TLV &&)=delete | |
| TLV & | operator= (const TLV &)=delete |
| TLV & | operator= (TLV &&)=delete |
| uint8_t | tag () const |
| void | tag (uint8_t t) |
| ByteVector | value () const |
| uint8_t | value_u1 () const |
| void | value (bool v) |
| void | value (unsigned char v) |
| void | value (const ByteVector &v) |
| void | value (TLVPtr tlv) |
| void | value (std::vector< TLVPtr > tlv) |
| ByteVector | compute () const |
| TLVPtr | get_child (uint8_t tag) const |
| std::vector< TLVPtr > | get_childs () const |
| uint8_t | getSizeTag () const |
| void | setSizeTag (uint8_t tag) |
| ByteVector | getSizeVector () const |
| void | setSizeVector (ByteVector size) |
| ByteVector | getCompletTLV () const |
Static Public Member Functions | |
| static TLVPtr | get_child (std::vector< TLVPtr > tlvs, uint8_t tag, bool required=true) |
| static std::vector< TLVPtr > | parse_tlvs (const ByteVector &bytes, size_t &bytes_consumed) |
| static std::vector< TLVPtr > | parse_tlvs (const ByteVector &bytes, bool strict=false) |
| static ByteVector | value_tlvs (std::vector< TLVPtr > tlvs) |
Private Attributes | |
| ByteVector | sizeVector_ |
| uint8_t | tag_ |
| uint8_t | sizeTag_ |
| ByteVector | value_ |
| std::vector< TLVPtr > | subTLVs_ |
This is a helper that represents TLV (tag, length, value) datatype.
A few specifications:
A TLV's value can be an other TLV. This scheme is supported.
|
explicit |
Construct a TLV and specify the tag.
|
virtualdefault |
|
delete |
|
delete |
| ByteVector logicalaccess::TLV::compute | ( | ) | const |
Return a raw representation of this TLV.
|
static |
| TLVPtr logicalaccess::TLV::get_child | ( | uint8_t | tag | ) | const |
| std::vector< TLVPtr > logicalaccess::TLV::get_childs | ( | ) | const |
| ByteVector logicalaccess::TLV::getCompletTLV | ( | ) | const |
| uint8_t logicalaccess::TLV::getSizeTag | ( | ) | const |
| ByteVector logicalaccess::TLV::getSizeVector | ( | ) | const |
|
static |
|
static |
| void logicalaccess::TLV::setSizeTag | ( | uint8_t | tag | ) |
| void logicalaccess::TLV::setSizeVector | ( | ByteVector | size | ) |
| uint8_t logicalaccess::TLV::tag | ( | ) | const |
| void logicalaccess::TLV::tag | ( | uint8_t | t | ) |
| ByteVector logicalaccess::TLV::value | ( | ) | const |
| void logicalaccess::TLV::value | ( | bool | v | ) |
Set the value.
| void logicalaccess::TLV::value | ( | const ByteVector & | v | ) |
Set the value.
| void logicalaccess::TLV::value | ( | std::vector< TLVPtr > | tlv | ) |
Set the value.
| void logicalaccess::TLV::value | ( | TLVPtr | tlv | ) |
| void logicalaccess::TLV::value | ( | unsigned char | v | ) |
Set the value.
|
static |
| uint8_t logicalaccess::TLV::value_u1 | ( | ) | const |
Return the "value" of this TLV as uint8_t. Throw if the value size is not exactly one byte.
|
private |
|
private |
|
private |
|
private |
|
private |
1.9.6