|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
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, blockHeaderLenght > | blockHeader {} |
| 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. | |
I&M0: mandatory identification data (vendor, order ID, serial number, revisions).
Definition at line 1075 of file protocol.h.
|
default |
Parse an I&M0 record from raw bytes.
| data | Bytes starting at the BlockHeader field. |
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:
|
inline |
Combine VendorIdHigh/VendorIdLow into a 16-bit vendor ID.
Definition at line 1132 of file protocol.h.
References profinet::OneOctetShift, vendorIdHigh, and vendorIdLow.
| std::array<std::uint8_t, blockHeaderLenght> profinet::PNInM0::blockHeader {} |
|
staticconstexpr |
Record data index for I&M0.
Definition at line 1079 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ReadIm0().
| std::uint16_t profinet::PNInM0::imHardwareRevision = 0 |
| std::uint16_t profinet::PNInM0::imProfileId = 0 |
| std::uint16_t profinet::PNInM0::imProfileSpecificType = 0 |
| std::uint16_t profinet::PNInM0::imRevisionCounter = 0 |
Monotonically increasing revision counter.
Definition at line 1113 of file protocol.h.
Referenced by Parse().
| std::string profinet::PNInM0::imSerialNumber |
| 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().
| std::uint8_t profinet::PNInM0::imSwRevisionBugFix = 0 |
| std::uint8_t profinet::PNInM0::imSwRevisionFunctionalEnhancement = 0 |
Functional enhancement revision digit.
Definition at line 1104 of file protocol.h.
Referenced by Parse().
| std::uint8_t profinet::PNInM0::imSwRevisionInternalChange = 0 |
| std::uint16_t profinet::PNInM0::imVersion = 0 |
|
staticconstexpr |
| std::string profinet::PNInM0::orderId |
Manufacturer-specific order/part number (20 chars).
Definition at line 1092 of file protocol.h.
Referenced by Parse().
| 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().
| 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().
| 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().