|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Configuration for establishing cyclic IO alongside an AR. More...
#include <rpcTypes.h>
Collaboration diagram for profinet::rpc::IOCRSetup:Public Member Functions | |
| std::uint32_t | CycleTimeUs () const |
| Compute the cycle time in microseconds from SendClockFactor/ReductionRatio. | |
| double | CycleTimeMs () const |
| Compute the cycle time in milliseconds. | |
| std::vector< std::string > | Validate () const |
| Sanity-check this configuration. | |
| bool | operator== (const IOCRSetup &) const =default |
| Compares two IOCR configurations for equality. | |
Public Attributes | |
| std::vector< IOSlot > | slots |
| Slots to include in the cyclic data frames. | |
| 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 | watchdogFactor = 6 |
| Watchdog factor (missed-frame tolerance before a timeout fault). | |
| std::uint16_t | dataHoldFactor = 6 |
| Data hold factor (how long to keep the last good frame's data). | |
| std::size_t | dataLength = 43 |
Configuration for establishing cyclic IO alongside an AR.
EXPERIMENTAL - NOT TESTED WITH REAL DEVICES. See rpc.py's IOCRSetup docstring for Python-GIL-driven cycle-time caveats (not applicable to this C++ port, but kept here as context since the block-building logic was ported as-is).
Definition at line 133 of file rpcTypes.h.
|
inline |
Compute the cycle time in milliseconds.
Definition at line 161 of file rpcTypes.h.
References CycleTimeUs().
Referenced by Validate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Compute the cycle time in microseconds from SendClockFactor/ReductionRatio.
Definition at line 154 of file rpcTypes.h.
References reductionRatio, and sendClockFactor.
Referenced by CycleTimeMs().
Here is the caller graph for this function:
|
default |
Compares two IOCR configurations for equality.
Two IOCR configurations are equal when all scalar configuration fields and their IO slot configurations are equal.
| std::vector< std::string > profinet::rpc::IOCRSetup::Validate | ( | ) | const |
Sanity-check this configuration.
Definition at line 625 of file rpc.cpp.
References CycleTimeMs(), profinet::cyclic::MIN_CYCLE_MS, slots, and watchdogFactor.
Here is the call graph for this function:| std::uint16_t profinet::rpc::IOCRSetup::dataHoldFactor = 6 |
Data hold factor (how long to keep the last good frame's data).
Definition at line 148 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildIocrBlock().
| std::size_t profinet::rpc::IOCRSetup::dataLength = 43 |
Definition at line 150 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildIocrBlock().
| std::uint16_t profinet::rpc::IOCRSetup::reductionRatio = 32 |
Reduction ratio relative to the send clock.
Definition at line 142 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildIocrBlock(), CycleTimeUs(), and profinet::device::ProfinetDevice::StartCyclic().
| std::uint16_t profinet::rpc::IOCRSetup::sendClockFactor = 32 |
Send clock base factor (31.25us units).
Definition at line 139 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildIocrBlock(), CycleTimeUs(), and profinet::device::ProfinetDevice::StartCyclic().
| std::vector<IOSlot> profinet::rpc::IOCRSetup::slots |
Slots to include in the cyclic data frames.
Definition at line 136 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildExpectedSubmoduleBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::BuildUnifiedExpectedSubmoduleBlock(), profinet::device::ProfinetDevice::StartCyclic(), and Validate().
| std::uint16_t profinet::rpc::IOCRSetup::watchdogFactor = 6 |
Watchdog factor (missed-frame tolerance before a timeout fault).
Definition at line 145 of file rpcTypes.h.
Referenced by profinet::rpc::RPCCon::BuildIocrBlock(), profinet::device::ProfinetDevice::StartCyclic(), and Validate().