PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::cyclic::CyclicTest Class Reference
+ Inheritance diagram for profinet::cyclic::CyclicTest:
+ Collaboration diagram for profinet::cyclic::CyclicTest:

Protected Member Functions

void SetUp () override
 
void StartControllerWithBlockedReceive ()
 Start the controller with an injected RX socket that blocks in Receive().
 
bool RxThreadJoinableForTest ()
 Return whether the RX worker thread is still joinable.
 

Static Protected Member Functions

static rt::IOCRConfig MakeConfig (std::uint16_t sendClockFactor, std::uint16_t reductionRatio, std::uint16_t frameId)
 
static std::unique_ptr< CyclicController > MakeController ()
 

Protected Attributes

std::unique_ptr< CyclicController > controller
 

Detailed Description

Definition at line 58 of file test_cyclic.cpp.

Member Function Documentation

◆ MakeConfig()

static rt::IOCRConfig profinet::cyclic::CyclicTest::MakeConfig ( std::uint16_t  sendClockFactor,
std::uint16_t  reductionRatio,
std::uint16_t  frameId 
)
inlinestaticprotected

Definition at line 66 of file test_cyclic.cpp.

References profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::frameId, frameId, profinet::rt::IOCRConfig::reductionRatio, and profinet::rt::IOCRConfig::sendClockFactor.

Referenced by MakeController(), and StartControllerWithBlockedReceive().

+ Here is the caller graph for this function:

◆ MakeController()

static std::unique_ptr< CyclicController > profinet::cyclic::CyclicTest::MakeController ( )
inlinestaticprotected

Definition at line 76 of file test_cyclic.cpp.

References ioContext, MakeConfig(), and profinet::String2Mac().

Referenced by SetUp().

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

◆ RxThreadJoinableForTest()

bool profinet::cyclic::CyclicTest::RxThreadJoinableForTest ( )
inlineprotected

Return whether the RX worker thread is still joinable.

Check whether the RX worker thread is joinable.

Parameters
controllerController under test.
Returns
True while the RX worker owns a joinable std::thread.

Definition at line 119 of file test_cyclic.cpp.

References controller.

◆ SetUp()

void profinet::cyclic::CyclicTest::SetUp ( )
inlineoverrideprotected

Definition at line 61 of file test_cyclic.cpp.

References controller, and MakeController().

+ Here is the call graph for this function:

◆ StartControllerWithBlockedReceive()

void profinet::cyclic::CyclicTest::StartControllerWithBlockedReceive ( )
inlineprotected

Start the controller with an injected RX socket that blocks in Receive().

Definition at line 86 of file test_cyclic.cpp.

References controller, profinet::cyclic::DEFAULT_MAX_CONSECUTIVE_TIMEOUTS, profinet::rt::ETHERTYPE_PROFINET, ioContext, MakeConfig(), rxSocket, and profinet::String2Mac().

+ Here is the call graph for this function:

Member Data Documentation

◆ controller

std::unique_ptr<CyclicController> profinet::cyclic::CyclicTest::controller
protected

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