00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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;
00034
00036 const unsigned int NUM_TICKS_TO_SEND_DATA = 4;
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()
00049 # endif
00050 #endif
00051
00052
00053
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
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
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