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

I&M2: installation date. More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNInM2:

Public Member Functions

bool operator== (const PNInM2 &) const =default
 Compares two PNInM2 for equality.
 

Static Public Member Functions

static PNInM2 Parse (const Bytes &data)
 Parse an I&M2 record from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::string imDate
 Installation date, "YYYY-MM-DD HH:MM" (16 chars).
 

Static Public Attributes

static constexpr std::uint16_t IDX = 0xAFF2
 Record data index for I&M2.
 
static constexpr std::size_t kSize = 22
 Size in bytes of this record.
 

Detailed Description

I&M2: installation date.

Definition at line 1221 of file protocol.h.

Member Function Documentation

◆ operator==()

bool profinet::PNInM2::operator== ( const PNInM2 ) const
default

Compares two PNInM2 for equality.

Two PNInM2 are equal when all scalar configuration fields are equal.

◆ Parse()

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

Parse an I&M2 record from raw bytes.

Parameters
dataBytes starting at the BlockHeader field.
Returns
The parsed record.

Definition at line 1240 of file protocol.h.

References blockHeader, profinet::blockHeaderLenght, profinet::DecodeBytes(), profinet::wire::Reader::Fixed(), imDate, kSize, and profinet::wire::Reader::ReadBytes().

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

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

Member Data Documentation

◆ blockHeader

std::array<std::uint8_t, blockHeaderLenght> profinet::PNInM2::blockHeader {}

Nested 6-byte block header.

Definition at line 1229 of file protocol.h.

Referenced by Parse().

◆ IDX

constexpr std::uint16_t profinet::PNInM2::IDX = 0xAFF2
staticconstexpr

Record data index for I&M2.

Definition at line 1225 of file protocol.h.

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

◆ imDate

std::string profinet::PNInM2::imDate

Installation date, "YYYY-MM-DD HH:MM" (16 chars).

Definition at line 1232 of file protocol.h.

Referenced by Parse().

◆ kSize

constexpr std::size_t profinet::PNInM2::kSize = 22
staticconstexpr

Size in bytes of this record.

Definition at line 1235 of file protocol.h.

Referenced by Parse().


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