|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Complete parsed GSDML device profile. More...
#include <gsdml.h>
Collaboration diagram for profinet::gsdml::GSDMLDevice:Public Member Functions | |
| const GSDMLModule * | FindModule (const std::string &moduleId) const |
| Look up a module by its GSDML ID. | |
| const GSDMLSubmodule * | FindSubmodule (const std::string &submoduleId) const |
| Look up a globally defined submodule. | |
| std::vector< rpc::IOSlot > | BuildIoSlots (const std::vector< std::tuple< int, std::string, int, std::string > > &plugged={}) const |
| Build I/O slot descriptions from the parsed GSDML configuration. | |
Public Attributes | |
| std::string | vendorName |
| Vendor name from the GSDML's DeviceIdentity. | |
| std::string | deviceName |
| Device name from the GSDML's DeviceIdentity / DeviceFunction. | |
| std::uint16_t | vendorId = 0 |
| PROFINET vendor ID from the GSDML's DeviceIdentity (VendorID attribute). | |
| std::uint16_t | deviceId = 0 |
| PROFINET device ID from the GSDML's DeviceIdentity (DeviceID attribute). | |
| std::string | dapModuleId |
| The device access point's own (built-in) identifier to matchs with the submodule. | |
| std::uint32_t | dapSubmoduleIdentNumber = 0 |
| The device access point's own (built-in) submodule ident number. | |
| std::uint32_t | dapModuleIdentNumber = 0 |
| The device access point's own module ident number. | |
| std::vector< int > | dapSlots |
| Slot numbers where the DAP may be fixed/plugged (from UseableModules/PlugSlots). | |
| std::vector< GSDMLSubmodule > | dapSubmodules |
| DAP virtual submodules. | |
| std::vector< GSDMLSystemSubmodule > | systemSubmodules |
| System-defined submodules built into the DAP (e.g. interface, port 1). | |
| std::map< std::string, GSDMLModule > | modules |
| Every module declared in the GSDML's ModuleList, keyed by GSDML ID. | |
| std::map< std::string, GSDMLSubmodule > | submodules |
| Every globally defined SubmoduleItem, keyed by GSDML ID. | |
| std::vector< GSDMLModuleReference > | moduleReferences |
| Modules referenced by the DAP's UseableModules list. | |
| std::vector< rpc::IOSlot > profinet::gsdml::GSDMLDevice::BuildIoSlots | ( | const std::vector< std::tuple< int, std::string, int, std::string > > & | plugged = {} | ) | const |
Build I/O slot descriptions from the parsed GSDML configuration.
The generated list follows the behavior of the Python GSDMLDevice::build_io_slots() implementation:
plugged configuration overrides the GSDML-selected module/submodule configuration.| plugged | Explicit module/submodule assignment. Each tuple contains: slot number, module ID, subslot number, and submodule ID. If empty, the configuration selected by FixedInSlots/UsedInSlots and FixedInSubslots/UsedInSubslots is resolved from the GSDML. |
| std::invalid_argument | If a module or submodule is unknown, or if a module is not allowed in the requested slot. |
Definition at line 520 of file gsdml.cpp.
References dapModuleIdentNumber, dapSubmodules, FindSubmodule(), profinet::gsdml::GSDMLModule::id, profinet::rpc::IOSlot::inputIocs, profinet::rpc::IOSlot::inputIoData, profinet::gsdml::GSDMLSubmodule::inputLength, profinet::rpc::IOSlot::inputLength, profinet::rpc::IOSlot::moduleIdent, moduleReferences, profinet::rpc::IOSlot::outputIocs, profinet::rpc::IOSlot::outputIoData, profinet::gsdml::GSDMLSubmodule::outputLength, profinet::rpc::IOSlot::outputLength, profinet::rpc::IOSlot::slot, profinet::rpc::IOSlot::submoduleIdent, profinet::gsdml::GSDMLSubmodule::submoduleIdentNumber, profinet::gsdml::GSDMLModule::submoduleReferences, profinet::gsdml::GSDMLModule::submodules, profinet::rpc::IOSlot::subslot, and systemSubmodules.
Here is the call graph for this function:| const GSDMLModule * profinet::gsdml::GSDMLDevice::FindModule | ( | const std::string & | moduleId | ) | const |
Look up a module by its GSDML ID.
| moduleId | GSDML ID attribute of the module. |
Definition at line 423 of file gsdml.cpp.
References modules.
| const GSDMLSubmodule * profinet::gsdml::GSDMLDevice::FindSubmodule | ( | const std::string & | submoduleId | ) | const |
Look up a globally defined submodule.
| submoduleId | GSDML ID attribute of the submodule. |
Definition at line 428 of file gsdml.cpp.
References submodules.
Referenced by BuildIoSlots().
Here is the caller graph for this function:| std::string profinet::gsdml::GSDMLDevice::dapModuleId |
The device access point's own (built-in) identifier to matchs with the submodule.
Definition at line 151 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::uint32_t profinet::gsdml::GSDMLDevice::dapModuleIdentNumber = 0 |
The device access point's own module ident number.
Definition at line 155 of file gsdml.h.
Referenced by BuildIoSlots(), and profinet::gsdml::ParseGsdmlString().
| std::vector<int> profinet::gsdml::GSDMLDevice::dapSlots |
Slot numbers where the DAP may be fixed/plugged (from UseableModules/PlugSlots).
Definition at line 157 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::uint32_t profinet::gsdml::GSDMLDevice::dapSubmoduleIdentNumber = 0 |
The device access point's own (built-in) submodule ident number.
Definition at line 153 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::vector<GSDMLSubmodule> profinet::gsdml::GSDMLDevice::dapSubmodules |
DAP virtual submodules.
Definition at line 160 of file gsdml.h.
Referenced by BuildIoSlots(), and profinet::gsdml::ParseGsdmlString().
| std::uint16_t profinet::gsdml::GSDMLDevice::deviceId = 0 |
PROFINET device ID from the GSDML's DeviceIdentity (DeviceID attribute).
Definition at line 148 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::deviceName |
Device name from the GSDML's DeviceIdentity / DeviceFunction.
Definition at line 144 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::vector<GSDMLModuleReference> profinet::gsdml::GSDMLDevice::moduleReferences |
Modules referenced by the DAP's UseableModules list.
Definition at line 172 of file gsdml.h.
Referenced by BuildIoSlots(), and profinet::gsdml::ParseGsdmlString().
| std::map<std::string, GSDMLModule> profinet::gsdml::GSDMLDevice::modules |
Every module declared in the GSDML's ModuleList, keyed by GSDML ID.
Definition at line 166 of file gsdml.h.
Referenced by FindModule(), and profinet::gsdml::ParseGsdmlString().
| std::map<std::string, GSDMLSubmodule> profinet::gsdml::GSDMLDevice::submodules |
Every globally defined SubmoduleItem, keyed by GSDML ID.
Definition at line 169 of file gsdml.h.
Referenced by FindSubmodule(), and profinet::gsdml::ParseGsdmlString().
| std::vector<GSDMLSystemSubmodule> profinet::gsdml::GSDMLDevice::systemSubmodules |
System-defined submodules built into the DAP (e.g. interface, port 1).
Definition at line 163 of file gsdml.h.
Referenced by BuildIoSlots(), and profinet::gsdml::ParseGsdmlString().
| std::uint16_t profinet::gsdml::GSDMLDevice::vendorId = 0 |
PROFINET vendor ID from the GSDML's DeviceIdentity (VendorID attribute).
Definition at line 146 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::vendorName |
Vendor name from the GSDML's DeviceIdentity.
Definition at line 142 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().