Lines Matching refs:tlv
36 uint8_t *TlvUtils::ParseTlv(const uint8_t *buffer, TlvCommon *tlv, const uint8_t *boundary, uint32_… in ParseTlv() argument
46 tlv->tag_ = (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->tag_; in ParseTlv()
47 tlv->len_ = (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->len_; in ParseTlv()
48 tlv->value_ = const_cast<uint8_t *>(buffer) + TLV_TLV_HEAD_LEN; in ParseTlv()
53 uint8_t *TlvUtils::AppendTlv(uint8_t *buffer, const TlvCommon *tlv, const uint8_t *boundary, uint32… in AppendTlv() argument
63 (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->tag_ = tlv->tag_; in AppendTlv()
64 (reinterpret_cast<TlvCommon *>(const_cast<uint8_t *>(buffer)))->len_ = tlv->len_; in AppendTlv()
65 if (tlv->len_ != 0 && tlv->value_ != nullptr) { in AppendTlv()
66 …emcpy_s(buffer + TLV_TLV_HEAD_LEN, boundary - buffer - TLV_TLV_HEAD_LEN, tlv->value_, tlv->len_) != in AppendTlv()
76 uint32_t TlvUtils::Serialize(const TlvCommon *tlv, uint32_t tlvCount, uint8_t *buff, uint32_t maxBu… in Serialize() argument
79 if (tlv == nullptr || buff == nullptr || buffSize == nullptr) { in Serialize()
87 curr = AppendTlv(curr, &tlv[index], boundary, &retCode); in Serialize()
96 uint32_t TlvUtils::Deserialize(const uint8_t *buff, uint32_t buffSize, TlvCommon *tlv, uint32_t max… in Deserialize() argument
99 if (tlv == nullptr || buff == nullptr || tlvCount == nullptr) { in Deserialize()
112 msg = ParseTlv(msg, &tlv[index], boundary, &retCode); in Deserialize()