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

Single IO data object within the C_SDU: one piece of process data mapped to a slot/subslot, with its IOPS (and optional IOCS) offset. More...

#include <rt.h>

+ Collaboration diagram for profinet::rt::IODataObject:

Public Member Functions

void Validate (std::size_t frameSize) const
 Validate that this IO data object fits within a cyclic frame.
 

Public Attributes

std::uint16_t slot = 0
 Slot number.
 
std::uint16_t subslot = 0
 Subslot number.
 
std::uint16_t frameOffset = 0
 Byte offset of this object's data within the cyclic frame.
 
std::uint16_t dataLength = 0
 Length in bytes of this object's data.
 
std::optional< std::uint16_t > offsetIOPS
 Byte offset of this object's IOPS (provider status) byte.
 
std::optional< std::uint16_t > offsetIOCS
 Byte offset of this object's IOCS (consumer status) byte, or 0 if not applicable.
 

Detailed Description

Single IO data object within the C_SDU: one piece of process data mapped to a slot/subslot, with its IOPS (and optional IOCS) offset.

Definition at line 108 of file rt.h.

Member Function Documentation

◆ Validate()

void profinet::rt::IODataObject::Validate ( std::size_t  frameSize) const

Validate that this IO data object fits within a cyclic frame.

Parameters
frameSizeSize of the C_SDU buffer in bytes.
Exceptions
std::invalid_argumentif any configured range is outside the frame.

Definition at line 85 of file rt.cpp.

References dataLength, frameOffset, length, offsetIOCS, and offsetIOPS.

Member Data Documentation

◆ dataLength

std::uint16_t profinet::rt::IODataObject::dataLength = 0

Length in bytes of this object's data.

Definition at line 120 of file rt.h.

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

◆ frameOffset

std::uint16_t profinet::rt::IODataObject::frameOffset = 0

Byte offset of this object's data within the cyclic frame.

Definition at line 117 of file rt.h.

Referenced by profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), and Validate().

◆ offsetIOCS

std::optional<std::uint16_t> profinet::rt::IODataObject::offsetIOCS

Byte offset of this object's IOCS (consumer status) byte, or 0 if not applicable.

Definition at line 126 of file rt.h.

Referenced by profinet::CyclicCaptureTests::TEST(), profinet::CyclicCaptureTests::TEST(), and Validate().

◆ offsetIOPS

std::optional<std::uint16_t> profinet::rt::IODataObject::offsetIOPS

Byte offset of this object's IOPS (provider status) byte.

Definition at line 123 of file rt.h.

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

◆ slot

◆ subslot

std::uint16_t profinet::rt::IODataObject::subslot = 0

Subslot number.

Definition at line 114 of file rt.h.


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