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

Method on_notification

implementation/routing/src/routing_manager_impl.cpp:1219–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1217}
1218
1219void routing_manager_impl::on_notification(client_t _client, service_t _service, instance_t _instance, const byte_t* _data, length_t _size,
1220 bool _notify_one) {
1221 event_t its_event_id = bithelper::read_uint16_be(&_data[VSOMEIP_METHOD_POS_MIN]);
1222 std::shared_ptr<event> its_event = find_event(_service, _instance, its_event_id);
1223 if (its_event) {
1224 uint32_t its_length = utility::get_payload_size(_data, _size);
1225 std::shared_ptr<payload> its_payload = runtime::get()->create_payload(&_data[VSOMEIP_PAYLOAD_POS], its_length);
1226
1227 if (_notify_one) {
1228 notify_one(_service, _instance, its_event->get_event(), its_payload, _client, true);
1229 } else {
1230 if (its_event->is_field()) {
1231 if (!its_event->set_payload_notify_pending(its_payload)) {
1232 its_event->set_payload(its_payload, false);
1233 }
1234 } else {
1235 its_event->set_payload(its_payload, VSOMEIP_ROUTING_CLIENT, true);
1236 }
1237 }
1238 }
1239}
1240
1241void routing_manager_impl::on_stop_offer_service(client_t _client, service_t _service, instance_t _instance, major_version_t _major,
1242 minor_version_t _minor) {

Callers 1

on_messageMethod · 0.45

Calls 5

create_payloadMethod · 0.80
is_fieldMethod · 0.80
get_eventMethod · 0.45
set_payloadMethod · 0.45

Tested by

no test coverage detected