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

Method send_register_event

implementation/routing/src/routing_manager_client.cpp:1762–1792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1760}
1761
1762void routing_manager_client::send_register_event(client_t _client, service_t _service, instance_t _instance, event_t _notifier,
1763 const std::set<eventgroup_t>& _eventgroups, const event_type_e _type,
1764 reliability_type_e _reliability, bool _is_provided, bool _is_cyclic) {
1765
1766 (void)_client;
1767
1768 protocol::register_events_command its_command;
1769 its_command.set_client(get_client());
1770
1771 protocol::register_event reg(_service, _instance, _notifier, _type, _is_provided, _reliability, _is_cyclic,
1772 static_cast<uint16_t>(_eventgroups.size()), _eventgroups);
1773
1774 if (!its_command.add_registration(reg)) {
1775 VSOMEIP_ERROR_P << "Register event command is too long.";
1776 }
1777
1778 std::vector<byte_t> its_buffer;
1779 its_command.serialize(its_buffer);
1780
1781 std::scoped_lock its_sender_lock{sender_mutex_};
1782 if (sender_) {
1783 sender_->send(&its_buffer[0], uint32_t(its_buffer.size()));
1784 } else {
1785 VSOMEIP_ERROR_P << "Failed due to a missing sender";
1786 }
1787
1788 if (_is_provided) {
1789 VSOMEIP_INFO << "REGISTER EVENT(" << hex4(get_client()) << "): [" << hex4(_service) << "." << hex4(_instance) << "."
1790 << hex4(_notifier) << ":is_provider=" << std::boolalpha << _is_provided << "]";
1791 }
1792}
1793
1794void routing_manager_client::on_subscribe_ack(client_t _client, service_t _service, instance_t _instance, eventgroup_t _eventgroup,
1795 event_t _event) {

Callers

nothing calls this directly

Calls 6

hex4Function · 0.85
add_registrationMethod · 0.80
set_clientMethod · 0.45
sizeMethod · 0.45
serializeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected