#include <daemon.h>

Public Member Functions | |
| bool | CheckPassedTime () |
| bool | CheckRange (double lowerRange, double upperRange, double value, std::string msg_name) |
| bool | CheckTopic (std::string str1, std::string str2) |
| bool | CompareStrings (std::string str1, std::string str2) |
| std::string | CreateTimestamp () |
| void | createTopicStructurePrefix () |
| Daemon () | |
| Daemon (ros::NodeHandle *nh, std::string daemonName) | |
| vda5050_msgs::Header | GetHeader () |
| std::vector< std::string > | GetMsgList (std::map< std::string, std::string > topicList) |
| std::string | GetParameter (std::string param) |
| std::string | GetTopic (std::string hierarchical_topic) |
| std::map< std::string, std::string > | GetTopicPublisherList () |
| std::string | getTopicStructurePrefix () |
| std::map< std::string, std::string > | GetTopicSubscriberList () |
| void | InitHeaderInfo () |
| void | LinkErrorTopics (ros::NodeHandle *nh) |
| void | PublishState () |
| std::map< std::string, std::string > | ReadTopicParams (ros::NodeHandle *nh, std::string paramTopicName) |
| void | UpdateHeader () |
| void | UpdateState () |
Protected Attributes | |
| ros::Publisher | errorPublisher |
| std::map< std::string, ros::Publisher > | messagePublisher |
| ros::NodeHandle | nh |
| std::map< std::string, ros::Subscriber > | subscribers |
Private Attributes | |
| vda5050_msgs::Header | messageHeader |
| std::string | mqttTopicStructurePrefix |
| bool | testMode |
| std::map< std::string, std::string > | topicPublisherList |
| std::map< std::string, std::string > | topicSubscriberList |
Model for all daemons. Every daemon provides some functionality to translate messages between the robot's internal communication and the VDA-5050-based client-server communication.
| Daemon::Daemon | ( | ) |
Default constructor for daemon objects. TODO: Do we need this?
Definition at line 30 of file src/daemon.cpp.
| Daemon::Daemon | ( | ros::NodeHandle * | nh, |
| std::string | daemonName | ||
| ) |
Constructor for daemon objects.
| nh | ROS node handle object. |
| daemonName | Name of the daemon. |
Definition at line 35 of file src/daemon.cpp.
| bool Daemon::CheckPassedTime | ( | ) |
Calculates the passed time between last update interval and now.
| bool Daemon::CheckRange | ( | double | lowerRange, |
| double | upperRange, | ||
| double | value, | ||
| std::string | msg_name | ||
| ) |
Check if a value is in given boundaries. If not, a warning is raised.
| lowerRange | Lower limit of the variable. |
| upperRange | Upper limit of the variable. |
| value | Value to be checked. |
| msg_name | Name of the message type. |
Definition at line 134 of file src/daemon.cpp.
| bool Daemon::CheckTopic | ( | std::string | str1, |
| std::string | str2 | ||
| ) |
Checks if the second topic is a child topic of the first topic.
| str1 | Name of the first topic. |
| str2 | Name of the topic that might be a child topic of the other topic. |
Definition at line 117 of file src/daemon.cpp.
| bool Daemon::CompareStrings | ( | std::string | str1, |
| std::string | str2 | ||
| ) |
Checks if the second string is contained in the first string.
| str1 | Some string. |
| str2 | Second string that might be a substring of the other string. |
Definition at line 112 of file src/daemon.cpp.
| std::string Daemon::CreateTimestamp | ( | ) |
Create a timestamp string of the current instant.
Definition at line 204 of file src/daemon.cpp.
| void Daemon::createTopicStructurePrefix | ( | ) |
Create the prefix of the topic structure.
Definition at line 87 of file src/daemon.cpp.
| vda5050_msgs::Header Daemon::GetHeader | ( | ) |
Get the header of a ROS message. TODO which message is processed?
Definition at line 106 of file src/daemon.cpp.
| std::vector< std::string > Daemon::GetMsgList | ( | std::map< std::string, std::string > | topicList | ) |
Get all message types. This is achieved by reading in the message keys that are used in the topic config file.
| topicList | All topic keys and names as a map. |
Definition at line 56 of file src/daemon.cpp.
| std::string Daemon::GetParameter | ( | std::string | param | ) |
Read a parameter from the ROS parameter server.
| param | Key of the parameter. |
Definition at line 64 of file src/daemon.cpp.
| std::string Daemon::GetTopic | ( | std::string | hierarchical_topic | ) |
Extract a topic string from a fully-qualified topic name.
Definition at line 128 of file src/daemon.cpp.
| std::map< std::string, std::string > Daemon::GetTopicPublisherList | ( | ) |
Get names of all published topics.
Definition at line 46 of file src/daemon.cpp.
| std::string Daemon::getTopicStructurePrefix | ( | ) |
Get the prefix of the topic structure.
Definition at line 95 of file src/daemon.cpp.
| std::map< std::string, std::string > Daemon::GetTopicSubscriberList | ( | ) |
Get names of all subscribed topics.
Definition at line 51 of file src/daemon.cpp.
| void Daemon::InitHeaderInfo | ( | ) |
Initialize the message header. Message objects are used multiple times, so this only needs to be done once at startup.
Definition at line 79 of file src/daemon.cpp.
| void Daemon::LinkErrorTopics | ( | ros::NodeHandle * | nh | ) |
Link the error topics.
| nh | Pointer to the ROS node handle. |
Definition at line 196 of file src/daemon.cpp.
| void Daemon::PublishState | ( | ) |
Fetches the header message and publishes the state message. Updates timestamp since last publishing.
| std::map< std::string, std::string > Daemon::ReadTopicParams | ( | ros::NodeHandle * | nh, |
| std::string | paramTopicName | ||
| ) |
Read in the user-specified topic names. The user can specify names for the topics that contain the needed information. For mapping the contents to the topic names, this method scans the parameter server.
| nh | Pointer to the ROS node handle. |
| paramTopicName | Name of the param family to scan through. |
Definition at line 164 of file src/daemon.cpp.
| void Daemon::UpdateHeader | ( | ) |
Update the message header for the next publish. This includes updating the timestamp of the message.
Definition at line 100 of file src/daemon.cpp.
| void Daemon::UpdateState | ( | ) |
Checks all the logic within the state daemon. For example, it checks if 30 seconds have passed without update.
|
protected |
|
private |
|
protected |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
private |