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;
89  urg_range_data_byte_t range_data_byte;
90 
91  int timeout;
95 
99  urg_range_data_byte_t received_range_data_byte;
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 */
int received_last_index
Definition: urg_sensor.h:97
int is_active
Definition: urg_sensor.h:74
int is_sending
Definition: urg_sensor.h:100
const char * urg_sensor_firmware_version(urg_t *urg)
Definition: urg_sensor.c:1244
int scanning_skip_scan
Definition: urg_sensor.h:88
const char * urg_sensor_vendor(urg_t *urg)
returns the vendor name
Definition: urg_sensor.c:1221
urg_error_handler error_handler
Definition: urg_sensor.h:102
int max_distance
Definition: urg_sensor.h:84
const char * urg_sensor_firmware_date(urg_t *urg)
Definition: urg_sensor.c:1268
int urg_is_stable(urg_t *urg)
Definition: urg_sensor.c:1122
int scanning_remain_times
Definition: urg_sensor.h:93
int urg_stop_measurement(urg_t *urg)
Definition: urg_sensor.c:978
long urg_scip_decode(const char data[], int size)
SCIP 文字列のデコード.
Definition: urg_sensor.c:364
void urg_set_timeout_msec(urg_t *urg, int msec)
タイムアウト時間の設定
Definition: urg_sensor.c:755
urg_connection_t connection
Definition: urg_sensor.h:76
int urg_start_measurement(urg_t *urg, urg_measurement_type_t type, int scan_times, int skip_scan)
Definition: urg_sensor.c:877
int is_laser_on
Definition: urg_sensor.h:94
int front_data_index
Definition: urg_sensor.h:80
URG sensor.
Definition: urg_sensor.h:72
int urg_start_time_stamp_mode(urg_t *urg)
Definition: urg_sensor.c:761
void urg_wakeup(urg_t *urg)
Definition: urg_sensor.c:1116
urg_measurement_type_t
Definition: urg_sensor.h:35
long urg_time_stamp(urg_t *urg)
Definition: urg_sensor.c:780
int urg_laser_on(urg_t *urg)
Definition: urg_sensor.c:1046
void urg_close(urg_t *urg)
Definition: urg_sensor.c:745
int urg_set_scanning_parameter(urg_t *urg, int first_step, int last_step, int skip_step)
Definition: urg_sensor.c:1009
urg_connection_type_t
通信タイプ
urg_range_data_byte_t
Definition: urg_sensor.h:48
urg_range_data_byte_t range_data_byte
Definition: urg_sensor.h:89
int area_resolution
Definition: urg_sensor.h:81
int last_errno
Definition: urg_sensor.h:75
const char * urg_sensor_status(urg_t *urg)
Definition: urg_sensor.c:1325
int received_first_index
Definition: urg_sensor.h:96
urg_measurement_type_t(* urg_error_handler)(const char *status, void *urg)
Definition: urg_sensor.h:62
int first_data_index
Definition: urg_sensor.h:78
int urg_laser_off(urg_t *urg)
Definition: urg_sensor.c:1070
int scanning_last_step
Definition: urg_sensor.h:86
int min_distance
Definition: urg_sensor.h:83
long scan_usec
Definition: urg_sensor.h:82
int urg_get_multiecho(urg_t *urg, long data_multi[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:955
const char * urg_sensor_product_type(urg_t *urg)
Definition: urg_sensor.c:1180
void urg_set_error_handler(urg_t *urg, urg_error_handler handler)
Definition: urg_sensor.c:1375
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
int scanning_skip_step
Definition: urg_sensor.h:87
int urg_set_communication_data_size(urg_t *urg, urg_range_data_byte_t data_byte)
int last_data_index
Definition: urg_sensor.h:79
int urg_get_distance(urg_t *urg, long data[], long *time_stamp, unsigned long long *system_time_stamp)
Definition: urg_sensor.c:934
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
const char * urg_sensor_state(urg_t *urg)
Definition: urg_sensor.c:1350
通信の処理
int scanning_first_step
Definition: urg_sensor.h:85
urg_range_data_byte_t received_range_data_byte
Definition: urg_sensor.h:99
int received_skip_step
Definition: urg_sensor.h:98
const char * urg_sensor_protocol_version(urg_t *urg)
returns the protocol version
Definition: urg_sensor.c:1300
void urg_sleep(urg_t *urg)
Definition: urg_sensor.c:1101
int timeout
Definition: urg_sensor.h:91
const char * urg_sensor_serial_id(urg_t *urg)
Definition: urg_sensor.c:1201
int urg_reboot(urg_t *urg)
Definition: urg_sensor.c:1076
通信リソース
int urg_stop_time_stamp_mode(urg_t *urg)
Definition: urg_sensor.c:813
int specified_scan_times
Definition: urg_sensor.h:92
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_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Mon Feb 28 2022 23:56:00