|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Test fixture for cyclic controller protocol conformance. More...
Inheritance diagram for profinet::cyclic::CyclicControllerConformanceTest:
Collaboration diagram for profinet::cyclic::CyclicControllerConformanceTest:Protected Member Functions | |
| void | SetUp () override |
| void | InvokeTransition (profinet::cyclic::CyclicState state) |
| void | InvokeTxCycle () |
| void | InvokeProcessInputFrame (const Bytes &data) |
Static Protected Member Functions | |
| static profinet::rt::IOCRConfig | MakeInputIocr () |
| Construct the input IOCR used by the regression tests. | |
| static profinet::rt::IOCRConfig | MakeOutputIocr () |
| Construct the output IOCR used by the regression tests. | |
| static std::unique_ptr< profinet::cyclic::CyclicController > | MakeController () |
| Construct the cyclic controller under test. | |
| static profinet::Bytes | BuildInputFrame (bool vlan=false, std::uint8_t transferStatus=0, profinet::Bytes payload={}) |
| Build a device-to-controller cyclic RT Ethernet frame. | |
Protected Attributes | |
| std::unique_ptr< CyclicController > | controller |
| The controller under test used to verify the private functionality. | |
Test fixture for cyclic controller protocol conformance.
Provides a deterministic input and output IOCR configuration and helper functions for constructing cyclic RT Ethernet frames.
Definition at line 43 of file test_cyclicControllerConformance.cpp.
|
inlinestaticprotected |
Build a device-to-controller cyclic RT Ethernet frame.
Creates an input IOCR frame using FrameID 0xC001. A VLAN tag can be inserted to verify that the RT parser does not assume a fixed EtherType offset.
| vlan | Whether an 802.1Q priority tag is included. |
| transferStatus | TransferStatus byte to place in the RT header. |
| payload | RT payload. A default payload is generated when empty. |
Definition at line 148 of file test_cyclicControllerConformance.cpp.
|
inlineprotected |
Definition at line 61 of file test_cyclicControllerConformance.cpp.
References controller.
|
inlineprotected |
Definition at line 51 of file test_cyclicControllerConformance.cpp.
References controller.
|
inlineprotected |
Definition at line 56 of file test_cyclicControllerConformance.cpp.
References controller.
|
inlinestaticprotected |
Construct the cyclic controller under test.
Definition at line 124 of file test_cyclicControllerConformance.cpp.
References ioContext, MakeInputIocr(), and MakeOutputIocr().
Referenced by SetUp().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprotected |
Construct the input IOCR used by the regression tests.
Definition at line 72 of file test_cyclicControllerConformance.cpp.
References profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::frameId, profinet::rt::IOCR_TYPE_INPUT, profinet::rt::IOCRConfig::objects, profinet::rt::IOCRConfig::reductionRatio, profinet::rt::IOCRConfig::referenceIOCR, profinet::rt::IOCRConfig::sendClockFactor, profinet::rt::IODataObject::slot, profinet::rt::IOCRConfig::typeIOCR, and profinet::rt::IOCRConfig::watchdogFactor.
Referenced by MakeController().
Here is the caller graph for this function:
|
inlinestaticprotected |
Construct the output IOCR used by the regression tests.
Definition at line 97 of file test_cyclicControllerConformance.cpp.
References profinet::rt::IOCRConfig::dataLength, profinet::rt::IOCRConfig::frameId, profinet::rt::IOCR_TYPE_OUTPUT, profinet::rt::IOCRConfig::objects, profinet::rt::IOCRConfig::reductionRatio, profinet::rt::IOCRConfig::sendClockFactor, profinet::rt::IODataObject::slot, profinet::rt::IOCRConfig::typeIOCR, and profinet::rt::IOCRConfig::watchdogFactor.
Referenced by MakeController().
Here is the caller graph for this function:
|
inlineoverrideprotected |
Definition at line 46 of file test_cyclicControllerConformance.cpp.
References controller, and MakeController().
Here is the call graph for this function:
|
protected |
The controller under test used to verify the private functionality.
Definition at line 67 of file test_cyclicControllerConformance.cpp.
Referenced by InvokeProcessInputFrame(), InvokeTransition(), InvokeTxCycle(), and SetUp().