/* this function composes an element type from metadata/payload (TLV structure)  */
uint16_t setElementType(uint8_t isValue, uint8_t requestIdx, uint8_t elementVal)
/* this function composes an element type from metadata/payload (TLV structure)  */
uint16_t setElementType(uint8_t isValue, uint8_t requestIdx, uint8_t elementVal)
{
    uint16_t elementType;
    elementType = elementVal;
    elementType |= (((isValue << 7) | (requestIdx & 0x7F)) << 8);
    return (elementType);
}