176 std::map<std::string, std::vector<int>> allowedSlots;
178 std::vector<std::pair<int, std::string>> fixedModules;
218 [[nodiscard]] std::vector<rpc::IOSlot>
BuildIoSlots(
const std::vector<std::tuple<int, std::string, int, std::string>>& plugged = {})
const;
227GSDMLDevice
ParseGsdml(
const std::string& path);
GSDMLDevice ParseGsdmlString(const std::string &xml)
Parse GSDML content already held in memory.
GSDMLDevice ParseGsdml(const std::string &path)
Parse a GSDML file into a GSDMLDevice.
PROFINET DCE/RPC protocol structures and IO-Device connection API.
One I/O data item within a submodule's cyclic data (GSDML DataItem element).
int length
Length in bytes of this item.
std::string dataType
GSDML DataType attribute, e.g. "Unsigned8", "Integer16", "OctetString".
std::string textId
Human-readable text ID/name for this item, if the GSDML supplied one.
Complete parsed GSDML device profile.
std::string vendorName
Vendor name from the GSDML's DeviceIdentity.
std::map< std::string, GSDMLModule > modules
Every module declared in the GSDML's ModuleList, keyed by GSDML ID.
std::vector< GSDMLModuleReference > moduleReferences
Modules referenced by the DAP's UseableModules list.
std::vector< GSDMLSubmodule > dapSubmodules
DAP virtual submodules.
std::uint16_t vendorId
PROFINET vendor ID from the GSDML's DeviceIdentity (VendorID attribute).
std::uint32_t dapSubmoduleIdentNumber
The device access point's own (built-in) submodule ident number.
const GSDMLSubmodule * FindSubmodule(const std::string &submoduleId) const
Look up a globally defined submodule.
std::vector< GSDMLSystemSubmodule > systemSubmodules
System-defined submodules built into the DAP (e.g. interface, port 1).
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.
std::uint16_t deviceId
PROFINET device ID from the GSDML's DeviceIdentity (DeviceID attribute).
std::uint32_t dapModuleIdentNumber
The device access point's own module ident number.
std::map< std::string, GSDMLSubmodule > submodules
Every globally defined SubmoduleItem, keyed by GSDML ID.
std::string deviceName
Device name from the GSDML's DeviceIdentity / DeviceFunction.
const GSDMLModule * FindModule(const std::string &moduleId) const
Look up a module by its GSDML ID.
std::vector< int > dapSlots
Slot numbers where the DAP may be fixed/plugged (from UseableModules/PlugSlots).
std::string dapModuleId
The device access point's own (built-in) identifier to matchs with the submodule.
Reference describing how a module may be used by the DAP.
std::string moduleId
Referenced ModuleItem ID.
std::vector< int > usedSlots
Slots where the module is currently used/preselected.
std::vector< int > allowedSlots
Slots where the module is allowed.
std::vector< int > fixedSlots
Slots where the module is fixed.
A GSDML module definition (ModuleItem), possibly offering multiple virtual submodules.
std::string id
GSDML ID attribute (used to resolve ModuleItemTarget references).
std::vector< GSDMLSubmoduleReference > submoduleReferences
References to globally defined SubmoduleItem definitions.
std::map< std::string, GSDMLSubmodule > submodules
Virtual submodules this module offers, keyed by their GSDML ID.
std::string name
Human-readable module name (from the GSDML's Name/TextId, resolved via ExternalTextList).
std::vector< int > physicalSubslots
Physical subslots supported by this module.
std::uint32_t moduleIdentNumber
Module ident number (hex value from the GSDML, parsed to an integer).
Reference to a submodule that may be used by a module.
std::vector< int > usedSubslots
Subslots where this submodule is currently used/preselected.
std::vector< int > allowedSubslots
Subslots where this submodule is allowed.
std::vector< int > fixedSubslots
Subslots where this submodule is fixed.
std::string submoduleId
Referenced SubmoduleItem ID.
A GSDML virtual submodule definition (VirtualSubmoduleItem).
std::string name
Human-readable submodule name (from the GSDML's Name/TextId, resolved via ExternalTextList).
std::uint32_t submoduleIdentNumber
Submodule ident number (hex value from the GSDML, parsed to an integer).
std::vector< GSDMLDataItem > inputItems
Individual input data items, in wire order.
std::vector< int > allowedSubslots
Subslots where this inline virtual submodule is allowed.
std::string id
GSDML ID attribute (used to resolve VirtualSubmoduleItemTarget references).
int outputLength
Total output data length in bytes (sum of Output DataItems).
std::vector< GSDMLDataItem > outputItems
Individual output data items, in wire order.
std::vector< int > usedSubslots
Subslots where this inline virtual submodule is selected/used.
int inputLength
Total input data length in bytes (sum of Input DataItems).
std::vector< int > fixedSubslots
Subslots where this inline virtual submodule is fixed.
A GSDML system-defined submodule (e.g. built into the DAP: interface, port).
std::uint16_t subslot
Subslot this submodule occupies.
std::uint32_t submoduleIdentNumber
Submodule ident number.