PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::rpc::IOCRSetup Struct Reference

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).
 
ApplicationRelations applicationRelations
 

Detailed Description

Configuration for establishing cyclic IO alongside an AR.

Definition at line 148 of file rpcTypes.h.

Member Function Documentation

◆ CycleTimeMs()

double profinet::rpc::IOCRSetup::CycleTimeMs ( ) const
inline

Compute the cycle time in milliseconds.

Returns
The cycle time in milliseconds.

Definition at line 176 of file rpcTypes.h.

References CycleTimeUs().

Referenced by profinet::rpc::TEST_F(), and Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CycleTimeUs()

std::uint32_t profinet::rpc::IOCRSetup::CycleTimeUs ( ) const
inline

Compute the cycle time in microseconds from SendClockFactor/ReductionRatio.

Returns
The cycle time in microseconds.

Definition at line 169 of file rpcTypes.h.

References reductionRatio, and sendClockFactor.

Referenced by CycleTimeMs(), and profinet::rpc::TEST_F().

+ Here is the caller graph for this function:

◆ operator==()

bool profinet::rpc::IOCRSetup::operator== ( const IOCRSetup &  ) const
default

Compares two IOCR configurations for equality.

Two IOCR configurations are equal when all scalar configuration fields and their IO slot configurations are equal.

◆ Validate()

std::vector< std::string > profinet::rpc::IOCRSetup::Validate ( ) const

Sanity-check this configuration.

Returns
Human-readable warnings, if any (does not throw; caller decides what to do).

Definition at line 546 of file rpc.cpp.

References CycleTimeMs(), profinet::cyclic::MIN_CYCLE_MS, slots, and watchdogFactor.

Referenced by profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), profinet::rpc::TEST_F(), and profinet::rpc::TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ applicationRelations

ApplicationRelations profinet::rpc::IOCRSetup::applicationRelations

Definition at line 165 of file rpcTypes.h.

Referenced by profinet::rpc::RPCCon::BuildIocrBlock().

◆ dataHoldFactor

std::uint16_t profinet::rpc::IOCRSetup::dataHoldFactor = 6

Data hold factor (how long to keep the last good frame's data).

Definition at line 163 of file rpcTypes.h.

Referenced by profinet::rpc::RPCCon::BuildIocrBlock(), profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), and profinet::CyclicCaptureTests::TEST().

◆ reductionRatio

◆ sendClockFactor

◆ slots

◆ watchdogFactor


The documentation for this struct was generated from the following files: