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

Classes

class  CyclicController
 RT_CLASS_1 cyclic data exchange controller. More...
 
struct  CyclicStats
 Statistics for cyclic communication. More...
 
struct  CyclicStatsSnapshot
 Copyable snapshot of cyclic communication statistics. More...
 
class  ICyclicController
 Abstract interface for controlling cyclic PROFINET communication. 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.
 

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().
 

Enumeration Type Documentation

◆ CyclicState

enum class profinet::cyclic::CyclicState
strong

Lifecycle state of a CyclicController.

Enumerator
Idle 

Initial state, not yet started.

Starting 

Sockets created, threads launching.

Running 

Active cyclic data exchange.

Stopping 

Graceful shutdown in progress (sending STOP frames).

Stopped 

Fully stopped, threads joined.

Fault 

Communication failure (e.g. consecutive watchdog timeouts).

Definition at line 38 of file cyclic.h.

Function Documentation

◆ ToString()

std::string profinet::cyclic::ToString ( CyclicState  state)

Human-readable name for a CyclicState value.

Parameters
stateState to name.
Returns
Lowercase state name, e.g. "running".

Definition at line 22 of file cyclic.cpp.

References Fault, Idle, Running, Starting, Stopped, and Stopping.

Referenced by profinet::cyclic::CyclicController::SetOutputData(), and profinet::cyclic::CyclicController::Start().

+ Here is the caller graph for this function:

Variable Documentation

◆ DEFAULT_MAX_CONSECUTIVE_TIMEOUTS

constexpr int profinet::cyclic::DEFAULT_MAX_CONSECUTIVE_TIMEOUTS = 3
inlineconstexpr

Default number of consecutive watchdog timeouts before transitioning to Fault.

Definition at line 155 of file cyclic.h.

◆ MIN_CYCLE_MS

constexpr int profinet::cyclic::MIN_CYCLE_MS = 8
inlineconstexpr

Minimum cycle time (ms) considered reliable.

Definition at line 151 of file cyclic.h.

Referenced by profinet::rpc::IOCRSetup::Validate().

◆ RECOMMENDED_CYCLE_MS

constexpr int profinet::cyclic::RECOMMENDED_CYCLE_MS = 32
inlineconstexpr

Recommended cycle time (ms).

Definition at line 153 of file cyclic.h.

◆ STOP_FRAME_COUNT

constexpr int profinet::cyclic::STOP_FRAME_COUNT = 3
inlineconstexpr

Number of STOP frames sent during a graceful Stop().

Definition at line 157 of file cyclic.h.

Referenced by profinet::cyclic::CyclicController::SendStopFrames().