PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
indices.h File Reference

PROFINET record-data indices, block types, and protocol enumerations. More...

#include <cstdint>
#include <string>
#include <utility>
#include <vector>
+ Include dependency graph for indices.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  profinet
 

Typedefs

using profinet::IndexNamePairs = std::vector< std::pair< std::uint16_t, std::string > >
 (index, name) pairs, e.g. for building a "try each of these" scan.
 

Enumerations

enum class  profinet::ControlCommand : std::uint16_t {
  profinet::Unknown = 0 , profinet::PrmEnd = 0x0001 , profinet::ApplicationReady = 0x0002 , profinet::Release = 0x0004 ,
  profinet::Done = 0x0008 , profinet::ReadyForCompanion = 0x0010 , profinet::ReadyForRtClass3 = 0x0020 , profinet::PrmBegin = 0x0040
}
 PROFINET IOD control command values. More...
 
enum class  profinet::BlockType : std::uint16_t {
  profinet::Unknown = 0 , profinet::DiagnosisData = 0x0010 , profinet::ExpectedIdentificationData = 0x0012 , profinet::RealIdentificationData = 0x0013 ,
  profinet::IdentificationMaintenance0 = 0x0020 , profinet::IdentificationMaintenance1 = 0x0021 , profinet::IdentificationMaintenance2 = 0x0022 , profinet::IdentificationMaintenance3 = 0x0023 ,
  profinet::IdentificationMaintenance4 = 0x0024 , profinet::IdentificationMaintenance5 = 0x0025 , profinet::IdentificationMaintenance6 = 0x0026 , profinet::IdentificationMaintenance7 = 0x0027 ,
  profinet::IdentificationMaintenance8 = 0x0028 , profinet::IdentificationMaintenance9 = 0x0029 , profinet::IdentificationMaintenance10 = 0x002A , profinet::IdentificationMaintenance11 = 0x002B ,
  profinet::IdentificationMaintenance12 = 0x002C , profinet::IdentificationMaintenance13 = 0x002D , profinet::IdentificationMaintenance14 = 0x002E , profinet::IdentificationMaintenance15 = 0x002F ,
  profinet::AlarmNotificationHigh = 0x0001 , profinet::AlarmAcknowledgementHigh = 0x8001 , profinet::AlarmNotificationLow = 0x0002 , profinet::AlarmAcknowledgementLow = 0x8002 ,
  profinet::IoDataWriteRequest = 0x0008 , profinet::IoDataWriteResponse = 0x8008 , profinet::IoDataReadRequest = 0x0009 , profinet::IoDataReadResponse = 0x8009 ,
  profinet::ApplicationRelationData = 0x0018 , profinet::LogData = 0x0019 , profinet::ApiData = 0x001A , profinet::SrlData = 0x001B ,
  profinet::ApplicationRelationRequest = 0x0101 , profinet::ApplicationRelationResponse = 0x8101 , profinet::IoCrRequest = 0x0102 , profinet::IoCrResponse = 0x8102 ,
  profinet::AlarmCrRequest = 0x0103 , profinet::AlarmCrResponse = 0x8103 , profinet::ExpectedSubmoduleRequest = 0x0104 , profinet::ModuleDifference = 0x8104 ,
  profinet::ControlPrmEndRequest = 0x0110 , profinet::ControlPrmEndResponse = 0x8110 , profinet::ControlApplicationReadyRequest = 0x0112 , profinet::ControlApplicationReadyResponse = 0x8112 ,
  profinet::ReleaseRequest = 0x0114 , profinet::ReleaseResponse = 0x8114 , profinet::ControlRtClass3Request = 0x0117 , profinet::ControlRtClass3Response = 0x8117 ,
  profinet::ParameterizationBeginRequest = 0x0118 , profinet::ParameterizationBeginResponse = 0x8118 , profinet::SubmoduleList = 0x0119 , profinet::PortDataCheck = 0x0200 ,
  profinet::PortDataAdjust = 0x0202 , profinet::PortDataReal = 0x020F , profinet::InterfaceMrpDataAdjust = 0x0211 , profinet::InterfaceMrpDataReal = 0x0212 ,
  profinet::PortMrpDataReal = 0x0215 , profinet::MrpRingStateData = 0x0219 , profinet::PortFoDataReal = 0x0220 , profinet::PortFoDataCheck = 0x0221 ,
  profinet::PortFoDataAdjust = 0x0222 , profinet::PortDataRealExtended = 0x022C , profinet::PortDataInterfaceDataReal = 0x0240 , profinet::PortStatistics = 0x0251 ,
  profinet::MultipleHeader = 0x0400 , profinet::ContainerContent = 0x0401 , profinet::ApplicationRelationServer = 0xF820 , profinet::RealProcessData = 0xF841 ,
  profinet::ExpectedProcessData = 0xF842 , profinet::RealIdentificationDataApi = 0xF000
}
 PROFINET block types. More...
 
enum class  profinet::AlarmType : std::uint16_t {
  profinet::Unknown = 0x000 , profinet::Diagnosis = 0x0001 , profinet::Process = 0x0002 , profinet::Pull = 0x0003 ,
  profinet::Plug = 0x0004 , profinet::Status = 0x0005 , profinet::Update = 0x0006 , profinet::Redundancy = 0x0007 ,
  profinet::ControlledBySupervisor = 0x0008 , profinet::Released = 0x0009 , profinet::PlugWrongSubmodule = 0x000A , profinet::ReturnOfSubmodule = 0x000B ,
  profinet::DiagnosisDisappears = 0x000C , profinet::MulticastMismatch = 0x000D , profinet::PortDataChange = 0x000E , profinet::SyncDataChanged = 0x000F ,
  profinet::IsochronousModeProblem = 0x0010 , profinet::NetworkComponentProblem = 0x0011 , profinet::TimeDataChanged = 0x0012 , profinet::DfpProblem = 0x0013 ,
  profinet::UploadRetrieval = 0x001E , profinet::PullModule = 0x001F
}
 PROFINET Alarm Types used in AlarmNotification blocks. More...
 
enum class  profinet::IocrType : std::uint16_t { profinet::Input = 0x0001 , profinet::Output = 0x0002 , profinet::MulticastProvider = 0x0003 , profinet::MulticastConsumer = 0x0004 }
 PROFINET IOCR types. More...
 
enum class  profinet::IocrRtClass : std::uint8_t { profinet::Udp = 0x04 }
 PROFINET IOCR real-time classes. More...
 
enum class  profinet::Usi : std::uint16_t {
  profinet::Unknown = 0 , profinet::ChannelDiagnosis = 0x8000 , profinet::MultipleDiagnosis = 0x8001 , profinet::ExtendedChannelDiagnosis = 0x8002 ,
  profinet::QualifiedChannelDiagnosis = 0x8003 , profinet::Maintenance = 0x8100 , profinet::Upload = 0x8200 , profinet::IParameter = 0x8201 ,
  profinet::RsAlarmLow = 0x8300 , profinet::RsAlarmHigh = 0x8301 , profinet::RsAlarmSubmodule = 0x8302 , profinet::PeAlarm = 0x8310 ,
  profinet::PralAlarm = 0x8320 , profinet::Bit0till14OfChannelNumber = 0x7FFF , profinet::Bit15OfChannelNumber = 0x8000 , profinet::Bit15AndExternalChannelDiagnosisOfChannelNumber = 0x8002 ,
  profinet::Bit15AndQualifiedChannelDiagnosisOfChannelNumber = 0x8003 , profinet::Low11BitsOfRsAlarmInfo = 0x7FFF
}
 PROFINET User Structure Identifiers (USI). More...
 

Functions

std::string profinet::GetBlockTypeName (BlockType blockType)
 Get the human-readable name for a block type.
 
std::string profinet::GetAlarmTypeName (AlarmType alarmType)
 Get the human-readable name for an alarm type.
 
std::string profinet::GetIocrTypeName (IocrType iocrType)
 Get the human-readable name for an IOCR type.
 
std::string profinet::GetIocrRtClassName (IocrRtClass rtClass)
 Get the human-readable name for an IOCR real-time class.
 
std::string profinet::GetUsiName (Usi usi)
 Get the human-readable name for a User Structure Identifier.
 
std::string profinet::GetModuleStateName (std::uint16_t state)
 Get the human-readable name for a module state.
 
std::string profinet::GetSubmoduleStateName (std::uint16_t state)
 Get the human-readable name for a submodule state.
 
std::string profinet::GetPeModeName (std::uint8_t mode)
 Get the human-readable name for a PROFIenergy operational mode.
 
const IndexNamePairsprofinet::CriticalIndices ()
 Critical indices that should always be tested.
 
const IndexNamePairsprofinet::ImIndices ()
 I&M0-I&M15 indices.
 
const IndexNamePairsprofinet::DiagnosisIndices (const std::string &scope)
 Diagnosis indices for a given addressing scope.
 
const IndexNamePairsprofinet::PortIndices ()
 Port-level indices.
 
const IndexNamePairsprofinet::InterfaceIndices ()
 Interface-level indices.
 
const IndexNamePairsprofinet::DeviceIndices ()
 Device-level indices.
 
const IndexNamePairsprofinet::AllStandardIndices ()
 Union of every standard index category.
 
std::string profinet::GetIndexName (std::uint16_t index)
 Get the human-readable name for a record data index.
 
std::string profinet::GetScope (std::uint16_t index)
 Get the addressing scope for an index.
 

Variables

constexpr std::uint8_t profinet::ALARM_TRANSPORT_RTA_CLASS_UDP = 0x01
 ALARM Cr Type ALARM.
 
constexpr std::uint16_t profinet::AR_TYPE_IOCAR_SINGLE = 0x0001
 AR Type Iocar Single.
 
constexpr std::uint16_t profinet::AR_TYPE_IOSAR = 0x0006
 AR Type Iosar.
 
constexpr std::uint16_t profinet::AR_TYPE_IOCARSR = 0x0020
 AR Type Iocarsr.
 
constexpr std::uint16_t profinet::MODULE_STATE_NO_MODULE = 0x0000
 Module State No Module.
 
constexpr std::uint16_t profinet::MODULE_STATE_WRONG_MODULE = 0x0001
 Module State Wrong Module.
 
constexpr std::uint16_t profinet::MODULE_STATE_PROPER_MODULE = 0x0002
 Module State Proper Module.
 
constexpr std::uint16_t profinet::MODULE_STATE_SUBSTITUTE_MODULE = 0x0003
 Module State Substitute Module.
 
constexpr std::uint16_t profinet::SUBMODULE_STATE_NO_SUBMODULE = 0x0000
 Submodule State No Submodule.
 
constexpr std::uint16_t profinet::SUBMODULE_STATE_WRONG_SUBMODULE = 0x0001
 Submodule State Wrong Submodule.
 
constexpr std::uint16_t profinet::SUBMODULE_STATE_LOCKED_BY_SUPERVISOR = 0x0002
 Submodule State Locked By Supervisor.
 
constexpr std::uint16_t profinet::SUBMODULE_STATE_APPLICATION_READY_PENDING = 0x0004
 Submodule State Application Ready Pending.
 
constexpr std::uint16_t profinet::SUBMODULE_STATE_OK = 0x0007
 Submodule State Ok.
 
constexpr std::uint8_t profinet::PE_MODE_POWER_OFF = 0x00
 PE Mode Power Off.
 
constexpr std::uint8_t profinet::PE_MODE_ENERGY_SAVING_MIN = 0x01
 PE Mode Energy Saving Min.
 
constexpr std::uint8_t profinet::PE_MODE_ENERGY_SAVING_MAX = 0x1F
 PE Mode Energy Saving Max.
 
constexpr std::uint8_t profinet::PE_MODE_OPERATE = 0xF0
 PE Mode Operate.
 
constexpr std::uint8_t profinet::PE_MODE_SLEEP_MODE_WOL = 0xFE
 PE Mode Sleep Mode WOL.
 
constexpr std::uint8_t profinet::PE_MODE_READY_TO_OPERATE = 0xFF
 PE Mode Ready To Operate.
 
constexpr std::uint16_t profinet::IM0 = 0xAFF0
 I&M0.
 
constexpr std::uint16_t profinet::IM1 = 0xAFF1
 I&M1.
 
constexpr std::uint16_t profinet::IM2 = 0xAFF2
 I&M2.
 
constexpr std::uint16_t profinet::IM3 = 0xAFF3
 I&M3.
 
constexpr std::uint16_t profinet::IM4 = 0xAFF4
 I&M4.
 
constexpr std::uint16_t profinet::IM5 = 0xAFF5
 I&M5.
 
constexpr std::uint16_t profinet::IM6 = 0xAFF6
 I&M6.
 
constexpr std::uint16_t profinet::IM7 = 0xAFF7
 I&M7.
 
constexpr std::uint16_t profinet::IM8 = 0xAFF8
 I&M8.
 
constexpr std::uint16_t profinet::IM9 = 0xAFF9
 I&M9.
 
constexpr std::uint16_t profinet::IM10 = 0xAFFA
 I&M10.
 
constexpr std::uint16_t profinet::IM11 = 0xAFFB
 I&M11.
 
constexpr std::uint16_t profinet::IM12 = 0xAFFC
 I&M12.
 
constexpr std::uint16_t profinet::IM13 = 0xAFFD
 I&M13.
 
constexpr std::uint16_t profinet::IM14 = 0xAFFE
 I&M14.
 
constexpr std::uint16_t profinet::IM15 = 0xAFFF
 I&M15.
 
constexpr std::uint16_t profinet::IM0_FILTER_DATA = 0xF840
 I&M0 Filter Data.
 
constexpr std::uint16_t profinet::DIAG_CHANNEL_SUBSLOT = 0x800A
 DIAG Channel Subslot.
 
constexpr std::uint16_t profinet::DIAG_ALL_SUBSLOT = 0x800B
 DIAG All Subslot.
 
constexpr std::uint16_t profinet::DIAG_MAINTENANCE_SUBSLOT = 0x800C
 DIAG Maintenance Subslot.
 
constexpr std::uint16_t profinet::DIAG_CHANNEL_SLOT = 0xC00A
 DIAG Channel Slot.
 
constexpr std::uint16_t profinet::DIAG_ALL_SLOT = 0xC00B
 DIAG All Slot.
 
constexpr std::uint16_t profinet::DIAG_MAINTENANCE_SLOT = 0xC00C
 DIAG Maintenance Slot.
 
constexpr std::uint16_t profinet::DIAG_CHANNEL_AR = 0xE00A
 DIAG Channel AR.
 
constexpr std::uint16_t profinet::DIAG_ALL_AR = 0xE00B
 DIAG All AR.
 
constexpr std::uint16_t profinet::DIAG_MAINTENANCE_AR = 0xE00C
 DIAG Maintenance AR.
 
constexpr std::uint16_t profinet::DIAG_CHANNEL_API = 0xF00A
 DIAG Channel API.
 
constexpr std::uint16_t profinet::DIAG_ALL_API = 0xF00B
 DIAG All API.
 
constexpr std::uint16_t profinet::DIAG_MAINTENANCE_API = 0xF00C
 DIAG Maintenance API.
 
constexpr std::uint16_t profinet::DIAG_DEVICE = 0xF80C
 DIAG Device.
 
constexpr std::uint16_t profinet::MAINT_REQUIRED_CHANNEL_SUBSLOT = 0x8010
 MAINT Required Channel Subslot.
 
constexpr std::uint16_t profinet::MAINT_DEMANDED_CHANNEL_SUBSLOT = 0x8011
 MAINT Demanded Channel Subslot.
 
constexpr std::uint16_t profinet::MAINT_REQUIRED_ALL_SUBSLOT = 0x8012
 MAINT Required All Subslot.
 
constexpr std::uint16_t profinet::MAINT_DEMANDED_ALL_SUBSLOT = 0x8013
 MAINT Demanded All Subslot.
 
constexpr std::uint16_t profinet::EXPECTED_ID_SUBSLOT = 0x8000
 Expected ID Subslot.
 
constexpr std::uint16_t profinet::REAL_ID_SUBSLOT = 0x8001
 Real ID Subslot.
 
constexpr std::uint16_t profinet::EXPECTED_ID_AR = 0xE000
 Expected ID AR.
 
constexpr std::uint16_t profinet::REAL_ID_AR = 0xE001
 Real ID AR.
 
constexpr std::uint16_t profinet::MODULE_DIFF_BLOCK = 0xE002
 Module Diff Block.
 
constexpr std::uint16_t profinet::REAL_ID_API = 0xF000
 Real ID API.
 
constexpr std::uint16_t profinet::AR_DATA = 0xF820
 AR Data.
 
constexpr std::uint16_t profinet::API_DATA = 0xF821
 API Data.
 
constexpr std::uint16_t profinet::PDEV_DATA = 0xF831
 Pdev Data.
 
constexpr std::uint16_t profinet::PD_REAL_DATA = 0xF841
 PD Real Data.
 
constexpr std::uint16_t profinet::PD_EXPECTED_DATA = 0xF842
 PD Expected Data.
 
constexpr std::uint16_t profinet::AUTO_CONFIG = 0xF850
 Auto Config.
 
constexpr std::uint16_t profinet::LOG_DATA = 0xF830
 Log Data.
 
constexpr std::uint16_t profinet::PD_PORT_DATA_REAL = 0x802A
 PD Port Data Real.
 
constexpr std::uint16_t profinet::PD_PORT_DATA_CHECK = 0x802B
 PD Port Data Check.
 
constexpr std::uint16_t profinet::PD_IR_DATA = 0x802C
 PD IR Data.
 
constexpr std::uint16_t profinet::PD_SYNC_DATA = 0x802D
 PD Sync Data.
 
constexpr std::uint16_t profinet::PD_PORT_DATA_ADJUST = 0x802F
 PD Port Data Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_STATISTIC = 0x8072
 PD Port Statistic.
 
constexpr std::uint16_t profinet::PD_NC_DATA_CHECK = 0x8070
 PD NC Data Check.
 
constexpr std::uint16_t profinet::PD_INTERFACE_ADJUST = 0x8071
 PD Interface Adjust.
 
constexpr std::uint16_t profinet::PD_INTERFACE_DATA_REAL = 0x8080
 PD Interface Data Real.
 
constexpr std::uint16_t profinet::PD_INTERFACE_FSU_ADJUST = 0x8090
 PD Interface FSU Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_FO_DATA_REAL = 0x8060
 PD Port FO Data Real.
 
constexpr std::uint16_t profinet::PD_PORT_FO_DATA_CHECK = 0x8061
 PD Port FO Data Check.
 
constexpr std::uint16_t profinet::PD_PORT_FO_DATA_ADJUST = 0x8062
 PD Port FO Data Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_SFP_DATA_CHECK = 0x8063
 PD Port SFP Data Check.
 
constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_REAL = 0x8050
 PD Interface MRP Data Real.
 
constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_CHECK = 0x8051
 PD Interface MRP Data Check.
 
constexpr std::uint16_t profinet::PD_INTERFACE_MRP_DATA_ADJUST = 0x8052
 PD Interface MRP Data Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_MRP_DATA_ADJUST = 0x8053
 PD Port MRP Data Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_MRP_DATA_REAL = 0x8054
 PD Port MRP Data Real.
 
constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_ADJUST = 0x8055
 PD Port MRP IC Data Adjust.
 
constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_CHECK = 0x8056
 PD Port MRP IC Data Check.
 
constexpr std::uint16_t profinet::PD_PORT_MRP_IC_DATA_REAL = 0x8057
 PD Port MRP IC Data Real.
 
constexpr std::uint16_t profinet::PD_IR_SUBFRAME_DATA = 0x8020
 PD IR Subframe Data.
 
constexpr std::uint16_t profinet::ISOCHRONOUS_MODE_DATA = 0x8030
 Isochronous Mode Data.
 
constexpr std::uint16_t profinet::PD_TIME_DATA = 0x8031
 PD Time Data.
 
constexpr std::uint16_t profinet::SUBSTITUTE_VALUES = 0x801E
 Substitute Values.
 
