Lines Matching refs:dest

55 static int32_t bytes2String(std::string& dest, const uint8_t * data, uint32_t len)  in bytes2String()  argument
64 dest += data[i++]; in bytes2String()
71 return (uint32_t)dest.size(); in bytes2String()
115 bool decoder::decode(message& dest, const std::vector<uint8_t>& data, const decode_context * ctx) c… in decode() argument
128 rt = decodeShortMessage(dest, &data[0], (uint32_t)data.size(), ctx); in decode()
130 rt = decodeNormalMessage(dest, &data[0], (uint32_t)data.size(), ctx); in decode()
133 if (rt && dest.getHeader().field.type == message::BUILD) { in decode()
136 setBuildNumber(dest.getBuild(), dest.getGuid()); in decode()
139 dest.setStatus(de.get_state()); in decode()
148 dest.setPayload(sstr.str()); in decode()
161 std::stringstream dest; in decodeShortPayload() local
162 hostPrintf(dest, entry->msg, v & (~entry->mask), std::vector<int>()); in decodeShortPayload()
163 m.setPayload(dest.str()); in decodeShortPayload()
170 message& dest, in decodeShortMessage() argument
179 dest.setHeader(0); // all optional fields off in decodeShortMessage()
180 dest.setType(type); in decodeShortMessage()
181 dest.setLength(length); in decodeShortMessage()
182 dest.setCollateral(ctx ? findCollateral(ctx->getGuid()) : nullptr); in decodeShortMessage()
183 dest.setContextTS(ctx ? ctx->getTS() : 0); in decodeShortMessage()
187 decodeShortPayload(dest, bytes2ValLE<uint32_t>(data) >> 4); in decodeShortMessage()
192 decodeShortPayload(dest, bytes2ValLE<uint64_t>(data) >> 4); in decodeShortMessage()
196 dest.setSubType(subtype); in decodeShortMessage()
202 dest.setBuild(val); in decodeShortMessage()
203 dest.setPayload(toHexValue(val)); in decodeShortMessage()
213 dest.setBuild(val); in decodeShortMessage()
214 dest.setPayload(toHexValue(val)); in decodeShortMessage()
226 dest.setStatus(message::decode_state::OK); in decodeShortMessage()
233 bool decoder::decodeNormalMessage(message& dest, const uint8_t * data, uint32_t length, const decod… in decodeNormalMessage() argument
237 dest.setContextTS(ctx ? ctx->getTS() : 0); in decodeNormalMessage()
238 dest.setLength(length); in decodeNormalMessage()
243 dest.setHeader(bytes2ValLE<uint32_t>(data+offset)); in decodeNormalMessage()
248 if (dest.getHeader().field.chksum) { in decodeNormalMessage()
251 dest.setCrc(bytes2ValLE<uint32_t>(data+length)); in decodeNormalMessage()
256 if (dest.getHeader().field.guid) { in decodeNormalMessage()
259 dest.setGuid(guid(data+offset)); in decodeNormalMessage()
262 dest.setGuid(generatePseudoGuid(dest.getHeaderOrigin())); in decodeNormalMessage()
267 if (dest.getHeader().field.location) { in decodeNormalMessage()
275 dest.setLocAddr64(addr); in decodeNormalMessage()
279 dest.setLocFileLine(file, line); in decodeNormalMessage()
287 dest.setLocAddr32(addr); in decodeNormalMessage()
291 dest.setLocFileLine(file, line); in decodeNormalMessage()
301 if (dest.getHeader().field.length) { in decodeNormalMessage()
309 if (dest.getHeader().field.timestamp) { in decodeNormalMessage()
311 dest.setMessageTS(bytes2ValLE<uint64_t>(data + offset)); in decodeNormalMessage()
315 if (dest.getHeader().field.length) { in decodeNormalMessage()
328 if (dest.getHeader().field.chksum) { in decodeNormalMessage()
330 if (crc != dest.getCrc()) { in decodeNormalMessage()
337 const collateral* coll = findCollateral(dest.getGuid()); in decodeNormalMessage()
338 dest.setCollateral(coll); in decodeNormalMessage()
343 dest.setClientName(coll->getName()); in decodeNormalMessage()
347 if (dest.getHeader().field.guid) { in decodeNormalMessage()
348 sstr << dest.getGuid(); in decodeNormalMessage()
350 sstr << dest.getHeaderOrigin(); in decodeNormalMessage()
352 dest.setClientName(sstr.str()); in decodeNormalMessage()
357 (this->*payloadDecode[dest.getHeader().field.type])(dest, data+offset, length - offset); in decodeNormalMessage()
359 dest.setStatus(message::decode_state::OK); in decodeNormalMessage()
363 void decoder::decodeInvalidType(message& dest, const uint8_t * data, uint32_t len) const in decodeInvalidType() argument
365 (void)dest; in decodeInvalidType()
372 void decoder::decodeBuildPayload(message& dest, const uint8_t * data, uint32_t len) const in decodeBuildPayload() argument
376 switch (dest.getHeader().field.subtype) { in decodeBuildPayload()
380 dest.setBuild(bytes2ValLE<uint64_t>(data)); in decodeBuildPayload()
381 sstr << toHexValue(dest.getBuild()); in decodeBuildPayload()
400 dest.setPayload(sstr.str()); in decodeBuildPayload()
403 void decoder::decodeStringPayload(message& dest, const uint8_t * data, uint32_t len) const in decodeStringPayload() argument
414 switch (dest.getHeader().field.subtype) { in decodeStringPayload()
419 dest.getHeader().field.subtype == in decodeStringPayload()
437 dest.setPayload(sstr.str()); in decodeStringPayload()
440 void decoder::decodeCatalogPayload(message& dest, const uint8_t * data, uint32_t len) const in decodeCatalogPayload() argument
442 const collateral * coll(dest.getCollateral()); in decodeCatalogPayload()
450 switch (dest.getHeader().field.subtype) { in decodeCatalogPayload()
503 if (0 != srcpos->m_file && 0 == (dest.getLocation().tag & message::IDANDLINE)) in decodeCatalogPayload()
505 dest.setLocFileLine(srcpos->m_file, srcpos->m_line); in decodeCatalogPayload()
509 dest.setPayload(sstr.str()); in decodeCatalogPayload()
512 void decoder::decodeRawPayload(message& dest, const uint8_t * data, uint32_t len) const in decodeRawPayload() argument
520 dest.setPayload(sstr.str()); in decodeRawPayload()