|
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::string | dapModuleName |
| The device access point's own (built-in) module name. | |
| std::string | dapModuleInfo |
| The device access point's own (built-in) module info text. | |
| 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. | |
| rpc::ApplicationRelations | applicationRelations |
| 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.
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 728 of file gsdml.cpp.
References dapModuleIdentNumber, dapSubmodules, FindSubmodule(), profinet::gsdml::GSDMLModule::id, profinet::gsdml::GSDMLSubmodule::inputLength, profinet::rpc::IOSlot::inputLength, profinet::rpc::IOSlot::moduleIdent, moduleReferences, 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 631 of file gsdml.cpp.
References modules.
Referenced by profinet::sim::MakeVirtualAumaIocrConfiguration().
Here is the caller graph for this function:| 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 636 of file gsdml.cpp.
References submodules.
Referenced by BuildIoSlots().
Here is the caller graph for this function:| rpc::ApplicationRelations profinet::gsdml::GSDMLDevice::applicationRelations |
Definition at line 204 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::dapModuleId |
The device access point's own (built-in) identifier to matchs with the submodule.
Definition at line 177 of file gsdml.h.
Referenced by profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), profinet::gsdml::ParseGsdmlString(), and profinet::io::TEST().
| std::uint32_t profinet::gsdml::GSDMLDevice::dapModuleIdentNumber = 0 |
The device access point's own module ident number.
Definition at line 185 of file gsdml.h.
Referenced by BuildIoSlots(), profinet::gsdml::ParseGsdmlString(), and profinet::io::TEST().
| std::string profinet::gsdml::GSDMLDevice::dapModuleInfo |
The device access point's own (built-in) module info text.
Definition at line 181 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::dapModuleName |
The device access point's own (built-in) module name.
Definition at line 179 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString(), and profinet::io::TEST().
| std::vector<int> profinet::gsdml::GSDMLDevice::dapSlots |
Slot numbers where the DAP may be fixed/plugged (from UseableModules/PlugSlots).
Definition at line 187 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 183 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().
| std::vector<GSDMLSubmodule> profinet::gsdml::GSDMLDevice::dapSubmodules |
DAP virtual submodules.
Definition at line 190 of file gsdml.h.
Referenced by BuildIoSlots(), profinet::gsdml::ParseGsdmlString(), and profinet::io::TEST().
| std::uint16_t profinet::gsdml::GSDMLDevice::deviceId = 0 |
PROFINET device ID from the GSDML's DeviceIdentity (DeviceID attribute).
Definition at line 174 of file gsdml.h.
Referenced by profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), and profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::deviceName |
Device name from the GSDML's DeviceIdentity / DeviceFunction.
Definition at line 170 of file gsdml.h.
Referenced by profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), and profinet::gsdml::ParseGsdmlString().
| std::vector<GSDMLModuleReference> profinet::gsdml::GSDMLDevice::moduleReferences |
Modules referenced by the DAP's UseableModules list.
Definition at line 202 of file gsdml.h.
Referenced by BuildIoSlots(), profinet::io::IoSignalCatalog::FromGsdml(), profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), profinet::gsdml::ParseGsdmlString(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), and profinet::io::TEST().
| std::map<std::string, GSDMLModule> profinet::gsdml::GSDMLDevice::modules |
Every module declared in the GSDML's ModuleList, keyed by GSDML ID.
Definition at line 196 of file gsdml.h.
Referenced by FindModule(), profinet::io::IoSignalCatalog::FromGsdml(), profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), profinet::gsdml::ParseGsdmlString(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), profinet::io::TEST(), and profinet::io::TEST().
| std::map<std::string, GSDMLSubmodule> profinet::gsdml::GSDMLDevice::submodules |
Every globally defined SubmoduleItem, keyed by GSDML ID.
Definition at line 199 of file gsdml.h.
Referenced by FindSubmodule(), profinet::gsdml::ParseGsdmlString(), profinet::io::TEST(), profinet::io::TEST(), and profinet::io::TEST().
| std::vector<GSDMLSystemSubmodule> profinet::gsdml::GSDMLDevice::systemSubmodules |
System-defined submodules built into the DAP (e.g. interface, port 1).
Definition at line 193 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 172 of file gsdml.h.
Referenced by profinet::sim::test::MakeAumaGsdml(), profinet::sim::test::MakePhoenixGsdml(), and profinet::gsdml::ParseGsdmlString().
| std::string profinet::gsdml::GSDMLDevice::vendorName |
Vendor name from the GSDML's DeviceIdentity.
Definition at line 168 of file gsdml.h.
Referenced by profinet::gsdml::ParseGsdmlString().