|
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Trace Core OST header |
|
15 // |
|
16 |
|
17 #ifndef __TRACECOREOSTHEADER_H__ |
|
18 #define __TRACECOREOSTHEADER_H__ |
|
19 |
|
20 namespace OstHeader |
|
21 { |
|
22 |
|
23 namespace OstBaseProtocol |
|
24 { |
|
25 /** |
|
26 * OST header size |
|
27 */ |
|
28 const TInt KOstBaseHeaderSize = 4; |
|
29 |
|
30 /** |
|
31 * OST header Version offset |
|
32 */ |
|
33 const TInt KOstHeaderVersionOffset = 0; |
|
34 |
|
35 /** |
|
36 * OST header version size |
|
37 */ |
|
38 const TInt KOstHeaderVersionSize = 1; |
|
39 |
|
40 /** |
|
41 * OST header ProtocolId offset |
|
42 */ |
|
43 const TInt KOstHeaderProtocolIdOffset = 1; |
|
44 |
|
45 /** |
|
46 * OST header ProtocolId size |
|
47 */ |
|
48 const TInt KOstHeaderProtocolIdSize = 1; |
|
49 |
|
50 /** |
|
51 * OST header Length offset |
|
52 */ |
|
53 const TInt KOstHeaderLengthOffset = 2; |
|
54 |
|
55 /** |
|
56 * OST header Length size |
|
57 */ |
|
58 const TInt KOstHeaderLengthSize = 2; |
|
59 } |
|
60 |
|
61 namespace OstTraceActivation |
|
62 { |
|
63 /** |
|
64 * OST header TransactionId offset |
|
65 */ |
|
66 const TInt KOstHeaderTransactionIdOffset = 4; |
|
67 |
|
68 /** |
|
69 * OST header TransactionId size |
|
70 */ |
|
71 const TInt KOstHeaderTransactionIdSize = 1; |
|
72 |
|
73 /** |
|
74 * OST header MessageId offset |
|
75 */ |
|
76 const TInt KOstHeaderMessageIdOffset = 5; |
|
77 |
|
78 /** |
|
79 * OST header Length size |
|
80 */ |
|
81 const TInt KOstHeaderMessageIdSize = 1; |
|
82 |
|
83 /** |
|
84 * OST header Result offset |
|
85 */ |
|
86 const TInt KOstHeaderResultOffset = 6; |
|
87 |
|
88 /** |
|
89 * OST header Result size |
|
90 */ |
|
91 const TInt KOstHeaderResultSize = 1; |
|
92 |
|
93 |
|
94 namespace SetApplicationStatusRequest |
|
95 { |
|
96 /** |
|
97 * OST header ApplicationId offset |
|
98 */ |
|
99 const TInt KApplicationIdOffset = 6; |
|
100 |
|
101 /** |
|
102 * OST header ApplicationId size |
|
103 */ |
|
104 const TInt KApplicationIdSize = 4; |
|
105 |
|
106 /** |
|
107 * OST header Activation Status offset |
|
108 */ |
|
109 const TInt KActivationStatusOffset = 10; |
|
110 |
|
111 /** |
|
112 * OST header Activation Status size |
|
113 */ |
|
114 const TInt KActivationStatusSize = 1; |
|
115 |
|
116 /** |
|
117 * OST header Filler offset |
|
118 */ |
|
119 const TInt KFillerOffset = 11; |
|
120 |
|
121 /** |
|
122 * OST header Filler size |
|
123 */ |
|
124 const TInt KFillerSize = 1; |
|
125 |
|
126 /** |
|
127 * OST header Filler offset |
|
128 */ |
|
129 const TInt KGroupIdOffset = 12; |
|
130 |
|
131 /** |
|
132 * OST header Filler size |
|
133 */ |
|
134 const TInt KGroupIdSize = 2; |
|
135 |
|
136 /* |
|
137 readMessage[0]=0x01; // Version 0.1 |
|
138 readMessage[1]=0x01; // Protocol ID OST Trace Activation Protocol |
|
139 readMessage[2]=0x00; // Length high |
|
140 readMessage[3]=0x0e; // Length low |
|
141 readMessage[4]=0x00; // Transaction ID |
|
142 readMessage[5]=0x06; // SetApplicationStatusRequest |
|
143 readMessage[6]=0x12; // Application ID high (MSByte) |
|
144 readMessage[7]=0x34; // Application ID |
|
145 readMessage[8]=0x56; // Application ID |
|
146 readMessage[9]=0x78; // Application ID low (LSByte) |
|
147 readMessage[10]=0x00; // Activation Status (0x00 deactivate, 0x01 activate) |
|
148 readMessage[11]=0x00; // Filler |
|
149 readMessage[12]=0x00; // Group ID 1 high |
|
150 readMessage[13]=0x03; // Group ID 1 low |
|
151 readMessage[14]=0x00; // Group ID 2 high |
|
152 readMessage[15]=0x40; // Group ID 2 low |
|
153 readMessage[16]=0x00; // Group ID 3 high |
|
154 readMessage[17]=0x41; // Group ID 3 low |
|
155 */ |
|
156 } |
|
157 } |
|
158 |
|
159 namespace OstAsciiTraceProtocol |
|
160 { |
|
161 /** |
|
162 * OST TraceProtocol Timestamp |
|
163 */ |
|
164 const TInt KTimeStampOffset = 4; |
|
165 |
|
166 /** |
|
167 * OST TraceProtocol Timestamp size |
|
168 */ |
|
169 const TInt KTimestampSize = 8; |
|
170 |
|
171 /** |
|
172 * OST TraceProtocol Timestamp |
|
173 */ |
|
174 const TInt KAsciiTraceDataOffset = 12; |
|
175 } |
|
176 |
|
177 namespace OstSimpleApplicationTraceProtocol |
|
178 { |
|
179 /** |
|
180 * OST TraceProtocol Timestamp |
|
181 */ |
|
182 const TInt KTimeStampOffset = 4; |
|
183 |
|
184 /** |
|
185 * OST TraceProtocol Timestamp size |
|
186 */ |
|
187 const TInt KTimestampSize = 8; |
|
188 |
|
189 /** |
|
190 * OST TraceProtocol Timestamp |
|
191 */ |
|
192 const TInt KApplicationIdOffset = 12; |
|
193 |
|
194 /** |
|
195 * OST TraceProtocol Timestamp size |
|
196 */ |
|
197 const TInt KApplicationIdSize = 4; |
|
198 |
|
199 /** |
|
200 * OST TraceProtocol Timestamp |
|
201 */ |
|
202 const TInt KTraceGroupIdOffset = 16; |
|
203 |
|
204 /** |
|
205 * OST TraceProtocol Timestamp size |
|
206 */ |
|
207 const TInt KTraceGroupIdSize = 2; |
|
208 |
|
209 /** |
|
210 * OST TraceProtocol Timestamp |
|
211 */ |
|
212 const TInt KTraceIdOffset = 18; |
|
213 |
|
214 /** |
|
215 * OST TraceProtocol Timestamp size |
|
216 */ |
|
217 const TInt KTraceIdSize = 2; |
|
218 |
|
219 /** |
|
220 * OST TraceProtocol Timestamp |
|
221 */ |
|
222 const TInt KBinaryTraceDataOffset = 20; |
|
223 |
|
224 } |
|
225 |
|
226 namespace OstTraceCoreProtocol |
|
227 { |
|
228 /** |
|
229 * OST TraceCore Protocol Header Size |
|
230 */ |
|
231 const TInt KHeaderSize = 4; |
|
232 |
|
233 /** |
|
234 * OST TraceCore Protocol Protocol ID offset in header |
|
235 */ |
|
236 const TInt KProtocolIdOffset = 0; |
|
237 |
|
238 /** |
|
239 * OST TraceCore Subscriber message ID offset in header if TraceCoreProtocol is KSubscriberProtocol |
|
240 */ |
|
241 const TInt KSubscriberIdOffset = 1; |
|
242 |
|
243 /** |
|
244 * OST TraceCore Protocol Subscriber Protocol ID |
|
245 */ |
|
246 const TInt KSubscriberProtocol = 0x01; |
|
247 } |
|
248 } |
|
249 |
|
250 namespace OstConstants |
|
251 { |
|
252 |
|
253 /** |
|
254 * OST KOstHeaderVersion 0.1 |
|
255 */ |
|
256 const TInt KOstHeaderVersion = 0x01; |
|
257 |
|
258 namespace OstBaseProtocol |
|
259 { |
|
260 /** |
|
261 * OST KOstSystemProtocol |
|
262 */ |
|
263 const TInt KOstSystemProtocol = 0x00; |
|
264 |
|
265 /** |
|
266 * OST KOstTraceActivationProtocol |
|
267 */ |
|
268 const TInt KOstTraceActivationProtocol = 0x01; |
|
269 |
|
270 /** |
|
271 * OST KOstAsciiTraceProtocol |
|
272 */ |
|
273 const TInt KOstAsciiTraceProtocol = 0x02; |
|
274 |
|
275 /** |
|
276 * OST KOstSimpleApplicationTraceProtocol |
|
277 */ |
|
278 const TInt KOstSimpleApplicationTraceProtocol = 0x03; |
|
279 |
|
280 /** |
|
281 * OST KOstTrkDebuggerProtocol |
|
282 */ |
|
283 const TInt KOstTrkDebuggerProtocol = 0x90; |
|
284 |
|
285 /** |
|
286 * OST KOstTraceCoreProtocol |
|
287 */ |
|
288 const TInt KOstTraceCoreProtocol = 0x91; |
|
289 |
|
290 /** |
|
291 * OST KOstTerminalKeyboardProtocol |
|
292 */ |
|
293 const TInt KOstTerminalKeyboardProtocol = 0x92; |
|
294 |
|
295 |
|
296 } |
|
297 |
|
298 namespace OstTraceActivation |
|
299 { |
|
300 /** |
|
301 * OST header TransactionId offset |
|
302 */ |
|
303 const TInt KGetAsciiStatusRequest = 0x00; |
|
304 |
|
305 /** |
|
306 * OST header TransactionId offset |
|
307 */ |
|
308 const TInt KGetAsciiStatusResponse = 0x01; |
|
309 |
|
310 /** |
|
311 * OST header TransactionId offset |
|
312 */ |
|
313 const TInt KSetAsciiStatusRequest = 0x02; |
|
314 |
|
315 /** |
|
316 * OST header TransactionId offset |
|
317 */ |
|
318 const TInt KSetAsciiStatusResponse = 0x03; |
|
319 |
|
320 /** |
|
321 * OST header TransactionId offset |
|
322 */ |
|
323 const TInt KGetApplicationStatusRequest = 0x04; |
|
324 |
|
325 /** |
|
326 * OST header TransactionId offset |
|
327 */ |
|
328 const TInt KGetApplicationStatusResponse = 0x05; |
|
329 |
|
330 /** |
|
331 * OST header TransactionId offset |
|
332 */ |
|
333 const TInt KSetApplicationStatusRequest = 0x06; |
|
334 |
|
335 /** |
|
336 * OST header TransactionId offset |
|
337 */ |
|
338 const TInt KSetApplicationStatusResponse = 0x07; |
|
339 |
|
340 /** |
|
341 * OST header TransactionId offset |
|
342 */ |
|
343 const TInt KMessageSyntaxError = 0xFE; |
|
344 |
|
345 /** |
|
346 * OST header TransactionId offset |
|
347 */ |
|
348 const TInt KUnknownMessageError = 0xFF; |
|
349 |
|
350 |
|
351 namespace ActivationStatus |
|
352 { |
|
353 |
|
354 /** |
|
355 * OST header Filler offset |
|
356 */ |
|
357 const TInt KApplicationTracesDeactivated = 0x00; |
|
358 |
|
359 /** |
|
360 * OST header Filler size |
|
361 */ |
|
362 const TInt KApplicationTracesActivated = 0x01; |
|
363 |
|
364 |
|
365 } |
|
366 } |
|
367 } |
|
368 |
|
369 #endif |
|
370 |
|
371 // End of File // __TRACECOREOSTHEADER_H__ |