distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::test::SignalsTestCaseCommon Class Reference

SignalsTestCaseCommon class is a TestCase with initialization and finalization steps required for signals. More...

#include <SignalsTestCaseCommon.hpp>

Inheritance diagram for distortos::test::SignalsTestCaseCommon:
[legend]
Collaboration diagram for distortos::test::SignalsTestCaseCommon:
[legend]

Public Member Functions

constexpr SignalsTestCaseCommon (const uint8_t priority, const SignalSet signalMask, const SignalAction signalAction)
 SignalsTestCaseCommon's constructor. More...
 
- Public Member Functions inherited from distortos::test::PrioritizedTestCase
constexpr PrioritizedTestCase (const uint8_t priority)
 PrioritizedTestCase's constructor. More...
 
- Public Member Functions inherited from distortos::test::TestCase
bool run () const
 Public function to start the test case. More...
 

Protected Member Functions

bool finalize () const override
 Finalizes the test case. More...
 
bool initialize () const override
 Initializes the test case. More...
 
- Protected Member Functions inherited from distortos::test::TestCaseCommon
bool finalize () const override
 Finalizes the test case. More...
 
bool initialize () const override
 Initializes the test case. More...
 

Private Attributes

SignalAction signalAction_
 SignalAction that will be associated with all signal numbers. More...
 
SignalSet signalMask_
 SignalSet with signal mask for test case. More...
 

Detailed Description

SignalsTestCaseCommon class is a TestCase with initialization and finalization steps required for signals.

During initialization:

  • configured priority is set;
  • configured signal action is set for all signal numbers;
  • configured signal mask is set;

During finalization:

  • empty signal mask is restored;
  • default signal actions are restored for all signal numbers;
  • original priority of main test thread is restored;

Constructor & Destructor Documentation

◆ SignalsTestCaseCommon()

constexpr distortos::test::SignalsTestCaseCommon::SignalsTestCaseCommon ( const uint8_t  priority,
const SignalSet  signalMask,
const SignalAction  signalAction 
)
inline

SignalsTestCaseCommon's constructor.

Parameters
[in]priorityis the priority at which test case will be executed
[in]signalMaskis the SignalSet with signal mask for test case
[in]signalActionis the SignalAction that will be associated with all signal numbers
Here is the call graph for this function:

Member Function Documentation

◆ finalize()

bool distortos::test::SignalsTestCaseCommon::finalize ( ) const
overrideprotectedvirtual

Finalizes the test case.

Restores empty signal mask, restores default signal actions for all signal numbers and calls PrioritizedTestCase::finalize().

Returns
true if finalization succeeded, false otherwise

Reimplemented from distortos::test::PrioritizedTestCase.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

bool distortos::test::SignalsTestCaseCommon::initialize ( ) const
overrideprotectedvirtual

Initializes the test case.

Calls PrioritizedTestCase::initialize(), sets configured signal action for all signal numbers and sets configured signal mask.

Returns
true if initialization succeeded, false otherwise

Reimplemented from distortos::test::PrioritizedTestCase.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ signalAction_

SignalAction distortos::test::SignalsTestCaseCommon::signalAction_
private

SignalAction that will be associated with all signal numbers.

◆ signalMask_

SignalSet distortos::test::SignalsTestCaseCommon::signalMask_
private

SignalSet with signal mask for test case.


The documentation for this class was generated from the following files: