MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / encodeMessage

Function encodeMessage

raster_ipc/RasterIpcProtocol.h:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50inline void encodeMessage(const Message& m, uint8_t out[kMessageBytes]) {
51 out[0] = static_cast<uint8_t>(m.type);
52 out[1] = 0;
53 out[2] = 0;
54 out[3] = 0;
55 out[4] = static_cast<uint8_t>(m.arg & 0xFFu);
56 out[5] = static_cast<uint8_t>((m.arg >> 8) & 0xFFu);
57 out[6] = static_cast<uint8_t>((m.arg >> 16) & 0xFFu);
58 out[7] = static_cast<uint8_t>((m.arg >> 24) & 0xFFu);
59}
60
61inline Message decodeMessage(const uint8_t in[kMessageBytes]) {
62 Message m;

Callers 4

DG_DrawFrameFunction · 0.85
sendMessageMethod · 0.85
mainFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
TESTFunction · 0.68