POK
types.h
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
17 
18 #ifndef APEX_TYPES
19 #define APEX_TYPES
20 
21 #include <types.h>
22 
23 #define SYSTEM_LIMIT_NUMBER_OF_PARTITIONS 32 /* module scope */
24 #define SYSTEM_LIMIT_NUMBER_OF_MESSAGES 512 /* module scope */
25 #define SYSTEM_LIMIT_MESSAGE_SIZE 8192 /* module scope */
26 #define SYSTEM_LIMIT_NUMBER_OF_PROCESSES 128 /* partition scope */
27 #define SYSTEM_LIMIT_NUMBER_OF_SAMPLING_PORTS 512 /* partition scope */
28 #define SYSTEM_LIMIT_NUMBER_OF_QUEUING_PORTS 512 /* partition scope */
29 #define SYSTEM_LIMIT_NUMBER_OF_BUFFERS 256 /* partition scope */
30 #define SYSTEM_LIMIT_NUMBER_OF_BLACKBOARDS 256 /* partition scope */
31 #define SYSTEM_LIMIT_NUMBER_OF_SEMAPHORES 256 /* partition scope */
32 #define SYSTEM_LIMIT_NUMBER_OF_EVENTS 256 /* partition scope */
33 
34 /*----------------------*/
35 /* Base APEX types */
36 /*----------------------*/
37 /* The actual size of these base types is system specific and the */
38 /* sizes must match the sizes used by the implementation of the */
39 /* underlying Operating System. */
40 typedef unsigned char APEX_BYTE; /* 8-bit unsigned */
41 typedef long APEX_INTEGER; /* 32-bit signed */
42 typedef unsigned long APEX_UNSIGNED; /* 32-bit unsigned */
43 typedef long long APEX_LONG_INTEGER; /* 64-bit signed */
44 /*----------------------*/
45 /* General APEX types */
46 /*----------------------*/
47 typedef
48 enum {
49  NO_ERROR = 0, /* request valid and operation performed */
50  NO_ACTION = 1, /* status of system unaffected by request */
51  NOT_AVAILABLE = 2, /* resource required by request unavailable */
52  INVALID_PARAM = 3, /* invalid parameter specified in request */
53  INVALID_CONFIG = 4, /* parameter incompatible with configuration */
54  INVALID_MODE = 5, /* request incompatible with current mode */
55  TIMED_OUT = 6 /* time-out tied up with request has expired */
56 } RETURN_CODE_TYPE;
57 #define MAX_NAME_LENGTH 30
58 typedef char NAME_TYPE[MAX_NAME_LENGTH];
59 typedef void (* SYSTEM_ADDRESS_TYPE);
60 typedef APEX_BYTE* MESSAGE_ADDR_TYPE;
61 typedef APEX_INTEGER MESSAGE_SIZE_TYPE;
62 typedef APEX_INTEGER MESSAGE_RANGE_TYPE;
63 typedef enum { SOURCE = 0, DESTINATION = 1 } PORT_DIRECTION_TYPE;
64 typedef enum { FIFO = 0, PRIORITY = 1 } QUEUING_DISCIPLINE_TYPE;
65 typedef APEX_LONG_INTEGER SYSTEM_TIME_TYPE; /* 64-bit signed integer with a 1 nanosecond LSB */
66 #define INFINITE_TIME_VALUE -1
67 
68 #endif