fadecandy_driver_ros.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Eurotec, Netherlands
3  * All rights reserved.
4  *
5  * Author: Jad Haj Mustafa
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  */
34 
36 #include <fadecandy_msgs/LEDArray.h>
37 #include <ros/publisher.h>
38 #include <ros/subscriber.h>
39 
40 #include "../fadecandy_driver.h"
41 
42 namespace fadecandy_driver
43 {
45 {
46 public:
51  FadecandyDriverROS(double restart_patience);
52 
56  void run();
57 
58 private:
63 
67  void setupConnection();
68 
73  void setLedsCallback(const fadecandy_msgs::LEDArrayConstPtr& msg);
74 
80 
86 
92 
97 
102 };
103 } // namespace fadecandy_driver
ros::Subscriber led_subscriber_
led_subscriber_ LED messages subscriber
void setLedsCallback(const fadecandy_msgs::LEDArrayConstPtr &msg)
void connectTimerCallback(const ros::TimerEvent &e)
void setupConnection()
setupConnection Connect the driver to the device
FadecandyDriver driver_
driver_ Fadecandy driver
ros::Timer diagnostics_timer_
timer_ Periodic timer for updating the diagnostics
void run()
run Listen to LED messages and publishes diagnostic of the driver
double restart_patience_
restart_patience_ Restart patience time
FadecandyDriverROS(double restart_patience)
FadecandyDriverRos fadecandy driver ROS wrapper.
diagnostic_updater::Updater diagnostic_updater_
diagnostic_updater_ Diagnostic updater
void diagnosticsCallback(diagnostic_updater::DiagnosticStatusWrapper &diagnostic_status)
diagnosticsCallback Diagnostics callback
void diagnosticsTimerCallback(const ros::TimerEvent &e)
ros::Timer connect_timer_
connection_check_timer_ Periodic timer for checking the connection


fadecandy_driver
Author(s):
autogenerated on Mon Feb 28 2022 22:18:46