* Encodes a Connected Address Item into 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 */
| 312 | * @return The new size of the message frame after encoding |
| 313 | */ |
| 314 | int EncodeConnectedAddressItem( |
| 315 | const CipCommonPacketFormatData *const common_packet_format_data_item, |
| 316 | ENIPMessage *const outgoing_message) { |
| 317 | /* connected data item -> address length set to 4 and copy ConnectionIdentifier */ |
| 318 | outgoing_message->used_message_length += AddIntToMessage( |
| 319 | kCipItemIdConnectionAddress, |
| 320 | &outgoing_message->current_message_position); |
| 321 | outgoing_message->used_message_length += AddIntToMessage(4, |
| 322 | &outgoing_message->current_message_position); |
| 323 | outgoing_message->used_message_length += AddDintToMessage( |
| 324 | common_packet_format_data_item->address_item.data.connection_identifier, |
| 325 | &outgoing_message->current_message_position); |
| 326 | return outgoing_message->used_message_length; |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * @brief Encodes a sequenced address item into the message |
no test coverage detected