* @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 */
| 582 | * @return New size of the message buffer |
| 583 | */ |
| 584 | int 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 |
no test coverage detected