FreeCalypso > hg > fc-magnetite
comparison src/g23m-fad/tcpip/include/atp_messages.h @ 174:90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 Oct 2016 05:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
173:bf64d785238a | 174:90eb61ecd093 |
---|---|
1 /******************************************************************************* | |
2 * | |
3 * File Name : atp_messages.h | |
4 * | |
5 * External definition for ATP SW entity | |
6 * | |
7 * (C) Texas Instruments, all rights reserved | |
8 * | |
9 * Version number : 0.1 Date : 28-Feb-2000 | |
10 * | |
11 * History : 0.1 - Created by E. Baissus | |
12 * | |
13 * | |
14 * Author : Eric Baissus : e-baissus@ti.com | |
15 * | |
16 * (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved | |
17 ******************************************************************************/ | |
18 #ifndef ATP_MESSAGES_H | |
19 #define ATP_MESSAGES_H | |
20 | |
21 #include "rv_general.h" | |
22 #include "rvf_api.h" | |
23 #include "atp_config.h" | |
24 #include "atp_api.h" | |
25 | |
26 #define ATP_MESSAGES_OFFSET (0x32 << 10) | |
27 | |
28 /* Generic structure for an ATP message */ | |
29 typedef T_RV_HDR T_ATP_MESSAGE; | |
30 | |
31 /* Header used by nearly all the ATP events */ | |
32 typedef struct | |
33 { | |
34 T_RV_HDR rv_hdr; | |
35 T_ATP_PORT_NB port_nb; | |
36 } T_ATP_GENERIC_HEADER; | |
37 | |
38 /* Open port Indication */ | |
39 #define ATP_OPEN_PORT_IND (ATP_MESSAGES_OFFSET | 0x0001) | |
40 | |
41 typedef struct | |
42 { | |
43 T_RV_HDR rv_hdr; | |
44 T_ATP_PORT_NB initiator_port_nb; | |
45 T_ATP_SW_ENTITY_ID initiator_id; | |
46 T_ATP_CUSTOM_INFO *custom_info_p; | |
47 } T_ATP_OPEN_PORT_IND; | |
48 | |
49 /* Open port Confimation */ | |
50 #define ATP_OPEN_PORT_CFM (ATP_MESSAGES_OFFSET | 0x0002) | |
51 | |
52 typedef struct | |
53 { | |
54 T_RV_HDR rv_hdr; | |
55 T_ATP_PORT_NB initiator_port_nb; | |
56 T_ATP_CUSTOM_INFO *custom_info_p; | |
57 T_ATP_OPEN_PORT_RESULT result; | |
58 } T_ATP_OPEN_PORT_CFM; | |
59 | |
60 /* Port Closed event */ | |
61 #define ATP_PORT_CLOSED (ATP_MESSAGES_OFFSET | 0x0003) | |
62 | |
63 typedef struct | |
64 { | |
65 T_RV_HDR rv_hdr; | |
66 T_ATP_PORT_NB port_nb; | |
67 T_ATP_SW_ENTITY_ID closer_sw_id; | |
68 T_ATP_PORT_NB closer_port_nb; | |
69 | |
70 } T_ATP_PORT_CLOSED; | |
71 | |
72 /* Command Ready Event */ | |
73 #define ATP_CMD_RDY (ATP_MESSAGES_OFFSET | 0x0010) | |
74 | |
75 typedef struct | |
76 { | |
77 T_RV_HDR rv_hdr; | |
78 T_ATP_PORT_NB port_nb; | |
79 T_ATP_CMD_TYPE cmd_type; | |
80 T_ATP_CMD_NB cmd_nb; | |
81 T_ATP_CMD *cmd_info_p; | |
82 }T_ATP_CMD_RDY; | |
83 | |
84 /* Text Command Ready Event */ | |
85 #define ATP_TXT_CMD_RDY (ATP_MESSAGES_OFFSET | 0x0011) | |
86 | |
87 typedef struct | |
88 { | |
89 T_RV_HDR rv_hdr; | |
90 T_ATP_PORT_NB port_nb; | |
91 T_ATP_CMD_TYPE cmd_type; | |
92 T_ATP_TXT_CMD txt_cmd_p; | |
93 }T_ATP_TXT_CMD_RDY; | |
94 | |
95 /* No copy data ready event */ | |
96 #define ATP_NO_COPY_DATA_RDY (ATP_MESSAGES_OFFSET | 0x0020) | |
97 | |
98 typedef struct | |
99 { | |
100 T_RV_HDR rv_hdr; | |
101 T_ATP_PORT_NB port_nb; | |
102 UINT32 buffer_size; | |
103 T_ATP_BUFFER atp_buffer_p; | |
104 } T_ATP_NO_COPY_DATA_RDY; | |
105 | |
106 /* Copy data ready event */ | |
107 #define ATP_DATA_RDY (ATP_MESSAGES_OFFSET | 0x0021) | |
108 | |
109 typedef struct | |
110 { | |
111 T_RV_HDR rv_hdr; | |
112 T_ATP_PORT_NB port_nb; | |
113 UINT32 nb_bytes; | |
114 | |
115 }T_ATP_DATA_RDY; | |
116 | |
117 /* Signal changed event*/ | |
118 #define ATP_SIGNAL_CHANGED (ATP_MESSAGES_OFFSET | 0x0030) | |
119 | |
120 typedef struct | |
121 { | |
122 T_RV_HDR rv_hdr; | |
123 T_ATP_PORT_NB port_nb; | |
124 T_ATP_PORT_SIGNAL signal; | |
125 T_ATP_SIGNAL_CHANGE_MASK mask; | |
126 T_RVF_MB_ID mb; | |
127 }T_ATP_SIGNAL_CHANGED; | |
128 | |
129 /* Mode changed event*/ | |
130 #define ATP_PORT_MODE_CHANGED (ATP_MESSAGES_OFFSET | 0x0031) | |
131 | |
132 typedef struct | |
133 { | |
134 T_RV_HDR rv_hdr; | |
135 T_ATP_PORT_NB port_nb; | |
136 T_ATP_PORT_MODE mode; | |
137 } T_ATP_PORT_MODE_CHANGED; | |
138 | |
139 /* Mode changed event*/ | |
140 #define ATP_ERROR (ATP_MESSAGES_OFFSET | 0x0041) | |
141 | |
142 typedef enum | |
143 { | |
144 ATP_MEMORY_ERROR, | |
145 ATP_PARAM_ERROR, | |
146 ATP_ISSUED_IN_A_WRONG_STATE_ERROR, | |
147 ATP_WAITING_FOR_RESULT, | |
148 ATP_CANNOT_TRANSLATE_CMD, | |
149 ATP_OTHER_SWE_NOT_IN_PROPER_MODE, | |
150 ATP_SAME_ACTION_ALREADY_DONE, // Example : SWE already registerd | |
151 ATP_NO_MORE_RESSOURCE // Example : no more place for any new SWE registration | |
152 } T_ATP_ERROR_TYPE; | |
153 | |
154 typedef enum | |
155 { | |
156 ATP_ERROR_FAILED_TO_OPEN_A_PORT, | |
157 ATP_ERROR_FAILED_TO_ACCEPT_A_PORT, | |
158 ATP_ERROR_FAILED_TO_SEND_CMD, | |
159 ATP_ERROR_FAILED_TO_CLOSE_A_PORT, | |
160 ATP_ERROR_FAILED_TO_SEND_DATA, | |
161 ATP_ERROR_FAILED_TO_GET_DATA, | |
162 ATP_ERROR_FAILED_TO_HANDLE_MODE, | |
163 ATP_ERROR_FAILED_TO_HANDLE_SIGNAL, | |
164 ATP_ERROR_FAILED_TO_HANDLE_FLOW_REDIRECTION, | |
165 ATP_ERROR_FAILED_TO_HANDLE_REGISTRATION, | |
166 ATP_ERROR_FAILED_TO_GET_MEMORY | |
167 } T_ATP_ERROR_MAIN_REASON; | |
168 | |
169 typedef struct // TO UPDATE | |
170 { | |
171 T_RV_HDR rv_hdr; | |
172 T_ATP_ERROR_MAIN_REASON main_reason; | |
173 T_ATP_ERROR_TYPE error_type; | |
174 } T_ATP_ERROR; | |
175 | |
176 #endif | |
177 |