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_c/urg_connection.h"
28 #include "urg_c/urg_time.h"
29 
30 
35  typedef enum {
43 
48  typedef enum {
52 
53 
54  enum {
57  };
58 
59 
62  (*urg_error_handler)(const char *status, void *urg);
63 
64 
72  typedef struct
73  {
74  int is_active;
77 
82  long scan_usec;
90 
91  int timeout;
95 
101 
103 
104  char return_buffer[80];
105  } urg_t;
106 
107 
147  extern int urg_open(urg_t *urg, urg_connection_type_t connection_type,
148  const char *device_or_address,
149  long baudrate_or_port);
150 
151 
163  extern void urg_close(urg_t *urg);
164 
165 
174  extern void urg_set_timeout_msec(urg_t *urg, int msec);
175 
176 
178  extern int urg_start_time_stamp_mode(urg_t *urg);
179 
180 
205  extern long urg_time_stamp(urg_t *urg);
206 
207 
209  extern int urg_stop_time_stamp_mode(urg_t *urg);
210 
211 
257  extern int urg_start_measurement(urg_t *urg, urg_measurement_type_t type,
258  int scan_times, int skip_scan);
259 
260 
298  extern int urg_get_distance(urg_t *urg, long data[], long *time_stamp, unsigned long long *system_time_stamp);
299 
300 
336  extern int urg_get_distance_intensity(urg_t *urg, long data[],
337  unsigned short intensity[],
338  long *time_stamp, unsigned long long *system_time_stamp);
339 
340 
387  extern int urg_get_multiecho(urg_t *urg, long data_multi[], long *time_stamp, unsigned long long *system_time_stamp);
388 
389 
424  extern int urg_get_multiecho_intensity(urg_t *urg, long data_multi[],
425  unsigned short intensity_multi[],
426  long *time_stamp, unsigned long long *system_time_stamp);
427 
428 
452  extern int urg_stop_measurement(urg_t *urg);
453 
454 
505  extern int urg_set_scanning_parameter(urg_t *urg, int first_step,
506  int last_step, int skip_step);
507 
508 
529  extern int urg_set_communication_data_size(urg_t *urg,
530  urg_range_data_byte_t data_byte);
531 
532 
534  extern int urg_laser_on(urg_t *urg);
535 
536 
538  extern int urg_laser_off(urg_t *urg);
539 
540 
542  extern int urg_reboot(urg_t *urg);
543 
544 
559  extern void urg_sleep(urg_t *urg);
560 
561 
568  extern void urg_wakeup(urg_t *urg);
569 
579  extern int urg_is_stable(urg_t *urg);
580 
581 
592  extern const char *urg_sensor_product_type(urg_t *urg);
593 
594 
605  extern const char *urg_sensor_serial_id(urg_t *urg);
606 
614  extern const char *urg_sensor_vendor(urg_t *urg);
615 
616 
627  extern const char *urg_sensor_firmware_version(urg_t *urg);
628 
629  extern const char *urg_sensor_firmware_date(urg_t *urg);
630 
638  extern const char *urg_sensor_protocol_version(urg_t *urg);
639 
649  extern const char *urg_sensor_status(urg_t *urg);
650 
651 
663  extern const char *urg_sensor_state(urg_t *urg);
664 
665 
672  extern void urg_set_error_handler(urg_t *urg, urg_error_handler handler);
673 
674 
684  extern long urg_scip_decode(const char data[], int size);
685 
686 
687 #ifdef __cplusplus
688 }
689 #endif
690 
691 #endif /* !URG_SENSOR_H */
urg_open
int urg_open(urg_t *urg, urg_connection_type_t connection_type, const char *device_or_address, long baudrate_or_port)
Definition: urg_sensor.c:684
URG_MAX_ECHO
@ URG_MAX_ECHO
Definition: urg_sensor.h:56
urg_sensor_product_type
const char * urg_sensor_product_type(urg_t *urg)
Definition: urg_sensor.c:1180
urg_t
URG sensor.
Definition: urg_sensor.h:72
urg_get_multiecho_intensity
int urg_get_multiecho_intensity(urg_t *urg, long data_multi[], unsigned short intensity_multi[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:965
urg_sensor_state
const char * urg_sensor_state(urg_t *urg)
Definition: urg_sensor.c:1350
urg_set_scanning_parameter
int urg_set_scanning_parameter(urg_t *urg, int first_step, int last_step, int skip_step)
Definition: urg_sensor.c:1009
urg_t::front_data_index
int front_data_index
Definition: urg_sensor.h:80
urg_t::received_first_index
int received_first_index
Definition: urg_sensor.h:96
urg_wakeup
void urg_wakeup(urg_t *urg)
Definition: urg_sensor.c:1116
urg_t::max_distance
int max_distance
Definition: urg_sensor.h:84
urg_get_distance
int urg_get_distance(urg_t *urg, long data[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:934
urg_t::area_resolution
int area_resolution
Definition: urg_sensor.h:81
urg_t::received_skip_step
int received_skip_step
Definition: urg_sensor.h:98
urg_connection_type_t
urg_connection_type_t
通信タイプ
Definition: urg_connection.h:32
urg_t::scan_usec
long scan_usec
Definition: urg_sensor.h:82
urg_laser_off
int urg_laser_off(urg_t *urg)
Definition: urg_sensor.c:1070
urg_stop_time_stamp_mode
int urg_stop_time_stamp_mode(urg_t *urg)
Definition: urg_sensor.c:813
urg_sensor_protocol_version
const char * urg_sensor_protocol_version(urg_t *urg)
returns the protocol version
Definition: urg_sensor.c:1300
urg_t::scanning_first_step
int scanning_first_step
Definition: urg_sensor.h:85
urg_sleep
void urg_sleep(urg_t *urg)
Definition: urg_sensor.c:1101
urg_stop_measurement
int urg_stop_measurement(urg_t *urg)
Definition: urg_sensor.c:978
urg_t::is_active
int is_active
Definition: urg_sensor.h:74
URG_COMMUNICATION_2_BYTE
@ URG_COMMUNICATION_2_BYTE
Definition: urg_sensor.h:50
urg_get_distance_intensity
int urg_get_distance_intensity(urg_t *urg, long data[], unsigned short intensity[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:943
urg_set_timeout_msec
void urg_set_timeout_msec(urg_t *urg, int msec)
タイムアウト時間の設定
Definition: urg_sensor.c:755
urg_t::connection
urg_connection_t connection
Definition: urg_sensor.h:76
urg_sensor_firmware_date
const char * urg_sensor_firmware_date(urg_t *urg)
Definition: urg_sensor.c:1268
urg_is_stable
int urg_is_stable(urg_t *urg)
Definition: urg_sensor.c:1122
urg_close
void urg_close(urg_t *urg)
Definition: urg_sensor.c:745
urg_connection_t
通信リソース
Definition: urg_connection.h:41
urg_scip_decode
long urg_scip_decode(const char data[], int size)
SCIP 文字列のデコード.
Definition: urg_sensor.c:364
urg_t::is_laser_on
int is_laser_on
Definition: urg_sensor.h:94
urg_time_stamp
long urg_time_stamp(urg_t *urg)
Definition: urg_sensor.c:780
urg_t::scanning_skip_scan
int scanning_skip_scan
Definition: urg_sensor.h:88
URG_UNKNOWN
@ URG_UNKNOWN
Definition: urg_sensor.h:41
urg_get_multiecho
int urg_get_multiecho(urg_t *urg, long data_multi[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:955
URG_STOP
@ URG_STOP
Definition: urg_sensor.h:40
urg_time.h
urg_range_data_byte_t
urg_range_data_byte_t
Definition: urg_sensor.h:48
URG_COMMUNICATION_3_BYTE
@ URG_COMMUNICATION_3_BYTE
Definition: urg_sensor.h:49
urg_t::range_data_byte
urg_range_data_byte_t range_data_byte
Definition: urg_sensor.h:89
urg_t::scanning_remain_times
int scanning_remain_times
Definition: urg_sensor.h:93
urg_t::scanning_skip_step
int scanning_skip_step
Definition: urg_sensor.h:87
urg_t::specified_scan_times
int specified_scan_times
Definition: urg_sensor.h:92
URG_DISTANCE
@ URG_DISTANCE
Definition: urg_sensor.h:36
urg_laser_on
int urg_laser_on(urg_t *urg)
Definition: urg_sensor.c:1046
urg_t::last_data_index
int last_data_index
Definition: urg_sensor.h:79
urg_t::received_range_data_byte
urg_range_data_byte_t received_range_data_byte
Definition: urg_sensor.h:99
urg_sensor_serial_id
const char * urg_sensor_serial_id(urg_t *urg)
Definition: urg_sensor.c:1201
urg_measurement_type_t
urg_measurement_type_t
Definition: urg_sensor.h:35
urg_error_handler
urg_measurement_type_t(* urg_error_handler)(const char *status, void *urg)
Definition: urg_sensor.h:62
urg_set_error_handler
void urg_set_error_handler(urg_t *urg, urg_error_handler handler)
Definition: urg_sensor.c:1375
urg_t::is_sending
int is_sending
Definition: urg_sensor.h:100
urg_connection.h
通信の処理
urg_t::scanning_last_step
int scanning_last_step
Definition: urg_sensor.h:86
urg_t::error_handler
urg_error_handler error_handler
Definition: urg_sensor.h:102
URG_MULTIECHO_INTENSITY
@ URG_MULTIECHO_INTENSITY
Definition: urg_sensor.h:39
urg_sensor_firmware_version
const char * urg_sensor_firmware_version(urg_t *urg)
Definition: urg_sensor.c:1244
URG_SCAN_INFINITY
@ URG_SCAN_INFINITY
Definition: urg_sensor.h:55
urg_sensor_status
const char * urg_sensor_status(urg_t *urg)
Definition: urg_sensor.c:1325
URG_MULTIECHO
@ URG_MULTIECHO
Definition: urg_sensor.h:38
urg_t::timeout
int timeout
Definition: urg_sensor.h:91
urg_t::min_distance
int min_distance
Definition: urg_sensor.h:83
urg_t::received_last_index
int received_last_index
Definition: urg_sensor.h:97
urg_set_communication_data_size
int urg_set_communication_data_size(urg_t *urg, urg_range_data_byte_t data_byte)
urg_start_measurement
int urg_start_measurement(urg_t *urg, urg_measurement_type_t type, int scan_times, int skip_scan)
Definition: urg_sensor.c:877
urg_sensor_vendor
const char * urg_sensor_vendor(urg_t *urg)
returns the vendor name
Definition: urg_sensor.c:1221
URG_DISTANCE_INTENSITY
@ URG_DISTANCE_INTENSITY
Definition: urg_sensor.h:37
urg_start_time_stamp_mode
int urg_start_time_stamp_mode(urg_t *urg)
Definition: urg_sensor.c:761
urg_t::last_errno
int last_errno
Definition: urg_sensor.h:75
urg_reboot
int urg_reboot(urg_t *urg)
Definition: urg_sensor.c:1076
urg_t::first_data_index
int first_data_index
Definition: urg_sensor.h:78


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Mar 2 2022 01:08:11