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

Function parse_sd

test/network_tests/fake_socket_tests/helpers/someip_message.cpp:83–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83[[nodiscard]] std::shared_ptr<vsomeip_v3::sd::message_impl> parse_sd(std::vector<unsigned char>& _message) {
84 if (_message.size() < VSOMEIP_FULL_HEADER_SIZE) {
85 TEST_LOG << "Message not long enough to contain someip header";
86 return 0;
87 }
88
89 vsomeip_v3::sd::deserializer des{&_message[0], _message.size(), VSOMEIP_DEFAULT_BUFFER_SHRINK_THRESHOLD};
90 auto deserialized_message = des.deserialize_sd_message();
91 if (!deserialized_message) {
92 TEST_LOG << "Failure during message deserialization";
93 return 0;
94 }
95 std::shared_ptr<vsomeip_v3::sd::message_impl> sd_message{deserialized_message};
96
97 return sd_message;
98}
99
100std::vector<unsigned char> construct_subscription(event_ids const& _subscription, boost::asio::ip::address _address, uint16_t _port) {
101 std::shared_ptr<vsomeip_v3::sd::entry_impl> entry_;

Callers 2

parseFunction · 0.85
parse_sequential_someipFunction · 0.85

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected