#pragma once #include #include #include class TLV { public: enum Tag { TAG_NULL = 0x00, TAG_LOCK_CTRL = 0x01, TAG_MEM_CTRL = 0x02, TAG_NDEF = 0x03, TAG_PROPRIETARY = 0xFD, TAG_TERMINATOR = 0xFE, }; public: TLV(); TLV(Tag tag, std::vector value); virtual ~TLV(); static std::vector FromBytes(const std::span& data); std::vector ToBytes() const; Tag GetTag() const; const std::vector& GetValue() const; void SetTag(Tag tag); void SetValue(const std::span& value); private: Tag mTag; std::vector mValue; };