timeout_test.c

timeout test

Author:
Satofumi KAMIMURA

$Id$

#include "urg_c/urg_sensor.h"
#include "urg_c/urg_utils.h"
#include "urg_c/urg_debug.h"
#include "open_urg_sensor.h"
#include <stdio.h>


int main(int argc, char *argv[])
{
    enum { TIMEOUT_MSEC = 3000 };
    char buffer;
    int n;
    urg_t urg;

    if (open_urg_sensor(&urg, argc, argv) < 0) {
        return 1;
    }

    printf("read\n");
    n = urg_raw_read(&urg, &buffer, 1, TIMEOUT_MSEC);
    printf("n = %d\n", n);

    return 0;
}


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