Fabric 0.2.0
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
fabric Namespace Reference

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 &parameters)
 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 ()
 

Enumeration Type Documentation

◆ event

Enumeration for different event types in connections.

Enumerator
ON_START 
ON_SUCCESS 
ON_FAILURE 
ON_STOP 

◆ PlanStatus

enum class fabric::PlanStatus
strong
Enumerator
UNKNOWN 
QUEUED 
PARSING 
PARSE_FAILED 
VALIDATING 
VALIDATION_FAILED 
BONDING 
BOND_FAILED 
CAPABILITY_STARTING 
CAPABILITY_START_FAILED 
CAPABILITY_CONNECTING 
CAPABILITY_CONNECT_FAILED 
RUNNING 
COMPLETED 
CANCELLED 

Function Documentation

◆ check_syntax()

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

Parameters
elementXML Element to be evaluated
control_listlist of valid control tags
rejectedlist containing invalid tags
erroroutput string for error messages
Returns
true if element valid and supported and false otherwise

◆ convert_to_string() [1/2]

void fabric::convert_to_string ( tinyxml2::XMLDocument &  document_xml,
std::string &  document_string 
)

convert XMLDocument to std::string

Parameters
documentelement to be converted
Returns
std::string converted document

◆ convert_to_string() [2/2]

bool fabric::convert_to_string ( tinyxml2::XMLElement *  element,
std::string &  parameters 
)
inline

convert XMLElement to std::string

Parameters
elementXMLElement element to be converted
paramtersparameter to hold std::string
Returns
true if element is not nullptr and conversion successful, false if element is nullptr

◆ extract_plan()

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.

Parameters
documentThe XMLDocument to extract the plan from
Returns
tinyxml2::XMLElement* Pointer to the first child of <Plan> if successful, nullptr otherwise

◆ generate_launch_description()

fabric.generate_launch_description ( )

◆ search()

bool fabric::search ( std::vector< std::string >  list,
std::string  value 
)

search a string in a vector of strings

Parameters
listvector of strings to be searched
valuestring to be searched in the vector
Returns
true if value is found in list and false otherwise