|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Narrow private-access adapter used only by cyclic controller tests. More...
Collaboration diagram for profinet::cyclic::CyclicControllerTestAccess:Static Public Member Functions | |
| static void | SetState (CyclicController &controller, CyclicState value) |
| Set the controller state without starting worker threads. | |
| static void | SetRunning (CyclicController &controller, bool value) |
| Set the controller worker running flag. | |
| static void | SetTxSock (CyclicController &controller, std::unique_ptr< IRawEthernetSocket > txSock) |
| Set the controller txSock. | |
| static void | SetRxSock (CyclicController &controller, std::unique_ptr< IRawEthernetSocket > rxSock) |
| Set the controller rxSock. | |
| static void | Transition (CyclicController &controller, CyclicState value) |
| Invoke the private transition implementation. | |
| static void | TxCycle (CyclicController &controller) |
| Invoke one TX cycle synchronously. | |
| static void | TxLoop (CyclicController &controller) |
| Invoke the private TX worker loop synchronously. | |
| static void | SendOutputFrame (CyclicController &controller, std::optional< std::uint8_t > dataStatusOverride=std::nullopt) |
| Invoke output frame generation. | |
| static void | SendStopFrames (CyclicController &controller) |
| Invoke cyclic stop-frame generation. | |
| static void | ProcessInputFrame (CyclicController &controller, const Bytes &data) |
| Invoke input Ethernet-frame processing. | |
| static void | HandleWatchdogTimeout (CyclicController &controller) |
| Invoke watchdog timeout handling. | |
| static void | RxLoop (CyclicController &controller) |
| Invoke the receive loop synchronously. | |
| static void | TrackCycleCounter (CyclicController &controller, std::uint16_t cycleCounter) |
| Invoke cycle-counter tracking. | |
| static void | SetMaxConsecutiveTimeouts (CyclicController &controller, int value) |
| Set the watchdog fault threshold. | |
| static void | SetIocsGood (CyclicController &controller, bool value) |
| Set the IOCS-good bookkeeping state. | |
| static void | SetAllOutputIocs (CyclicController &controller, std::uint8_t status) |
| Set the IOCS value for every configured output object. | |
| static bool | IocsGood (const CyclicController &controller) |
| Read the IOCS-good bookkeeping state. | |
| static void | SwapOutputBuilder (CyclicController &controller) |
| Promote the output write buffer to the send buffer. | |
| static std::uint8_t | FirstOutputByte (const CyclicController &controller) |
| Return the first byte of the output payload. | |
| static void | SetRxCounterStep (CyclicController &controller, std::uint32_t value) |
| Set the RX cycle-counter step. | |
| static rt::IODataObject & | InputObject (CyclicController &controller, std::size_t index) |
| Return an input IO object for malformed-frame setup. | |
| static void | ResetTxSocket (CyclicController &controller) |
| Reset the injected TX socket. | |
| static void | ResetRxSocket (CyclicController &controller) |
| Reset the injected RX socket. | |
| static CyclicStats & | Stats (CyclicController &controller) |
| Return the controller statistics object for targeted setup. | |
| static std::uint8_t | FirstOutputIocs (const CyclicController &controller) |
| Return the IOCS value of the first configured output object. | |
Narrow private-access adapter used only by cyclic controller tests.
The adapter provides one controlled test seam instead of adding a separate friend declaration for every test fixture.
Definition at line 117 of file test_cyclicMore.cpp.
|
inlinestatic |
Return the first byte of the output payload.
| controller | Controller under test. |
Definition at line 263 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Return the IOCS value of the first configured output object.
| controller | Controller under test. |
Definition at line 311 of file test_cyclicMore.cpp.
References controller, and frame.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke watchdog timeout handling.
| controller | Controller under test. |
Definition at line 200 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Return an input IO object for malformed-frame setup.
| controller | Controller under test. |
| index | Zero-based IO object index. |
Definition at line 280 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Read the IOCS-good bookkeeping state.
| controller | Controller under test. |
Definition at line 247 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke input Ethernet-frame processing.
| controller | Controller under test. |
| data | Ethernet frame bytes. |
Definition at line 193 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::CyclicDataTests::DeliverInput(), profinet::cyclic::CyclicCallbackTests::DeliverInput(), profinet::cyclic::CyclicFrameTests::ProcessCounter(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Reset the injected RX socket.
| controller | Controller under test. |
Definition at line 294 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Reset the injected TX socket.
| controller | Controller under test. |
Definition at line 287 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke the receive loop synchronously.
| controller | Controller under test. |
Definition at line 207 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke output frame generation.
| controller | Controller under test. |
| dataStatusOverride | Optional DataStatus override. |
Definition at line 177 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke cyclic stop-frame generation.
| controller | Controller under test. |
Definition at line 185 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Set the IOCS value for every configured output object.
| controller | Controller under test. |
| status | IOCS value to write. |
Definition at line 240 of file test_cyclicMore.cpp.
References controller.
|
inlinestatic |
Set the IOCS-good bookkeeping state.
| controller | Controller under test. |
| value | Whether IOCS is currently considered good. |
Definition at line 231 of file test_cyclicMore.cpp.
References controller.
|
inlinestatic |
Set the watchdog fault threshold.
| controller | Controller under test. |
| value | Maximum consecutive watchdog timeouts. |
Definition at line 223 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Set the controller worker running flag.
| controller | Controller under test. |
| value | New running flag. |
Definition at line 131 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Set the RX cycle-counter step.
| controller | Controller under test. |
| value | Counter increment. |
Definition at line 271 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Set the controller rxSock.
| controller | Controller under test. |
| rxSock | New rxSock for testing. |
Definition at line 147 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::CyclicWatchdogTests::SetUp().
Here is the caller graph for this function:
|
inlinestatic |
Set the controller state without starting worker threads.
| controller | Controller under test. |
| value | New controller state. |
Definition at line 123 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::CyclicWatchdogTests::SetUp(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Set the controller txSock.
| controller | Controller under test. |
| txSock | New txSock for testing. |
Definition at line 139 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::CyclicTxTests::SetUp(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Return the controller statistics object for targeted setup.
| controller | Controller under test. |
Definition at line 302 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Promote the output write buffer to the send buffer.
| controller | Controller under test. |
Definition at line 255 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke cycle-counter tracking.
| controller | Controller under test. |
| cycleCounter | Received cycle counter. |
Definition at line 215 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke the private transition implementation.
| controller | Controller under test. |
| value | New controller state. |
Definition at line 155 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke one TX cycle synchronously.
| controller | Controller under test. |
Definition at line 162 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F(), and profinet::cyclic::TEST_F().
Here is the caller graph for this function:
|
inlinestatic |
Invoke the private TX worker loop synchronously.
| controller | Controller under test. |
Definition at line 169 of file test_cyclicMore.cpp.
References controller.
Referenced by profinet::cyclic::TEST_F().
Here is the caller graph for this function: