LCOV - code coverage report
Current view: top level - cpp2can/include/can/framemgmt - ICANFrameListener.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2025-01-20 13:53:09 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2024 Accenture.
       2             : 
       3             : /**
       4             :  * Contains interface ICANFrameListener.
       5             :  * \file ICANFrameListener.h
       6             :  * \ingroup framemgmt
       7             :  */
       8             : #ifndef GUARD_3991843A_AE0E_493A_8A61_E4A780891238
       9             : #define GUARD_3991843A_AE0E_493A_8A61_E4A780891238
      10             : 
      11             : #include <estd/forward_list.h>
      12             : 
      13             : namespace can
      14             : {
      15             : class CANFrame;
      16             : class IFilter;
      17             : 
      18             : /**
      19             :  * CANFrameListener interface
      20             :  *
      21             :  *
      22             :  * An ICANFrameListener subclass is a class interested in the reception
      23             :  * of CANFrames. Therefore it needs to register at an ICanTransceiver.
      24             :  */
      25             : class ICANFrameListener : public ::estd::forward_list_node<ICANFrameListener>
      26             : {
      27             : public:
      28             :     ICANFrameListener();
      29             :     ICANFrameListener(ICANFrameListener const&)            = delete;
      30             :     ICANFrameListener& operator=(ICANFrameListener const&) = delete;
      31             : 
      32             :     /**
      33             :      * This method notifies the listener of a CANFrame reception.
      34             :      */
      35             :     virtual void frameReceived(CANFrame const& canFrame) = 0;
      36             : 
      37             :     /**
      38             :      * Returns the ICANFrameListeners filter.
      39             :      */
      40             :     virtual IFilter& getFilter() = 0;
      41             : };
      42             : 
      43             : /*
      44             :  * inline implementation
      45             :  */
      46          17 : inline ICANFrameListener::ICANFrameListener() : ::estd::forward_list_node<ICANFrameListener>() {}
      47             : 
      48             : } // namespace can
      49             : 
      50             : #endif // GUARD_3991843A_AE0E_493A_8A61_E4A780891238

Generated by: LCOV version 1.14