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

Function EncodeUnconnectedDataItemLength

source/src/enet_encap/cpf.c:584–592  ·  view source on GitHub ↗

* @brief Encode the data item length of the unconnected data segment * * @param message_router_response Router Response message to be processed * @param outgoing_message The outgoing message object * * @return New size of the message buffer */

Source from the content-addressed store, hash-verified

582 * @return New size of the message buffer
583 */
584int EncodeUnconnectedDataItemLength(
585 const CipMessageRouterResponse *const message_router_response,
586 ENIPMessage *const outgoing_message) {
587 outgoing_message->used_message_length += AddIntToMessage(
588 (EipUint16) ( message_router_response->data_length + 4 /* TODO: Magic number */
589 + (2 * message_router_response->size_of_additional_status) ),
590 &outgoing_message->current_message_position);
591 return outgoing_message->used_message_length;
592}
593
594/**
595 * @brief Encodes the Message Router Response data

Callers 1

AssembleLinearMessageFunction · 0.85

Calls 1

AddIntToMessageFunction · 0.85

Tested by

no test coverage detected