Lines Matching refs:berTlv
97 std::vector<uint8_t> berTlv) { in getDataFromBerTlv() argument
98 if (berTlv.empty()) { in getDataFromBerTlv()
101 size_t lengthTag = berTlv[0]; in getDataFromBerTlv()
102 DLOG_IF(INFO, nfc_debug_enabled) << "decodeBerTlv: berTlv[0]=" << berTlv[0]; in getDataFromBerTlv()
107 if (lengthTag < 0x80 && berTlv.size() == (lengthTag + 1)) { in getDataFromBerTlv()
108 return std::vector<uint8_t>(berTlv.begin() + 1, berTlv.end()); in getDataFromBerTlv()
109 } else if (lengthTag == 0x81 && berTlv.size() > 2) { in getDataFromBerTlv()
110 size_t length = berTlv[1]; in getDataFromBerTlv()
111 if ((length + 2) == berTlv.size()) { in getDataFromBerTlv()
112 return std::vector<uint8_t>(berTlv.begin() + 2, berTlv.end()); in getDataFromBerTlv()
114 } else if (lengthTag == 0x82 && berTlv.size() > 3) { in getDataFromBerTlv()
115 size_t length = ((berTlv[1] << 8) | berTlv[2]); in getDataFromBerTlv()
116 if ((length + 3) == berTlv.size()) { in getDataFromBerTlv()
117 return std::vector<uint8_t>(berTlv.begin() + 3, berTlv.end()); in getDataFromBerTlv()
119 } else if (lengthTag == 0x83 && berTlv.size() > 4) { in getDataFromBerTlv()
120 size_t length = (berTlv[1] << 16) | (berTlv[2] << 8) | berTlv[3]; in getDataFromBerTlv()
121 if ((length + 4) == berTlv.size()) { in getDataFromBerTlv()
122 return std::vector<uint8_t>(berTlv.begin() + 4, berTlv.end()); in getDataFromBerTlv()
124 } else if (lengthTag == 0x84 && berTlv.size() > 5) { in getDataFromBerTlv()
126 (berTlv[1] << 24) | (berTlv[2] << 16) | (berTlv[3] << 8) | berTlv[4]; in getDataFromBerTlv()
127 if ((length + 5) == berTlv.size()) { in getDataFromBerTlv()
128 return std::vector<uint8_t>(berTlv.begin() + 5, berTlv.end()); in getDataFromBerTlv()
170 std::vector<uint8_t> berTlv(event_buff.begin() + berTlvStart, in nfaHciCallback() local
173 data = getInstance().getDataFromBerTlv(berTlv); in nfaHciCallback()