Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
include
urg_sensor.h
Go to the documentation of this file.
1
#ifndef URG_SENSOR_H
2
#define URG_SENSOR_H
3
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#include "
urg_connection.h
"
28
29
37
typedef
enum
{
38
URG_DISTANCE
,
39
URG_DISTANCE_INTENSITY
,
40
URG_MULTIECHO
,
41
URG_MULTIECHO_INTENSITY
,
42
URG_STOP
,
43
URG_UNKNOWN
,
44
}
urg_measurement_type_t
;
45
53
typedef
enum
{
54
URG_COMMUNICATION_3_BYTE
,
55
URG_COMMUNICATION_2_BYTE
,
56
}
urg_range_data_byte_t
;
57
58
59
enum
{
60
URG_SCAN_INFINITY
= 0,
61
URG_MAX_ECHO
= 3,
62
};
63
64
66
typedef
urg_measurement_type_t
67
(*
urg_error_handler
)(
const
char
*status,
void
*urg);
68
69
77
typedef
struct
78
{
79
int
is_active;
80
int
last_errno;
81
urg_connection_t
connection;
82
83
int
first_data_index;
84
int
last_data_index;
85
int
front_data_index;
86
int
area_resolution;
87
long
scan_usec;
88
int
min_distance;
89
int
max_distance;
90
int
scanning_first_step;
91
int
scanning_last_step;
92
int
scanning_skip_step;
93
int
scanning_skip_scan;
94
urg_range_data_byte_t
range_data_byte;
95
96
int
timeout;
97
int
specified_scan_times;
98
int
scanning_remain_times;
99
int
is_laser_on;
100
101
int
received_first_index;
102
int
received_last_index;
103
int
received_skip_step;
104
urg_range_data_byte_t
received_range_data_byte;
105
int
is_sending;
106
107
urg_error_handler
error_handler;
108
109
char
return_buffer[80];
110
}
urg_t
;
111
112
188
extern
int
urg_open
(
urg_t
*urg,
urg_connection_type_t
connection_type,
189
const
char
*device_or_address,
190
long
baudrate_or_port);
191
192
212
extern
void
urg_close
(
urg_t
*urg);
213
214
233
extern
void
urg_set_timeout_msec
(
urg_t
*urg,
int
msec);
234
235
243
extern
int
urg_start_time_stamp_mode
(
urg_t
*urg);
244
245
280
extern
long
urg_time_stamp
(
urg_t
*urg);
281
282
290
extern
int
urg_stop_time_stamp_mode
(
urg_t
*urg);
291
292
376
extern
int
urg_start_measurement
(
urg_t
*urg,
urg_measurement_type_t
type,
377
int
scan_times,
int
skip_scan);
378
379
436
extern
int
urg_get_distance
(
urg_t
*urg,
long
data[],
long
*time_stamp);
437
438
499
extern
int
urg_get_distance_intensity
(
urg_t
*urg,
long
data[],
500
unsigned
short
intensity[],
501
long
*time_stamp);
502
503
586
extern
int
urg_get_multiecho
(
urg_t
*urg,
long
data_multi[],
long
*time_stamp);
587
588
647
extern
int
urg_get_multiecho_intensity
(
urg_t
*urg,
long
data_multi[],
648
unsigned
short
intensity_multi[],
649
long
*time_stamp);
650
651
688
extern
int
urg_stop_measurement
(
urg_t
*urg);
689
690
785
extern
int
urg_set_scanning_parameter
(
urg_t
*urg,
int
first_step,
786
int
last_step,
int
skip_step);
787
788
833
extern
int
urg_set_communication_data_size
(
urg_t
*urg,
834
urg_range_data_byte_t
data_byte);
835
836
844
extern
int
urg_laser_on
(
urg_t
*urg);
845
846
854
extern
int
urg_laser_off
(
urg_t
*urg);
855
856
864
extern
int
urg_reboot
(
urg_t
*urg);
865
866
895
extern
void
urg_sleep
(
urg_t
*urg);
896
897
908
extern
void
urg_wakeup
(
urg_t
*urg);
909
928
extern
int
urg_is_stable
(
urg_t
*urg);
929
930
951
extern
const
char
*
urg_sensor_product_type
(
urg_t
*urg);
952
953
974
extern
const
char
*
urg_sensor_serial_id
(
urg_t
*urg);
975
976
997
extern
const
char
*
urg_sensor_firmware_version
(
urg_t
*urg);
998
999
1018
extern
const
char
*
urg_sensor_status
(
urg_t
*urg);
1019
1020
1043
extern
const
char
*
urg_sensor_state
(
urg_t
*urg);
1044
1045
1058
extern
void
urg_set_error_handler
(
urg_t
*urg,
urg_error_handler
handler);
1059
1060
1079
extern
long
urg_scip_decode
(
const
char
data[],
int
size);
1080
1081
1082
#ifdef __cplusplus
1083
}
1084
#endif
1085
1086
#endif
/* !URG_SENSOR_H */
Generated on Thu May 2 2013 10:55:17 by
1.8.3.1