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

Method get_length

implementation/service_discovery/src/message_impl.cpp:50–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48message_impl::~message_impl() { }
49
50length_t message_impl::get_length() const {
51 length_t current_length = VSOMEIP_SOMEIP_SD_DATA_SIZE;
52 if (entries_.size()) {
53 current_length += VSOMEIP_SOMEIP_SD_ENTRY_LENGTH_SIZE;
54 current_length += uint32_t(entries_.size() * VSOMEIP_SOMEIP_SD_ENTRY_SIZE);
55 }
56
57 current_length += VSOMEIP_SOMEIP_SD_OPTION_LENGTH_SIZE;
58 if (options_.size()) {
59 for (size_t i = 0; i < options_.size(); ++i) {
60 current_length += static_cast<length_t>(options_[i]->get_length() + VSOMEIP_SOMEIP_SD_OPTION_HEADER_SIZE);
61 }
62 }
63 return current_length;
64}
65
66length_t message_impl::get_size() const {
67 return current_message_size_;

Callers 1

serializeMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected