|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Namespaces | |
| namespace | blocks |
| namespace | cyclic |
| namespace | dcp |
| namespace | detail |
| namespace | device |
| namespace | diagnosis |
| namespace | gsdml |
| namespace | rpc |
| namespace | rt |
| namespace | wire |
Classes | |
| struct | AlarmEndpoint |
| Alarm endpoint configuration. More... | |
| struct | AlarmItem |
| Generic/unknown alarm item. More... | |
| class | AlarmListener |
| Background listener for PROFINET alarm notifications. More... | |
| struct | AlarmNotification |
| Complete parsed AlarmNotification PDU: header fields + parsed items. More... | |
| class | DCPDeviceNotFoundError |
| Device not found via DCP. More... | |
| class | DCPError |
| DCP protocol errors. More... | |
| class | DCPTimeoutError |
| DCP operation timed out. More... | |
| struct | DiagnosisItem |
| Diagnosis alarm item. More... | |
| struct | EthernetHeader |
| Plain (untagged) Ethernet II frame header. More... | |
| class | EthernetSocket |
| A minimal RAII wrapper around a Linux AF_PACKET raw socket bound to an interface. More... | |
| struct | EthernetVLANHeader |
| 802.1Q VLAN-tagged Ethernet II frame header. More... | |
| class | IAlarmListener |
| Abstract interface for receiving PROFINET alarm notifications. More... | |
| class | InvalidIPError |
| Invalid IP address format. More... | |
| class | InvalidMACError |
| Invalid MAC address format. More... | |
| struct | IOCRAPIObject |
| One slot/subslot's placement within an IOCR's cyclic data frame. More... | |
| struct | IParameterItem |
| iParameter alarm item (USI 0x8201). More... | |
| struct | IPConfiguration |
| Decoded IPv4 address/netmask/gateway triple. More... | |
| class | IRawEthernetSocket |
| Abstract interface for raw Ethernet frame transport. More... | |
| struct | MaintenanceItem |
| Maintenance alarm item (USI 0x8100). More... | |
| class | MaxTimeout |
| Time-limited-operation helper, mirroring util.py's MaxTimeout context manager. More... | |
| struct | PEAlarmItem |
| PROFIenergy alarm item (USI 0x8310). More... | |
| class | PermissionDeniedError |
| Insufficient permissions for raw socket. More... | |
| struct | PNAlarmAckPDU |
| AlarmAck-PDU: acknowledges receipt of an AlarmNotification-PDU. More... | |
| struct | PNAlarmCRBlockReq |
| AlarmCRBlockReq: requests establishment of the alarm connection (part of the CONNECT request). More... | |
| struct | PNAlarmCRBlockRes |
| AlarmCRBlockRes: device's response confirming the alarm connection (part of the CONNECT response). More... | |
| struct | PNAlarmNotificationPDU |
| AlarmNotification-PDU: carries a diagnosis/process/pull/plug/... alarm event. More... | |
| struct | PNARBlockRequest |
| ARBlockReq: establishes an Application Relationship (sent in the CONNECT request). More... | |
| struct | PNBlockHeader |
| struct | PNDCPBlock |
| DCP response block: Option(1) + SubOption(1) + Length(2) + Status(2) + payload. More... | |
| struct | PNDCPBlockRequest |
| DCP request block: Option(1) + SubOption(1) + Length(2) + payload(Length). More... | |
| struct | PNDCPHeader |
| DCP (Discovery and Configuration Protocol) frame header. More... | |
| struct | PNExpectedSubmoduleDataDescription |
| Describes one direction (input or output) of a submodule's cyclic data. More... | |
| struct | PNInM0 |
| I&M0: mandatory identification data (vendor, order ID, serial number, revisions). More... | |
| struct | PNInM1 |
| I&M1: user-assigned tag function and location strings. More... | |
| struct | PNInM2 |
| I&M2: installation date. More... | |
| struct | PNInM3 |
| I&M3: free-text descriptor. More... | |
| struct | PNInM4 |
| I&M4: PROFIsafe signature (binary, not text). More... | |
| struct | PNInM5 |
| I&M5: free-text annotation. More... | |
| struct | PNInMReserved |
| I&M6-I&M15: reserved for future use per IEC 61158-6-10. More... | |
| struct | PNIOCRBlockReqHeader |
| IOCRBlockReq header: requests establishment of one IOCR (part of the CONNECT request). More... | |
| struct | PNIOCRBlockRes |
| IOCRBlockRes: device's response confirming an IOCR (part of the CONNECT response). More... | |
| struct | PNIODHeader |
| IOD read/write request/response header (RPC body for READ/WRITE/IMPLICIT_READ). More... | |
| struct | PNIODReleaseBlock |
| Control block used for Release/PrmBegin/PrmEnd/ApplicationReady/RTClass3 requests. More... | |
| struct | PNIODWriteReq |
| IODWriteReqHeader: request header for writing a data record. More... | |
| struct | PNIODWriteRes |
| IODWriteResHeader: response header confirming (or rejecting) a data record write. More... | |
| class | PNIOError |
| PNIO application error with error codes. More... | |
| struct | PNNRDData |
| NRD (Network Representation Data) wrapper carrying the actual IOD payload. More... | |
| struct | PNRPCHeader |
| DCE/RPC PDU header used to carry PROFINET connect/read/write/control requests. More... | |
| struct | PNRTAHeader |
| RTA-PDU Header - Real-Time Acyclic PDU for Layer 2 alarm transport. More... | |
| struct | PRALAlarmItem |
| Pull Request Alarm item (USI 0x8320). More... | |
| class | ProfinetError |
| Base exception for all PROFINET errors. More... | |
| class | RPCConnectionError |
| Failed to establish RPC connection. More... | |
| class | RPCError |
| DCE/RPC protocol errors. More... | |
| class | RPCFaultError |
| RPC returned a fault response. More... | |
| class | RPCTimeoutError |
| RPC operation timed out. More... | |
| struct | RSAlarmItem |
| Reporting System alarm item (USI 0x8300-0x8302). More... | |
| class | SocketError |
| Socket operation error. More... | |
| class | UdpSocket |
| A connected UDP socket with a timeout. More... | |
| struct | UploadRetrievalItem |
| Upload/Retrieval alarm item (USI 0x8200, 0x8201). More... | |
| class | ValidationError |
| Input validation error. More... | |
Typedefs | |
| using | AlarmItemVariant = std::variant< AlarmItem, DiagnosisItem, MaintenanceItem, UploadRetrievalItem, PEAlarmItem, RSAlarmItem, PRALAlarmItem > |
| A parsed alarm payload item; the held alternative is selected by USI. | |
| using | IndexNamePairs = std::vector< std::pair< std::uint16_t, std::string > > |
| (index, name) pairs, e.g. for building a "try each of these" scan. | |
| using | Bytes = std::vector< std::uint8_t > |
| Generic byte buffer alias used throughout the library for raw wire data. | |
| using | PNInM6 = PNInMReserved< 0xAFF6 > |
| I&M6 record type (reserved). | |
| using | PNInM7 = PNInMReserved< 0xAFF7 > |
| I&M7 record type (reserved). | |
| using | PNInM8 = PNInMReserved< 0xAFF8 > |
| I&M8 record type (reserved). | |
| using | PNInM9 = PNInMReserved< 0xAFF9 > |
| I&M9 record type (reserved). | |
| using | PNInM10 = PNInMReserved< 0xAFFA > |
| I&M10 record type (reserved). | |
| using | PNInM11 = PNInMReserved< 0xAFFB > |
| I&M11 record type (reserved). | |
| using | PNInM12 = PNInMReserved< 0xAFFC > |
| I&M12 record type (reserved). | |
| using | PNInM13 = PNInMReserved< 0xAFFD > |
| I&M13 record type (reserved). | |
| using | PNInM14 = PNInMReserved< 0xAFFE > |
| I&M14 record type (reserved). | |
| using | PNInM15 = PNInMReserved< 0xAFFF > |
| I&M15 record type (reserved). | |
| using | MacAddress = std::array< std::uint8_t, macAddressLength > |
| A 6-byte Ethernet MAC address. | |
Functions | |
| Usi | UsiOf (const AlarmItemVariant &item) |
| Get the USI shared by every AlarmItemVariant alternative. | |
| std::string | UsiNameOf (const AlarmItemVariant &item) |
| Get the human-readable USI name for any AlarmItemVariant alternative. | |
| std::pair< AlarmItemVariant, std::size_t > | ParseAlarmItem (const Bytes &data, std::size_t offset=0) |
| Parse a single alarm item starting at an offset. | |
| AlarmNotification | ParseAlarmNotification (const Bytes &data) |
| Parse a complete AlarmNotification PDU (BlockHeader + body + items). | |
| std::string | GetErrorDecodeName (ErrorDecode errorDecodeName) |
| Get the human-readable name for an ErrorDecode value. | |
| std::string | GetPnioRwErrorCode1Name (PnioRwErrorCode1 errorCodeRw1) |
| Get the human-readable name for a PNIORW ErrorCode1. | |
| std::string | GetPnioCmErrorCode1Name (PnioCmErrorCode1 errorCodeCm1) |
| Get the human-readable name for a PNIO-CM ErrorCode1. | |
| std::string | GetPnioRwErrorMessage (PnioRwInvalidIndexErrorCode2 errorCode2) |
| Get the human-readable message for an InvalidIndex error. | |
| std::string | GetPnioRwErrorMessage (PnioRwWriteLengthErrorCode2 errorCode2) |
| Get the human-readable message for a WriteLength error. | |
| std::string | GetPnioRwErrorMessage (PnioRwResourceErrorCode2 errorCode2) |
| Get the human-readable message for a Resource error. | |
| std::string | GetPnioRwErrorMessage (PnioRwAccessErrorCode2 errorCode2) |
| Get the human-readable message for an Access error. | |
| std::string | GetPnioRwErrorMessage (PnioRwApplicationErrorCode2 errorCode2) |
| Get the human-readable message for an Application error. | |
| std::string | GetPnioCmErrorMessage (PnioCmArErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM AR error. | |
| std::string | GetPnioCmErrorMessage (PnioCmIocrErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM IOCR error. | |
| std::string | GetPnioCmErrorMessage (PnioCmAlarmCrErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM Alarm CR error. | |
| std::string | GetPnioCmErrorMessage (PnioCmExpectedSubmoduleErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM Expected Submodule error. | |
| std::string | GetPnioCmErrorMessage (PnioCmDeviceErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM Device error. | |
| std::string | GetPnioCmErrorMessage (PnioCmFaultyBlockErrorCode2 errorCode2) |
| Get the human-readable message for a PNIO-CM Faulty Block error. | |
| std::string | GetPnioErrorCode1Name (PnioErrorCode1 errorCode1) |
| Get the human-readable name of a PNIO ErrorCode1. | |
| std::string | GetPnioErrorMessage (PnioRmpmErrorCode2 errorCode2) |
| Get the human-readable message for an RMPM ErrorCode2. | |
| std::string | GetPnioErrorMessage (PnioPrmServerErrorCode2 errorCode2) |
| Get the human-readable message for a Parameter Server ErrorCode2. | |
| std::string | GetPnioRwErrorMessage (PnioRwErrorCode1 errorCode1, std::uint8_t errorCode2) |
| Decode a PNIO read/write error. | |
| std::string | GetBlockTypeName (BlockType blockType) |
| Get the human-readable name for a block type. | |
| std::string | GetAlarmTypeName (AlarmType alarmType) |
| Get the human-readable name for an alarm type. | |
| std::string | GetIocrTypeName (IocrType iocrType) |
| Get the human-readable name for an IOCR type. | |
| std::string | GetIocrRtClassName (IocrRtClass rtClass) |
| Get the human-readable name for an IOCR real-time class. | |
| std::string | GetUsiName (Usi usi) |
| Get the human-readable name for a User Structure Identifier. | |
| std::string | GetModuleStateName (std::uint16_t state) |
| Get the human-readable name for a module state. | |
| std::string | GetSubmoduleStateName (std::uint16_t state) |
| Get the human-readable name for a submodule state. | |
| std::string | GetPeModeName (std::uint8_t mode) |
| Get the human-readable name for a PROFIenergy operational mode. | |
| const IndexNamePairs & | CriticalIndices () |
| Critical indices that should always be tested. | |
| const IndexNamePairs & | ImIndices () |
| I&M0-I&M15 indices. | |
| const IndexNamePairs & | DiagnosisIndices (const std::string &scope) |
| Diagnosis indices for a given addressing scope. | |
| const IndexNamePairs & | PortIndices () |
| Port-level indices. | |
| const IndexNamePairs & | InterfaceIndices () |
| Interface-level indices. | |
| const IndexNamePairs & | DeviceIndices () |
| Device-level indices. | |
| const IndexNamePairs & | AllStandardIndices () |
| Union of every standard index category. | |
| std::string | GetIndexName (std::uint16_t index) |
| Get the human-readable name for a record data index. | |
| std::string | GetScope (std::uint16_t index) |
| Get the addressing scope for an index. | |
| std::string | Hex4 (std::uint16_t value) |
| Format a 16-bit unsigned integer as a 4-digit hexadecimal string. | |
| std::string | Hex2 (std::uint8_t value) |
| Format an 8-bit unsigned integer as a 2-digit hexadecimal string. | |
| std::vector< std::uint8_t > | ToVec (const std::string &input) |
| Convert a string into a vector of raw bytes. | |
| std::string | HexFallback (const char *widthPrefix, std::uint32_t value, int digitWidth) |
| Format a hexadecimal string with a custom prefix and dynamic width. | |
| std::size_t | SkipVlanTags (std::span< const std::uint8_t > frame) noexcept |
| Return the byte offset of the real EtherType in a raw Ethernet frame. | |
| std::string | ToHex (const std::uint8_t *data, std::size_t len) |
| Hex-encode a byte buffer. | |
| std::string | ToHex (const std::vector< std::uint8_t > &data) |
| Hex-encode a byte buffer. | |
| MacAddress | String2Mac (const std::string &macStr) |
| Parse a colon-separated MAC address string. | |
| std::string | Mac2String (const MacAddress &mac) |
| Format a MAC address as a colon-separated string. | |
| std::string | Mac2String (const std::uint8_t *macBytes, std::size_t len) |
| Format a MAC address as a colon-separated string. | |
| std::string | String2Ip (std::span< const std::uint8_t > ipBytes) |
| Format raw IPv4 address bytes as a dotted string. | |
| std::string | String2Ip (const std::uint8_t *ipBytes, std::size_t len) |
| Format raw IPv4 address bytes as a dotted string. | |
| std::array< std::uint8_t, 4 > | Ip2String (const std::string &ipStr) |
| Parse a dotted-decimal IPv4 address string. | |
| std::string | DecodeBytes (const std::uint8_t *data, std::size_t len) |
| Decode bytes to a UTF-8 string, stripping trailing NUL bytes. | |
| std::string | DecodeBytes (const std::vector< std::uint8_t > &data) |
| Decode bytes to a UTF-8 string, stripping trailing NUL bytes. | |
| MacAddress | GetMac (const std::string &ifname) |
| Get the MAC address of a network interface. | |
| std::filesystem::path | GetExecutableDirectory () |
| Retrieves the absolute directory path of the currently running executable. | |
| std::string | GetVendorName (std::uint16_t vendorId) |
| Get the vendor name for a 16-bit PROFINET vendor ID. | |
| std::optional< std::string > | LookupVendor (std::uint16_t vendorId) |
| Look up a vendor name without a fallback string. | |
| std::string | DecodePnioCmError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2) |
| std::string | DecodePnioError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2) |
| std::string | DecodePnioRWError (const std::uint8_t &errorCode1, const std::uint8_t &errorCode2) |
Variables | |
| constexpr std::uint16_t | FRAME_ID_ALARM_HIGH = 0xFC01 |
| Frame ID used for high-priority alarms. | |
| constexpr std::uint16_t | FRAME_ID_ALARM_LOW = 0xFE01 |
| Frame ID used for low-priority alarms. | |
| constexpr std::uint16_t | ETHERTYPE_PROFINET = 0x8892 |
| EtherType used by PROFINET RTA frames (0x8892). | |
| constexpr std::uint16_t | ALARM_UDP_PORT = 34964 |
| UDP port used for alarm transport when Transport == 1. | |
| constexpr std::uint8_t | ALARM_TRANSPORT_RTA_CLASS_UDP = 0x01 |
| ALARM Cr Type ALARM. | |
| constexpr std::uint16_t | AR_TYPE_IOCAR_SINGLE = 0x0001 |
| AR Type Iocar Single. | |
| constexpr std::uint16_t | AR_TYPE_IOSAR = 0x0006 |
| AR Type Iosar. | |
| constexpr std::uint16_t | AR_TYPE_IOCARSR = 0x0020 |
| AR Type Iocarsr. | |
| constexpr std::uint16_t | MODULE_STATE_NO_MODULE = 0x0000 |
| Module State No Module. | |
| constexpr std::uint16_t | MODULE_STATE_WRONG_MODULE = 0x0001 |
| Module State Wrong Module. | |
| constexpr std::uint16_t | MODULE_STATE_PROPER_MODULE = 0x0002 |
| Module State Proper Module. | |
| constexpr std::uint16_t | MODULE_STATE_SUBSTITUTE_MODULE = 0x0003 |
| Module State Substitute Module. | |
| constexpr std::uint16_t | SUBMODULE_STATE_NO_SUBMODULE = 0x0000 |
| Submodule State No Submodule. | |
| constexpr std::uint16_t | SUBMODULE_STATE_WRONG_SUBMODULE = 0x0001 |
| Submodule State Wrong Submodule. | |
| constexpr std::uint16_t | SUBMODULE_STATE_LOCKED_BY_SUPERVISOR = 0x0002 |
| Submodule State Locked By Supervisor. | |
| constexpr std::uint16_t | SUBMODULE_STATE_APPLICATION_READY_PENDING = 0x0004 |
| Submodule State Application Ready Pending. | |
| constexpr std::uint16_t | SUBMODULE_STATE_OK = 0x0007 |
| Submodule State Ok. | |
| constexpr std::uint8_t | PE_MODE_POWER_OFF = 0x00 |
| PE Mode Power Off. | |
| constexpr std::uint8_t | PE_MODE_ENERGY_SAVING_MIN = 0x01 |
| PE Mode Energy Saving Min. | |
| constexpr std::uint8_t | PE_MODE_ENERGY_SAVING_MAX = 0x1F |
| PE Mode Energy Saving Max. | |
| constexpr std::uint8_t | PE_MODE_OPERATE = 0xF0 |
| PE Mode Operate. | |
| constexpr std::uint8_t | PE_MODE_SLEEP_MODE_WOL = 0xFE |
| PE Mode Sleep Mode WOL. | |
| constexpr std::uint8_t | PE_MODE_READY_TO_OPERATE = 0xFF |
| PE Mode Ready To Operate. | |
| constexpr std::uint16_t | IM0 = 0xAFF0 |
| I&M0. | |
| constexpr std::uint16_t | IM1 = 0xAFF1 |
| I&M1. | |
| constexpr std::uint16_t | IM2 = 0xAFF2 |
| I&M2. | |
| constexpr std::uint16_t | IM3 = 0xAFF3 |
| I&M3. | |
| constexpr std::uint16_t | IM4 = 0xAFF4 |
| I&M4. | |
| constexpr std::uint16_t | IM5 = 0xAFF5 |
| I&M5. | |
| constexpr std::uint16_t | IM6 = 0xAFF6 |
| I&M6. | |
| constexpr std::uint16_t | IM7 = 0xAFF7 |
| I&M7. | |
| constexpr std::uint16_t | IM8 = 0xAFF8 |
| I&M8. | |
| constexpr std::uint16_t | IM9 = 0xAFF9 |
| I&M9. | |
| constexpr std::uint16_t | IM10 = 0xAFFA |
| I&M10. | |
| constexpr std::uint16_t | IM11 = 0xAFFB |
| I&M11. | |
| constexpr std::uint16_t | IM12 = 0xAFFC |
| I&M12. | |
| constexpr std::uint16_t | IM13 = 0xAFFD |
| I&M13. | |
| constexpr std::uint16_t | IM14 = 0xAFFE |
| I&M14. | |
| constexpr std::uint16_t | IM15 = 0xAFFF |
| I&M15. | |
| constexpr std::uint16_t | IM0_FILTER_DATA = 0xF840 |
| I&M0 Filter Data. | |
| constexpr std::uint16_t | DIAG_CHANNEL_SUBSLOT = 0x800A |
| DIAG Channel Subslot. | |
| constexpr std::uint16_t | DIAG_ALL_SUBSLOT = 0x800B |
| DIAG All Subslot. | |
| constexpr std::uint16_t | DIAG_MAINTENANCE_SUBSLOT = 0x800C |
| DIAG Maintenance Subslot. | |
| constexpr std::uint16_t | DIAG_CHANNEL_SLOT = 0xC00A |
| DIAG Channel Slot. | |
| constexpr std::uint16_t | DIAG_ALL_SLOT = 0xC00B |
| DIAG All Slot. | |
| constexpr std::uint16_t | DIAG_MAINTENANCE_SLOT = 0xC00C |
| DIAG Maintenance Slot. | |
| constexpr std::uint16_t | DIAG_CHANNEL_AR = 0xE00A |
| DIAG Channel AR. | |
| constexpr std::uint16_t | DIAG_ALL_AR = 0xE00B |
| DIAG All AR. | |
| constexpr std::uint16_t | DIAG_MAINTENANCE_AR = 0xE00C |
| DIAG Maintenance AR. | |
| constexpr std::uint16_t | DIAG_CHANNEL_API = 0xF00A |
| DIAG Channel API. | |
| constexpr std::uint16_t | DIAG_ALL_API = 0xF00B |
| DIAG All API. | |
| constexpr std::uint16_t | DIAG_MAINTENANCE_API = 0xF00C |
| DIAG Maintenance API. | |
| constexpr std::uint16_t | DIAG_DEVICE = 0xF80C |
| DIAG Device. | |
| constexpr std::uint16_t | MAINT_REQUIRED_CHANNEL_SUBSLOT = 0x8010 |
| MAINT Required Channel Subslot. | |
| constexpr std::uint16_t | MAINT_DEMANDED_CHANNEL_SUBSLOT = 0x8011 |
| MAINT Demanded Channel Subslot. | |
| constexpr std::uint16_t | MAINT_REQUIRED_ALL_SUBSLOT = 0x8012 |
| MAINT Required All Subslot. | |
| constexpr std::uint16_t | MAINT_DEMANDED_ALL_SUBSLOT = 0x8013 |
| MAINT Demanded All Subslot. | |
| constexpr std::uint16_t | EXPECTED_ID_SUBSLOT = 0x8000 |
| Expected ID Subslot. | |
| constexpr std::uint16_t | REAL_ID_SUBSLOT = 0x8001 |
| Real ID Subslot. | |
| constexpr std::uint16_t | EXPECTED_ID_AR = 0xE000 |
| Expected ID AR. | |
| constexpr std::uint16_t | REAL_ID_AR = 0xE001 |
| Real ID AR. | |
| constexpr std::uint16_t | MODULE_DIFF_BLOCK = 0xE002 |
| Module Diff Block. | |
| constexpr std::uint16_t | REAL_ID_API = 0xF000 |
| Real ID API. | |
| constexpr std::uint16_t | AR_DATA = 0xF820 |
| AR Data. | |
| constexpr std::uint16_t | API_DATA = 0xF821 |
| API Data. | |
| constexpr std::uint16_t | PDEV_DATA = 0xF831 |
| Pdev Data. | |
| constexpr std::uint16_t | PD_REAL_DATA = 0xF841 |
| PD Real Data. | |
| constexpr std::uint16_t | PD_EXPECTED_DATA = 0xF842 |
| PD Expected Data. | |
| constexpr std::uint16_t | AUTO_CONFIG = 0xF850 |
| Auto Config. | |
| constexpr std::uint16_t | LOG_DATA = 0xF830 |
| Log Data. | |
| constexpr std::uint16_t | PD_PORT_DATA_REAL = 0x802A |
| PD Port Data Real. | |
| constexpr std::uint16_t | PD_PORT_DATA_CHECK = 0x802B |
| PD Port Data Check. | |
| constexpr std::uint16_t | PD_IR_DATA = 0x802C |
| PD IR Data. | |
| constexpr std::uint16_t | PD_SYNC_DATA = 0x802D |
| PD Sync Data. | |
| constexpr std::uint16_t | PD_PORT_DATA_ADJUST = 0x802F |
| PD Port Data Adjust. | |
| constexpr std::uint16_t | PD_PORT_STATISTIC = 0x8072 |
| PD Port Statistic. | |
| constexpr std::uint16_t | PD_NC_DATA_CHECK = 0x8070 |
| PD NC Data Check. | |
| constexpr std::uint16_t | PD_INTERFACE_ADJUST = 0x8071 |
| PD Interface Adjust. | |
| constexpr std::uint16_t | PD_INTERFACE_DATA_REAL = 0x8080 |
| PD Interface Data Real. | |
| constexpr std::uint16_t | PD_INTERFACE_FSU_ADJUST = 0x8090 |
| PD Interface FSU Adjust. | |
| constexpr std::uint16_t | PD_PORT_FO_DATA_REAL = 0x8060 |
| PD Port FO Data Real. | |
| constexpr std::uint16_t | PD_PORT_FO_DATA_CHECK = 0x8061 |
| PD Port FO Data Check. | |
| constexpr std::uint16_t | PD_PORT_FO_DATA_ADJUST = 0x8062 |
| PD Port FO Data Adjust. | |
| constexpr std::uint16_t | PD_PORT_SFP_DATA_CHECK = 0x8063 |
| PD Port SFP Data Check. | |
| constexpr std::uint16_t | PD_INTERFACE_MRP_DATA_REAL = 0x8050 |
| PD Interface MRP Data Real. | |
| constexpr std::uint16_t | PD_INTERFACE_MRP_DATA_CHECK = 0x8051 |
| PD Interface MRP Data Check. | |
| constexpr std::uint16_t | PD_INTERFACE_MRP_DATA_ADJUST = 0x8052 |
| PD Interface MRP Data Adjust. | |
| constexpr std::uint16_t | PD_PORT_MRP_DATA_ADJUST = 0x8053 |
| PD Port MRP Data Adjust. | |
| constexpr std::uint16_t | PD_PORT_MRP_DATA_REAL = 0x8054 |
| PD Port MRP Data Real. | |
| constexpr std::uint16_t | PD_PORT_MRP_IC_DATA_ADJUST = 0x8055 |
| PD Port MRP IC Data Adjust. | |
| constexpr std::uint16_t | PD_PORT_MRP_IC_DATA_CHECK = 0x8056 |
| PD Port MRP IC Data Check. | |
| constexpr std::uint16_t | PD_PORT_MRP_IC_DATA_REAL = 0x8057 |
| PD Port MRP IC Data Real. | |
| constexpr std::uint16_t | PD_IR_SUBFRAME_DATA = 0x8020 |
| PD IR Subframe Data. | |
| constexpr std::uint16_t | ISOCHRONOUS_MODE_DATA = 0x8030 |
| Isochronous Mode Data. | |
| constexpr std::uint16_t | PD_TIME_DATA = 0x8031 |
| PD Time Data. | |
| constexpr std::uint16_t | SUBSTITUTE_VALUES = 0x801E |
| Substitute Values. | |
| constexpr std::uint16_t | RECORD_INPUT_DATA = 0x8028 |
| Record Input Data. | |
| constexpr std::uint16_t | RECORD_OUTPUT_DATA = 0x8029 |
| Record Output Data. | |
| constexpr std::uint16_t | AM_DEVICE_ID = 0xF8E0 |
| AM Device ID. | |
| constexpr std::uint16_t | AM_FULL_INFO = 0xF8E1 |
| AM Full Info. | |
| constexpr std::uint16_t | AM_HW_ONLY = 0xF8E2 |
| AM HW Only. | |
| constexpr std::uint16_t | AM_FW_ONLY = 0xF8E3 |
| AM FW Only. | |
| constexpr std::uint16_t | AM_LOCATION_SLOT = 0xFBE0 |
| AM Location Slot. | |
| constexpr std::uint16_t | AM_LOCATION_TREE = 0xFBE1 |
| AM Location Tree. | |
| constexpr std::uint16_t | AM_DATA = 0xFBF0 |
| AM Data. | |
| constexpr std::uint16_t | F_PARAMETER_BLOCK = 0x0100 |
| F Parameter Block. | |
| constexpr std::uint16_t | F_PRM_FLAG1 = 0x0101 |
| F Prm Flag1. | |
| constexpr std::uint16_t | F_PRM_FLAG2 = 0x0102 |
| F Prm Flag2. | |
| constexpr std::uint16_t | F_PARAMETER_WRITE = 0xE000 |
| F Parameter Write. | |
| constexpr std::uint16_t | F_PARAMETER_READ = 0xE001 |
| F Parameter Read. | |
| constexpr std::uint16_t | PROFIENERGY = 0x80A0 |
| Profienergy. | |
| constexpr std::uint16_t | WRITE_MULTIPLE = 0xE040 |
| Write Multiple. | |
| constexpr std::uint16_t | AR_FSU_DATA_ADJUST = 0xE050 |
| AR FSU Data Adjust. | |
| constexpr std::uint16_t | SUBSLOT_DAP = 0x0001 |
| Subslot DAP. | |
| constexpr std::uint16_t | SUBSLOT_INTERFACE = 0x8000 |
| Subslot Interface. | |
| constexpr std::uint16_t | SUBSLOT_PORT1 = 0x8001 |
| Subslot Port1. | |
| constexpr std::uint16_t | SUBSLOT_PORT2 = 0x8002 |
| Subslot Port2. | |
| constexpr int | blockHeaderLenght = 6 |
| Constant lenght of a blockHeader. | |
| constexpr std::array< std::uint8_t, 12 > | kPnUuidSuffix |
| PROFINET UUID suffix, shared by all interface/object UUIDs. | |
| constexpr std::size_t | MAX_ETHERNET_FRAME = 1522 |
| Maximum PROFINET Ethernet frame size in bytes (including VLAN tag headroom). | |
| constexpr std::uint16_t | PROFINET_ETHERTYPE = 0x8892 |
| EtherType value identifying PROFINET frames (0x8892). | |
| constexpr std::uint16_t | IP_ETHERTYPE = 0x8000 |
| EtherType value identifying IP frames (0x8000). | |
| constexpr std::uint16_t | VLAN_ETHERTYPE = 0x8100 |
| EtherType value identifying an 802.1Q VLAN tag (0x8100). | |
| constexpr int | ETH_P_ALL = 0x0003 |
| Linux AF_PACKET protocol value matching every EtherType. | |
| constexpr int | macAddressLength = 6 |
| Constant lenght of a mac address. | |
| constexpr int | uuidLenght = 16 |
| Constant lenght of a UUID. | |
| static constexpr int | BitsPerOctet = 8 |
| static constexpr int | OneOctetShift = BitsPerOctet |
| The bit-shift distance required to move data across a single octet. | |
| static constexpr int | TwoOctetsShift = BitsPerOctet * 2 |
| The bit-shift distance required to move data across two octets. | |
| static constexpr int | ThreeOctetsShift = BitsPerOctet * 3 |
| The bit-shift distance required to move data across three octets. | |
| static constexpr std::uint8_t | LowByteMask = 0xFF |
| Bitmask used to isolate the lowest significant byte (8 bits) of a larger integer. | |
| constexpr std::size_t | RECEIVE_BUFFER_LENGTH = 4096 |
| Receive buffer length. | |
Defines the structures and parsing functions used to decode AlarmNotification payloads according to their User Structure Identifier (USI). Provides alarm item types and parsing functions for AlarmNotification PDUs (USI-dispatched: Diagnosis, Maintenance, Upload/Retrieval, PE, RS, PRAL). Per IEC 61158-6-10.
Defines protocol, transport, timeout, and PNIO error representations used to report failures across DCP, RPC, cyclic IO, and related services.
| using profinet::AlarmItemVariant = typedef std::variant<AlarmItem, DiagnosisItem, MaintenanceItem, UploadRetrievalItem, PEAlarmItem, RSAlarmItem, PRALAlarmItem> |
| using profinet::Bytes = typedef std::vector<std::uint8_t> |
Generic byte buffer alias used throughout the library for raw wire data.
Definition at line 52 of file protocol.h.
| using profinet::IndexNamePairs = typedef std::vector<std::pair<std::uint16_t, std::string> > |
| using profinet::MacAddress = typedef std::array<std::uint8_t, macAddressLength> |
| using profinet::PNInM10 = typedef PNInMReserved<0xAFFA> |
I&M10 record type (reserved).
Definition at line 1432 of file protocol.h.
| using profinet::PNInM11 = typedef PNInMReserved<0xAFFB> |
I&M11 record type (reserved).
Definition at line 1434 of file protocol.h.
| using profinet::PNInM12 = typedef PNInMReserved<0xAFFC> |
I&M12 record type (reserved).
Definition at line 1436 of file protocol.h.
| using profinet::PNInM13 = typedef PNInMReserved<0xAFFD> |
I&M13 record type (reserved).
Definition at line 1438 of file protocol.h.
| using profinet::PNInM14 = typedef PNInMReserved<0xAFFE> |
I&M14 record type (reserved).
Definition at line 1440 of file protocol.h.
| using profinet::PNInM15 = typedef PNInMReserved<0xAFFF> |
I&M15 record type (reserved).
Definition at line 1442 of file protocol.h.
| using profinet::PNInM6 = typedef PNInMReserved<0xAFF6> |
I&M6 record type (reserved).
Definition at line 1424 of file protocol.h.
| using profinet::PNInM7 = typedef PNInMReserved<0xAFF7> |
I&M7 record type (reserved).
Definition at line 1426 of file protocol.h.
| using profinet::PNInM8 = typedef PNInMReserved<0xAFF8> |
I&M8 record type (reserved).
Definition at line 1428 of file protocol.h.
| using profinet::PNInM9 = typedef PNInMReserved<0xAFF9> |
I&M9 record type (reserved).
Definition at line 1430 of file protocol.h.
|
strong |
PROFINET Alarm Types used in AlarmNotification blocks.
The underlying values correspond to the Alarm Type field defined by PROFINET IO.
|
strong |
PROFINET block types.
The underlying values correspond to the BlockType field defined by PROFINET IO.
|
strong |
PROFINET IOD control command values.
These values are bit fields as defined by IEC 61158-6-10.
|
strong |
PROFINET error decode values.
The ErrorDecode field identifies the error family and determines how ErrorCode1 and subsequent error information are interpreted.
| Enumerator | |
|---|---|
| PnioCm | PNIO connection management error. |
| PnioRw | PNIO read/write error. |
| Pnio | General PNIO error. |
Definition at line 21 of file exceptions.h.
|
strong |
|
strong |
|
strong |
PNIO-CM Alarm CR ErrorCode2 values.
| Enumerator | |
|---|---|
| InvalidAlarmCrType | Invalid Alarm CR type. |
| NoAlarmCrResources | No Alarm CR resources are available. |
Definition at line 352 of file exceptions.h.
|
strong |
PNIO-CM AR ErrorCode2 values.
Definition at line 280 of file exceptions.h.
|
strong |
PNIO-CM Device ErrorCode2 values.
ErrorCode2 values for errors reported by the connection management device (CMDEV).
Definition at line 403 of file exceptions.h.
|
strong |
PNIO-CM ErrorCode1 values.
These values are interpreted when ErrorDecode is ErrorDecode::PnioCm.
Definition at line 75 of file exceptions.h.
|
strong |
PNIO-CM Expected Submodule ErrorCode2 values.
ErrorCode2 values for errors associated with the ExpectedSubmoduleBlockReq.
Definition at line 373 of file exceptions.h.
|
strong |
PNIO-CM Faulty Block ErrorCode2 values.
ErrorCode2 values for errors indicating a faulty PNIO-CM block.
| Enumerator | |
|---|---|
| FaultyBlockStructure | Faulty block structure. |
Definition at line 429 of file exceptions.h.
|
strong |
PNIO-CM IOCR ErrorCode2 values.
Definition at line 319 of file exceptions.h.
|
strong |
PNIO ErrorCode1 values.
ErrorCode1 identifies the specific PNIO error category. The meaning of ErrorCode2 depends on the selected ErrorCode1 value.
| Enumerator | |
|---|---|
| Rmpm | Runtime parameter and module management (RMPM) error. |
| PrmServer | Parameter server error. |
Definition at line 447 of file exceptions.h.
|
strong |
PNIO Parameter Server ErrorCode2 values.
These values are valid when ErrorCode1 is PnioErrorCode1::PrmServer.
| Enumerator | |
|---|---|
| StateConflict | The parameter server is in an invalid state for the requested operation. |
Definition at line 498 of file exceptions.h.
|
strong |
PNIO RMPM ErrorCode2 values.
These values are valid when ErrorCode1 is PnioErrorCode1::Rmpm.
Definition at line 468 of file exceptions.h.
|
strong |
PNIORW Access ErrorCode2 values.
Definition at line 219 of file exceptions.h.
|
strong |
PNIORW Application ErrorCode2 values.
Definition at line 245 of file exceptions.h.
|
strong |
PNIO read/write ErrorCode1 values.
These values are interpreted when ErrorDecode is ErrorDecode::PnioRw.
| Enumerator | |
|---|---|
| InvalidIndex | Invalid or unsupported index. |
| WriteLength | Write length error. |
| Resource | Resource error. |
| Access | Access error. |
| Application | Application error. |
Definition at line 45 of file exceptions.h.
|
strong |
PNIORW InvalidIndex ErrorCode2 values.
| Enumerator | |
|---|---|
| IndexNotSupported | Index is not supported. |
| IndexNotWritten | Index exists but has not been written. |
Definition at line 156 of file exceptions.h.
|
strong |
PNIORW Resource ErrorCode2 values.
| Enumerator | |
|---|---|
| ResourceNotAvailable | Resource is not available. |
| InvalidSlot | Slot number is invalid. |
| InvalidSubslot | Subslot number is invalid. |
| ModuleHasNoData | Module has no data. |
Definition at line 196 of file exceptions.h.
|
strong |
PNIORW WriteLength ErrorCode2 values.
Definition at line 173 of file exceptions.h.
|
strong |
PROFINET User Structure Identifiers (USI).
The underlying values correspond to the User Structure Identifier field used in PROFINET diagnosis and alarm data.
| const IndexNamePairs & profinet::AllStandardIndices | ( | ) |
Union of every standard index category.
Combines ImIndices() + DiagnosisIndices("subslot") + DiagnosisIndices("device") + PortIndices() + InterfaceIndices() + DeviceIndices() + a handful of extras (ExpectedIdentificationData, RealIdentificationData, ModuleDiffBlock, SubstituteValues, RecordInputData, RecordOutputData) – matches alarms.py's ALL_STANDARD_INDICES concatenation order.
Definition at line 618 of file indices.cpp.
References DeviceIndices(), DiagnosisIndices(), EXPECTED_ID_SUBSLOT, ImIndices(), InterfaceIndices(), MODULE_DIFF_BLOCK, PortIndices(), REAL_ID_SUBSLOT, RECORD_INPUT_DATA, RECORD_OUTPUT_DATA, and SUBSTITUTE_VALUES.
Referenced by GetIndexName().
Here is the call graph for this function:
Here is the caller graph for this function:| const IndexNamePairs & profinet::CriticalIndices | ( | ) |
Critical indices that should always be tested.
Definition at line 495 of file indices.cpp.
References AR_DATA, DIAG_DEVICE, IM0, IM0_FILTER_DATA, LOG_DATA, MODULE_DIFF_BLOCK, and PD_REAL_DATA.
| std::string profinet::DecodeBytes | ( | const std::uint8_t * | data, |
| std::size_t | len | ||
| ) |
Decode bytes to a UTF-8 string, stripping trailing NUL bytes.
| data | Pointer to the first byte to decode. |
| len | Number of bytes to decode. |
Definition at line 247 of file util.cpp.
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), DecodeBytes(), profinet::PNInM0::Parse(), profinet::PNInM1::Parse(), profinet::PNInM2::Parse(), profinet::PNInM3::Parse(), profinet::PNInM5::Parse(), and profinet::dcp::DCPDHCPBlock::Parse().
Here is the caller graph for this function:| std::string profinet::DecodeBytes | ( | const std::vector< std::uint8_t > & | data | ) |
Decode bytes to a UTF-8 string, stripping trailing NUL bytes.
| data | Bytes to decode. |
Definition at line 258 of file util.cpp.
References DecodeBytes().
Here is the call graph for this function:| std::string profinet::DecodePnioCmError | ( | const std::uint8_t & | errorCode1, |
| const std::uint8_t & | errorCode2 | ||
| ) |
Definition at line 538 of file exceptions.cpp.
References AlarmCr, AlarmCrResponse, Ar, ArResponse, CmDev, ExpectedSubmodule, FaultyBlock, GetPnioCmErrorCode1Name(), GetPnioCmErrorMessage(), Iocr, and IocrResponse.
Referenced by profinet::PNIOError::CreateFromCodes().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::DecodePnioError | ( | const std::uint8_t & | errorCode1, |
| const std::uint8_t & | errorCode2 | ||
| ) |
Definition at line 575 of file exceptions.cpp.
References GetPnioErrorMessage(), PrmServer, and Rmpm.
Referenced by profinet::PNIOError::CreateFromCodes().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::DecodePnioRWError | ( | const std::uint8_t & | errorCode1, |
| const std::uint8_t & | errorCode2 | ||
| ) |
Definition at line 591 of file exceptions.cpp.
References Access, Application, GetPnioRwErrorMessage(), InvalidIndex, Resource, and WriteLength.
Referenced by profinet::PNIOError::CreateFromCodes().
Here is the call graph for this function:
Here is the caller graph for this function:| const IndexNamePairs & profinet::DeviceIndices | ( | ) |
Device-level indices.
Definition at line 604 of file indices.cpp.
References API_DATA, AR_DATA, AUTO_CONFIG, LOG_DATA, PD_EXPECTED_DATA, PD_REAL_DATA, and PDEV_DATA.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
Here is the caller graph for this function:| const IndexNamePairs & profinet::DiagnosisIndices | ( | const std::string & | scope | ) |
Diagnosis indices for a given addressing scope.
| scope | One of "subslot", "slot", "ar", "api", "device". |
Definition at line 532 of file indices.cpp.
References DIAG_ALL_API, DIAG_ALL_AR, DIAG_ALL_SLOT, DIAG_ALL_SUBSLOT, DIAG_CHANNEL_API, DIAG_CHANNEL_AR, DIAG_CHANNEL_SLOT, DIAG_CHANNEL_SUBSLOT, DIAG_DEVICE, DIAG_MAINTENANCE_API, DIAG_MAINTENANCE_AR, DIAG_MAINTENANCE_SLOT, and DIAG_MAINTENANCE_SUBSLOT.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
Here is the caller graph for this function:| std::string profinet::GetAlarmTypeName | ( | AlarmType | alarmType | ) |
Get the human-readable name for an alarm type.
| alarmType | Alarm type. |
Definition at line 278 of file indices.cpp.
References ControlledBySupervisor, DfpProblem, Diagnosis, DiagnosisDisappears, IsochronousModeProblem, MulticastMismatch, NetworkComponentProblem, Plug, PlugWrongSubmodule, PortDataChange, Process, Pull, PullModule, Redundancy, Released, ReturnOfSubmodule, Status, SyncDataChanged, TimeDataChanged, Update, and UploadRetrieval.
Referenced by profinet::AlarmNotification::AlarmTypeName().
Here is the caller graph for this function:| std::string profinet::GetBlockTypeName | ( | BlockType | blockType | ) |
Get the human-readable name for a block type.
| blockType | Block type. |
Definition at line 38 of file indices.cpp.
References AlarmAcknowledgementHigh, AlarmAcknowledgementLow, AlarmCrRequest, AlarmCrResponse, AlarmNotificationHigh, AlarmNotificationLow, ApiData, ApplicationRelationData, ApplicationRelationRequest, ApplicationRelationResponse, ApplicationRelationServer, ContainerContent, ControlApplicationReadyRequest, ControlApplicationReadyResponse, ControlPrmEndRequest, ControlPrmEndResponse, ControlRtClass3Request, ControlRtClass3Response, DiagnosisData, ExpectedIdentificationData, ExpectedProcessData, ExpectedSubmoduleRequest, Hex4(), IdentificationMaintenance0, IdentificationMaintenance1, IdentificationMaintenance10, IdentificationMaintenance11, IdentificationMaintenance12, IdentificationMaintenance13, IdentificationMaintenance14, IdentificationMaintenance15, IdentificationMaintenance2, IdentificationMaintenance3, IdentificationMaintenance4, IdentificationMaintenance5, IdentificationMaintenance6, IdentificationMaintenance7, IdentificationMaintenance8, IdentificationMaintenance9, InterfaceMrpDataAdjust, InterfaceMrpDataReal, IoCrRequest, IoCrResponse, IoDataReadRequest, IoDataReadResponse, IoDataWriteRequest, IoDataWriteResponse, LogData, ModuleDifference, MrpRingStateData, MultipleHeader, ParameterizationBeginRequest, ParameterizationBeginResponse, PortDataAdjust, PortDataCheck, PortDataInterfaceDataReal, PortDataReal, PortDataRealExtended, PortFoDataAdjust, PortFoDataCheck, PortFoDataReal, PortMrpDataReal, PortStatistics, RealIdentificationData, RealIdentificationDataApi, RealProcessData, ReleaseRequest, ReleaseResponse, SrlData, and SubmoduleList.
Referenced by profinet::blocks::ParseModuleDiffBlock(), and profinet::blocks::BlockHeader::TypeName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetErrorDecodeName | ( | ErrorDecode | errorDecodeName | ) |
Get the human-readable name for an ErrorDecode value.
| errorDecodeName | Error decode value. |
Definition at line 15 of file exceptions.cpp.
References Hex2(), Pnio, PnioCm, and PnioRw.
Here is the call graph for this function:| std::filesystem::path profinet::GetExecutableDirectory | ( | ) |
Retrieves the absolute directory path of the currently running executable.
This function reads the /proc/self/exe symbolic link maintained by the Linux kernel and extracts its parent directory using modern C++20 filesystem utilities.
It safely wraps any system exceptions inside a try-catch block and guarantees no manual buffer management or C-style array pitfalls.
| std::string profinet::GetIndexName | ( | std::uint16_t | index | ) |
Get the human-readable name for a record data index.
| index | Record data index. |
Definition at line 642 of file indices.cpp.
References AllStandardIndices(), and Hex4().
Referenced by profinet::rpc::RPCCon::EnumerateIndices().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetIocrRtClassName | ( | IocrRtClass | rtClass | ) |
Get the human-readable name for an IOCR real-time class.
| rtClass | IOCR real-time class. |
Definition at line 373 of file indices.cpp.
Here is the call graph for this function:| std::string profinet::GetIocrTypeName | ( | IocrType | iocrType | ) |
Get the human-readable name for an IOCR type.
| iocrType | IOCR type. |
Definition at line 350 of file indices.cpp.
References Hex4(), Input, MulticastConsumer, MulticastProvider, and Output.
Here is the call graph for this function:| MacAddress profinet::GetMac | ( | const std::string & | ifname | ) |
Get the MAC address of a network interface.
| ifname | Interface name, e.g. "eth0". |
Uses SIOCGIFHWADDR (Linux only). Throws SocketError on failure.
Definition at line 267 of file util.cpp.
Referenced by profinet::device::ProfinetDevice::Discover(), profinet::device::ProfinetDevice::FromDcpInfo(), profinet::device::ProfinetDevice::FromIp(), and profinet::device::Scan().
Here is the caller graph for this function:| std::string profinet::GetModuleStateName | ( | std::uint16_t | state | ) |
Get the human-readable name for a module state.
| state | Raw module state value. |
Definition at line 445 of file indices.cpp.
References Hex4(), MODULE_STATE_NO_MODULE, MODULE_STATE_PROPER_MODULE, MODULE_STATE_SUBSTITUTE_MODULE, and MODULE_STATE_WRONG_MODULE.
Referenced by profinet::blocks::ModuleDiffModule::StateName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPeModeName | ( | std::uint8_t | mode | ) |
Get the human-readable name for a PROFIenergy operational mode.
| mode | Raw PROFIenergy mode value. |
Definition at line 470 of file indices.cpp.
References Hex2(), PE_MODE_ENERGY_SAVING_MAX, PE_MODE_ENERGY_SAVING_MIN, PE_MODE_OPERATE, PE_MODE_POWER_OFF, PE_MODE_READY_TO_OPERATE, and PE_MODE_SLEEP_MODE_WOL.
Referenced by profinet::PEAlarmItem::ModeName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPnioCmErrorCode1Name | ( | PnioCmErrorCode1 | errorCodeCm1 | ) |
Get the human-readable name for a PNIO-CM ErrorCode1.
| errorCodeCm1 | ErrorCode1 value. |
Definition at line 61 of file exceptions.cpp.
References AlarmCr, AlarmCrResponse, Ar, ArFsu, ArResponse, ArRpc, ArServerResponse, CmCtl, CmDev, CmRpc, ExpectedSubmodule, FaultyAr, FaultyBlock, FaultyRecord, Hex2(), Iocr, IocrResponse, IodControlRequest, IodControlResponse, IrInfo, ModuleDiff, ModuleDiffResponse, PrmServer, and SrInfo.
Referenced by profinet::PNIOError::BlockName(), and DecodePnioCmError().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmAlarmCrErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM Alarm CR error.
| errorCode2 | PNIO-CM Alarm CR ErrorCode2 value. |
Definition at line 426 of file exceptions.cpp.
References Hex2(), InvalidAlarmCrType, and NoAlarmCrResources.
Here is the call graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmArErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM AR error.
| errorCode2 | PNIO-CM AR ErrorCode2 value. |
Definition at line 356 of file exceptions.cpp.
References ArAlreadyActive, ArUuidConflict, Hex2(), InvalidArType, InvalidSessionKey, NoAlarmResources, NoArResources, NoConsumerResources, NoMemory, and NoProviderResources.
Referenced by DecodePnioCmError().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmDeviceErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM Device error.
| errorCode2 | PNIO-CM Device ErrorCode2 value. |
Definition at line 469 of file exceptions.cpp.
References AlreadyOwned, ArSetAborted, ConnectionResourceUnavailable, DeviceStateConflict, and Hex2().
Here is the call graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmExpectedSubmoduleErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM Expected Submodule error.
| errorCode2 | PNIO-CM Expected Submodule ErrorCode2 value. |
Definition at line 443 of file exceptions.cpp.
References Hex2(), InvalidSlot, InvalidSubslot, IoDataLengthMismatch, WrongModuleIdentNumber, and WrongSubmoduleIdentNumber.
Here is the call graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmFaultyBlockErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM Faulty Block error.
| errorCode2 | PNIO-CM Faulty Block ErrorCode2 value. |
Definition at line 492 of file exceptions.cpp.
References FaultyBlockStructure, and Hex2().
Here is the call graph for this function:| std::string profinet::GetPnioCmErrorMessage | ( | PnioCmIocrErrorCode2 | errorCode2 | ) |
Get the human-readable message for a PNIO-CM IOCR error.
| errorCode2 | PNIO-CM IOCR ErrorCode2 value. |
Definition at line 394 of file exceptions.cpp.
References CycleTimeConflict, Hex2(), InvalidFrameId, InvalidIocrType, InvalidIoDataLength, InvalidRtClass, NoIocrResources, and WatchdogConfigurationError.
Here is the call graph for this function:| std::string profinet::GetPnioErrorCode1Name | ( | PnioErrorCode1 | errorCode1 | ) |
Get the human-readable name of a PNIO ErrorCode1.
| errorCode1 | PNIO ErrorCode1 value. |
Definition at line 265 of file exceptions.cpp.
References Hex2(), PrmServer, and Rmpm.
Here is the call graph for this function:| std::string profinet::GetPnioErrorMessage | ( | PnioPrmServerErrorCode2 | errorCode2 | ) |
Get the human-readable message for a Parameter Server ErrorCode2.
| errorCode2 | Parameter Server ErrorCode2 value. |
Definition at line 308 of file exceptions.cpp.
References Hex2(), and StateConflict.
Here is the call graph for this function:| std::string profinet::GetPnioErrorMessage | ( | PnioRmpmErrorCode2 | errorCode2 | ) |
Get the human-readable message for an RMPM ErrorCode2.
| errorCode2 | RMPM ErrorCode2 value. |
Definition at line 282 of file exceptions.cpp.
References Hex2(), InvalidArgumentsLength, OutOfArResources, RequiredIocrBlockMissing, UnknownBlocksInRequest, and WrongAlarmCrBlockCount.
Referenced by DecodePnioError().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPnioRwErrorCode1Name | ( | PnioRwErrorCode1 | errorCodeRw1 | ) |
Get the human-readable name for a PNIORW ErrorCode1.
| errorCodeRw1 | ErrorCode1 value. |
Definition at line 35 of file exceptions.cpp.
References Access, Application, Hex2(), InvalidIndex, Resource, and WriteLength.
Here is the call graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwAccessErrorCode2 | errorCode2 | ) |
Get the human-readable message for an Access error.
| errorCode2 | PNIO Read/Write Access ErrorCode2. |
Definition at line 204 of file exceptions.cpp.
References AccessDenied, Hex2(), InvalidArea, InvalidRange, InvalidState, and LocalControl.
Here is the call graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwApplicationErrorCode2 | errorCode2 | ) |
Get the human-readable message for an Application error.
| errorCode2 | PNIO Read/Write Application ErrorCode2. |
Definition at line 230 of file exceptions.cpp.
References AlarmPending, BackupNotAllowed, Hex2(), InvalidApi, ModuleFailure, ReadError, ResourceBusy, VersionConflict, and WriteError.
Here is the call graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwErrorCode1 | errorCode1, |
| std::uint8_t | errorCode2 | ||
| ) |
Decode a PNIO read/write error.
| errorCode1 | PNIO read/write ErrorCode1 value. |
| errorCode2 | Raw PNIO read/write ErrorCode2 value. |
ErrorCode2 is interpreted according to the ErrorCode1 category. Unknown ErrorCode2 values are returned as a hexadecimal value.
Definition at line 322 of file exceptions.cpp.
References Access, Application, GetPnioRwErrorMessage(), Hex2(), InvalidIndex, Resource, and WriteLength.
Here is the call graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwInvalidIndexErrorCode2 | errorCode2 | ) |
Get the human-readable message for an InvalidIndex error.
| errorCode2 | PNIO Read/Write InvalidIndex ErrorCode2. |
Definition at line 141 of file exceptions.cpp.
References Hex2(), IndexNotSupported, and IndexNotWritten.
Referenced by DecodePnioRWError(), and GetPnioRwErrorMessage().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwResourceErrorCode2 | errorCode2 | ) |
Get the human-readable message for a Resource error.
| errorCode2 | PNIO Read/Write Resource ErrorCode2. |
Definition at line 181 of file exceptions.cpp.
References Hex2(), InvalidSlot, InvalidSubslot, ModuleHasNoData, and ResourceNotAvailable.
Here is the call graph for this function:| std::string profinet::GetPnioRwErrorMessage | ( | PnioRwWriteLengthErrorCode2 | errorCode2 | ) |
Get the human-readable message for a WriteLength error.
| errorCode2 | PNIO Read/Write WriteLength ErrorCode2. |
Definition at line 158 of file exceptions.cpp.
References DataTooLong, DataTooShort, Hex2(), WriteLengthError, and WriteProtected.
Here is the call graph for this function:| std::string profinet::GetScope | ( | std::uint16_t | index | ) |
Get the addressing scope for an index.
| index | Record data index. |
Definition at line 683 of file indices.cpp.
| std::string profinet::GetSubmoduleStateName | ( | std::uint16_t | state | ) |
Get the human-readable name for a submodule state.
| state | Raw submodule state value. |
Definition at line 457 of file indices.cpp.
References Hex4(), SUBMODULE_STATE_APPLICATION_READY_PENDING, SUBMODULE_STATE_LOCKED_BY_SUPERVISOR, SUBMODULE_STATE_NO_SUBMODULE, SUBMODULE_STATE_OK, and SUBMODULE_STATE_WRONG_SUBMODULE.
Referenced by profinet::blocks::ModuleDiffSubmodule::StateName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetUsiName | ( | Usi | usi | ) |
Get the human-readable name for a User Structure Identifier.
| usi | User Structure Identifier. |
Definition at line 386 of file indices.cpp.
References ChannelDiagnosis, ExtendedChannelDiagnosis, Hex4(), IParameter, Maintenance, MultipleDiagnosis, PeAlarm, PralAlarm, QualifiedChannelDiagnosis, RsAlarmHigh, RsAlarmLow, RsAlarmSubmodule, and Upload.
Referenced by profinet::AlarmItem::UsiName(), profinet::DiagnosisItem::UsiName(), profinet::MaintenanceItem::UsiName(), profinet::UploadRetrievalItem::UsiName(), profinet::IParameterItem::UsiName(), profinet::PEAlarmItem::UsiName(), profinet::RSAlarmItem::UsiName(), and profinet::PRALAlarmItem::UsiName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::GetVendorName | ( | std::uint16_t | vendorId | ) |
Get the vendor name for a 16-bit PROFINET vendor ID.
| vendorId | 16-bit PROFINET vendor ID. |
Definition at line 29 of file vendors.cpp.
References LookupVendor().
Referenced by profinet::dcp::DCPDeviceDescription::VendorName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::Hex2 | ( | std::uint8_t | value | ) |
Format an 8-bit unsigned integer as a 2-digit hexadecimal string.
| value | The 8-bit numeric value to format. |
Definition at line 68 of file util.cpp.
Referenced by profinet::PNIOError::CreateFromCodes(), profinet::dcp::DcpBlockErrorName(), profinet::dcp::GetBlockName(), GetErrorDecodeName(), GetIocrRtClassName(), profinet::dcp::DCPResponseCode::GetName(), GetPeModeName(), GetPnioCmErrorCode1Name(), GetPnioCmErrorMessage(), GetPnioCmErrorMessage(), GetPnioCmErrorMessage(), GetPnioCmErrorMessage(), GetPnioCmErrorMessage(), GetPnioCmErrorMessage(), GetPnioErrorCode1Name(), GetPnioErrorMessage(), GetPnioErrorMessage(), GetPnioRwErrorCode1Name(), GetPnioRwErrorMessage(), GetPnioRwErrorMessage(), GetPnioRwErrorMessage(), GetPnioRwErrorMessage(), GetPnioRwErrorMessage(), GetPnioRwErrorMessage(), profinet::dcp::DCPDHCPBlock::Parse(), and profinet::dcp::ParseSetResponse().
Here is the caller graph for this function:| std::string profinet::Hex4 | ( | std::uint16_t | value | ) |
Format a 16-bit unsigned integer as a 4-digit hexadecimal string.
| value | The 16-bit numeric value to format. |
Definition at line 63 of file util.cpp.
Referenced by profinet::diagnosis::DecodeChannelErrorType(), profinet::diagnosis::DecodeExtChannelErrorType(), GetBlockTypeName(), GetIndexName(), GetIocrTypeName(), GetModuleStateName(), profinet::dcp::IPBlockInfo::GetName(), profinet::dcp::BlockQualifier::GetName(), profinet::dcp::ResetQualifier::GetName(), profinet::dcp::DeviceInitiative::GetName(), GetSubmoduleStateName(), GetUsiName(), profinet::dcp::ParseSetResponse(), and profinet::dcp::DCPDeviceDescription::ToString().
Here is the caller graph for this function:| std::string profinet::HexFallback | ( | const char * | widthPrefix, |
| std::uint32_t | value, | ||
| int | digitWidth | ||
| ) |
Format a hexadecimal string with a custom prefix and dynamic width.
| widthPrefix | The text prefix to prepend before the opening parenthesis. |
| value | The 32-bit numeric value to format as hexadecimal. |
| digitWidth | The minimum number of digits for the hexadecimal part, zero-padded. |
| const IndexNamePairs & profinet::ImIndices | ( | ) |
I&M0-I&M15 indices.
Definition at line 509 of file indices.cpp.
References IM0, IM1, IM10, IM11, IM12, IM13, IM14, IM15, IM2, IM3, IM4, IM5, IM6, IM7, IM8, and IM9.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
Here is the caller graph for this function:| const IndexNamePairs & profinet::InterfaceIndices | ( | ) |
Interface-level indices.
Definition at line 594 of file indices.cpp.
References PD_INTERFACE_DATA_REAL, PD_INTERFACE_MRP_DATA_REAL, and PD_NC_DATA_CHECK.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
Here is the caller graph for this function:| std::array< std::uint8_t, 4 > profinet::Ip2String | ( | const std::string & | ipStr | ) |
Parse a dotted-decimal IPv4 address string.
| ipStr | IPv4 address in "a.b.c.d" form. |
Throws InvalidIPError on malformed input.
Definition at line 230 of file util.cpp.
Referenced by profinet::dcp::SendHello(), and profinet::dcp::SetIp().
Here is the caller graph for this function:| std::optional< std::string > profinet::LookupVendor | ( | std::uint16_t | vendorId | ) |
Look up a vendor name without a fallback string.
| vendorId | 16-bit PROFINET vendor ID. |
Definition at line 15 of file vendors.cpp.
References profinet::detail::kVendorTable, and profinet::detail::kVendorTableSize.
Referenced by GetVendorName().
Here is the caller graph for this function:| std::string profinet::Mac2String | ( | const MacAddress & | mac | ) |
Format a MAC address as a colon-separated string.
| mac | MAC address to format. |
Definition at line 196 of file util.cpp.
References Mac2String().
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), Mac2String(), profinet::blocks::PeerInfo::MacStr(), and profinet::blocks::InterfaceInfo::MacStr().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::Mac2String | ( | const std::uint8_t * | macBytes, |
| std::size_t | len | ||
| ) |
| std::pair< AlarmItemVariant, std::size_t > profinet::ParseAlarmItem | ( | const Bytes & | data, |
| std::size_t | offset = 0 |
||
| ) |
Parse a single alarm item starting at an offset.
| data | Buffer containing the alarm item. |
| offset | Byte offset within Data to start parsing at. |
Throws std::invalid_argument (mirrors alarms.py's ValueError) if data is truncated for the dispatched item type.
Definition at line 234 of file alarms.cpp.
References ChannelDiagnosis, ExtendedChannelDiagnosis, IParameter, Maintenance, OneOctetShift, PeAlarm, PralAlarm, QualifiedChannelDiagnosis, RsAlarmHigh, RsAlarmLow, RsAlarmSubmodule, Upload, and profinet::AlarmItem::userStructureId.
Referenced by ParseAlarmNotification().
Here is the caller graph for this function:| AlarmNotification profinet::ParseAlarmNotification | ( | const Bytes & | data | ) |
Parse a complete AlarmNotification PDU (BlockHeader + body + items).
| data | Buffer containing the complete PDU, including its block header. |
Throws std::invalid_argument if data is too short (< 26 bytes: the structurally correct BlockHeader(6)+Body(20) minimum – see the .cpp for a note on an off-by-2 bug in upstream alarms.py this deliberately does NOT replicate, since it would misalign every item after the first). Item parsing errors past that point are swallowed and stop item parsing early (matching alarms.py's try/except ValueError: break), so a truncated trailing item doesn't lose the items parsed so far.
Definition at line 286 of file alarms.cpp.
References profinet::AlarmNotification::alarmSequenceNumber, profinet::AlarmNotification::alarmType, profinet::AlarmNotification::api, profinet::AlarmNotification::arDiagnosisState, profinet::PNBlockHeader::blockLength, profinet::AlarmNotification::blockType, profinet::PNBlockHeader::blockType, profinet::AlarmNotification::blockVersion, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::AlarmNotification::channelDiagnosis, profinet::AlarmNotification::items, profinet::AlarmNotification::manufacturerSpecific, profinet::AlarmNotification::moduleIdentNumber, profinet::PNBlockHeader::Parse(), ParseAlarmItem(), payload, profinet::AlarmNotification::rawPayload, profinet::AlarmNotification::slotNumber, profinet::AlarmNotification::submoduleDiagnosisState, profinet::AlarmNotification::submoduleIdentNumber, profinet::AlarmNotification::subslotNumber, profinet::wire::Reader::U16(), and profinet::wire::Reader::U32().
Referenced by profinet::AlarmListener::ProcessAlarm(), and profinet::device::ProfinetDevice::ReadAlarm().
Here is the call graph for this function:
Here is the caller graph for this function:| const IndexNamePairs & profinet::PortIndices | ( | ) |
Port-level indices.
Definition at line 582 of file indices.cpp.
References PD_PORT_DATA_ADJUST, PD_PORT_DATA_CHECK, PD_PORT_DATA_REAL, PD_PORT_MRP_DATA_REAL, and PD_PORT_STATISTIC.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
Here is the caller graph for this function:
|
noexcept |
Return the byte offset of the real EtherType in a raw Ethernet frame.
PROFINET devices commonly send RT and alarm frames 802.1Q priority-tagged (TPID 0x8100, VID 0). Depending on NIC/driver VLAN offload, the tag may or may not be stripped before reaching a raw socket, so receivers must skip any number of VLAN tags. Recognized TPIDs include 802.1Q (0x8100), 802.1ad (0x88A8), and legacy double-tagging (0x9100).
| frame | A view over the raw Ethernet frame bytes, starting at the destination MAC address. |
Definition at line 89 of file util.cpp.
Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::cyclic::CyclicController::ProcessInputFrame().
Here is the caller graph for this function:| std::string profinet::String2Ip | ( | const std::uint8_t * | ipBytes, |
| std::size_t | len | ||
| ) |
Format raw IPv4 address bytes as a dotted string.
| ipBytes | Pointer to at least 4 bytes. |
| len | Number of bytes available at ip_bytes. |
Throws InvalidIPError if fewer than 4 bytes are given.
Definition at line 225 of file util.cpp.
References String2Ip().
Here is the call graph for this function:| std::string profinet::String2Ip | ( | std::span< const std::uint8_t > | ipBytes | ) |
Format raw IPv4 address bytes as a dotted string.
| ipBytes | View over a contiguous sequence of at least 4 bytes. |
Throws InvalidIPError if fewer than 4 bytes are given.
Definition at line 214 of file util.cpp.
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), profinet::blocks::InterfaceInfo::GatewayStr(), profinet::blocks::InterfaceInfo::IpStr(), profinet::PNDCPBlockRequest::ParseIp(), profinet::PNDCPBlock::ParseIp(), String2Ip(), and profinet::blocks::InterfaceInfo::SubnetStr().
Here is the caller graph for this function:| MacAddress profinet::String2Mac | ( | const std::string & | macStr | ) |
Parse a colon-separated MAC address string.
| macStr | MAC address in "aa:bb:cc:dd:ee:ff" form. |
Throws InvalidMACError on malformed input.
Definition at line 130 of file util.cpp.
References macAddressLength.
Referenced by profinet::dcp::GetParam(), profinet::dcp::ResetToFactory(), profinet::dcp::SendDiscover(), profinet::dcp::SendHello(), profinet::dcp::SendRequest(), profinet::dcp::SetIp(), profinet::dcp::SetParam(), profinet::dcp::SignalDevice(), profinet::device::ProfinetDevice::StartAlarmListener(), and profinet::device::ProfinetDevice::StartCyclic().
Here is the caller graph for this function:| std::string profinet::ToHex | ( | const std::uint8_t * | data, |
| std::size_t | len | ||
| ) |
Hex-encode a byte buffer.
| data | Pointer to the first byte to encode. |
| len | Number of bytes to encode. |
Definition at line 112 of file util.cpp.
Referenced by profinet::dcp::DCPDHCPBlock::Parse(), ToHex(), profinet::dcp::DCPDeviceDescription::ToString(), and profinet::rpc::UuidBytesToString().
Here is the caller graph for this function:| std::string profinet::ToHex | ( | const std::vector< std::uint8_t > & | data | ) |
| std::vector< std::uint8_t > profinet::ToVec | ( | const std::string & | input | ) |
Convert a string into a vector of raw bytes.
| input | The input string containing the data to convert. |
Definition at line 73 of file util.cpp.
Referenced by profinet::dcp::BuildSetParamRequest(), and profinet::dcp::SendHello().
Here is the caller graph for this function:| std::string profinet::UsiNameOf | ( | const AlarmItemVariant & | item | ) |
Get the human-readable USI name for any AlarmItemVariant alternative.
| item | The alarm item to inspect. |
Definition at line 73 of file alarms.cpp.
| Usi profinet::UsiOf | ( | const AlarmItemVariant & | item | ) |
Get the USI shared by every AlarmItemVariant alternative.
| item | The alarm item to inspect. |
Definition at line 67 of file alarms.cpp.
|
inlineconstexpr |
|
inlineconstexpr |
UDP port used for alarm transport when Transport == 1.
Definition at line 44 of file alarmListener.h.
Referenced by profinet::AlarmListener::Start().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
AR Data.
Definition at line 732 of file indices.h.
Referenced by CriticalIndices(), and DeviceIndices().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Constant lenght of a blockHeader.
Definition at line 55 of file protocol.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::Connect(), profinet::rpc::RPCCon::Disconnect(), profinet::PNIODHeader::Parse(), profinet::PNARBlockRequest::Parse(), profinet::PNIODReleaseBlock::Parse(), profinet::PNInM0::Parse(), profinet::PNInM1::Parse(), profinet::PNInM2::Parse(), profinet::PNInM3::Parse(), profinet::PNInM4::Parse(), profinet::PNInM5::Parse(), profinet::PNInMReserved< Idx >::Parse(), profinet::PNIOCRBlockRes::Parse(), profinet::PNIOCRBlockReqHeader::Parse(), profinet::PNAlarmCRBlockRes::Parse(), profinet::PNAlarmNotificationPDU::Parse(), profinet::PNIODWriteRes::Parse(), profinet::rpc::RPCCon::ParseAlarmCrResponse(), profinet::blocks::ParseBlockHeader(), profinet::rpc::RPCCon::ParseIocrResponse(), profinet::blocks::ParsePdRealData(), profinet::rpc::RPCCon::Read(), profinet::rpc::RPCCon::ReadImplicit(), profinet::AlarmListener::SendAck(), profinet::rpc::RPCCon::SendControl(), profinet::rpc::RPCCon::Write(), and profinet::rpc::RPCCon::WriteMultiple().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
DIAG Device.
Definition at line 693 of file indices.h.
Referenced by CriticalIndices(), and DiagnosisIndices().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
DIAG Maintenance Subslot.
Definition at line 669 of file indices.h.
Referenced by DiagnosisIndices().
|
inlineconstexpr |
Linux AF_PACKET protocol value matching every EtherType.
Definition at line 38 of file util.h.
Referenced by profinet::EthernetSocket::EthernetSocket().
|
inlineconstexpr |
EtherType used by PROFINET RTA frames (0x8892).
Definition at line 42 of file alarmListener.h.
Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::AlarmListener::SendLayer2Ack(), and profinet::AlarmListener::Start().
|
inlineconstexpr |
|
inlineconstexpr |
Expected ID Subslot.
Definition at line 717 of file indices.h.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Frame ID used for high-priority alarms.
Definition at line 38 of file alarmListener.h.
Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::AlarmListener::SendLayer2Ack().
|
inlineconstexpr |
Frame ID used for low-priority alarms.
Definition at line 40 of file alarmListener.h.
Referenced by profinet::AlarmListener::HandleLayer2Frame(), and profinet::AlarmListener::SendLayer2Ack().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
I&M1.
Definition at line 626 of file indices.h.
Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm1().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
I&M2.
Definition at line 628 of file indices.h.
Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm2().
|
inlineconstexpr |
I&M3.
Definition at line 630 of file indices.h.
Referenced by ImIndices(), and profinet::device::ProfinetDevice::WriteIm3().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
EtherType value identifying IP frames (0x8000).
Definition at line 34 of file util.h.
Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock().
|
inlineconstexpr |
|
inlineconstexpr |
PROFINET UUID suffix, shared by all interface/object UUIDs.
Definition at line 460 of file protocol.h.
Referenced by profinet::PNRPCHeader::PrefixedUuid().
|
inlineconstexpr |
Log Data.
Definition at line 744 of file indices.h.
Referenced by CriticalIndices(), and DeviceIndices().
|
staticconstexpr |
Bitmask used to isolate the lowest significant byte (8 bits) of a larger integer.
Definition at line 59 of file util.h.
Referenced by profinet::rt::BuildEthernetFrame(), profinet::DiagnosisItem::ChannelTypeValue(), profinet::rpc::EpmLookup(), profinet::PNIOError::FromArgsStatus(), profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::AlarmListener::SendLayer2Ack(), profinet::rpc::StringToUuidBytes(), and profinet::rt::RTFrame::ToBytes().
|
inlineconstexpr |
Constant lenght of a mac address.
Definition at line 41 of file util.h.
Referenced by profinet::AlarmListener::HandleLayer2Frame(), profinet::EthernetHeader::Parse(), profinet::EthernetVLANHeader::Parse(), profinet::PNARBlockRequest::Parse(), profinet::PNIOCRBlockReqHeader::Parse(), profinet::device::ParseMac(), and String2Mac().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Maximum PROFINET Ethernet frame size in bytes (including VLAN tag headroom).
Definition at line 30 of file util.h.
Referenced by profinet::EthernetSocket::Recv().
|
inlineconstexpr |
Module Diff Block.
Definition at line 726 of file indices.h.
Referenced by AllStandardIndices(), CriticalIndices(), profinet::rpc::RPCCon::EnumerateIndices(), and profinet::rpc::RPCCon::ReadModuleDiff().
|
inlineconstexpr |
Module State No Module.
Definition at line 564 of file indices.h.
Referenced by GetModuleStateName().
|
inlineconstexpr |
Module State Proper Module.
Definition at line 568 of file indices.h.
Referenced by GetModuleStateName(), and profinet::blocks::ModuleDiffModule::IsProper().
|
inlineconstexpr |
Module State Substitute Module.
Definition at line 570 of file indices.h.
Referenced by GetModuleStateName().
|
inlineconstexpr |
Module State Wrong Module.
Definition at line 566 of file indices.h.
Referenced by GetModuleStateName().
|
staticconstexpr |
The bit-shift distance required to move data across a single octet.
Definition at line 50 of file util.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::rt::BuildEthernetFrame(), profinet::dcp::DCPDeviceDescription::DeviceId(), profinet::rpc::EpmLookup(), profinet::PNIOError::FromArgsStatus(), profinet::rt::RTFrame::FromBytes(), profinet::diagnosis::ChannelProperties::FromUint16(), profinet::AlarmListener::HandleLayer2Frame(), ParseAlarmItem(), profinet::diagnosis::ParseDiagnosisBlock(), profinet::diagnosis::ParseDiagnosisSimple(), profinet::rt::ParseEthernetFrame(), profinet::blocks::ParsePdPortDataReal(), profinet::dcp::ParseSetResponse(), profinet::blocks::ParseWriteMultipleResponse(), profinet::rpc::PeekBlockHeader(), profinet::cyclic::CyclicController::ProcessInputFrame(), profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::dcp::RecvSetResponse(), profinet::AlarmListener::SendLayer2Ack(), profinet::rpc::StringToUuidBytes(), profinet::rt::RTFrame::ToBytes(), profinet::wire::Reader::U16(), profinet::wire::Reader::U32(), profinet::rpc::UuidBytesToString(), profinet::dcp::DCPDeviceDescription::VendorId(), and profinet::PNInM0::VendorId().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
PD Interface MRP Data Real.
Definition at line 802 of file indices.h.
Referenced by InterfaceIndices().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
PD Real Data.
Definition at line 738 of file indices.h.
Referenced by CriticalIndices(), DeviceIndices(), and profinet::rpc::RPCCon::ReadPdRealData().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
EtherType value identifying PROFINET frames (0x8892).
Definition at line 32 of file util.h.
Referenced by profinet::rpc::RPCCon::BuildAlarmCrBlock(), profinet::rpc::RPCCon::BuildIocrBlock(), profinet::rpc::RPCCon::Connect(), profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), and profinet::dcp::RecvSetResponse().
|
inlineconstexpr |
Real ID API.
Definition at line 729 of file indices.h.
Referenced by profinet::rpc::RPCCon::ReadRealIdentificationData().
|
inlineconstexpr |
|
inlineconstexpr |
Real ID Subslot.
Definition at line 719 of file indices.h.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
|
inlineconstexpr |
Receive buffer length.
Definition at line 62 of file util.h.
Referenced by profinet::AlarmListener::HandleUdpFrame(), profinet::rpc::RpcTransport::Receive(), and profinet::rpc::RpcTransport::SendReceive().
|
inlineconstexpr |
Record Input Data.
Definition at line 841 of file indices.h.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
|
inlineconstexpr |
Record Output Data.
Definition at line 843 of file indices.h.
Referenced by AllStandardIndices(), and profinet::rpc::RPCCon::EnumerateIndices().
|
inlineconstexpr |
Submodule State Application Ready Pending.
Definition at line 579 of file indices.h.
Referenced by GetSubmoduleStateName().
|
inlineconstexpr |
Submodule State Locked By Supervisor.
Definition at line 577 of file indices.h.
Referenced by GetSubmoduleStateName().
|
inlineconstexpr |
Submodule State No Submodule.
Definition at line 573 of file indices.h.
Referenced by GetSubmoduleStateName().
|
inlineconstexpr |
Submodule State Ok.
Definition at line 581 of file indices.h.
Referenced by GetSubmoduleStateName(), and profinet::blocks::ModuleDiffSubmodule::IsOk().
|
inlineconstexpr |
Submodule State Wrong Submodule.
Definition at line 575 of file indices.h.
Referenced by GetSubmoduleStateName().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
staticconstexpr |
The bit-shift distance required to move data across three octets.
Definition at line 56 of file util.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::PNIOError::FromArgsStatus(), profinet::diagnosis::ParseDiagnosisBlock(), profinet::blocks::ParsePdPortDataReal(), profinet::blocks::ParseWriteMultipleResponse(), profinet::wire::PutU32(), profinet::rpc::StringToUuidBytes(), profinet::wire::Reader::U32(), and profinet::rpc::UuidBytesToString().
|
staticconstexpr |
The bit-shift distance required to move data across two octets.
Definition at line 53 of file util.h.
Referenced by profinet::rpc::RPCCon::ApplicationReady(), profinet::PNIOError::FromArgsStatus(), profinet::diagnosis::ParseDiagnosisBlock(), profinet::blocks::ParsePdPortDataReal(), profinet::blocks::ParseWriteMultipleResponse(), profinet::wire::PutU32(), profinet::rpc::StringToUuidBytes(), profinet::wire::Reader::U32(), and profinet::rpc::UuidBytesToString().
|
inlineconstexpr |
Constant lenght of a UUID.
Definition at line 44 of file util.h.
Referenced by profinet::rpc::EpmLookup(), profinet::PNRPCHeader::Parse(), profinet::PNIODHeader::Parse(), profinet::PNARBlockRequest::Parse(), profinet::PNIODReleaseBlock::Parse(), profinet::PNIODWriteRes::Parse(), profinet::dcp::DCPDHCPBlock::Parse(), and profinet::blocks::ParseWriteMultipleResponse().
|
inlineconstexpr |
EtherType value identifying an 802.1Q VLAN tag (0x8100).
Definition at line 36 of file util.h.
Referenced by profinet::dcp::ParseSetResponse(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), and profinet::dcp::RecvSetResponse().