Platform.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of openSDK.
00003  *
00004  * Copyright (C) 2006-2007 openSDK team
00005  *
00006  * openSDK is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; version 2.
00009  *
00010  * openSDK is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with openSDK; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  *
00019  *     $Id: Platform.h,v 1.13 2007/04/25 10:33:21 nuno-lopes Exp $
00020  */
00021 
00022 #ifndef __Platform_h__
00023 #define __Platform_h__
00024 
00027 const int TIME_DIFF_SYSTEM = 946684800;
00028 
00030 const int MAX_SHUTDOWN_TIME = 10;
00031 
00033 const unsigned long USECONDS_TICK = 8000; // 8ms
00034 
00036 const unsigned int NUM_TICKS_TO_SEND_DATA = 4; // 32 ms
00037 
00038 
00039 #ifdef __USE_GNU
00040 # define opensdk_yield() pthread_yield()
00041 #else
00042 # include <unistd.h>
00043 # if defined(_POSIX_PRIORITY_SCHEDULING) || defined(__CYGWIN__)
00044 #  include <sched.h>
00045 #  define opensdk_yield() sched_yield()
00046 # else
00047 #  warning "defining opensdk_yield() as NOP. this can create some instability. please contact the dev team"
00048 #  define opensdk_yield() /* nothing? */
00049 # endif
00050 #endif
00051 
00052 
00053 // the robot platform name
00054 #ifdef ERS210
00055 # define ROBOTDESIGN "ERS-210"
00056 #elseif defined(ERS220)
00057 # define ROBOTDESIGN "ERS-220"
00058 #else
00059 # define ROBOTDESIGN "ERS-7"
00060 #endif
00061 
00062 // camera image definitions
00063 #ifdef ERS220
00064 const unsigned int IMG_WIDTH  = 176;
00065 const unsigned int IMG_HEIGHT = 144;
00066 #else
00067 const unsigned int IMG_WIDTH  = 208;
00068 const unsigned int IMG_HEIGHT = 160;
00069 #endif
00070 
00071 const unsigned int IMG_SIZE   = (IMG_WIDTH * IMG_HEIGHT * 3);
00072 const unsigned int IMG_LAYERS = 4;
00073 
00074 
00075 // servers socket names
00076 #define AUDIO_SERVER_SOCKET "audioSocket.tmp"
00077 #define ACTUATORS_SERVER_SOCKET "actuatorsSocket.tmp"
00078 #define SENSORS_SERVER_SOCKET "sensorsSocket.tmp"
00079 #define IMAGE_SERVER_SOCKET "imagesSocket.tmp"
00080 
00081 #endif

Generated on Sun Dec 2 23:04:30 2007 for openSDK by  doxygen 1.3.9.1