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

Method deserialize

implementation/protocol/src/remove_security_policy_command.cpp:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void remove_security_policy_command::deserialize(const std::vector<byte_t>& _buffer, error_e& _error) {
39
40 if (COMMAND_HEADER_SIZE + sizeof(update_id_) + sizeof(uid_) + sizeof(gid_t) > _buffer.size()) {
41
42 _error = error_e::ERROR_NOT_ENOUGH_BYTES;
43 return;
44 }
45
46 // deserialize header
47 command::deserialize(_buffer, _error);
48 if (_error != error_e::ERROR_OK)
49 return;
50
51 // deserialize payload
52 size_t its_offset(COMMAND_HEADER_SIZE);
53 std::memcpy(&update_id_, &_buffer[its_offset], sizeof(update_id_));
54 its_offset += sizeof(update_id_);
55 std::memcpy(&uid_, &_buffer[its_offset], sizeof(uid_));
56 its_offset += sizeof(uid_);
57 std::memcpy(&gid_, &_buffer[its_offset], sizeof(gid_));
58}
59
60uint32_t remove_security_policy_command::get_update_id() const {
61

Callers

nothing calls this directly

Calls 2

deserializeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected