FreeCalypso > hg > fc-selenite
comparison src/g23m-fad/tcpip/include/rvm_api.h @ 1:d393cd9bb723
src/g23m-*: initial import from Magnetite
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 15 Jul 2018 04:40:46 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:b6a5e36de839 | 1:d393cd9bb723 |
|---|---|
| 1 /** | |
| 2 * | |
| 3 * @file rvm_api.h | |
| 4 * | |
| 5 * Public interface of the Riviera Manager. | |
| 6 * | |
| 7 * @author Cristian Livadiotti (c-livadiotti@ti.com) | |
| 8 * @version 0.2 | |
| 9 * | |
| 10 */ | |
| 11 | |
| 12 /* | |
| 13 * Revision History: | |
| 14 * | |
| 15 * 06/04/2000 Cristian Livadiotti Create. | |
| 16 * 10/18/2001 David Lamy-Charrier Update for new Riviera 1.6. | |
| 17 * | |
| 18 * (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved | |
| 19 */ | |
| 20 | |
| 21 #ifndef __RVM_API_H_ | |
| 22 #define __RVM_API_H_ | |
| 23 | |
| 24 #include "rv_general.h" | |
| 25 //#include "rvf_i.h" | |
| 26 | |
| 27 #ifdef __cplusplus | |
| 28 extern "C" { | |
| 29 #endif | |
| 30 | |
| 31 /****************************************************** | |
| 32 * Message type used by rvf: add, del and Modify timers | |
| 33 *******************************************************/ | |
| 34 #define RVM_MSG_OFFSET_PUB BUILD_MESSAGE_OFFSET(RVM_USE_ID) | |
| 35 | |
| 36 #define RVM_TMS_MSG (RVM_MSG_OFFSET_PUB | 0x004) | |
| 37 #define RVF_NOTIFY_MSG (RVM_MSG_OFFSET_PUB | 0x006) | |
| 38 | |
| 39 /******************************************************************/ | |
| 40 /* RVM functions return type and values */ | |
| 41 /******************************************************************/ | |
| 42 | |
| 43 /* Return type */ | |
| 44 typedef T_RV_RET T_RVM_RETURN; | |
| 45 | |
| 46 /* RVM return parameters definition */ | |
| 47 #define RVM_OK RV_OK | |
| 48 #define RVM_NOT_SUPPORTED RV_NOT_SUPPORTED | |
| 49 #define RVM_NOT_READY RV_NOT_READY | |
| 50 #define RVM_MEMORY_ERR RV_MEMORY_ERR | |
| 51 #define RVM_INTERNAL_ERR RV_INTERNAL_ERR | |
| 52 #define RVM_INVALID_PARAMETER RV_INVALID_PARAMETER | |
| 53 | |
| 54 /******************************************************************/ | |
| 55 /* Definition / Types related to both API functions and messages */ | |
| 56 /******************************************************************/ | |
| 57 | |
| 58 /* RVM USEID definition (Unique Software Entity IDentifier)*/ | |
| 59 typedef UINT32 T_RVM_USE_ID; | |
| 60 | |
| 61 #define RVM_INVALID_USE_ID (0) | |
| 62 | |
| 63 /* RVM name prototype */ | |
| 64 #define RVM_NAME_MAX_LEN (10) | |
| 65 typedef char T_RVM_NAME[RVM_NAME_MAX_LEN]; | |
| 66 | |
| 67 typedef UINT32 T_RVM_VERSION; | |
| 68 | |
| 69 /***********************************************/ | |
| 70 /* Definition / Types related to messages only */ | |
| 71 /***********************************************/ | |
| 72 | |
| 73 /* Message used as a result from a rvm_start or rv_stop function call */ | |
| 74 /*--------------------------------------------------------------------*/ | |
| 75 #define RVM_EVT_TO_APPLI (60009) // Value of the event field in the message buffer | |
| 76 | |
| 77 /* Action field of the results message to application */ | |
| 78 typedef enum { | |
| 79 RVM_START_APPLI = 0, | |
| 80 RVM_STOP_APPLI = 1 | |
| 81 }T_RVM_APPLI_ACTION; | |
| 82 | |
| 83 /* structure of RVM returned message to appli */ | |
| 84 typedef struct | |
| 85 { | |
| 86 T_RV_HDR header; // event field will be RVM_EVT_TO_APPLI | |
| 87 T_RV_RETURN_PATH rp; | |
| 88 T_RVM_APPLI_ACTION action; // Indicates if the result is coming from a rvm_start or a rvm_stop function call | |
| 89 T_RVM_NAME swe_name; // Name of the SW entity | |
| 90 UINT8 swe_index; // Number of the SW entity | |
| 91 T_RVM_RETURN result; | |
| 92 } T_RVM_APPLI_RESULT; | |
| 93 | |
| 94 /***************************************/ | |
| 95 /* RVM external functions declarations */ | |
| 96 /***************************************/ | |
| 97 | |
| 98 /* enable init at boot up */ | |
| 99 BOOLEAN rvm_init(void); | |
| 100 /* launch the creation process to start the specified SWE */ | |
| 101 T_RVM_RETURN rvm_start_swe( T_RVM_USE_ID swe_id, T_RV_RETURN_PATH return_path); | |
| 102 | |
| 103 /* stop the specified SWE */ | |
| 104 T_RVM_RETURN rvm_stop_swe( T_RVM_USE_ID swe_id, T_RV_RETURN_PATH return_path); | |
| 105 T_RVM_RETURN rvm_swe_stopped(T_RV_HDR* p_msg); | |
| 106 | |
| 107 /* function called to start the RV Environment */ | |
| 108 T_RVM_RETURN rvm_start_environment(); | |
| 109 | |
| 110 /* function called to get the return_path of a SWE */ | |
| 111 T_RVM_RETURN rvm_get_swe_information( T_RVM_USE_ID swe_id, | |
| 112 T_RV_RETURN_PATH * return_path); | |
| 113 | |
| 114 /* function called to get the user-friendly name of a SWE */ | |
| 115 T_RVM_RETURN rvm_get_swe_name( T_RVM_USE_ID swe_id, | |
| 116 T_RVM_NAME swe_name); | |
| 117 | |
| 118 /* function called to get the version number of a SWE */ | |
| 119 T_RVM_RETURN rvm_get_swe_version( T_RVM_USE_ID swe_id, | |
| 120 T_RVM_VERSION * swe_version); | |
| 121 | |
| 122 #ifdef __cplusplus | |
| 123 } | |
| 124 #endif | |
| 125 | |
| 126 #endif /* __RVM_API_H_ */ | |
| 127 |
