POK
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Thu Jan 15 23:34:13 2009 00015 */ 00016 00017 00018 #ifndef APEX_TYPES 00019 #define APEX_TYPES 00020 00021 #include <types.h> 00022 00023 #define SYSTEM_LIMIT_NUMBER_OF_PARTITIONS 32 /* module scope */ 00024 #define SYSTEM_LIMIT_NUMBER_OF_MESSAGES 512 /* module scope */ 00025 #define SYSTEM_LIMIT_MESSAGE_SIZE 8192 /* module scope */ 00026 #define SYSTEM_LIMIT_NUMBER_OF_PROCESSES 128 /* partition scope */ 00027 #define SYSTEM_LIMIT_NUMBER_OF_SAMPLING_PORTS 512 /* partition scope */ 00028 #define SYSTEM_LIMIT_NUMBER_OF_QUEUING_PORTS 512 /* partition scope */ 00029 #define SYSTEM_LIMIT_NUMBER_OF_BUFFERS 256 /* partition scope */ 00030 #define SYSTEM_LIMIT_NUMBER_OF_BLACKBOARDS 256 /* partition scope */ 00031 #define SYSTEM_LIMIT_NUMBER_OF_SEMAPHORES 256 /* partition scope */ 00032 #define SYSTEM_LIMIT_NUMBER_OF_EVENTS 256 /* partition scope */ 00033 00034 /*----------------------*/ 00035 /* Base APEX types */ 00036 /*----------------------*/ 00037 /* The actual size of these base types is system specific and the */ 00038 /* sizes must match the sizes used by the implementation of the */ 00039 /* underlying Operating System. */ 00040 typedef unsigned char APEX_BYTE; /* 8-bit unsigned */ 00041 typedef long APEX_INTEGER; /* 32-bit signed */ 00042 typedef unsigned long APEX_UNSIGNED; /* 32-bit unsigned */ 00043 typedef long long APEX_LONG_INTEGER; /* 64-bit signed */ 00044 /*----------------------*/ 00045 /* General APEX types */ 00046 /*----------------------*/ 00047 typedef 00048 enum { 00049 NO_ERROR = 0, /* request valid and operation performed */ 00050 NO_ACTION = 1, /* status of system unaffected by request */ 00051 NOT_AVAILABLE = 2, /* resource required by request unavailable */ 00052 INVALID_PARAM = 3, /* invalid parameter specified in request */ 00053 INVALID_CONFIG = 4, /* parameter incompatible with configuration */ 00054 INVALID_MODE = 5, /* request incompatible with current mode */ 00055 TIMED_OUT = 6 /* time-out tied up with request has expired */ 00056 } RETURN_CODE_TYPE; 00057 #define MAX_NAME_LENGTH 30 00058 typedef char NAME_TYPE[MAX_NAME_LENGTH]; 00059 typedef void (* SYSTEM_ADDRESS_TYPE); 00060 typedef APEX_BYTE* MESSAGE_ADDR_TYPE; 00061 typedef APEX_INTEGER MESSAGE_SIZE_TYPE; 00062 typedef APEX_INTEGER MESSAGE_RANGE_TYPE; 00063 typedef enum { SOURCE = 0, DESTINATION = 1 } PORT_DIRECTION_TYPE; 00064 typedef enum { FIFO = 0, PRIORITY = 1 } QUEUING_DISCIPLINE_TYPE; 00065 typedef APEX_LONG_INTEGER SYSTEM_TIME_TYPE; /* 64-bit signed integer with a 1 nanosecond LSB */ 00066 #define INFINITE_TIME_VALUE -1 00067 00068 #endif