io_state_relay_handler.h
Go to the documentation of this file.
1 /*********************************************************************
2 * FSRobo-R Package BSDL
3 * ---------
4 * Copyright (C) 2019 FUJISOFT. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation and/or
12 * other materials provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its contributors
14 * may be used to endorse or promote products derived from this software without
15 * specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *********************************************************************/
28 
29 #ifndef FSROBO_R_DRIVER_IO_STATE_RELAY_HANDLER_H
30 #define FSROBO_R_DRIVER_IO_STATE_RELAY_HANDLER_H
31 
32 #include "ros/ros.h"
34 #include "fsrobo_r_msgs/IOStates.h"
36 
37 
38 namespace fsrobo_r_driver
39 {
40 namespace io_state_relay_handler
41 {
42 
51 {
52  // since this class defines a different init(), this helps find the base-class init()
54 
55 public:
56 
61 
62 
71 
72 protected:
73 
76 
85 
86 private:
95  void createDigitalMessage(int data, int n, int base_addr, fsrobo_r_msgs::Digital &d);
96  void createAnalogMessage(int data, int n, int base_ch, fsrobo_r_msgs::Analog &a);
97 };
98 
99 }
100 }
101 
102 
103 #endif // FSROBO_R_DRIVER_IO_STATE_RELAY_HANDLER_H
void createDigitalMessage(int data, int n, int base_addr, fsrobo_r_msgs::Digital &d)
void createAnalogMessage(int data, int n, int base_ch, fsrobo_r_msgs::Analog &a)
Class encapsulated robot status message generation methods (either to or from a industrial::simple_me...
bool internalCB(fsrobo_r_driver::simple_message::io_state_message::IOStateMessage &in)
Callback executed upon receiving a robot status message.
Message handler that relays joint positions (converts simple message types to ROS message types and p...
bool init(industrial::smpl_msg_connection::SmplMsgConnection *connection)
Class initializer.
bool init(int msg_type, industrial::smpl_msg_connection::SmplMsgConnection *connection)


fsrobo_r_driver
Author(s): F-ROSROBO
autogenerated on Sun Feb 9 2020 03:58:29