distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep Class Reference

test step for thread sleep More...

Inheritance diagram for distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep:
[legend]
Collaboration diagram for distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep:
[legend]

Public Types

enum  Type : uint8_t { Type::sleepFor, Type::sleepUntil }
 type of sleep test step More...
 

Public Member Functions

constexpr SleepTestStep (const Type type)
 SleepTestStep's constructor. More...
 
- Public Member Functions inherited from distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::TestStep
constexpr TestStep (const uint8_t totalSequencePoints, const uint8_t expectedContextSwitchCount, const uint8_t signalingThreadSequencePoint1, const uint8_t signalHandlerSequencePoint, const uint8_t joinSequencePoint, const uint8_t signalingThreadSequencePoint2)
 TestStep's constructor. More...
 
virtual ~TestStep ()
 TestStep's virtual destructor. More...
 
bool run (SequenceAsserter &sequenceAsserter)
 Runs test step. More...
 
std::pair< uint8_t, uint8_t > getParameters () const
 Gets execution parameters of test step. More...
 

Private Member Functions

bool block () override
 Executes the action that will block current thread. More...
 

Private Attributes

Type type_
 type of test step More...
 

Detailed Description

test step for thread sleep

Member Enumeration Documentation

◆ Type

enum distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep::Type : uint8_t
strong

type of sleep test step

Enumerator
sleepFor 

uses ThisThread::sleepFor()

sleepUntil 

uses ThisThread::sleepUntil()

Constructor & Destructor Documentation

◆ SleepTestStep()

constexpr distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep::SleepTestStep ( const Type  type)
inlineexplicit

SleepTestStep's constructor.

Parameters
[in]typeis the type of test step

Member Function Documentation

◆ block()

bool distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep::block ( )
inlineoverrideprivatevirtual

Executes the action that will block current thread.

Calls ThisThread::sleepFor() or ThisThread::sleepUntil() - depending on the type of test step - and ensures that the function returns with EINTR error code.

Returns
true if execution of blocking action succeeded, false otherwise

Implements distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::TestStep.

Here is the call graph for this function:

Member Data Documentation

◆ type_

Type distortos::test::anonymous_namespace{SignalsInterruptionTestCase.cpp}::SleepTestStep::type_
private

type of test step


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