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

Function AddDintToMessage

source/src/enet_encap/endianconv.c:132–143  ·  view source on GitHub ↗

* @brief Converts UINT32 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

130 * @param buffer pointer where data should be written.
131 */
132int AddDintToMessage(const EipUint32 data,
133 EipUint8 **const buffer) {
134 unsigned char *p = (unsigned char *) *buffer;
135
136 p[0] = (unsigned char) data;
137 p[1] = (unsigned char) (data >> 8);
138 p[2] = (unsigned char) (data >> 16);
139 p[3] = (unsigned char) (data >> 24);
140 *buffer += 4;
141
142 return 4;
143}
144
145#ifdef OPENER_SUPPORT_64BIT_DATATYPES
146

Callers 12

CipEpathSetLogicalValueFunction · 0.85
EncodeDataFunction · 0.85
SendConnectedDataFunction · 0.85
EncapsulateIpAddressFunction · 0.85
AssembleLinearMessageFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68