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

            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 <etl/span.h>
      14              : 
      15              : namespace someip
      16              : {
      17              : class SdOptions
      18              : {
      19              : public:
      20              :     SdOptions() = default;
      21              : 
      22              :     bool init(::etl::span<uint8_t const> const& payload, size_t entriesLength);
      23              : 
      24              :     void readIndexValues(::etl::span<uint8_t const> const& entry);
      25              : 
      26              :     // for now makes these available
      27              :     ::etl::span<uint8_t const> getOptionsData() const;
      28              : 
      29              :     uint8_t getOptions1Index() const;
      30              :     uint8_t getOptions2Index() const;
      31              :     uint8_t getOptions1Num() const;
      32              :     uint8_t getOptions2Num() const;
      33              : 
      34              : private:
      35              :     ::etl::span<uint8_t const> _optionsData;
      36              : 
      37              :     uint8_t _options1Index = 0xFFU;
      38              :     uint8_t _options2Index = 0xFFU;
      39              :     uint8_t _options1Num   = 0xFFU;
      40              :     uint8_t _options2Num   = 0xFFU;
      41              : };
      42              : 
      43           22 : inline ::etl::span<uint8_t const> SdOptions::getOptionsData() const { return _optionsData; }
      44              : 
      45           26 : inline uint8_t SdOptions::getOptions1Index() const { return _options1Index; }
      46              : 
      47           25 : inline uint8_t SdOptions::getOptions2Index() const { return _options2Index; }
      48              : 
      49           26 : inline uint8_t SdOptions::getOptions1Num() const { return _options1Num; }
      50              : 
      51           25 : inline uint8_t SdOptions::getOptions2Num() const { return _options2Num; }
      52              : 
      53              : } // namespace someip
        

Generated by: LCOV version 2.0-1