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 #ifdef POK_NEEDS_ARINC653_SAMPLING 00019 00020 #include <arinc653/types.h> 00021 00022 /*--------------------------------------------------------------------*/ 00023 /* */ 00024 /* SAMPLING PORT constant and type definitions and management services*/ 00025 /* */ 00026 /*--------------------------------------------------------------------*/ 00027 00028 #ifndef APEX_SAMPLING 00029 #define APEX_SAMPLING 00030 00031 #define MAX_NUMBER_OF_SAMPLING_PORTS SYSTEM_LIMIT_NUMBER_OF_SAMPLING_PORTS 00032 00033 typedef NAME_TYPE SAMPLING_PORT_NAME_TYPE; 00034 00035 typedef APEX_INTEGER SAMPLING_PORT_ID_TYPE; 00036 00037 typedef enum { INVALID = 0, VALID = 1 } VALIDITY_TYPE; 00038 00039 typedef struct 00040 { 00041 SYSTEM_TIME_TYPE REFRESH_PERIOD; 00042 MESSAGE_SIZE_TYPE MAX_MESSAGE_SIZE; 00043 PORT_DIRECTION_TYPE PORT_DIRECTION; 00044 VALIDITY_TYPE LAST_MSG_VALIDITY; 00045 } SAMPLING_PORT_STATUS_TYPE; 00046 00047 extern void CREATE_SAMPLING_PORT ( 00048 /*in */ SAMPLING_PORT_NAME_TYPE SAMPLING_PORT_NAME, 00049 /*in */ MESSAGE_SIZE_TYPE MAX_MESSAGE_SIZE, 00050 /*in */ PORT_DIRECTION_TYPE PORT_DIRECTION, 00051 /*in */ SYSTEM_TIME_TYPE REFRESH_PERIOD, 00052 /*out*/ SAMPLING_PORT_ID_TYPE *SAMPLING_PORT_ID, 00053 /*out*/ RETURN_CODE_TYPE *RETURN_CODE ); 00054 00055 extern void WRITE_SAMPLING_MESSAGE ( 00056 /*in */ SAMPLING_PORT_ID_TYPE SAMPLING_PORT_ID, 00057 /*in */ MESSAGE_ADDR_TYPE MESSAGE_ADDR, /* by reference */ 00058 /*in */ MESSAGE_SIZE_TYPE LENGTH, 00059 /*out*/ RETURN_CODE_TYPE *RETURN_CODE ); 00060 00061 extern void READ_SAMPLING_MESSAGE ( 00062 /*in */ SAMPLING_PORT_ID_TYPE SAMPLING_PORT_ID, 00063 /*out*/ MESSAGE_ADDR_TYPE MESSAGE_ADDR, 00064 /*out*/ MESSAGE_SIZE_TYPE *LENGTH, 00065 /*out*/ VALIDITY_TYPE *VALIDITY, 00066 /*out*/ RETURN_CODE_TYPE *RETURN_CODE ); 00067 00068 extern void GET_SAMPLING_PORT_ID ( 00069 /*in */ SAMPLING_PORT_NAME_TYPE SAMPLING_PORT_NAME, 00070 /*out*/ SAMPLING_PORT_ID_TYPE *SAMPLING_PORT_ID, 00071 /*out*/ RETURN_CODE_TYPE *RETURN_CODE ); 00072 00073 extern void GET_SAMPLING_PORT_STATUS ( 00074 /*in */ SAMPLING_PORT_ID_TYPE SAMPLING_PORT_ID, 00075 /*out*/ SAMPLING_PORT_STATUS_TYPE *SAMPLING_PORT_STATUS, 00076 /*out*/ RETURN_CODE_TYPE *RETURN_CODE ); 00077 00078 #endif 00079 00080 #endif