constexpr std::uint16_t profinet::RECORD_INPUT_DATA = 0x8028
 Record Input Data.
 
constexpr std::uint16_t profinet::RECORD_OUTPUT_DATA = 0x8029
 Record Output Data.
 
constexpr std::uint16_t profinet::AM_DEVICE_ID = 0xF8E0
 AM Device ID.
 
constexpr std::uint16_t profinet::AM_FULL_INFO = 0xF8E1
 AM Full Info.
 
constexpr std::uint16_t profinet::AM_HW_ONLY = 0xF8E2
 AM HW Only.
 
constexpr std::uint16_t profinet::AM_FW_ONLY = 0xF8E3
 AM FW Only.
 
constexpr std::uint16_t profinet::AM_LOCATION_SLOT = 0xFBE0
 AM Location Slot.
 
constexpr std::uint16_t profinet::AM_LOCATION_TREE = 0xFBE1
 AM Location Tree.
 
constexpr std::uint16_t profinet::AM_DATA = 0xFBF0
 AM Data.
 
constexpr std::uint16_t profinet::F_PARAMETER_BLOCK = 0x0100
 F Parameter Block.
 
constexpr std::uint16_t profinet::F_PRM_FLAG1 = 0x0101
 F Prm Flag1.
 
constexpr std::uint16_t profinet::F_PRM_FLAG2 = 0x0102
 F Prm Flag2.
 
constexpr std::uint16_t profinet::F_PARAMETER_WRITE = 0xE000
 F Parameter Write.
 
constexpr std::uint16_t profinet::F_PARAMETER_READ = 0xE001
 F Parameter Read.
 
constexpr std::uint16_t profinet::PROFIENERGY = 0x80A0
 Profienergy.
 
constexpr std::uint16_t profinet::WRITE_MULTIPLE = 0xE040
 Write Multiple.
 
constexpr std::uint16_t profinet::AR_FSU_DATA_ADJUST = 0xE050
 AR FSU Data Adjust.
 
constexpr std::uint16_t profinet::SUBSLOT_DAP = 0x0001
 Subslot DAP.
 
constexpr std::uint16_t profinet::SUBSLOT_INTERFACE = 0x8000
 Subslot Interface.
 
constexpr std::uint16_t profinet::SUBSLOT_PORT1 = 0x8001
 Subslot Port1.
 
constexpr std::uint16_t profinet::SUBSLOT_PORT2 = 0x8002
 Subslot Port2.
 

Detailed Description

PROFINET record-data indices, block types, and protocol enumerations.

Defines the standardized PROFINET indices and protocol enumeration values used for record-data access, diagnosis, alarms, identification and maintenance, process data, port and interface data, and Application Relationship (AR) services.

The header provides:

  • PROFINET block type and control command enumerations.
  • Alarm type, IOCR type, and IOCR real-time class enumerations.
  • User Structure Identifier (USI) definitions.
  • Module and submodule state constants.
  • PROFIenergy operational mode constants.
  • I&M0-I&M15 record indices.
  • Diagnosis and maintenance indices for subslot, slot, AR, API, and device addressing scopes.
  • Expected and real identification data indices.
  • Port, interface, fiber-optic, MRP, synchronization, and I/O data indices.
  • Asset Management and PROFIsafe indices.
  • AR-specific and standard DAP subslot constants.
  • Helpers for converting enumeration and state values to human-readable names.
  • Standard index tables grouped by addressing scope and function.
  • Helpers for resolving an index name and determining its addressing scope.

PROFINET record-data indices are organized into ranges that identify their addressing scope:

  • 0x0000-0x7FFF: user or manufacturer specific.
  • 0x8000-0x8FFF: subslot level.
  • 0xA000-0xAFFF: slot-level I&M data.
  • 0xC000-0xCFFF: slot level.
  • 0xE000-0xEFFF: Application Relationship (AR) level.
  • 0xF000-0xF7FF: API level.
  • 0xF800-0xFBFF: device level.

The standard index tables support enumeration of commonly implemented record indices, while GetIndexName() and GetScope() also provide range-based fallback handling for indices that are not explicitly listed.

Definition in file indices.h.