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

Function EncodeDataItemData

source/src/enet_encap/cpf.c:415–425  ·  view source on GitHub ↗

* Adds the data items to the message frame * * @param common_packet_format_data_item The Common Packet Format data structure from which the message is constructed * @param outgoing_message The outgoing message object * * @return The new size of the message frame after encoding */

Source from the content-addressed store, hash-verified

413 * @return The new size of the message frame after encoding
414 */
415int EncodeDataItemData(
416 const CipCommonPacketFormatData *const common_packet_format_data_item,
417 ENIPMessage *const outgoing_message) {
418 for (size_t i = 0; i < common_packet_format_data_item->data_item.length;
419 i++) {
420 outgoing_message->used_message_length += AddSintToMessage(
421 *(common_packet_format_data_item->data_item.data + i),
422 &outgoing_message->current_message_position);
423 }
424 return outgoing_message->used_message_length;
425}
426
427/**
428 * @brief Encodes the Connected Data item length

Callers 1

AssembleLinearMessageFunction · 0.85

Calls 1

AddSintToMessageFunction · 0.85

Tested by

no test coverage detected