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, blockHeaderLength > blockHeader {}
 Nested 6-byte block header.
 
std::uint16_t vendorId = 0
 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 1516 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 1584 of file protocol.h.

References blockHeader, profinet::blockHeaderLength, 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(), and vendorId.

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 1576 of file protocol.h.

References vendorId.

Member Data Documentation

◆ blockHeader

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

Nested 6-byte block header.

Definition at line 1524 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 1520 of file protocol.h.

Referenced by profinet::rpc::RpcTests::MakeImPayload(), and profinet::rpc::RPCCon::ReadIm0().

◆ imHardwareRevision

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

Hardware revision number.

Definition at line 1542 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ imProfileId

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

I&M profile ID.

Definition at line 1560 of file protocol.h.

Referenced by Parse().

◆ imProfileSpecificType

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

I&M profile-specific type.

Definition at line 1563 of file protocol.h.

Referenced by Parse().

◆ imRevisionCounter

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

Monotonically increasing revision counter.

Definition at line 1557 of file protocol.h.

Referenced by Parse().

◆ imSerialNumber

std::string profinet::PNInM0::imSerialNumber

Device serial number (16 chars).

Definition at line 1539 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ imSupported

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

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

Definition at line 1569 of file protocol.h.

Referenced by Parse().

◆ imSwRevisionBugFix

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

Bug fix revision digit.

Definition at line 1551 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ imSwRevisionFunctionalEnhancement

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

Functional enhancement revision digit.

Definition at line 1548 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ imSwRevisionInternalChange

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

Internal change revision digit.

Definition at line 1554 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ imVersion

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

I&M data structure version.

Definition at line 1566 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 1572 of file protocol.h.

Referenced by profinet::rpc::RpcTests::MakeImPayload(), Parse(), and TEST_F().

◆ orderId

std::string profinet::PNInM0::orderId

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

Definition at line 1536 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ swRevisionPrefix

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

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

Definition at line 1545 of file protocol.h.

Referenced by Parse(), and profinet::device::TEST_F().

◆ vendorId

std::uint16_t profinet::PNInM0::vendorId = 0

The PROFINET vendor ID.

Definition at line 1527 of file protocol.h.

Referenced by Parse(), and VendorId().


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