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

Method deserialize

implementation/protocol/src/routing_info_command.cpp:37–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void routing_info_command::deserialize(const std::vector<byte_t>& _buffer, error_e& _error) {
38
39 if (COMMAND_HEADER_SIZE > _buffer.size()) {
40
41 _error = error_e::ERROR_NOT_ENOUGH_BYTES;
42 return;
43 }
44
45 // deserialize header
46 command::deserialize(_buffer, _error);
47 if (_error != error_e::ERROR_OK)
48 return;
49
50 // deserialize payload
51 size_t its_index(COMMAND_HEADER_SIZE);
52 while (its_index < _buffer.size()) {
53
54 routing_info_entry its_entry;
55 its_entry.deserialize(_buffer, its_index, _error);
56
57 if (_error == error_e::ERROR_OK)
58 entries_.emplace_back(its_entry);
59 else
60 break;
61 }
62}
63
64// specific
65const std::vector<routing_info_entry>& routing_info_command::get_entries() const {

Callers

nothing calls this directly

Calls 2

deserializeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected