INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

player_macros.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2006 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 #ifndef PLAYER_MACROS_H
00011 #define PLAYER_MACROS_H
00012 
00013 // A set of macros, copied from Player, used by vfh_algorithm.cc
00014 
00015 /* never worry about timersub type activies again -- from GLIBC and upcased. */
00016 #define TIMESUB(a, b, result)                                                 \
00017   do {                                                                        \
00018     (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
00019     (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;                          \
00020     if ((result)->tv_usec < 0) {                                              \
00021       --(result)->tv_sec;                                                     \
00022       (result)->tv_usec += 1000000;                                           \
00023     }                                                                         \
00024   } while (0)
00025 
00026 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5