LCOV - code coverage report
Current view: top level - libs/bsw/cpp2someip/include/someip - RpcServiceRegistry.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 1 1
Test Date: 2026-09-11 12:05:06 Functions: 100.0 % 1 1

            Line data    Source code
       1              : /********************************************************************************
       2              :  * Copyright (c) 2026 Accenture
       3              :  *
       4              :  * This program and the accompanying materials are made available under the
       5              :  * terms of the Apache License Version 2.0 which is available at
       6              :  * https://www.apache.org/licenses/LICENSE-2.0
       7              :  *
       8              :  * SPDX-License-Identifier: Apache-2.0
       9              :  ********************************************************************************/
      10              : 
      11              : #pragma once
      12              : 
      13              : #include "someip/IServiceRegistry.h"
      14              : #include "someip/IServiceTrackerListener.h"
      15              : #include "someip/ServiceDescription.h"
      16              : #include "someip/ServiceManager.h"
      17              : #include "someip/ServiceTracker.h"
      18              : 
      19              : namespace someip
      20              : {
      21              : class RpcServiceRegistry
      22              : : public IServiceRegistry
      23              : , public IServiceTrackerListener
      24              : {
      25              : public:
      26              :     RpcServiceRegistry(ServiceManager& serviceManager, ServiceTracker& serviceTracker);
      27              : 
      28              :     void init() override;
      29              :     void shutdown() override;
      30              : 
      31              :     bool registerProvidedService(ProvidedService& service) override;
      32              :     void unregisterProvidedService(ProvidedService& service) override;
      33              : 
      34              :     bool registerServiceQuery(ServiceQuery& query) override;
      35              :     void unregisterServiceQuery(ServiceQuery& query) override;
      36              : 
      37              :     QueryManager const* getQueryManager() const override;
      38              : 
      39              :     instance_id::type getInstanceId(
      40              :         service_id::type serviceId,
      41              :         major_version::type majorVersion,
      42              :         ::ip::IPAddress const& ipAddress,
      43              :         uint16_t port,
      44              :         bool remoteProvider = true) const override;
      45              : 
      46              :     void offerReceived(
      47              :         ServiceDescription const& receivedService, ::ip::IPAddress const& sourceAddress) override;
      48              : 
      49              :     SubscriptionResult subscribeReceived(
      50              :         service_id::type serviceId,
      51              :         instance_id::type instanceId,
      52              :         major_version::type majorVersion,
      53              :         eventgroup_id::type eventGroup,
      54              :         ttl::type ttl,
      55              :         ::ip::IPAddress const& ipAddress,
      56              :         uint16_t port,
      57              :         uint8_t proto) override;
      58              : 
      59              :     void subscribeAckReceived(
      60              :         service_id::type serviceId,
      61              :         instance_id::type instanceId,
      62              :         eventgroup_id::type eventGroup,
      63              :         major_version::type majorVersion,
      64              :         ::ip::IPEndpoint const& multicastEndpoint,
      65              :         ::ip::IPAddress const& sourceAddress) override;
      66              : 
      67              :     void subscribeNackReceived(
      68              :         service_id::type serviceId,
      69              :         instance_id::type instanceId,
      70              :         eventgroup_id::type eventGroup,
      71              :         major_version::type majorVersion,
      72              :         ::ip::IPAddress const& sourceAddress) override;
      73              : 
      74              :     void rebootDetected(::ip::IPAddress const& ipAddress) override;
      75              : 
      76              :     bool interestedInService(
      77              :         service_id::type serviceId,
      78              :         instance_id::type instanceId,
      79              :         major_version::type majorVersion) const override;
      80              : 
      81              :     bool isEventgroupPort(
      82              :         service_id::type serviceId,
      83              :         instance_id::type instanceId,
      84              :         major_version::type majorVersion,
      85              :         uint16_t port) const override;
      86              : 
      87              :     /** \see IServiceTrackerListener::serviceTrackerChanged() */
      88            4 :     void serviceTrackerChanged(ServiceDescription const&, ServiceTrackerStatus const) override {}
      89              : 
      90              :     uint16_t getCurrentNumberOfSubscriptions() const override;
      91              :     uint16_t getMaximumNumberOfSubscriptions() const override;
      92              :     uint16_t getCurrentNumberOfProvidedServices() const override;
      93              :     uint16_t getMaximumNumberOfProvidedServices() const override;
      94              :     uint16_t getCurrentNumberOfRemoteServices() const override;
      95              :     uint16_t getMaximumNumberOfRemoteServices() const override;
      96              : 
      97              : private:
      98              :     ServiceManager& _serviceManager;
      99              :     ServiceTracker& _serviceTracker;
     100              : };
     101              : 
     102              : } // namespace someip
        

Generated by: LCOV version 2.0-1