|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Abstract interface for controlling cyclic PROFINET communication. More...
#include <cyclic.h>
Inheritance diagram for profinet::cyclic::ICyclicController:
Collaboration diagram for profinet::cyclic::ICyclicController:Public Member Functions | |
| virtual | ~ICyclicController ()=default |
| Virtual destructor. | |
| virtual void | Start (std::unique_ptr< IRawEthernetSocket > tx=nullptr, std::unique_ptr< IRawEthernetSocket > rx=nullptr)=0 |
| Starts cyclic PROFINET communication. | |
| virtual void | Stop ()=0 |
| Stops cyclic PROFINET communication. | |
| virtual bool | IsRunning () const =0 |
| Whether the controller is actively exchanging cyclic data. | |
| virtual CyclicState | State () const =0 |
| The controller's current lifecycle state. | |
| virtual void | SetOutputData (int slot, int subslot, const Bytes &data)=0 |
| Set complete process output data for one slot/subslot. | |
| virtual Bytes | GetOutputData (int slot, int subslot) const =0 |
| Read the currently configured output data for one slot/subslot. | |
| virtual std::optional< Bytes > | GetInputData (int slot, int subslot, bool allowBad=false) const =0 |
| Get the latest valid input process data. | |
Abstract interface for controlling cyclic PROFINET communication.
Defines the lifecycle operations required by higher-level components to start and stop cyclic PROFINET communication. The interface separates device-level lifecycle management from the concrete cyclic controller implementation, allowing components such as ProfinetDevice to be unit tested without starting actual cyclic Ethernet communication.
Implementations are responsible for managing the underlying cyclic communication resources and maintaining the appropriate controller state between Start() and Stop() calls.
|
virtualdefault |
Virtual destructor.
Ensures that derived cyclic controller implementations can be destroyed safely through an ICyclicController pointer.
|
pure virtual |
Get the latest valid input process data.
| slot | Slot number. |
| subslot | Subslot number. |
| allowBad | Return data even when IOPS is BAD. |
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
Read the currently configured output data for one slot/subslot.
| slot | Slot number. |
| subslot | Subslot number. |
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
Whether the controller is actively exchanging cyclic data.
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
Set complete process output data for one slot/subslot.
| slot | Slot number. |
| subslot | Subslot number. |
| data | Complete process-data object. |
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
Starts cyclic PROFINET communication.
Starts the cyclic communication process and enables transmission and reception of cyclic IO data according to the configured IOCR parameters.
| std::exception | Derived implementations may throw when cyclic communication cannot be started. |
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
The controller's current lifecycle state.
Implemented in profinet::cyclic::CyclicController.
|
pure virtual |
Stops cyclic PROFINET communication.
Stops cyclic communication and releases or disables the resources associated with cyclic IO data exchange. Implementations should leave the controller in a state in which it can be safely destroyed or started again, where supported.
Implemented in profinet::cyclic::CyclicController.