Fast RTPS  Version 2.6.10
Fast RTPS
XMLEndpointParser.h
1 // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
20 #ifndef XMLENDPOINTPARSER_H_
21 #define XMLENDPOINTPARSER_H_
22 #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
23 
24 #include <cstdint>
25 #include <set>
26 #include <string>
27 #include <vector>
28 
29 #include <fastdds/rtps/builtin/data/ReaderProxyData.h>
30 #include <fastdds/rtps/builtin/data/WriterProxyData.h>
31 #include <fastrtps/xmlparser/XMLParserCommon.h>
32 #include <fastrtps/xmlparser/XMLParser.h>
33 
34 namespace tinyxml2 {
35 class XMLElement;
36 class XMLDocument;
37 } // namespace tinyxml2
38 
39 
40 
41 namespace eprosima {
42 namespace fastrtps {
43 namespace rtps {
44 class ReaderProxyData;
45 class WriterProxyData;
46 } // namespace rtps
47 
48 namespace xmlparser {
49 
55 {
56 public:
57 
59  {
60  }
61 
63  {
64  }
65 
67  std::string m_RTPSParticipantName;
69  std::vector<rtps::ReaderProxyData*> m_readers;
71  std::vector<rtps::WriterProxyData*> m_writers;
72 };
73 
79 {
80 public:
81 
83  virtual ~XMLEndpointParser();
90  std::string& filename);
97  tinyxml2::XMLDocument& doc);
98 
100  tinyxml2::XMLElement* xml_endpoint,
102 
110  tinyxml2::XMLElement* xml_endpoint,
119  tinyxml2::XMLElement* xml_endpoint,
129  const char* partname,
130  uint16_t id,
131  rtps::ReaderProxyData** rdataptr);
140  const char* partname,
141  uint16_t id,
142  rtps::WriterProxyData** wdataptr);
143 
144 private:
145 
146  XMLP_ret get_disable_positive_acks_qos(
147  tinyxml2::XMLElement* elem,
148  DisablePositiveACKsQosPolicy& disable_positive_acks_qos);
149 
150  std::set<int16_t> m_endpointIds;
151  std::set<uint32_t> m_entityIds;
152 
153  std::vector<StaticRTPSParticipantInfo*> m_RTPSParticipants;
154 };
155 
156 
157 } /* xmlparser */
158 } /* namespace */
159 } /* namespace eprosima */
160 
161 #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
162 #endif /* XMLENDPOINTPARSER_H_ */
Class StaticRTPSParticipantInfo, contains the information of writers and readers loaded from the XML ...
Definition: XMLEndpointParser.h:55
std::vector< rtps::ReaderProxyData * > m_readers
Vector of ReaderProxyData pointer.
Definition: XMLEndpointParser.h:69
std::string m_RTPSParticipantName
RTPS PArticipant name.
Definition: XMLEndpointParser.h:67
StaticRTPSParticipantInfo()
Definition: XMLEndpointParser.h:58
std::vector< rtps::WriterProxyData * > m_writers
Vector of ReaderProxyData pointer.
Definition: XMLEndpointParser.h:71
virtual ~StaticRTPSParticipantInfo()
Definition: XMLEndpointParser.h:62
Class XMLEndpointParser used to parse the XML file that contains information about remote endpoints.
Definition: XMLEndpointParser.h:79
void loadXMLParticipantEndpoint(tinyxml2::XMLElement *xml_endpoint, StaticRTPSParticipantInfo *pdata)
XMLP_ret loadXMLNode(tinyxml2::XMLDocument &doc)
Load the XML node.
XMLP_ret loadXMLFile(std::string &filename)
Load the XML file.
XMLP_ret loadXMLWriterEndpoint(tinyxml2::XMLElement *xml_endpoint, StaticRTPSParticipantInfo *pdata)
Load a Writer endpoint.
XMLP_ret lookforWriter(const char *partname, uint16_t id, rtps::WriterProxyData **wdataptr)
Look for a writer in the previously loaded endpoints.
XMLP_ret lookforReader(const char *partname, uint16_t id, rtps::ReaderProxyData **rdataptr)
Look for a reader in the previously loaded endpoints.
XMLP_ret loadXMLReaderEndpoint(tinyxml2::XMLElement *xml_endpoint, StaticRTPSParticipantInfo *pdata)
Load a Reader endpoint.
Class XMLParser, used to load XML data.
Definition: XMLParser.h:91
XMLP_ret
Enum class XMLP_ret, used to provide a strongly typed result from the operations within this module.
Definition: XMLParserCommon.h:27
fastdds::dds::DisablePositiveACKsQosPolicy DisablePositiveACKsQosPolicy
Definition: QosPolicies.h:96
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
Definition: XMLEndpointParser.h:34