timeout_test.c
Go to the documentation of this file.
1 
9 #include "urg_c/urg_sensor.h"
10 #include "urg_c/urg_utils.h"
11 #include "urg_c/urg_debug.h"
12 #include "open_urg_sensor.h"
13 #include <stdio.h>
14 
15 
16 int main(int argc, char *argv[])
17 {
18  enum { TIMEOUT_MSEC = 3000 };
19  char buffer;
20  int n;
21  urg_t urg;
22 
23  if (open_urg_sensor(&urg, argc, argv) < 0) {
24  return 1;
25  }
26 
27  printf("read\n");
28  n = urg_raw_read(&urg, &buffer, 1, TIMEOUT_MSEC);
29  printf("n = %d\n", n);
30 
31  return 0;
32 }
int urg_raw_read(urg_t *urg, char *data, int max_data_size, int timeout)
Definition: urg_debug.c:19
URG debugging functions.
URG sensor.
Definition: urg_sensor.h:72
int main(int argc, char *argv[])
Definition: timeout_test.c:16
URG sensor.
int open_urg_sensor(urg_t *urg, int argc, char *argv[])
URG sensor utility.


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Thu Jun 6 2019 19:27:49