POK
queueing.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 #ifdef POK_NEEDS_ARINC653_QUEUEING
18 
19 #ifndef POK_NEEDS_ARINC653_PROCESS
20 #define POK_NEEDS_ARINC653_PROCESS
21 #endif
22 
23 #include <arinc653/process.h>
24 #include <arinc653/types.h>
25 
26 #ifndef APEX_QUEUING
27 #define APEX_QUEUING
28 #define MAX_NUMBER_OF_QUEUING_PORTS SYSTEM_LIMIT_NUMBER_OF_QUEUING_PORTS
29 typedef NAME_TYPE QUEUING_PORT_NAME_TYPE;
30 typedef APEX_INTEGER QUEUING_PORT_ID_TYPE;
31 
32 typedef struct {
33  MESSAGE_RANGE_TYPE NB_MESSAGE;
34  MESSAGE_RANGE_TYPE MAX_NB_MESSAGE;
35  MESSAGE_SIZE_TYPE MAX_MESSAGE_SIZE;
36  PORT_DIRECTION_TYPE PORT_DIRECTION;
37  WAITING_RANGE_TYPE WAITING_PROCESSES;
39 
40 extern void CREATE_QUEUING_PORT (
41  /*in */ QUEUING_PORT_NAME_TYPE QUEUING_PORT_NAME,
42  /*in */ MESSAGE_SIZE_TYPE MAX_MESSAGE_SIZE,
43  /*in */ MESSAGE_RANGE_TYPE MAX_NB_MESSAGE,
44  /*in */ PORT_DIRECTION_TYPE PORT_DIRECTION,
45  /*in */ QUEUING_DISCIPLINE_TYPE QUEUING_DISCIPLINE,
46  /*out*/ QUEUING_PORT_ID_TYPE *QUEUING_PORT_ID,
47  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
48 
49 extern void SEND_QUEUING_MESSAGE (
50  /*in */ QUEUING_PORT_ID_TYPE QUEUING_PORT_ID,
51  /*in */ MESSAGE_ADDR_TYPE MESSAGE_ADDR, /* by reference */
52  /*in */ MESSAGE_SIZE_TYPE LENGTH,
53  /*in */ SYSTEM_TIME_TYPE TIME_OUT,
54  /*out*/ RETURN_CODE_TYPE *RETURN_CODE);
55 
56 extern void RECEIVE_QUEUING_MESSAGE (
57  /*in */ QUEUING_PORT_ID_TYPE QUEUING_PORT_ID,
58  /*in */ SYSTEM_TIME_TYPE TIME_OUT,
59  /*out*/ MESSAGE_ADDR_TYPE MESSAGE_ADDR,
60  /*out*/ MESSAGE_SIZE_TYPE *LENGTH,
61  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
62 
63 extern void GET_QUEUING_PORT_ID (
64  /*in */ QUEUING_PORT_NAME_TYPE QUEUING_PORT_NAME,
65  /*out*/ QUEUING_PORT_ID_TYPE *QUEUING_PORT_ID,
66  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
67 
68 extern void GET_QUEUING_PORT_STATUS (
69  /*in */ QUEUING_PORT_ID_TYPE QUEUING_PORT_ID,
70  /*out*/ QUEUING_PORT_STATUS_TYPE *QUEUING_PORT_STATUS,
71  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
72 #endif
73 
74 
75 #endif