current
samples
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
}
urg_t
URG sensor.
Definition:
urg_sensor.h:72
urg_sensor.h
URG sensor.
urg_debug.h
URG debugging functions.
open_urg_sensor.h
main
int main(int argc, char *argv[])
Definition:
timeout_test.c:16
urg_raw_read
int urg_raw_read(urg_t *urg, char *data, int max_data_size, int timeout)
Definition:
urg_debug.c:19
urg_utils.h
URG sensor utility.
open_urg_sensor
int open_urg_sensor(urg_t *urg, int argc, char *argv[])
Definition:
open_urg_sensor.c:18
urg_c
Author(s): Satofumi Kamimura
, Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Mar 2 2022 01:08:11