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

Function EncodeExtendedStatusDataItems

source/src/enet_encap/cpf.c:542–553  ·  view source on GitHub ↗

* @brief Encodes the extended status data items * * @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

540 * @return New size of the message buffer
541 */
542size_t EncodeExtendedStatusDataItems(
543 const CipMessageRouterResponse *const message_router_response,
544 ENIPMessage *const outgoing_message) {
545 for (size_t i = 0;
546 i < message_router_response->size_of_additional_status &&
547 i < MAX_SIZE_OF_ADD_STATUS; i++) {
548 outgoing_message->used_message_length += AddIntToMessage(
549 message_router_response->additional_status[i],
550 &outgoing_message->current_message_position);
551 }
552 return outgoing_message->used_message_length;
553}
554
555/**
556 * @brief Encodes the extended status (length and data) into the message

Callers 1

EncodeExtendedStatusFunction · 0.85

Calls 1

AddIntToMessageFunction · 0.85

Tested by

no test coverage detected