LCOV - code coverage report
Current view: top level - fsfw/datapool - PoolEntryIF.h (source / functions) Hit Total Coverage
Test: fsfw-tests_coverage.info Lines: 1 1 100.0 %
Date: 2023-12-12 13:11:03 Functions: 1 2 50.0 %

          Line data    Source code
       1             : #ifndef FSFW_DATAPOOL_POOLENTRYIF_H_
       2             : #define FSFW_DATAPOOL_POOLENTRYIF_H_
       3             : 
       4             : #include <cstdint>
       5             : 
       6             : #include "../globalfunctions/Type.h"
       7             : 
       8             : /**
       9             :  * @brief       This interface defines the access possibilities to a
      10             :  *                      single data pool entry.
      11             :  * @details
      12             :  * The interface provides methods to determine the size and the validity
      13             :  * information of a value. It also defines a method to receive a pointer to the
      14             :  * raw data content. It is mainly used by DataPool itself, but also as a
      15             :  * return pointer.
      16             :  *
      17             :  * @author      Bastian Baetz
      18             :  * @ingroup data_pool
      19             :  *
      20             :  */
      21             : class PoolEntryIF {
      22             :  public:
      23             :   /**
      24             :    * @brief     This is an empty virtual destructor,
      25             :    *                    as it is required for C++ interfaces.
      26             :    */
      27          63 :   virtual ~PoolEntryIF() {}
      28             :   /**
      29             :    * @brief     getSize returns the array size of the entry.
      30             :    *                    A single variable parameter has size 1.
      31             :    */
      32             :   virtual uint8_t getSize() = 0;
      33             :   /**
      34             :    * @brief     This operation returns the size in bytes, which is calculated by
      35             :    *                    sizeof(type) * array_size.
      36             :    */
      37             :   virtual uint16_t getByteSize() = 0;
      38             :   /**
      39             :    * @brief     This operation returns a the address pointer casted to void*.
      40             :    */
      41             :   virtual void* getRawData() = 0;
      42             :   /**
      43             :    * @brief     This method allows to set the valid information of the pool entry.
      44             :    */
      45             :   virtual void setValid(bool isValid) = 0;
      46             :   /**
      47             :    * @brief     This method allows to set the valid information of the pool entry.
      48             :    */
      49             :   virtual bool getValid() = 0;
      50             :   /**
      51             :    * @brief     This is a debug method that prints all values and the valid
      52             :    *                    information to the screen. It prints all array entries in a row.
      53             :    * @details
      54             :    * Also displays whether the pool entry is valid or invalid.
      55             :    */
      56             :   virtual void print() = 0;
      57             :   /**
      58             :    * Returns the type of the entry.
      59             :    */
      60             :   virtual Type getType() = 0;
      61             : };
      62             : 
      63             : #endif /* FSFW_DATAPOOL_POOLENTRYIF_H_ */

Generated by: LCOV version 1.14

Impressum Datenschutz