* 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 */
| 413 | * @return The new size of the message frame after encoding |
| 414 | */ |
| 415 | int 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 |
no test coverage detected