I say create a TLV class first and available encoding as an enum with a value equal to the linked tag.


enum encoding { ASCII = 0x01, binary = 0x02};

class TLV
{
unsigned char tag; //a...