|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Namespaces | |
| namespace | test |
Classes | |
| class | CyclicCallbackTests |
| Fixture for input callbacks. More... | |
| class | CyclicController |
| RT_CLASS_1 cyclic data exchange controller. More... | |
| class | CyclicControllerConformanceTest |
| Test fixture for cyclic controller protocol conformance. More... | |
| class | CyclicControllerTestAccess |
| Narrow private-access adapter used only by cyclic controller tests. More... | |
| class | CyclicDataTests |
| Fixture for input data and status access. More... | |
| class | CyclicFrameTests |
| Fixture for input Ethernet parsing and cycle-counter tracking. More... | |
| class | CyclicStateTests |
| Fixture for state-transition and lifecycle behavior. More... | |
| struct | CyclicStats |
| Statistics for cyclic communication. More... | |
| struct | CyclicStatsSnapshot |
| Copyable snapshot of cyclic communication statistics. More... | |
| class | CyclicStatsTests |
| Fixture for statistics and snapshots. More... | |
| class | CyclicTest |
| class | CyclicTxTests |
| Fixture for TX behavior and generated frame validation. More... | |
| class | CyclicWatchdogTests |
| Fixture for watchdog and RX-loop behavior. More... | |
| class | ICyclicController |
| Abstract interface for controlling cyclic PROFINET communication. More... | |
| class | MockCyclicController |
| Google Mock implementation of ICyclicController. More... | |
| class | ReceivedIopsTest |
| Test fixture for received cyclic input IOPS behavior. More... | |
Enumerations | |
| enum class | CyclicState { Idle , Starting , Running , Stopping , Stopped , Fault } |
| Lifecycle state of a CyclicController. More... | |
Functions | |
| std::string | ToString (CyclicState state) |
| Human-readable name for a CyclicState value. | |
| TEST_F (CyclicTest, CyclicStateToStringCoversAllStates) | |
| TEST_F (CyclicTest, CyclicStatsResetRestoresInitialValues) | |
| TEST_F (CyclicTest, CyclicControllerRejectsNegativeMaxConsecutiveTimeouts) | |
| TEST_F (CyclicTest, CyclicControllerRejectsSub1msCycleTime) | |
| TEST_F (CyclicTest, CyclicControllerConstructsWithSafeCycleTime) | |
| TEST_F (CyclicControllerConformanceTest, UntaggedInputFrameIsAccepted) | |
| TEST_F (CyclicControllerConformanceTest, VlanTaggedInputFrameIsAccepted) | |
| TEST_F (CyclicControllerConformanceTest, NonZeroTransferStatusIsRejected) | |
| TEST_F (CyclicControllerConformanceTest, TxContinuesWhileControllerIsInFault) | |
| TEST_F (CyclicStateTests, StopDoesNotDestroyRxSocketBeforeRxThreadExits) | |
| TEST_F (CyclicStateTests, StopIsIdempotent) | |
| TEST_F (CyclicStateTests, CanStartAgainAfterStop) | |
| TEST_F (CyclicStateTests, ToStringReturnsUnknownForInvalidValue) | |
| TEST_F (CyclicStateTests, TransitionCallsCallbackForStateChange) | |
| TEST_F (CyclicStateTests, TransitionSkipsCallbackForSameState) | |
| TEST_F (CyclicStateTests, TransitionSwallowsCallbackException) | |
| TEST_F (CyclicStateTests, StartRejectsInvalidStartingStates) | |
| TEST_F (CyclicStateTests, StartAcceptsFaultState) | |
| TEST_F (CyclicStateTests, StartAcceptsStoppedState) | |
| TEST_F (CyclicStateTests, StopDoesNothingWhenNotRunning) | |
| TEST_F (CyclicStateTests, StartAndStopCompleteNormalLifecycle) | |
| TEST_F (CyclicStateTests, FailedStartLeavesStoppedState) | |
| TEST_F (CyclicStateTests, FailedStartCanBeRetried) | |
| TEST_F (CyclicStatsTests, AverageCycleTimeReturnsIntegerAverage) | |
| TEST_F (CyclicStatsTests, AverageCycleTimeReturnsZeroWhenNoCycles) | |
| TEST_F (CyclicStatsTests, SnapshotAverageCycleTimeReturnsZeroWhenNoCycles) | |
| TEST_F (CyclicStatsTests, StatsSnapshotCopiesAllFields) | |
| TEST_F (CyclicStatsTests, ResetRestoresInitialValues) | |
| TEST_F (CyclicDataTests, GetInputDataReturnsNulloptForUnknownObject) | |
| TEST_F (CyclicDataTests, GetInputDataReturnsGoodInput) | |
| TEST_F (CyclicDataTests, GetInputDataRejectsBadInputByDefault) | |
| TEST_F (CyclicDataTests, GetInputStatusReturnsNulloptForUnknownObject) | |
| TEST_F (CyclicDataTests, GetInputStatusReturnsReceivedIops) | |
| TEST_F (CyclicDataTests, IsInputGoodReturnsFalseForUnknownObject) | |
| TEST_F (CyclicDataTests, IsInputGoodReturnsTrueForGoodInput) | |
| TEST_F (CyclicDataTests, IsInputGoodReturnsFalseForBadInput) | |
| TEST_F (CyclicDataTests, SetOutputDataAcceptsIdleState) | |
| TEST_F (CyclicDataTests, SetOutputDataRejectsStoppedState) | |
| TEST_F (CyclicDataTests, SetOutputDataRejectsFaultState) | |
| TEST_F (CyclicCallbackTests, InputStatusCallbackRunsOnGoodTransition) | |
| TEST_F (CyclicCallbackTests, InputStatusCallbackSkipsUnchangedStatus) | |
| TEST_F (CyclicCallbackTests, InputStatusCallbackRunsOnBadTransition) | |
| TEST_F (CyclicCallbackTests, InputStatusCallbackSwallowsException) | |
| TEST_F (CyclicCallbackTests, InputDataCallbackRunsForGoodInput) | |
| TEST_F (CyclicCallbackTests, InputDataCallbackSkipsBadInput) | |
| TEST_F (CyclicCallbackTests, InputDataCallbackSkipsEmptyData) | |
| TEST_F (CyclicCallbackTests, InputDataCallbackSwallowsException) | |
| TEST_F (CyclicCallbackTests, TimeoutAndErrorCallbacksCanBeRegistered) | |
| TEST_F (CyclicFrameTests, RejectsTooShortEthernetFrame) | |
| TEST_F (CyclicFrameTests, RejectsUnexpectedEtherType) | |
| TEST_F (CyclicFrameTests, RejectsUnexpectedSourceMac) | |
| TEST_F (CyclicFrameTests, RejectsMalformedRtFrame) | |
| TEST_F (CyclicFrameTests, RejectsUnexpectedFrameId) | |
| TEST_F (CyclicFrameTests, AcceptsVlanTaggedInputFrame) | |
| TEST_F (CyclicFrameTests, RejectsInvalidDataStatus) | |
| TEST_F (CyclicFrameTests, RejectsNonZeroTransferStatus) | |
| TEST_F (CyclicFrameTests, DISABLED_ValidInputRestoresIocsGoodState) | |
| TEST_F (CyclicFrameTests, SkipsObjectWithInvalidIopsOffset) | |
| TEST_F (CyclicFrameTests, SkipsObjectWithInvalidDataRange) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterInitializesOnFirstFrame) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterCountsDuplicate) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterAcceptsExpectedStep) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterCountsForwardGap) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterCountsOutOfOrder) | |
| TEST_F (CyclicFrameTests, TrackCycleCounterHandlesZeroStep) | |
| TEST_F (CyclicWatchdogTests, WatchdogTimeoutUpdatesStatistics) | |
| TEST_F (CyclicWatchdogTests, MonitoringOnlyWatchdogKeepsIocsGood) | |
| TEST_F (CyclicWatchdogTests, WatchdogFaultsAtConfiguredThreshold) | |
| TEST_F (CyclicWatchdogTests, WatchdogDoesNotTransitionWhenAlreadyFaulted) | |
| TEST_F (CyclicWatchdogTests, TimeoutCallbackSwallowsException) | |
| TEST_F (CyclicWatchdogTests, WatchdogDoesNotRepeatBadTransition) | |
| TEST_F (CyclicWatchdogTests, RxLoopProcessesValidFrame) | |
| TEST_F (CyclicWatchdogTests, RxLoopStopsWithoutSocket) | |
| TEST_F (CyclicWatchdogTests, RxLoopReportsSocketException) | |
| TEST_F (CyclicWatchdogTests, RxLoopHandlesWatchdogTimeout) | |
| TEST_F (CyclicTxTests, TxLoopRecordsCycleTiming) | |
| TEST_F (CyclicTxTests, TxCycleSendsFrameAndUpdatesStatistics) | |
| TEST_F (CyclicTxTests, TxCycleSendsInFault) | |
| TEST_F (CyclicTxTests, SendOutputFrameWithoutSocketDoesNotThrow) | |
| TEST_F (CyclicTxTests, SendOutputFrameReportsSocketError) | |
| TEST_F (CyclicTxTests, SendOutputFrameUsesDataStatusOverride) | |
| TEST_F (CyclicTxTests, SendStopFramesGeneratesStopFrameCount) | |
| TEST_F (CyclicTxTests, SendStopFramesWithoutSocketDoesNothing) | |
| TEST_F (CyclicTxTests, SendStopFramesStopsAfterSendErrorCallbackThrows) | |
| TEST_F (CyclicTxTests, SetOutputDataIsReflectedInTransmittedFrame) | |
| TEST_F (CyclicStateTests, CallbackCanBeReplacedWhileRunning) | |
| TEST_F (CyclicStateTests, ClearedCallbackIsNotInvoked) | |
| TEST_F (CyclicStateTests, CallbackMayRequestStopWithoutDeadlock) | |
| TEST_F (ReceivedIopsTest, GoodIopsDeliversInputData) | |
| TEST_F (ReceivedIopsTest, DISABLED_BadIopsWithholdsStaleInputData) | |
| TEST_F (ReceivedIopsTest, StatusCallbackFiresOnlyOnTransitions) | |
| TEST_F (ReceivedIopsTest, InputCallbackSkipsBadData) | |
| TEST_F (ReceivedIopsTest, DISABLED_LowerIopsBitsDoNotAffectGoodState) | |
Variables | |
| constexpr int | MIN_CYCLE_MS = 8 |
| Minimum cycle time (ms) considered reliable. | |
| constexpr int | RECOMMENDED_CYCLE_MS = 32 |
| Recommended cycle time (ms). | |
| constexpr int | DEFAULT_MAX_CONSECUTIVE_TIMEOUTS = 3 |
| Default number of consecutive watchdog timeouts before transitioning to Fault. | |
| constexpr int | STOP_FRAME_COUNT = 3 |
| Number of STOP frames sent during a graceful Stop(). | |
|
strong |
Lifecycle state of a CyclicController.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputDataCallbackRunsForGoodInput | |||
| ) |
Definition at line 909 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputDataCallbackSkipsBadInput | |||
| ) |
Definition at line 926 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_BAD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputDataCallbackSkipsEmptyData | |||
| ) |
Definition at line 940 of file test_cyclicMore.cpp.
References controller, profinet::rt::IODataObject::dataLength, profinet::cyclic::CyclicControllerTestAccess::InputObject(), and profinet::rt::IOXS_GOOD.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputDataCallbackSwallowsException | |||
| ) |
Definition at line 955 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputStatusCallbackRunsOnBadTransition | |||
| ) |
Definition at line 878 of file test_cyclicMore.cpp.
References controller, profinet::rt::IOXS_BAD, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputStatusCallbackRunsOnGoodTransition | |||
| ) |
Definition at line 846 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputStatusCallbackSkipsUnchangedStatus | |||
| ) |
Definition at line 863 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| InputStatusCallbackSwallowsException | |||
| ) |
Definition at line 897 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicCallbackTests | , |
| TimeoutAndErrorCallbacksCanBeRegistered | |||
| ) |
Definition at line 967 of file test_cyclicMore.cpp.
References controller, ioContext, profinet::kInputFrameId, and profinet::kOutputFrameId.
| profinet::cyclic::TEST_F | ( | CyclicControllerConformanceTest | , |
| NonZeroTransferStatusIsRejected | |||
| ) |
TransferStatus must be validated independently of DataStatus. A cyclic frame with a non-zero TransferStatus must not be delivered as valid input.
Definition at line 223 of file test_cyclicControllerConformance.cpp.
References controller, and Running.
| profinet::cyclic::TEST_F | ( | CyclicControllerConformanceTest | , |
| TxContinuesWhileControllerIsInFault | |||
| ) |
The controller must continue transmitting cyclic output frames while in FAULT. Stopping transmission would allow the device Data Hold Timer to expire and may terminate the Application Relationship.
IOCS is already reported as BAD in FAULT, so continuing transmission does not imply that the output data is valid.
Definition at line 241 of file test_cyclicControllerConformance.cpp.
References controller, and Fault.
| profinet::cyclic::TEST_F | ( | CyclicControllerConformanceTest | , |
| UntaggedInputFrameIsAccepted | |||
| ) |
Definition at line 189 of file test_cyclicControllerConformance.cpp.
References controller, and Running.
| profinet::cyclic::TEST_F | ( | CyclicControllerConformanceTest | , |
| VlanTaggedInputFrameIsAccepted | |||
| ) |
Definition at line 204 of file test_cyclicControllerConformance.cpp.
References controller, and Running.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| GetInputDataRejectsBadInputByDefault | |||
| ) |
Definition at line 749 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_BAD.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| GetInputDataReturnsGoodInput | |||
| ) |
Definition at line 739 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| GetInputDataReturnsNulloptForUnknownObject | |||
| ) |
Definition at line 733 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| GetInputStatusReturnsNulloptForUnknownObject | |||
| ) |
Definition at line 758 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| GetInputStatusReturnsReceivedIops | |||
| ) |
Definition at line 764 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| IsInputGoodReturnsFalseForBadInput | |||
| ) |
Definition at line 786 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_BAD.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| IsInputGoodReturnsFalseForUnknownObject | |||
| ) |
Definition at line 773 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| IsInputGoodReturnsTrueForGoodInput | |||
| ) |
Definition at line 779 of file test_cyclicMore.cpp.
References controller, and profinet::rt::IOXS_GOOD.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| SetOutputDataAcceptsIdleState | |||
| ) |
Definition at line 793 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| SetOutputDataRejectsFaultState | |||
| ) |
Definition at line 806 of file test_cyclicMore.cpp.
References controller, Fault, and profinet::cyclic::CyclicControllerTestAccess::SetState().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicDataTests | , |
| SetOutputDataRejectsStoppedState | |||
| ) |
Definition at line 799 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::SetState(), and Stopped.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| AcceptsVlanTaggedInputFrame | |||
| ) |
Definition at line 1066 of file test_cyclicMore.cpp.
References controller, frame, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| DISABLED_ValidInputRestoresIocsGoodState | |||
| ) |
Definition at line 1108 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::FirstOutputIocs(), profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), profinet::cyclic::CyclicControllerTestAccess::IocsGood(), profinet::rt::IOXS_BAD, profinet::rt::IOXS_GOOD, profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame(), and profinet::cyclic::CyclicControllerTestAccess::SwapOutputBuilder().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsInvalidDataStatus | |||
| ) |
Definition at line 1086 of file test_cyclicMore.cpp.
References controller, profinet::kInputFrameId, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsMalformedRtFrame | |||
| ) |
Definition at line 1044 of file test_cyclicMore.cpp.
References controller, frame, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsNonZeroTransferStatus | |||
| ) |
Definition at line 1097 of file test_cyclicMore.cpp.
References controller, profinet::rt::RTFrame::DATA_RUN, profinet::rt::RTFrame::DATA_VALID, profinet::kInputFrameId, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsTooShortEthernetFrame | |||
| ) |
Definition at line 1016 of file test_cyclicMore.cpp.
References controller, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsUnexpectedEtherType | |||
| ) |
Definition at line 1023 of file test_cyclicMore.cpp.
References controller, frame, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsUnexpectedFrameId | |||
| ) |
Definition at line 1058 of file test_cyclicMore.cpp.
References controller, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| RejectsUnexpectedSourceMac | |||
| ) |
Definition at line 1034 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| SkipsObjectWithInvalidDataRange | |||
| ) |
Definition at line 1139 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::InputObject(), and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| SkipsObjectWithInvalidIopsOffset | |||
| ) |
Definition at line 1128 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::InputObject(), profinet::rt::IODataObject::offsetIOPS, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterAcceptsExpectedStep | |||
| ) |
Definition at line 1168 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterCountsDuplicate | |||
| ) |
Definition at line 1160 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterCountsForwardGap | |||
| ) |
Definition at line 1179 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterCountsOutOfOrder | |||
| ) |
Definition at line 1187 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterHandlesZeroStep | |||
| ) |
Definition at line 1195 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::SetRxCounterStep(), and profinet::cyclic::CyclicControllerTestAccess::TrackCycleCounter().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicFrameTests | , |
| TrackCycleCounterInitializesOnFirstFrame | |||
| ) |
Definition at line 1153 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| CallbackCanBeReplacedWhileRunning | |||
| ) |
Definition at line 1557 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| CallbackMayRequestStopWithoutDeadlock | |||
| ) |
Definition at line 1578 of file test_cyclicMore.cpp.
References controller, and profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| CanStartAgainAfterStop | |||
| ) |
Definition at line 433 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| ClearedCallbackIsNotInvoked | |||
| ) |
Definition at line 1568 of file test_cyclicMore.cpp.
References controller, and profinet::cyclic::CyclicControllerTestAccess::ProcessInputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| FailedStartCanBeRetried | |||
| ) |
Definition at line 570 of file test_cyclicMore.cpp.
References controller, Running, and rx.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| FailedStartLeavesStoppedState | |||
| ) |
Definition at line 558 of file test_cyclicMore.cpp.
References controller, Fault, and rx.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StartAcceptsFaultState | |||
| ) |
Definition at line 514 of file test_cyclicMore.cpp.
References controller, Fault, Running, profinet::cyclic::CyclicControllerTestAccess::SetRunning(), profinet::cyclic::CyclicControllerTestAccess::SetState(), and Stopped.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StartAcceptsStoppedState | |||
| ) |
Definition at line 528 of file test_cyclicMore.cpp.
References controller, Running, profinet::cyclic::CyclicControllerTestAccess::SetRunning(), profinet::cyclic::CyclicControllerTestAccess::SetState(), and Stopped.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StartAndStopCompleteNormalLifecycle | |||
| ) |
Definition at line 547 of file test_cyclicMore.cpp.
References controller, Running, and Stopped.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StartRejectsInvalidStartingStates | |||
| ) |
Definition at line 500 of file test_cyclicMore.cpp.
References controller, Running, profinet::cyclic::CyclicControllerTestAccess::SetRunning(), profinet::cyclic::CyclicControllerTestAccess::SetState(), Starting, and Stopping.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StopDoesNotDestroyRxSocketBeforeRxThreadExits | |||
| ) |
rxSocketPtr->WaitUntilReceiveEntered();
Definition at line 350 of file test_cyclicMore.cpp.
References controller, DEFAULT_MAX_CONSECUTIVE_TIMEOUTS, ioContext, profinet::kInputFrameId, profinet::kOutputFrameId, rxSocket, and txSocket.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StopDoesNothingWhenNotRunning | |||
| ) |
Definition at line 540 of file test_cyclicMore.cpp.
References controller, and Idle.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| StopIsIdempotent | |||
| ) |
Definition at line 426 of file test_cyclicMore.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| ToStringReturnsUnknownForInvalidValue | |||
| ) |
Definition at line 445 of file test_cyclicMore.cpp.
References ToString().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| TransitionCallsCallbackForStateChange | |||
| ) |
Definition at line 452 of file test_cyclicMore.cpp.
References controller, Idle, Starting, and profinet::cyclic::CyclicControllerTestAccess::Transition().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| TransitionSkipsCallbackForSameState | |||
| ) |
Definition at line 473 of file test_cyclicMore.cpp.
References controller, Idle, and profinet::cyclic::CyclicControllerTestAccess::Transition().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStateTests | , |
| TransitionSwallowsCallbackException | |||
| ) |
Definition at line 487 of file test_cyclicMore.cpp.
References controller, Running, and profinet::cyclic::CyclicControllerTestAccess::Transition().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStatsTests | , |
| AverageCycleTimeReturnsIntegerAverage | |||
| ) |
Definition at line 604 of file test_cyclicMore.cpp.
References profinet::cyclic::CyclicStats::AvgCycleTimeUs(), profinet::cyclic::CyclicStats::cycleCount, and profinet::cyclic::CyclicStats::cycleTimeSumUs.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStatsTests | , |
| AverageCycleTimeReturnsZeroWhenNoCycles | |||
| ) |
Definition at line 614 of file test_cyclicMore.cpp.
| profinet::cyclic::TEST_F | ( | CyclicStatsTests | , |
| ResetRestoresInitialValues | |||
| ) |
Definition at line 664 of file test_cyclicMore.cpp.
References profinet::cyclic::CyclicStats::AvgCycleTimeUs(), profinet::cyclic::CyclicStats::consecutiveTimeouts, profinet::cyclic::CyclicStats::cycleCount, profinet::cyclic::CyclicStats::cycleTimeSumUs, profinet::cyclic::CyclicStats::framesDuplicate, profinet::cyclic::CyclicStats::framesInvalid, profinet::cyclic::CyclicStats::framesMissed, profinet::cyclic::CyclicStats::framesOutOfOrder, profinet::cyclic::CyclicStats::framesReceived, profinet::cyclic::CyclicStats::framesSent, profinet::cyclic::CyclicStats::lastCycleTimeUs, profinet::cyclic::CyclicStats::maxCycleTimeUs, profinet::cyclic::CyclicStats::maxJitterUs, profinet::cyclic::CyclicStats::minCycleTimeUs, and profinet::cyclic::CyclicStats::Reset().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicStatsTests | , |
| SnapshotAverageCycleTimeReturnsZeroWhenNoCycles | |||
| ) |
Definition at line 621 of file test_cyclicMore.cpp.
| profinet::cyclic::TEST_F | ( | CyclicStatsTests | , |
| StatsSnapshotCopiesAllFields | |||
| ) |
Definition at line 628 of file test_cyclicMore.cpp.
References profinet::cyclic::CyclicStatsSnapshot::AvgCycleTimeUs(), profinet::cyclic::CyclicStatsSnapshot::consecutiveTimeouts, controller, profinet::cyclic::CyclicStatsSnapshot::cycleCount, profinet::cyclic::CyclicStatsSnapshot::cycleTimeSumUs, profinet::cyclic::CyclicStatsSnapshot::framesDuplicate, profinet::cyclic::CyclicStatsSnapshot::framesInvalid, profinet::cyclic::CyclicStatsSnapshot::framesMissed, profinet::cyclic::CyclicStatsSnapshot::framesOutOfOrder, profinet::cyclic::CyclicStatsSnapshot::framesReceived, profinet::cyclic::CyclicStatsSnapshot::framesSent, profinet::cyclic::CyclicStatsSnapshot::lastCycleTimeUs, profinet::cyclic::CyclicStatsSnapshot::maxCycleTimeUs, profinet::cyclic::CyclicStatsSnapshot::maxJitterUs, profinet::cyclic::CyclicStatsSnapshot::minCycleTimeUs, and profinet::cyclic::CyclicControllerTestAccess::Stats().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTest | , |
| CyclicControllerConstructsWithSafeCycleTime | |||
| ) |
Definition at line 199 of file test_cyclic.cpp.
References ioContext, profinet::cyclic::CyclicController::IsRunning(), profinet::cyclic::CyclicController::State(), profinet::String2Mac(), and ToString().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTest | , |
| CyclicControllerRejectsNegativeMaxConsecutiveTimeouts | |||
| ) |
Definition at line 155 of file test_cyclic.cpp.
References ioContext, and profinet::String2Mac().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTest | , |
| CyclicControllerRejectsSub1msCycleTime | |||
| ) |
Definition at line 177 of file test_cyclic.cpp.
References ioContext, and profinet::String2Mac().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTest | , |
| CyclicStateToStringCoversAllStates | |||
| ) |
Definition at line 127 of file test_cyclic.cpp.
References Fault, Idle, Running, Starting, Stopped, Stopping, and ToString().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTest | , |
| CyclicStatsResetRestoresInitialValues | |||
| ) |
Definition at line 138 of file test_cyclic.cpp.
References profinet::cyclic::CyclicStats::AvgCycleTimeUs(), profinet::cyclic::CyclicStats::cycleCount, profinet::cyclic::CyclicStats::cycleTimeSumUs, profinet::cyclic::CyclicStats::framesMissed, profinet::cyclic::CyclicStats::framesSent, and profinet::cyclic::CyclicStats::Reset().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendOutputFrameReportsSocketError | |||
| ) |
Definition at line 1476 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::SendOutputFrame(), and tx.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendOutputFrameUsesDataStatusOverride | |||
| ) |
Definition at line 1492 of file test_cyclicMore.cpp.
References controller, profinet::rt::RTFrame::FromBytes(), profinet::cyclic::CyclicControllerTestAccess::SendOutputFrame(), and tx.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendOutputFrameWithoutSocketDoesNotThrow | |||
| ) |
Definition at line 1469 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::ResetTxSocket(), and profinet::cyclic::CyclicControllerTestAccess::SendOutputFrame().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendStopFramesGeneratesStopFrameCount | |||
| ) |
Definition at line 1504 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::SendStopFrames(), STOP_FRAME_COUNT, and tx.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendStopFramesStopsAfterSendErrorCallbackThrows | |||
| ) |
Definition at line 1523 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::SendStopFrames(), and tx.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SendStopFramesWithoutSocketDoesNothing | |||
| ) |
Definition at line 1513 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::ResetTxSocket(), profinet::cyclic::CyclicControllerTestAccess::SendStopFrames(), profinet::cyclic::CyclicControllerTestAccess::SetTxSock(), and txSocket.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| SetOutputDataIsReflectedInTransmittedFrame | |||
| ) |
Definition at line 1538 of file test_cyclicMore.cpp.
References controller, profinet::rt::RTFrame::FromBytes(), profinet::cyclic::CyclicControllerTestAccess::SendOutputFrame(), profinet::cyclic::CyclicControllerTestAccess::SwapOutputBuilder(), and tx.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| TxCycleSendsFrameAndUpdatesStatistics | |||
| ) |
Definition at line 1452 of file test_cyclicMore.cpp.
References controller, tx, and profinet::cyclic::CyclicControllerTestAccess::TxCycle().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| TxCycleSendsInFault | |||
| ) |
Definition at line 1461 of file test_cyclicMore.cpp.
References controller, Fault, profinet::cyclic::CyclicControllerTestAccess::SetState(), tx, and profinet::cyclic::CyclicControllerTestAccess::TxCycle().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicTxTests | , |
| TxLoopRecordsCycleTiming | |||
| ) |
Definition at line 1420 of file test_cyclicMore.cpp.
References controller, DEFAULT_MAX_CONSECUTIVE_TIMEOUTS, ioContext, profinet::kInputFrameId, profinet::kOutputFrameId, profinet::cyclic::CyclicControllerTestAccess::SetRunning(), profinet::cyclic::CyclicControllerTestAccess::SetTxSock(), tx, profinet::cyclic::CyclicControllerTestAccess::TxLoop(), and txSocket.
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| MonitoringOnlyWatchdogKeepsIocsGood | |||
| ) |
Definition at line 1256 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), profinet::cyclic::CyclicControllerTestAccess::IocsGood(), Running, and profinet::cyclic::CyclicControllerTestAccess::SetMaxConsecutiveTimeouts().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| RxLoopHandlesWatchdogTimeout | |||
| ) |
Definition at line 1371 of file test_cyclicMore.cpp.
References controller, rx, profinet::cyclic::CyclicControllerTestAccess::RxLoop(), and profinet::cyclic::CyclicControllerTestAccess::SetRunning().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| RxLoopProcessesValidFrame | |||
| ) |
Definition at line 1323 of file test_cyclicMore.cpp.
References controller, rx, profinet::cyclic::CyclicControllerTestAccess::RxLoop(), and profinet::cyclic::CyclicControllerTestAccess::SetRunning().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| RxLoopReportsSocketException | |||
| ) |
Definition at line 1352 of file test_cyclicMore.cpp.
References controller, rx, profinet::cyclic::CyclicControllerTestAccess::RxLoop(), and profinet::cyclic::CyclicControllerTestAccess::SetRunning().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| RxLoopStopsWithoutSocket | |||
| ) |
Definition at line 1343 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::ResetRxSocket(), profinet::cyclic::CyclicControllerTestAccess::RxLoop(), and profinet::cyclic::CyclicControllerTestAccess::SetRunning().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| TimeoutCallbackSwallowsException | |||
| ) |
Definition at line 1298 of file test_cyclicMore.cpp.
References controller, and profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| WatchdogDoesNotRepeatBadTransition | |||
| ) |
Definition at line 1311 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::FirstOutputByte(), profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), and profinet::cyclic::CyclicControllerTestAccess::IocsGood().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| WatchdogDoesNotTransitionWhenAlreadyFaulted | |||
| ) |
Definition at line 1288 of file test_cyclicMore.cpp.
References profinet::cyclic::CyclicStats::consecutiveTimeouts, controller, Fault, profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), profinet::cyclic::CyclicControllerTestAccess::SetState(), and profinet::cyclic::CyclicControllerTestAccess::Stats().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| WatchdogFaultsAtConfiguredThreshold | |||
| ) |
Definition at line 1269 of file test_cyclicMore.cpp.
References controller, Fault, and profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | CyclicWatchdogTests | , |
| WatchdogTimeoutUpdatesStatistics | |||
| ) |
Definition at line 1238 of file test_cyclicMore.cpp.
References controller, profinet::cyclic::CyclicControllerTestAccess::HandleWatchdogTimeout(), and profinet::cyclic::CyclicControllerTestAccess::IocsGood().
Here is the call graph for this function:| profinet::cyclic::TEST_F | ( | ReceivedIopsTest | , |
| DISABLED_BadIopsWithholdsStaleInputData | |||
| ) |
The device may keep transmitting old payload bytes after an input submodule becomes invalid. Those bytes remain available for diagnostics but must not be returned as valid application input.
Definition at line 179 of file test_receivedIops.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | ReceivedIopsTest | , |
| DISABLED_LowerIopsBitsDoNotAffectGoodState | |||
| ) |
The DataState is bit 7. The lower Instance and Extension bits must not change an otherwise GOOD provider status into BAD.
Definition at line 267 of file test_receivedIops.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | ReceivedIopsTest | , |
| GoodIopsDeliversInputData | |||
| ) |
Definition at line 152 of file test_receivedIops.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | ReceivedIopsTest | , |
| InputCallbackSkipsBadData | |||
| ) |
Definition at line 245 of file test_receivedIops.cpp.
References controller.
| profinet::cyclic::TEST_F | ( | ReceivedIopsTest | , |
| StatusCallbackFiresOnlyOnTransitions | |||
| ) |
Repeated GOOD or BAD frames must not generate duplicate callbacks. A callback is generated when the raw provider status transitions.
Definition at line 203 of file test_receivedIops.cpp.
References controller, and profinet::operator==().
Here is the call graph for this function:| std::string profinet::cyclic::ToString | ( | CyclicState | state | ) |
Human-readable name for a CyclicState value.
| state | State to name. |
Definition at line 24 of file cyclic.cpp.
References Fault, Idle, Running, Starting, Stopped, and Stopping.
Referenced by profinet::cyclic::CyclicController::SetOutputData(), profinet::cyclic::CyclicController::Start(), profinet::sim::VirtualPhoenixPlc::StatusReport(), TEST_F(), TEST_F(), and TEST_F().
Here is the caller graph for this function:
|
inlineconstexpr |
Default number of consecutive watchdog timeouts before transitioning to Fault.
Definition at line 157 of file cyclic.h.
Referenced by profinet::cyclic::CyclicStateTests::MakeController(), profinet::cyclic::CyclicWatchdogTests::SetUp(), profinet::cyclic::CyclicTxTests::SetUp(), profinet::cyclic::CyclicTest::StartControllerWithBlockedReceive(), TEST_F(), and TEST_F().
|
inlineconstexpr |
Minimum cycle time (ms) considered reliable.
Definition at line 153 of file cyclic.h.
Referenced by profinet::rpc::IOCRSetup::Validate().
|
inlineconstexpr |
|
inlineconstexpr |
Number of STOP frames sent during a graceful Stop().
Definition at line 159 of file cyclic.h.
Referenced by profinet::cyclic::CyclicController::SendStopFrames(), and TEST_F().