|
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, 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. | |
I&M0: mandatory identification data (vendor, order ID, serial number, revisions).
Definition at line 1516 of file protocol.h.
|
default |
Parse an I&M0 record from raw bytes.
| data | Bytes starting at the BlockHeader field. |
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:
|
inline |
Combine VendorIdHigh/VendorIdLow into a 16-bit vendor ID.
Definition at line 1576 of file protocol.h.
References vendorId.
| std::array<std::uint8_t, blockHeaderLength> profinet::PNInM0::blockHeader {} |
|
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().
| 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().
| 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 1557 of file protocol.h.
Referenced by Parse().
| 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().
| 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().
| 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().
| 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().
| 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().
| std::uint16_t profinet::PNInM0::imVersion = 0 |
|
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().
| 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().
| 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().
| std::uint16_t profinet::PNInM0::vendorId = 0 |
The PROFINET vendor ID.
Definition at line 1527 of file protocol.h.
Referenced by Parse(), and VendorId().