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

Method get_payload_size

implementation/utility/src/utility.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84uint32_t utility::get_payload_size(const byte_t* _data, uint32_t _size) {
85 if (_size <= VSOMEIP_FULL_HEADER_SIZE)
86 return 0;
87
88 uint32_t length_ = bithelper::read_uint32_be(&_data[4]);
89
90 if (length_ <= VSOMEIP_SOMEIP_HEADER_SIZE)
91 return 0;
92
93 if (_size != (VSOMEIP_SOMEIP_HEADER_SIZE + length_))
94 return 0;
95
96 return length_ - VSOMEIP_SOMEIP_HEADER_SIZE;
97}
98
99bool utility::is_routing_manager(const std::string& _network) {
100 // Only the first caller can become routing manager.

Callers 1

TESTFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected