Home
last modified time | relevance | path

Searched refs:tlv (Results 1 – 3 of 3) sorted by relevance

/developtools/hdc/hdc_rust/src/common/
Dbase.rs181 pub fn tlv_append(mut tlv: String, tag: &str, val: &str) -> String { in tlv_append()
188 tlv.push_str(tag); in tlv_append()
189 tlv.push_str(&" ".repeat(TLV_TAG_LEN - tlen)); in tlv_append()
195 tlv.push_str(svlen.as_str()); in tlv_append()
196 tlv.push_str(&" ".repeat(TLV_VAL_LEN - svlen.len())); in tlv_append()
198 tlv.push_str(val); in tlv_append()
199 tlv in tlv_append()
201 pub fn tlv_to_stringmap(tlv: &str) -> Option<HashMap<&str, &str>> { in tlv_to_stringmap()
204 while tlv.len() >= TLV_MIN_LEN && tlv.len() > cur_index { in tlv_to_stringmap()
206 let Some(tag) = tlv.get(cur_index..(cur_index + TLV_TAG_LEN)) else { in tlv_to_stringmap()
[all …]
/developtools/hdc/src/common/
Dbase.cpp1849 bool TlvAppend(string &tlv, string tag, string val) in TlvAppend() argument
1858 tlv.append(tag); in TlvAppend()
1864 tlv.append(vallen); in TlvAppend()
1865 tlv.append(val); in TlvAppend()
1868 bool TlvToStringMap(string tlv, std::map<string, string> &tlvmap) in TlvToStringMap() argument
1870 if (tlv.length() < TLV_MIN_LEN) { in TlvToStringMap()
1873 while (tlv.length() >= TLV_MIN_LEN) { in TlvToStringMap()
1874 string tag = tlv.substr(0, TLV_TAG_LEN); in TlvToStringMap()
1876 tlv.erase(0, TLV_TAG_LEN); in TlvToStringMap()
1878 string vallen = tlv.substr(0, TLV_VAL_LEN); in TlvToStringMap()
[all …]
Dbase.h198 bool TlvAppend(string &tlv, string tag, string val);
199 bool TlvToStringMap(string tlv, std::map<string, string> &tlvmap);