LCOV - code coverage report
Current view: top level - libs/bsw/cpp2someip/src - SubscribedEventGroup.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 25 25
Test Date: 2026-09-11 12:05:06 Functions: 100.0 % 4 4

            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              : #include "someip/SubscribedEventGroup.h"
      12              : 
      13              : #include "someip/ServiceDescription.h"
      14              : #include "someip/SomeIpConstants.h"
      15              : 
      16              : namespace someip
      17              : {
      18            1 : SubscribedEventGroup::SubscribedEventGroup()
      19            1 : : _endpoints()
      20            1 : , _serviceId(service_id::INVALID)
      21            1 : , _instanceId(instance_id::ANY)
      22            1 : , _eventgroup(eventgroup_id::ALL)
      23            1 : , _majorVersion(major_version::INVALID)
      24            1 : {}
      25              : 
      26          340 : SubscribedEventGroup::SubscribedEventGroup(
      27              :     service_id::type const serviceId,
      28              :     major_version::type const majorVersion,
      29              :     instance_id::type const instanceId,
      30          340 :     eventgroup_id::type const eventgroup)
      31          340 : : _endpoints()
      32          340 : , _serviceId(serviceId)
      33          340 : , _instanceId(instanceId)
      34          340 : , _eventgroup(eventgroup)
      35          340 : , _majorVersion(majorVersion)
      36          340 : {}
      37              : 
      38            8 : bool SubscribedEventGroup::operator==(SubscribedEventGroup const& rhs) const
      39              : {
      40              :     return (
      41            6 :         (rhs._serviceId == _serviceId) && (rhs._majorVersion == _majorVersion)
      42           14 :         && (rhs._instanceId == _instanceId) && (rhs._eventgroup == _eventgroup));
      43              : }
      44              : 
      45            1 : void SubscribedEventGroup::clear()
      46              : {
      47            1 :     _endpoints.clear();
      48            1 :     _serviceId    = service_id::INVALID;
      49            1 :     _majorVersion = major_version::INVALID;
      50            1 :     _instanceId   = instance_id::ANY;
      51            1 :     _eventgroup   = eventgroup_id::ALL;
      52            1 : }
      53              : 
      54              : } // namespace someip
        

Generated by: LCOV version 2.0-1