|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
IOCR configuration derived from AR setup: timing parameters and IO object mappings needed for cyclic data exchange. More...
#include <rt.h>
Collaboration diagram for profinet::rt::IOCRConfig:Public Member Functions | |
| std::uint32_t | CycleTimeUs () const |
| Compute the cycle time in microseconds. | |
| double | CycleTimeMs () const |
| Compute the cycle time in milliseconds. | |
| std::uint32_t | WatchdogTimeUs () const |
| Compute the watchdog timeout in microseconds. | |
| bool | IsInput () const |
| Whether this is an input (device -> controller) IOCR. | |
| bool | IsOutput () const |
| Whether this is an output (controller -> device) IOCR. | |
Public Attributes | |
| std::uint16_t | typeIOCR = 0 |
| IOCR direction: 1=Input, 2=Output. | |
| std::uint16_t | referenceIOCR = 0 |
| IOCR reference assigned during AR establishment. | |
| std::uint16_t | frameId = 0 |
| Frame ID assigned to this IOCR. | |
| std::uint16_t | sendClockFactor = 32 |
| Send clock base factor (31.25us units). | |
| std::uint16_t | reductionRatio = 32 |
| Reduction ratio relative to the send clock. | |
| std::uint16_t | phase = 0 |
| Phase offset within the reduction ratio. | |
| std::uint16_t | watchdogFactor = 3 |
| Watchdog factor (missed-frame tolerance before a timeout fault). | |
| std::uint16_t | dataLength = 40 |
| Total cyclic data length in bytes. | |
| std::vector< IODataObject > | objects |
| IO data objects carried in this IOCR's cyclic frame. | |
IOCR configuration derived from AR setup: timing parameters and IO object mappings needed for cyclic data exchange.
|
inline |
Compute the cycle time in milliseconds.
Definition at line 178 of file rt.h.
References CycleTimeUs().
Referenced by profinet::cyclic::CyclicController::CheckCycleTime(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Compute the cycle time in microseconds.
Base clock is 31.25us per IEC 61158; cycle time = ReductionRatio * SendClockFactor * 31.25us (computed as ReductionRatio * SendClockFactor * 125 / 4 to stay in integer microseconds).
Definition at line 171 of file rt.h.
References reductionRatio, and sendClockFactor.
Referenced by CycleTimeMs(), profinet::sim::VirtualAumaValve::Run(), profinet::cyclic::CyclicController::SendStopFrames(), TEST_F(), profinet::cyclic::CyclicController::TxLoop(), and WatchdogTimeUs().
Here is the caller graph for this function:
|
inline |
Whether this is an input (device -> controller) IOCR.
Definition at line 192 of file rt.h.
References profinet::rt::IOCR_TYPE_INPUT, and typeIOCR.
Referenced by TEST_F().
Here is the caller graph for this function:
|
inline |
Whether this is an output (controller -> device) IOCR.
Definition at line 199 of file rt.h.
References profinet::rt::IOCR_TYPE_OUTPUT, and typeIOCR.
Referenced by TEST_F().
Here is the caller graph for this function:
|
inline |
Compute the watchdog timeout in microseconds.
Definition at line 185 of file rt.h.
References CycleTimeUs(), and watchdogFactor.
Referenced by profinet::cyclic::CyclicController::RxLoop(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:| std::uint16_t profinet::rt::IOCRConfig::dataLength = 40 |
Total cyclic data length in bytes.
Definition at line 160 of file rt.h.
Referenced by profinet::rt::CyclicDataBuilder::CyclicDataBuilder(), profinet::sim::VirtualAumaValve::VirtualAumaValve(), profinet::rt::BuildIocrConfigs(), profinet::sim::VirtualPhoenixPlc::Connect(), profinet::cyclic::CyclicTest::MakeConfig(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), profinet::sim::VirtualAumaValve::SendInputFrame(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| std::uint16_t profinet::rt::IOCRConfig::frameId = 0 |
Frame ID assigned to this IOCR.
Definition at line 145 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), profinet::cyclic::CyclicTest::MakeConfig(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), profinet::cyclic::CyclicController::ProcessInputFrame(), profinet::sim::VirtualAumaValve::ProcessOutputFrame(), profinet::sim::VirtualAumaValve::SendInputFrame(), and profinet::cyclic::CyclicController::SendOutputFrame().
| std::vector<IODataObject> profinet::rt::IOCRConfig::objects |
IO data objects carried in this IOCR's cyclic frame.
Definition at line 163 of file rt.h.
Referenced by profinet::rt::CyclicDataBuilder::CyclicDataBuilder(), profinet::sim::VirtualAumaValve::VirtualAumaValve(), profinet::rt::BuildIocrConfigs(), profinet::sim::VirtualPhoenixPlc::Connect(), profinet::rt::CyclicDataBuilder::GetData(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), profinet::cyclic::CyclicController::ProcessInputFrame(), profinet::sim::VirtualAumaValve::ProcessOutputFrame(), profinet::sim::VirtualAumaValve::SendInputFrame(), profinet::rt::CyclicDataBuilder::SetAllIocs(), profinet::rt::CyclicDataBuilder::SetAllIops(), profinet::rt::CyclicDataBuilder::SetData(), profinet::rt::CyclicDataBuilder::SetIocs(), profinet::rt::CyclicDataBuilder::SetIops(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| std::uint16_t profinet::rt::IOCRConfig::phase = 0 |
Phase offset within the reduction ratio.
Definition at line 154 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs().
| std::uint16_t profinet::rt::IOCRConfig::reductionRatio = 32 |
Reduction ratio relative to the send clock.
Definition at line 151 of file rt.h.
Referenced by profinet::cyclic::CyclicController::CyclicController(), profinet::rt::BuildIocrConfigs(), CycleTimeUs(), profinet::cyclic::CyclicTest::MakeConfig(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), profinet::sim::VirtualAumaValve::SendInputFrame(), and TEST_F().
| std::uint16_t profinet::rt::IOCRConfig::referenceIOCR = 0 |
IOCR reference assigned during AR establishment.
Definition at line 142 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), and profinet::sim::MakeVirtualAumaIocrConfiguration().
| std::uint16_t profinet::rt::IOCRConfig::sendClockFactor = 32 |
Send clock base factor (31.25us units).
Definition at line 148 of file rt.h.
Referenced by profinet::cyclic::CyclicController::CyclicController(), profinet::rt::BuildIocrConfigs(), CycleTimeUs(), profinet::cyclic::CyclicTest::MakeConfig(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), profinet::sim::VirtualAumaValve::SendInputFrame(), and TEST_F().
| std::uint16_t profinet::rt::IOCRConfig::typeIOCR = 0 |
IOCR direction: 1=Input, 2=Output.
Definition at line 139 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), IsInput(), IsOutput(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), and TEST_F().
| std::uint16_t profinet::rt::IOCRConfig::watchdogFactor = 3 |
Watchdog factor (missed-frame tolerance before a timeout fault).
Definition at line 157 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), profinet::cyclic::ReceivedIopsTest::MakeController(), profinet::cyclic::CyclicControllerConformanceTest::MakeInputIocr(), profinet::cyclic::CyclicControllerConformanceTest::MakeOutputIocr(), profinet::sim::MakeVirtualAumaIocrConfiguration(), TEST_F(), and WatchdogTimeUs().