timeout_test.c
Go to the documentation of this file.
00001 
00009 #include "urg_c/urg_sensor.h"
00010 #include "urg_c/urg_utils.h"
00011 #include "urg_c/urg_debug.h"
00012 #include "open_urg_sensor.h"
00013 #include <stdio.h>
00014 
00015 
00016 int main(int argc, char *argv[])
00017 {
00018     enum { TIMEOUT_MSEC = 3000 };
00019     char buffer;
00020     int n;
00021     urg_t urg;
00022 
00023     if (open_urg_sensor(&urg, argc, argv) < 0) {
00024         return 1;
00025     }
00026 
00027     printf("read\n");
00028     n = urg_raw_read(&urg, &buffer, 1, TIMEOUT_MSEC);
00029     printf("n = %d\n", n);
00030 
00031     return 0;
00032 }


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Aug 26 2015 16:38:27