Motorcortex Core  version: 2.7.6
ecat_xml_v2_0.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2020 VECTIONEER.
4  */
5 
6 #ifndef MOTORCORTEX_CORE_ECAT_XML_V2_0_H
7 #define MOTORCORTEX_CORE_ECAT_XML_V2_0_H
8 
9 #include "ecat_xml.h"
10 
11 namespace mcx::ecat {
12 
13 class EtherCatXmlV2_0 : public EtherCatXml {
14 public:
15  EtherCatXmlV2_0() = default;
16 
17  virtual ~EtherCatXmlV2_0() = default;
18 
19  // loads domain configuration from xml element
20  EcatDomainConfig loadDomainConfig(tinyxml2::XMLElement* domain_xml, const std::string& path) const override;
21 
22 private:
23  static EcatDomainConfig loadDomain(const tinyxml2::XMLElement* domain_xml, const std::string& path, size_t& counter);
24 
25  static std::vector<EcatDeviceConfig> loadDevices(const tinyxml2::XMLElement* domain_xml, const std::string& path);
26 
27  static std::vector<EcatSyncInfo> loadSyncManagers(const tinyxml2::XMLElement* device_element,
28  const EcatDeviceInfo& info);
29 
30  static std::vector<EcatPdoInfo> loadPdos(const tinyxml2::XMLElement* device_element, EcatDirection dir,
31  size_t sm_counter, bool check_sm);
32 
33  static std::vector<ParameterLink> loadLinks(const tinyxml2::XMLElement* pdo_element, EcatDirection direction);
34 
35  static std::vector<EcatPdoInfo> loadPdoEntries(const tinyxml2::XMLElement* pdo_element, const std::string& tag,
36  EcatDirection direction);
37 
38  static EcatDcInfo loadDistributedClock(const tinyxml2::XMLElement* device_element);
39 
40  static std::vector<EcatSdoConfig> loadServiceDataObjects(const tinyxml2::XMLElement* device_element, size_t position);
41 
42  static std::vector<EcatSdoConfig> loadServiceDataEntries(const tinyxml2::XMLElement* sdo_element, SdoDirection dir,
43  size_t position);
44 
45  static EcatSdoConfig loadServiceDataEntry(const tinyxml2::XMLElement* sdo_entry, SdoDirection dir, SdoType type,
46  size_t position);
47 
48  static EcatDeviceInfo loadDeviceInfo(const tinyxml2::XMLElement* device_element);
49 
50  static DataTypeDesc getDataType(const tinyxml2::XMLElement* entry_element);
51 
52  static std::vector<EcatMailbox> loadMailboxes(const tinyxml2::XMLElement* device_element, const std::string& path);
53 
54  static std::tuple<bool, EcatMailbox> loadMailbox(const std::string& path);
55 
56  static std::tuple<bool, EcatMailbox> loadMailbox(const tinyxml2::XMLElement* mailbox_element);
57 
58  static std::tuple<bool, std::vector<EcatCoe>> loadCoe(const tinyxml2::XMLElement* mailbox_element);
59 
60  static std::tuple<bool, std::vector<EcatSoe>> loadSoe(const tinyxml2::XMLElement* mailbox_element);
61 };
62 
63 } // namespace mcx::ecat
64 
65 #endif // MOTORCORTEX_CORE_ECAT_XML_V2_0_H
mcx::ecat::EtherCatXmlV2_0
Definition: ecat_xml_v2_0.h:13
mcx::ecat::EcatDomainConfig
Definition: ecat_xmltypes.h:255
mcx::ecat::EcatDeviceInfo
Definition: ecat_xmltypes.h:175
mcx::ecat::DataTypeDesc
Definition: ecat_datatype.h:24
mcx::ecat::EcatSdoConfig
Definition: ecat_xmltypes.h:197
mcx::ecat::EcatDcInfo
Definition: ecat_xmltypes.h:167
mcx::ecat::EtherCatXml
Definition: ecat_xml.h:24