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

Method get_size

implementation/protocol/src/routing_info_entry.cpp:179–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179size_t routing_info_entry::get_size() const {
180
181 size_t its_size(ROUTING_INFO_ENTRY_HEADER_SIZE);
182
183 if (!address_.is_unspecified()) {
184 if (address_.is_v4()) {
185 its_size += (sizeof(boost::asio::ip::address_v4::bytes_type) + sizeof(port_));
186 } else {
187 its_size += (sizeof(boost::asio::ip::address_v6::bytes_type) + sizeof(port_));
188 }
189 }
190
191 its_size += sizeof(uint32_t); // size of the client info
192 its_size += sizeof(uint32_t); // size of the services array
193 its_size += (services_.size() * (sizeof(service_t) + sizeof(instance_t) + sizeof(major_version_t) + sizeof(minor_version_t)));
194
195 return its_size;
196}
197
198client_t routing_info_entry::get_client() const {
199

Callers 1

serializeMethod · 0.45

Calls 2

is_v4Method · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected