MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / AddLintToMessage

Function AddLintToMessage

source/src/enet_encap/endianconv.c:178–192  ·  view source on GitHub ↗

* @brief Converts EipUint64 data from host to little endian and writes it to buffer. * @param data value to be written * @param buffer pointer where data should be written. */

Source from the content-addressed store, hash-verified

176 * @param buffer pointer where data should be written.
177 */
178int AddLintToMessage(const EipUint64 data,
179 EipUint8 **const buffer) {
180 EipUint8 *buffer_address = *buffer;
181 buffer_address[0] = (EipUint8) (data >> 56) & 0xFF;
182 buffer_address[1] = (EipUint8) (data >> 48) & 0xFF;
183 buffer_address[2] = (EipUint8) (data >> 40) & 0xFF;
184 buffer_address[3] = (EipUint8) (data >> 32) & 0xFF;
185 buffer_address[4] = (EipUint8) (data >> 24) & 0xFF;
186 buffer_address[5] = (EipUint8) (data >> 16) & 0xFF;
187 buffer_address[6] = (EipUint8) (data >> 8) & 0xFF;
188 buffer_address[7] = (EipUint8) (data) & 0xFF;
189 (*buffer) += 8;
190
191 return 8;
192}
193
194#endif
195

Callers 2

EncodeDataFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68