POK
/home/jaouen/pok_official/pok/trunk/libpok/include/arinc653/queueing.h
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 #ifdef POK_NEEDS_ARINC653_QUEUEING
00018 
00019 #ifndef POK_NEEDS_ARINC653_PROCESS
00020 #define POK_NEEDS_ARINC653_PROCESS
00021 #endif
00022 
00023 #include <arinc653/process.h>
00024 #include <arinc653/types.h>
00025 
00026 #ifndef APEX_QUEUING
00027 #define APEX_QUEUING
00028 #define   MAX_NUMBER_OF_QUEUING_PORTS     SYSTEM_LIMIT_NUMBER_OF_QUEUING_PORTS
00029 typedef   NAME_TYPE        QUEUING_PORT_NAME_TYPE;
00030 typedef   APEX_INTEGER     QUEUING_PORT_ID_TYPE;
00031 
00032 typedef struct {
00033    MESSAGE_RANGE_TYPE       NB_MESSAGE;
00034    MESSAGE_RANGE_TYPE       MAX_NB_MESSAGE;
00035    MESSAGE_SIZE_TYPE        MAX_MESSAGE_SIZE;
00036    PORT_DIRECTION_TYPE      PORT_DIRECTION;
00037    WAITING_RANGE_TYPE       WAITING_PROCESSES;
00038 } QUEUING_PORT_STATUS_TYPE;
00039 
00040 extern void CREATE_QUEUING_PORT (
00041       /*in */ QUEUING_PORT_NAME_TYPE    QUEUING_PORT_NAME,
00042       /*in */ MESSAGE_SIZE_TYPE         MAX_MESSAGE_SIZE,
00043       /*in */ MESSAGE_RANGE_TYPE        MAX_NB_MESSAGE,
00044       /*in */ PORT_DIRECTION_TYPE       PORT_DIRECTION,
00045       /*in */ QUEUING_DISCIPLINE_TYPE   QUEUING_DISCIPLINE,
00046       /*out*/ QUEUING_PORT_ID_TYPE      *QUEUING_PORT_ID,
00047       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00048 
00049 extern void SEND_QUEUING_MESSAGE (
00050       /*in */ QUEUING_PORT_ID_TYPE      QUEUING_PORT_ID,
00051       /*in */ MESSAGE_ADDR_TYPE         MESSAGE_ADDR,       /* by reference */
00052       /*in */ MESSAGE_SIZE_TYPE         LENGTH,
00053       /*in */ SYSTEM_TIME_TYPE          TIME_OUT,
00054       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE);
00055 
00056 extern void RECEIVE_QUEUING_MESSAGE (
00057       /*in */ QUEUING_PORT_ID_TYPE      QUEUING_PORT_ID,
00058       /*in */ SYSTEM_TIME_TYPE          TIME_OUT,
00059       /*out*/ MESSAGE_ADDR_TYPE         MESSAGE_ADDR,
00060       /*out*/ MESSAGE_SIZE_TYPE         *LENGTH,
00061       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00062 
00063 extern void GET_QUEUING_PORT_ID (
00064       /*in */ QUEUING_PORT_NAME_TYPE    QUEUING_PORT_NAME,
00065       /*out*/ QUEUING_PORT_ID_TYPE      *QUEUING_PORT_ID,
00066       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00067 
00068 extern void GET_QUEUING_PORT_STATUS (
00069       /*in */ QUEUING_PORT_ID_TYPE      QUEUING_PORT_ID,
00070       /*out*/ QUEUING_PORT_STATUS_TYPE *QUEUING_PORT_STATUS,
00071       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00072 
00073 extern void CLEAR_QUEUING_PORT (
00074       /*in */ QUEUING_PORT_ID_TYPE      QUEUING_PORT_ID,
00075       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00076 
00077 #endif
00078 
00079 
00080 #endif