|
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 167 of file rt.h.
References CycleTimeUs().
Referenced by profinet::cyclic::CyclicController::CheckCycleTime().
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 160 of file rt.h.
References reductionRatio, and sendClockFactor.
Referenced by CycleTimeMs(), profinet::cyclic::CyclicController::SendStopFrames(), 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 181 of file rt.h.
References profinet::rt::IOCR_TYPE_INPUT, and typeIOCR.
|
inline |
Whether this is an output (controller -> device) IOCR.
Definition at line 188 of file rt.h.
References profinet::rt::IOCR_TYPE_OUTPUT, and typeIOCR.
|
inline |
Compute the watchdog timeout in microseconds.
Definition at line 174 of file rt.h.
References CycleTimeUs(), and watchdogFactor.
Referenced by profinet::cyclic::CyclicController::RxLoop().
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 149 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs().
| std::uint16_t profinet::rt::IOCRConfig::frameId = 0 |
Frame ID assigned to this IOCR.
Definition at line 134 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), profinet::cyclic::CyclicController::ProcessInputFrame(), 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 152 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), profinet::rt::CyclicDataBuilder::GetData(), profinet::cyclic::CyclicController::ProcessInputFrame(), profinet::rt::CyclicDataBuilder::SetAllIocs(), profinet::rt::CyclicDataBuilder::SetAllIops(), profinet::rt::CyclicDataBuilder::SetData(), profinet::rt::CyclicDataBuilder::SetIocs(), and profinet::rt::CyclicDataBuilder::SetIops().
| std::uint16_t profinet::rt::IOCRConfig::phase = 0 |
Phase offset within the reduction ratio.
Definition at line 143 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 140 of file rt.h.
Referenced by profinet::cyclic::CyclicController::CyclicController(), profinet::rt::BuildIocrConfigs(), and CycleTimeUs().
| std::uint16_t profinet::rt::IOCRConfig::referenceIOCR = 0 |
IOCR reference assigned during AR establishment.
Definition at line 131 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs().
| std::uint16_t profinet::rt::IOCRConfig::sendClockFactor = 32 |
Send clock base factor (31.25us units).
Definition at line 137 of file rt.h.
Referenced by profinet::cyclic::CyclicController::CyclicController(), profinet::rt::BuildIocrConfigs(), and CycleTimeUs().
| std::uint16_t profinet::rt::IOCRConfig::typeIOCR = 0 |
IOCR direction: 1=Input, 2=Output.
Definition at line 128 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), IsInput(), and IsOutput().
| std::uint16_t profinet::rt::IOCRConfig::watchdogFactor = 3 |
Watchdog factor (missed-frame tolerance before a timeout fault).
Definition at line 146 of file rt.h.
Referenced by profinet::rt::BuildIocrConfigs(), and WatchdogTimeUs().