MCPcopy Create free account
hub / github.com/COVESA/vsomeip / serialize

Method serialize

implementation/protocol/src/routing_info_command.cpp:15–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13routing_info_command::routing_info_command() : command(id_e::ROUTING_INFO_ID) { }
14
15void routing_info_command::serialize(std::vector<byte_t>& _buffer) const {
16
17 size_t its_size(COMMAND_HEADER_SIZE);
18 for (const auto& e : entries_)
19 its_size += e.get_size();
20
21 // resize buffer
22 _buffer.resize(its_size);
23
24 // set size
25 size_ = static_cast<command_size_t>(its_size - COMMAND_HEADER_SIZE);
26
27 // serialize header
28 command::serialize(_buffer);
29
30 // serialize payload
31 size_t _index(COMMAND_HEADER_SIZE);
32 for (const auto& e : entries_) {
33 e.serialize(_buffer, _index);
34 }
35}
36
37void routing_info_command::deserialize(const std::vector<byte_t>& _buffer, error_e& _error) {
38

Callers

nothing calls this directly

Calls 3

serializeFunction · 0.85
resizeMethod · 0.80
get_sizeMethod · 0.45

Tested by

no test coverage detected