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

One slot/subslot's placement within an IOCR's cyclic data frame. More...

#include <protocol.h>

+ Collaboration diagram for profinet::IOCRAPIObject:

Public Member Functions

Bytes ToBytes () const
 Serialize this object back to raw bytes.
 

Static Public Member Functions

static IOCRAPIObject Parse (const Bytes &data)
 Parse an IOCR API object from raw bytes.
 

Public Attributes

std::uint16_t slotNumber = 0
 Slot number.
 
std::uint16_t subslotNumber = 0
 Subslot number.
 
std::uint16_t frameOffset = 0
 Byte offset of this object's data within the cyclic frame.
 

Static Public Attributes

static constexpr std::size_t kSize = 6
 Size in bytes of this object.
 

Detailed Description

One slot/subslot's placement within an IOCR's cyclic data frame.

Definition at line 1449 of file protocol.h.

Member Function Documentation

◆ Parse()

static IOCRAPIObject profinet::IOCRAPIObject::Parse ( const Bytes data)
inlinestatic

Parse an IOCR API object from raw bytes.

Parameters
dataBytes starting at the SlotNumber field.
Returns
The parsed object.

Definition at line 1466 of file protocol.h.

References frameOffset, kSize, slotNumber, subslotNumber, and profinet::wire::Reader::U16().

+ Here is the call graph for this function:

◆ ToBytes()

Bytes profinet::IOCRAPIObject::ToBytes ( ) const
inline

Serialize this object back to raw bytes.

Returns
The encoded bytes.

Definition at line 1482 of file protocol.h.

References frameOffset, profinet::wire::PutU16(), slotNumber, and subslotNumber.

+ Here is the call graph for this function:

Member Data Documentation

◆ frameOffset

std::uint16_t profinet::IOCRAPIObject::frameOffset = 0

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

Definition at line 1458 of file protocol.h.

Referenced by Parse(), and ToBytes().

◆ kSize

constexpr std::size_t profinet::IOCRAPIObject::kSize = 6
staticconstexpr

Size in bytes of this object.

Definition at line 1461 of file protocol.h.

Referenced by Parse().

◆ slotNumber

std::uint16_t profinet::IOCRAPIObject::slotNumber = 0

Slot number.

Definition at line 1452 of file protocol.h.

Referenced by Parse(), and ToBytes().

◆ subslotNumber

std::uint16_t profinet::IOCRAPIObject::subslotNumber = 0

Subslot number.

Definition at line 1455 of file protocol.h.

Referenced by Parse(), and ToBytes().


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