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

I&M0: mandatory identification data (vendor, order ID, serial number, revisions). More...

#include <protocol.h>

+ Collaboration diagram for profinet::PNInM0:

Public Member Functions

std::uint16_t VendorId () const
 Combine VendorIdHigh/VendorIdLow into a 16-bit vendor ID.
 
bool operator== (const PNInM0 &) const =default
 Compares two PNInM0 for equality.
 

Static Public Member Functions

static PNInM0 Parse (const Bytes &data)
 Parse an I&M0 record from raw bytes.
 

Public Attributes

std::array< std::uint8_t, blockHeaderLenghtblockHeader {}
 Nested 6-byte block header.
 
std::uint8_t vendorIdHigh = 0
 High byte of the PROFINET vendor ID.
 
std::uint8_t vendorIdLow = 0
 Low byte of the PROFINET vendor ID.
 
std::string orderId
 Manufacturer-specific order/part number (20 chars).
 
std::string imSerialNumber
 Device serial number (16 chars).
 
std::uint16_t imHardwareRevision = 0
 Hardware revision number.
 
std::uint8_t swRevisionPrefix = 0
 Software revision prefix character (e.g. 'V', 'R', 'P', 'U', 'T').
 
std::uint8_t imSwRevisionFunctionalEnhancement = 0
 Functional enhancement revision digit.
 
std::uint8_t imSwRevisionBugFix = 0
 Bug fix revision digit.
 
std::uint8_t imSwRevisionInternalChange = 0
 Internal change revision digit.
 
std::uint16_t imRevisionCounter = 0
 Monotonically increasing revision counter.
 
std::uint16_t imProfileId = 0
 I&M profile ID.
 
std::uint16_t imProfileSpecificType = 0
 I&M profile-specific type.
 
std::uint16_t imVersion = 0
 I&M data structure version.
 
std::uint16_t imSupported = 0
 Bitmask of which I&M1-I&M15 records this device supports.
 

Static Public Attributes

static constexpr std::uint16_t IDX = 0xAFF0
 Record data index for I&M0.
 
static constexpr std::size_t kSize = 60
 Size in bytes of this record.
 

Detailed Description

I&M0: mandatory identification data (vendor, order ID, serial number, revisions).

Definition at line 1075 of file protocol.h.

Member Function Documentation

◆ operator==()

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

Compares two PNInM0 for equality.

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

◆ Parse()

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

Parse an I&M0 record from raw bytes.

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

Definition at line 1140 of file protocol.h.

References blockHeader, profinet::blockHeaderLenght, profinet::DecodeBytes(), profinet::wire::Reader::Fixed(), imHardwareRevision, imProfileId, imProfileSpecificType, imRevisionCounter, imSerialNumber, imSupported, imSwRevisionBugFix, imSwRevisionFunctionalEnhancement, imSwRevisionInternalChange, imVersion, kSize, orderId, profinet::wire::Reader::ReadBytes(), swRevisionPrefix, profinet::wire::Reader::U16(), profinet::wire::Reader::U8(), vendorIdHigh, and vendorIdLow.

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

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

◆ VendorId()

std::uint16_t profinet::PNInM0::VendorId ( ) const
inline

Combine VendorIdHigh/VendorIdLow into a 16-bit vendor ID.

Returns
The 16-bit PROFINET vendor ID.

Definition at line 1132 of file protocol.h.

References profinet::OneOctetShift, vendorIdHigh, and vendorIdLow.

Member Data Documentation

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 1083 of file protocol.h.

Referenced by Parse().

◆ IDX

constexpr std::uint16_t profinet::PNInM0::IDX = 0xAFF0
staticconstexpr

Record data index for I&M0.

Definition at line 1079 of file protocol.h.

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

◆ imHardwareRevision

std::uint16_t profinet::PNInM0::imHardwareRevision = 0

Hardware revision number.

Definition at line 1098 of file protocol.h.

Referenced by Parse().

◆ imProfileId

std::uint16_t profinet::PNInM0::imProfileId = 0

I&M profile ID.

Definition at line 1116 of file protocol.h.

Referenced by Parse().

◆ imProfileSpecificType

std::uint16_t profinet::PNInM0::imProfileSpecificType = 0

I&M profile-specific type.

Definition at line 1119 of file protocol.h.

Referenced by Parse().

◆ imRevisionCounter

std::uint16_t profinet::PNInM0::imRevisionCounter = 0

Monotonically increasing revision counter.

Definition at line 1113 of file protocol.h.

Referenced by Parse().

◆ imSerialNumber

std::string profinet::PNInM0::imSerialNumber

Device serial number (16 chars).

Definition at line 1095 of file protocol.h.

Referenced by Parse().

◆ imSupported

std::uint16_t profinet::PNInM0::imSupported = 0

Bitmask of which I&M1-I&M15 records this device supports.

Definition at line 1125 of file protocol.h.

Referenced by Parse().

◆ imSwRevisionBugFix

std::uint8_t profinet::PNInM0::imSwRevisionBugFix = 0

Bug fix revision digit.

Definition at line 1107 of file protocol.h.

Referenced by Parse().

◆ imSwRevisionFunctionalEnhancement

std::uint8_t profinet::PNInM0::imSwRevisionFunctionalEnhancement = 0

Functional enhancement revision digit.

Definition at line 1104 of file protocol.h.

Referenced by Parse().

◆ imSwRevisionInternalChange

std::uint8_t profinet::PNInM0::imSwRevisionInternalChange = 0

Internal change revision digit.

Definition at line 1110 of file protocol.h.

Referenced by Parse().

◆ imVersion

std::uint16_t profinet::PNInM0::imVersion = 0

I&M data structure version.

Definition at line 1122 of file protocol.h.

Referenced by Parse().

◆ kSize

constexpr std::size_t profinet::PNInM0::kSize = 60
staticconstexpr

Size in bytes of this record.

Definition at line 1128 of file protocol.h.

Referenced by Parse().

◆ orderId

std::string profinet::PNInM0::orderId

Manufacturer-specific order/part number (20 chars).

Definition at line 1092 of file protocol.h.

Referenced by Parse().

◆ swRevisionPrefix

std::uint8_t profinet::PNInM0::swRevisionPrefix = 0

Software revision prefix character (e.g. 'V', 'R', 'P', 'U', 'T').

Definition at line 1101 of file protocol.h.

Referenced by Parse().

◆ vendorIdHigh

std::uint8_t profinet::PNInM0::vendorIdHigh = 0

High byte of the PROFINET vendor ID.

Definition at line 1086 of file protocol.h.

Referenced by Parse(), and VendorId().

◆ vendorIdLow

std::uint8_t profinet::PNInM0::vendorIdLow = 0

Low byte of the PROFINET vendor ID.

Definition at line 1089 of file protocol.h.

Referenced by Parse(), and VendorId().


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