|
Fabric 0.2.0
|
Classes | |
| class | CapabilityClient |
| Class for capability client interactions. More... | |
| struct | CapabilityInfo |
| class | CompatibilityValidation |
| Syntax validation plugin for XML plans. More... | |
| struct | connection |
| Structure representing connections between nodes. More... | |
| class | Fabric |
| Class representing the main server of the fabric. More... | |
| struct | fabric_exception |
| Base class for driver exceptions. More... | |
| struct | node |
| Structure representing a node in the fabric. More... | |
| class | ParserBase |
| Abstract base class for XML plan parsing plugins. More... | |
| struct | Plan |
| class | ValidationBase |
| Abstract base class for XML plan validation plugins. More... | |
| class | XMLParser |
| Syntax validation plugin for XML plans. More... | |
Enumerations | |
| enum | event { ON_START , ON_SUCCESS , ON_FAILURE , ON_STOP } |
| Enumeration for different event types in connections. More... | |
| enum class | PlanStatus { UNKNOWN , QUEUED , PARSING , PARSE_FAILED , VALIDATING , VALIDATION_FAILED , BONDING , BOND_FAILED , CAPABILITY_STARTING , CAPABILITY_START_FAILED , CAPABILITY_CONNECTING , CAPABILITY_CONNECT_FAILED , RUNNING , COMPLETED , CANCELLED } |
Functions | |
| bool | search (std::vector< std::string > list, std::string value) |
| search a string in a vector of strings | |
| tinyxml2::XMLElement * | extract_plan (tinyxml2::XMLDocument &document) |
| Extract the <Plan> element from the XML document. | |
| bool | convert_to_string (tinyxml2::XMLElement *element, std::string ¶meters) |
| convert XMLElement to std::string | |
| void | convert_to_string (tinyxml2::XMLDocument &document_xml, std::string &document_string) |
| convert XMLDocument to std::string | |
| bool | check_syntax (tinyxml2::XMLElement *element, std::vector< std::string > &control_list, std::vector< std::string > &rejected, std::string &error) |
| check the plan to make sure all control and runner XML elements are valid with minimal required attributes. The function uses recursive approach to go through the xml plan | |
| generate_launch_description () | |
| enum fabric::event |
|
strong |
| bool fabric::check_syntax | ( | tinyxml2::XMLElement * | element, |
| std::vector< std::string > & | control_list, | ||
| std::vector< std::string > & | rejected, | ||
| std::string & | error | ||
| ) |
check the plan to make sure all control and runner XML elements are valid with minimal required attributes. The function uses recursive approach to go through the xml plan
| element | XML Element to be evaluated |
| control_list | list of valid control tags |
| rejected | list containing invalid tags |
| error | output string for error messages |
true if element valid and supported and false otherwise | void fabric::convert_to_string | ( | tinyxml2::XMLDocument & | document_xml, |
| std::string & | document_string | ||
| ) |
convert XMLDocument to std::string
| document | element to be converted |
|
inline |
convert XMLElement to std::string
| element | XMLElement element to be converted |
| paramters | parameter to hold std::string |
true if element is not nullptr and conversion successful, false if element is nullptr | tinyxml2::XMLElement * fabric::extract_plan | ( | tinyxml2::XMLDocument & | document | ) |
Extract the <Plan> element from the XML document.
This function checks if the root element of the provided XML document is <Plan>. If so, it returns the first child element of <Plan>. Otherwise, it indicates failure.
| document | The XMLDocument to extract the plan from |
| fabric.generate_launch_description | ( | ) |
| bool fabric::search | ( | std::vector< std::string > | list, |
| std::string | value | ||
| ) |
search a string in a vector of strings
| list | vector of strings to be searched |
| value | string to be searched in the vector |
true if value is found in list and false otherwise