rq_sensor_com.h
Go to the documentation of this file.
1 /* Software License Agreement (BSD License)
2 *
3 * Copyright (c) 2014, Robotiq, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following
14 * disclaimer in the documentation and/or other materials provided
15 * with the distribution.
16 * * Neither the name of Robotiq, Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * Copyright (c) 2014, Robotiq, Inc
34 */
35 
36 /*
37  * \file rq_sensor_com.h
38  * \date June 19, 2014
39  * \author Jonathan Savoie <jonathan.savoie@robotiq.com>
40  * \maintainer Jean-Philippe Roberge <ros@robotiq.com>
41  */
42 
43 #ifndef RQ_SENSOR_COM_H
44 #define RQ_SENSOR_COM_H
45 
46 #include "rq_int.h"
47 #include <stdio.h>
48  #include <stdbool.h>
49 #include <string>
50 
51 #define MP_BUFF_SIZE 1024
52 
54 INT_8 rq_sensor_com(const std::string&);
57 void rq_com_listen_stream(void);
59 bool rq_com_get_valid_stream(void);
60 
61 //Accesseur
62 void rq_com_get_str_serial_number(INT_8 * serial_number);
63 void rq_com_get_str_firmware_version(INT_8 * firmware_version);
64 void rq_com_get_str_production_year(INT_8 * production_year);
66 bool rq_com_got_new_message(void);
67 void rq_com_do_zero_force_flag(void);
68 void stop_connection(void);
69 
70 #endif //RQ_SENSOR_COM_H
void rq_com_get_str_production_year(INT_8 *production_year)
Retrieves the sensor firmware version.
float rq_com_get_received_data(UINT_8 i)
Return an effort component.
void rq_sensor_com_read_info_high_lvl(void)
Reads and stores high level information from the sensor. These include the firmware version...
INT_8 rq_sensor_com()
Discovers and initialize the communication with the sensor.
bool rq_com_get_valid_stream(void)
returns if the stream message is valid
void rq_com_get_str_firmware_version(INT_8 *firmware_version)
Retrieves the sensor firmware version.
void rq_com_get_str_serial_number(INT_8 *serial_number)
Retrieves the sensor serial number.
void rq_com_do_zero_force_flag(void)
Set the "zero sensor" flag to 1. When the next stream message will be decoded, the effort values will...
void stop_connection(void)
close the serial port.
INT_8 rq_com_start_stream(void)
Starts the sensor streaming mode.
unsigned char UINT_8
Definition: rq_int.h:51
bool rq_com_get_stream_detected(void)
retrieves the sensor firmware version
char INT_8
Definition: rq_int.h:46
void rq_com_listen_stream(void)
Listens and decode a valid stream input.
bool rq_com_got_new_message(void)
Returns true if a new valid stream message has been decoded and is available.


robotiq_ft_sensor
Author(s): Jonathan Savoie
autogenerated on Tue Jun 1 2021 02:30:04