1 |
/* ------------------------------------------------------------------------- */ |
2 |
/* */ |
3 |
/* Copyright (c) 2003 The Open Group */ |
4 |
/* */ |
5 |
/* Permission is hereby granted, free of charge, to any person obtaining a */ |
6 |
/* copy of this software (the "Software"), to deal in the Software without */ |
7 |
/* restriction, including without limitation the rights to use, copy, */ |
8 |
/* modify, merge, publish, distribute, sublicense, and/or sell copies of */ |
9 |
/* the Software, and to permit persons to whom the Software is furnished */ |
10 |
/* to do so, subject to the following conditions: */ |
11 |
/* */ |
12 |
/* The above copyright notice and this permission notice shall be included */ |
13 |
/* in all copies or substantial portions of the Software. */ |
14 |
/* */ |
15 |
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */ |
16 |
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
17 |
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
18 |
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
19 |
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */ |
20 |
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR */ |
21 |
/* THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
22 |
/* */ |
23 |
/* ------------------------------------------------------------------------- */ |
24 |
/* */ |
25 |
/* File revision information */ |
26 |
/* */ |
27 |
/* $Source: /tang_cvs/arm4/sdk4/c/include/arm4.h,v $ */ |
28 |
/* $Revision: 1.2 $ */ |
29 |
/* $Date: 2003/12/03 13:55:14 $ */ |
30 |
/* */ |
31 |
/* --------------------------------------------------------------- */ |
32 |
/* arm4.h - ARM4 standard header file */ |
33 |
/* */ |
34 |
/* This header file defines all defines, typedefs, structures, */ |
35 |
/* and API functions visible for an application which uses an ARM */ |
36 |
/* agent. All compiler/platform specifics are handled in a */ |
37 |
/* separate header file named <arm4os.h>. */ |
38 |
/* */ |
39 |
/* NOTE: The ARM4 C language binding differs completely from */ |
40 |
/* ARM1 and ARM2 bindings. */ |
41 |
/* --------------------------------------------------------------- */ |
42 |
|
43 |
#ifndef ARM4_H_INCLUDED |
44 |
#define ARM4_H_INCLUDED |
45 |
|
46 |
#ifndef ARM4OS_H_INCLUDED |
47 |
#include "arm4os.h" |
48 |
#endif /* ARM4OS_H_INCLUDED */ |
49 |
|
50 |
#ifdef __cplusplus |
51 |
extern "C" { |
52 |
#endif /* __cplusplus */ |
53 |
|
54 |
/* --------------------------------------------------------------- */ |
55 |
/* ---------------------- defines section ------------------------ */ |
56 |
/* --------------------------------------------------------------- */ |
57 |
|
58 |
/* Boolean values */ |
59 |
#define ARM_FALSE 0 |
60 |
#define ARM_TRUE 1 |
61 |
|
62 |
/* Transaction status */ |
63 |
#define ARM_STATUS_GOOD 0 |
64 |
#define ARM_STATUS_ABORTED 1 |
65 |
#define ARM_STATUS_FAILED 2 |
66 |
#define ARM_STATUS_UNKNOWN 3 |
67 |
|
68 |
/* -------------- reserved error codes range --------------------- */ |
69 |
|
70 |
#define ARM_ERROR_CODE_RESERVED_MIN -20999 |
71 |
#define ARM_ERROR_CODE_RESERVED_MAX -20000 |
72 |
|
73 |
/* --------------- known sub-buffer formats ---------------------- */ |
74 |
|
75 |
#define ARM_SUBBUFFER_USER 3 |
76 |
#define ARM_SUBBUFFER_ARRIVAL_TIME 4 |
77 |
#define ARM_SUBBUFFER_METRIC_VALUES 5 |
78 |
#define ARM_SUBBUFFER_SYSTEM_ADDRESS 6 |
79 |
#define ARM_SUBBUFFER_DIAG_DETAIL 7 |
80 |
|
81 |
#define ARM_SUBBUFFER_APP_IDENTITY 102 |
82 |
#define ARM_SUBBUFFER_APP_CONTEXT 103 |
83 |
#define ARM_SUBBUFFER_TRAN_IDENTITY 104 |
84 |
#define ARM_SUBBUFFER_TRAN_CONTEXT 105 |
85 |
#define ARM_SUBBUFFER_METRIC_BINDINGS 106 |
86 |
#define ARM_SUBBUFFER_CHARSET 107 |
87 |
|
88 |
/* -------------------- metric defines --------------------------- */ |
89 |
|
90 |
#define ARM_METRIC_FORMAT_RESERVED 0 |
91 |
#define ARM_METRIC_FORMAT_COUNTER32 1 |
92 |
#define ARM_METRIC_FORMAT_COUNTER64 2 |
93 |
#define ARM_METRIC_FORMAT_CNTRDIVR32 3 |
94 |
#define ARM_METRIC_FORMAT_GAUGE32 4 |
95 |
#define ARM_METRIC_FORMAT_GAUGE64 5 |
96 |
#define ARM_METRIC_FORMAT_GAUGEDIVR32 6 |
97 |
#define ARM_METRIC_FORMAT_NUMERICID32 7 |
98 |
#define ARM_METRIC_FORMAT_NUMERICID64 8 |
99 |
/* format 9 (string8) is deprecated */ |
100 |
#define ARM_METRIC_FORMAT_STRING32 10 |
101 |
|
102 |
#define ARM_METRIC_USE_GENERAL 0 |
103 |
#define ARM_METRIC_USE_TRAN_SIZE 1 |
104 |
#define ARM_METRIC_USE_TRAN_STATUS 2 |
105 |
|
106 |
#define ARM_METRIC_MIN_ARRAY_INDEX 0 |
107 |
#define ARM_METRIC_MAX_ARRAY_INDEX 6 |
108 |
#define ARM_METRIC_MAX_COUNT 7 |
109 |
|
110 |
#define ARM_METRIC_STRING32_MAX_CHARS 31 |
111 |
#define ARM_METRIC_STRING32_MAX_LENGTH \ |
112 |
(ARM_METRIC_STRING32_MAX_CHARS*3+1) |
113 |
|
114 |
/* ------------------- misc string defines ----------------------- */ |
115 |
|
116 |
#define ARM_NAME_MAX_CHARS 127 |
117 |
#define ARM_NAME_MAX_LENGTH (ARM_NAME_MAX_CHARS*3+1) |
118 |
|
119 |
#define ARM_DIAG_DETAIL_MAX_CHARS 4095 |
120 |
#define ARM_DIAG_DETAIL_MAX_LENGTH (ARM_DIAG_DETAIL_MAX_CHARS*3+1) |
121 |
|
122 |
#define ARM_MSG_BUFFER_CHARS 255 |
123 |
#define ARM_MSG_BUFFER_LENGTH (ARM_MSG_BUFFER_CHARS*3+1) |
124 |
|
125 |
/* ------------------- properties defines ------------------------ */ |
126 |
|
127 |
#define ARM_PROPERTY_MIN_ARRAY_INDEX 0 |
128 |
#define ARM_PROPERTY_MAX_ARRAY_INDEX 19 |
129 |
#define ARM_PROPERTY_MAX_COUNT 20 |
130 |
|
131 |
#define ARM_PROPERTY_NAME_MAX_CHARS (ARM_NAME_MAX_CHARS) |
132 |
#define ARM_PROPERTY_NAME_MAX_LENGTH \ |
133 |
(ARM_PROPERTY_NAME_MAX_CHARS*3+1) |
134 |
#define ARM_PROPERTY_VALUE_MAX_CHARS 255 |
135 |
#define ARM_PROPERTY_VALUE_MAX_LENGTH \ |
136 |
(ARM_PROPERTY_VALUE_MAX_CHARS*3+1) |
137 |
|
138 |
#define ARM_PROPERTY_URI_MAX_CHARS 4095 |
139 |
#define ARM_PROPERTY_URI_MAX_LENGTH (ARM_PROPERTY_URI_MAX_CHARS*3+1) |
140 |
|
141 |
/* -------------- system address format values ------------------- */ |
142 |
|
143 |
#define ARM_SYSADDR_FORMAT_RESERVED 0 |
144 |
#define ARM_SYSADDR_FORMAT_IPV4 1 |
145 |
#define ARM_SYSADDR_FORMAT_IPV4PORT 2 |
146 |
#define ARM_SYSADDR_FORMAT_IPV6 3 |
147 |
#define ARM_SYSADDR_FORMAT_IPV6PORT 4 |
148 |
#define ARM_SYSADDR_FORMAT_SNA 5 |
149 |
#define ARM_SYSADDR_FORMAT_X25 6 |
150 |
#define ARM_SYSADDR_FORMAT_HOSTNAME 7 |
151 |
#define ARM_SYSADDR_FORMAT_UUID 8 |
152 |
|
153 |
/* ------------------ mandatory charsets ------------------------- */ |
154 |
|
155 |
/* IANA charset MIBenum numbers (http://www.iana.org/) */ |
156 |
#define ARM_CHARSET_ASCII 3 /* mandatory */ |
157 |
#define ARM_CHARSET_UTF8 106 /* mandatory */ |
158 |
#define ARM_CHARSET_UTF16BE 1013 |
159 |
#define ARM_CHARSET_UTF16LE 1014 |
160 |
/* mandatory on Windows */ |
161 |
#define ARM_CHARSET_UTF16 1015 |
162 |
#define ARM_CHARSET_IBM037 2028 |
163 |
/* mandatory on iSeries */ |
164 |
#define ARM_CHARSET_IBM1047 2102 |
165 |
/* mandatory on zSeries */ |
166 |
|
167 |
/* ------------- flags to be passed on API calls ----------------- */ |
168 |
|
169 |
/* Use ARM_FLAG_NONE instead of zero to be more readable. */ |
170 |
#define ARM_FLAG_NONE (0x00000000) |
171 |
|
172 |
/* ARM_FLAG_TRACE_REQUEST could be used in the following calls to */ |
173 |
/* request a trace: */ |
174 |
/* - arm_generate_correlator() */ |
175 |
/* - arm_start_transaction() */ |
176 |
/* - arm_report_transaction() */ |
177 |
/* NOTE: The agent need not support instance tracing, so to be */ |
178 |
/* sure check the generated correlator using the */ |
179 |
/* arm_get_correlator_flags() function. */ |
180 |
#define ARM_FLAG_TRACE_REQUEST (0x00000001) |
181 |
|
182 |
/* ARM_FLAG_BIND_THREAD could be used on arm_start_transaction() */ |
183 |
/* call to do an implicit arm_bind_thread(). */ |
184 |
#define ARM_FLAG_BIND_THREAD (0x00000002) |
185 |
|
186 |
/* ARM_FLAG_CORR_IN_PROCESS indicates that a correlator will only */ |
187 |
/* be used within the process it was created. So an ARM */ |
188 |
/* implementation may optimize the generation of a correlator */ |
189 |
/* for that special usage. This flag can be passed to: */ |
190 |
/* - arm_generate_correlator() */ |
191 |
/* - arm_start_transaction() */ |
192 |
/* NOTE: The agent need not support in-process correlation at all. */ |
193 |
#define ARM_FLAG_CORR_IN_PROCESS (0x00000004) |
194 |
|
195 |
/* --------------- correlator defines ---------------------------- */ |
196 |
|
197 |
#define ARM_CORR_MAX_LENGTH 512 |
198 |
/* total max length */ |
199 |
|
200 |
/* Correlator interface flag numbers. See */ |
201 |
/* arm_get_correlator_flags(). */ |
202 |
#define ARM_CORR_FLAGNUM_APP_TRACE 1 |
203 |
#define ARM_CORR_FLAGNUM_AGENT_TRACE 2 |
204 |
|
205 |
|
206 |
/* Use if no correlator should be provided (e.g., in */ |
207 |
/* arm_start_transaction(). */ |
208 |
#define ARM_CORR_NONE ((arm_correlator_t *) NULL) |
209 |
|
210 |
/* --- current time for arm_report_transaction() stop time ------- */ |
211 |
|
212 |
#define ARM_USE_CURRENT_TIME ((arm_stop_time_t)-1) |
213 |
|
214 |
/* ------------------ misc defines ------------------------------- */ |
215 |
|
216 |
/* Use ARM_BUF4_NONE instead of a NULL to be more readable. */ |
217 |
#define ARM_BUF4_NONE ((arm_buffer4_t*) NULL) |
218 |
|
219 |
/* Use ARM_ID_NONE instead of a NULL to be more readable. */ |
220 |
#define ARM_ID_NONE ((arm_id_t *) NULL) |
221 |
|
222 |
/* --------------------------------------------------------------- */ |
223 |
/* --------------- basic typedef section ------------------------- */ |
224 |
/* --------------------------------------------------------------- */ |
225 |
|
226 |
/* Generic data types */ |
227 |
/* ARM4_*INT* defines are set in the <arm4os.h> header file. */ |
228 |
/* They are platform/compiler-specific. */ |
229 |
typedef ARM4_CHAR arm_char_t; |
230 |
|
231 |
typedef ARM4_INT8 arm_int8_t; |
232 |
typedef ARM4_UINT8 arm_uint8_t; |
233 |
/* used to define an opaque byte array */ |
234 |
|
235 |
typedef ARM4_INT16 arm_int16_t; |
236 |
typedef ARM4_UINT16 arm_uint16_t; |
237 |
|
238 |
typedef ARM4_INT32 arm_int32_t; |
239 |
typedef ARM4_UINT32 arm_uint32_t; |
240 |
|
241 |
typedef ARM4_INT64 arm_int64_t; |
242 |
typedef ARM4_UINT64 arm_uint64_t; |
243 |
|
244 |
/* ARM-specific simple types */ |
245 |
typedef arm_int32_t arm_boolean_t; |
246 |
typedef arm_int32_t arm_error_t; |
247 |
|
248 |
typedef arm_int64_t arm_arrival_time_t; /* opaque arrival time */ |
249 |
typedef arm_int64_t arm_stop_time_t; /* stop time in milli secs */ |
250 |
typedef arm_int64_t arm_response_time_t; |
251 |
/* response time in nano secs */ |
252 |
|
253 |
typedef arm_int32_t arm_tran_status_t; /* ARM_TRAN_STATUS_* values */ |
254 |
typedef arm_int32_t arm_charset_t; /* IANA MIBenum values */ |
255 |
typedef arm_int32_t arm_sysaddr_format_t; /* ARM_SYSADDR_* values */ |
256 |
|
257 |
/* ARM string buffer types */ |
258 |
typedef arm_char_t arm_message_buffer_t[ARM_MSG_BUFFER_LENGTH]; |
259 |
|
260 |
/* subbuffer types */ |
261 |
typedef arm_int32_t arm_subbuffer_format_t; |
262 |
|
263 |
/* metric types */ |
264 |
typedef arm_uint8_t arm_metric_format_t; |
265 |
typedef arm_uint8_t arm_metric_slot_t; |
266 |
typedef arm_int16_t arm_metric_usage_t; |
267 |
|
268 |
/* handle types */ |
269 |
typedef arm_int64_t arm_app_start_handle_t; |
270 |
typedef arm_int64_t arm_tran_start_handle_t; |
271 |
typedef arm_int64_t arm_tran_block_handle_t; |
272 |
|
273 |
/* correlator types */ |
274 |
typedef arm_int16_t arm_correlator_length_t; |
275 |
|
276 |
/* --------------------------------------------------------------- */ |
277 |
/* ---------------- compound typedefs section -------------------- */ |
278 |
/* --------------------------------------------------------------- */ |
279 |
|
280 |
/* All IDs are 16 bytes on an 8-byte boundary. */ |
281 |
typedef struct arm_id |
282 |
{ |
283 |
union |
284 |
{ |
285 |
arm_uint8_t uint8[16]; |
286 |
arm_uint32_t uint32[4]; |
287 |
arm_uint64_t uint64[2]; |
288 |
} id_u; |
289 |
} arm_id_t; |
290 |
|
291 |
/* Correlator */ |
292 |
typedef struct arm_correlator |
293 |
{ |
294 |
arm_uint8_t opaque[ARM_CORR_MAX_LENGTH]; |
295 |
} arm_correlator_t; |
296 |
|
297 |
/* User-defined metrics */ |
298 |
typedef arm_int32_t arm_metric_counter32_t; |
299 |
typedef arm_int64_t arm_metric_counter64_t; |
300 |
typedef arm_int32_t arm_metric_divisor32_t; |
301 |
typedef arm_int32_t arm_metric_gauge32_t; |
302 |
typedef arm_int64_t arm_metric_gauge64_t; |
303 |
typedef arm_int32_t arm_metric_numericID32_t; |
304 |
typedef arm_int64_t arm_metric_numericID64_t; |
305 |
typedef const arm_char_t *arm_metric_string32_t; |
306 |
typedef struct arm_metric_cntrdivr32 |
307 |
{ |
308 |
arm_metric_counter32_t counter; |
309 |
arm_metric_divisor32_t divisor; |
310 |
} arm_metric_cntrdivr32_t; |
311 |
typedef struct arm_metric_gaugedivr32 |
312 |
{ |
313 |
arm_metric_gauge32_t gauge; |
314 |
arm_metric_divisor32_t divisor; |
315 |
} arm_metric_gaugedivr32_t; |
316 |
|
317 |
typedef struct arm_metric |
318 |
{ |
319 |
arm_metric_slot_t slot; |
320 |
arm_metric_format_t format; |
321 |
arm_metric_usage_t usage; |
322 |
arm_boolean_t valid; |
323 |
union |
324 |
{ |
325 |
arm_metric_counter32_t counter32; |
326 |
arm_metric_counter64_t counter64; |
327 |
arm_metric_cntrdivr32_t counterdivisor32; |
328 |
arm_metric_gauge32_t gauge32; |
329 |
arm_metric_gauge64_t gauge64; |
330 |
arm_metric_gaugedivr32_t gaugedivisor32; |
331 |
arm_metric_numericID32_t numericid32; |
332 |
arm_metric_numericID64_t numericid64; |
333 |
arm_metric_string32_t string32; |
334 |
} metric_u; |
335 |
} arm_metric_t; |
336 |
|
337 |
typedef struct arm_metric_binding |
338 |
{ |
339 |
arm_metric_slot_t slot; |
340 |
arm_id_t id; |
341 |
} arm_metric_binding_t; |
342 |
|
343 |
typedef struct arm_property |
344 |
{ |
345 |
const arm_char_t *name; |
346 |
const arm_char_t *value; |
347 |
} arm_property_t; |
348 |
|
349 |
/* ------------------------------------------------------------- */ |
350 |
/* -------------- sub-buffer typedefs section ------------------ */ |
351 |
/* ------------------------------------------------------------- */ |
352 |
|
353 |
typedef struct arm_subbuffer { |
354 |
arm_subbuffer_format_t format; |
355 |
/* Format-specific data fields follow here. */ |
356 |
} arm_subbuffer_t; |
357 |
|
358 |
/* This macro could be used avoid a compiler warning if you */ |
359 |
/* direct one of the following arm_subbuffer_*_t structure */ |
360 |
/* pointers to a function accepting sub-buffer pointers. Any */ |
361 |
/* sub-buffer is passed to the ARM API call as a */ |
362 |
/* (arm_subbuffer_t *) pointer. Use this macro if you pass a */ |
363 |
/* "real" subbuffer to an API function. Note for the special */ |
364 |
/* ARM SDK subbuffers the ARM_SDKSB() macro has to be used. */ |
365 |
#define ARM_SB(x) (&((x).header)) |
366 |
|
367 |
/* The user data buffer */ |
368 |
typedef struct arm_buffer4 |
369 |
{ |
370 |
arm_int32_t count; |
371 |
arm_subbuffer_t **subbuffer_array; |
372 |
} arm_buffer4_t; |
373 |
|
374 |
typedef struct arm_subbuffer_charset |
375 |
{ |
376 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_CHARSET */ |
377 |
|
378 |
arm_charset_t charset; /* One of the IANA MIBenum values */ |
379 |
arm_int32_t flags; |
380 |
} arm_subbuffer_charset_t; |
381 |
|
382 |
typedef struct arm_subbuffer_app_identity |
383 |
{ |
384 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_APP_IDENTITY */ |
385 |
|
386 |
arm_int32_t identity_property_count; |
387 |
const arm_property_t *identity_property_array; |
388 |
arm_int32_t context_name_count; |
389 |
const arm_char_t **context_name_array; |
390 |
} arm_subbuffer_app_identity_t; |
391 |
|
392 |
typedef struct arm_subbuffer_app_context |
393 |
{ |
394 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_APP_CONTEXT */ |
395 |
|
396 |
arm_int32_t context_value_count; |
397 |
const arm_char_t **context_value_array; |
398 |
} arm_subbuffer_app_context_t; |
399 |
|
400 |
typedef struct arm_subbuffer_tran_identity |
401 |
{ |
402 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_TRAN_IDENTITY */ |
403 |
|
404 |
arm_int32_t identity_property_count; |
405 |
const arm_property_t *identity_property_array; |
406 |
arm_int32_t context_name_count; |
407 |
const arm_char_t **context_name_array; |
408 |
const arm_char_t *uri; |
409 |
} arm_subbuffer_tran_identity_t; |
410 |
|
411 |
typedef struct arm_subbuffer_tran_context |
412 |
{ |
413 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_TRAN_CONTEXT */ |
414 |
|
415 |
arm_int32_t context_value_count; |
416 |
const arm_char_t **context_value_array; |
417 |
const arm_char_t *uri; |
418 |
} arm_subbuffer_tran_context_t; |
419 |
|
420 |
typedef struct arm_subbuffer_arrival_time |
421 |
{ |
422 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_ARRIVAL_TIME */ |
423 |
|
424 |
arm_arrival_time_t opaque_time; |
425 |
} arm_subbuffer_arrival_time_t; |
426 |
|
427 |
typedef struct arm_subbuffer_metric_bindings |
428 |
{ |
429 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_METRIC_BINDINGS */ |
430 |
|
431 |
arm_int32_t count; |
432 |
const arm_metric_binding_t *metric_binding_array; |
433 |
} arm_subbuffer_metric_bindings_t; |
434 |
|
435 |
typedef struct arm_subbuffer_metric_values |
436 |
{ |
437 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_METRIC_VALUES */ |
438 |
|
439 |
arm_int32_t count; |
440 |
const arm_metric_t *metric_value_array; |
441 |
} arm_subbuffer_metric_values_t; |
442 |
|
443 |
typedef struct arm_subbuffer_user |
444 |
{ |
445 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_USER */ |
446 |
|
447 |
const arm_char_t *name; |
448 |
arm_boolean_t id_valid; |
449 |
arm_id_t id; |
450 |
} arm_subbuffer_user_t; |
451 |
|
452 |
typedef struct arm_subbuffer_system_address |
453 |
{ |
454 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_SYSTEM_ADDRESS */ |
455 |
|
456 |
arm_int16_t address_format; |
457 |
arm_int16_t address_length; |
458 |
const arm_uint8_t *address; |
459 |
arm_boolean_t id_valid; |
460 |
arm_id_t id; |
461 |
} arm_subbuffer_system_address_t; |
462 |
|
463 |
typedef struct arm_subbuffer_diag_detail |
464 |
{ |
465 |
arm_subbuffer_t header; /* ARM_SUBBUFFER_DIAG_DETAIL */ |
466 |
|
467 |
const arm_char_t *diag_detail; |
468 |
} arm_subbuffer_diag_detail_t; |
469 |
|
470 |
/* --------------------------------------------------------------- */ |
471 |
/* ------------------ ARM4 API section --------------------------- */ |
472 |
/* --------------------------------------------------------------- */ |
473 |
|
474 |
/* register metadata API functions */ |
475 |
ARM4_API_DYNAMIC(arm_error_t) |
476 |
arm_register_application( |
477 |
const arm_char_t *app_name, |
478 |
const arm_id_t *input_app_id, |
479 |
const arm_int32_t flags, |
480 |
const arm_buffer4_t *buffer4, |
481 |
arm_id_t *output_app_id); |
482 |
|
483 |
ARM4_API_DYNAMIC(arm_error_t) |
484 |
arm_destroy_application( |
485 |
const arm_id_t *app_id, |
486 |
const arm_int32_t flags, |
487 |
const arm_buffer4_t *buffer4); |
488 |
|
489 |
ARM4_API_DYNAMIC(arm_error_t) |
490 |
arm_register_transaction( |
491 |
const arm_id_t *app_id, |
492 |
const arm_char_t *tran_name, |
493 |
const arm_id_t *input_tran_id, |
494 |
const arm_int32_t flags, |
495 |
const arm_buffer4_t *buffer4, |
496 |
arm_id_t *output_tran_id); |
497 |
|
498 |
ARM4_API_DYNAMIC(arm_error_t) |
499 |
arm_register_metric( |
500 |
const arm_id_t *app_id, |
501 |
const arm_char_t *metric_name, |
502 |
const arm_metric_format_t metric_format, |
503 |
const arm_metric_usage_t metric_usage, |
504 |
const arm_char_t *metric_unit, |
505 |
const arm_id_t *input_metric_id, |
506 |
const arm_int32_t flags, |
507 |
const arm_buffer4_t *buffer4, |
508 |
arm_id_t *output_metric_id); |
509 |
|
510 |
/* application instance API functions */ |
511 |
ARM4_API_DYNAMIC(arm_error_t) |
512 |
arm_start_application( |
513 |
const arm_id_t *app_id, |
514 |
const arm_char_t *app_group, |
515 |
const arm_char_t *app_instance, |
516 |
const arm_int32_t flags, |
517 |
const arm_buffer4_t *buffer4, |
518 |
arm_app_start_handle_t *app_handle); |
519 |
|
520 |
ARM4_API_DYNAMIC(arm_error_t) |
521 |
arm_stop_application( |
522 |
const arm_app_start_handle_t app_handle, |
523 |
const arm_int32_t flags, |
524 |
const arm_buffer4_t *buffer4); |
525 |
|
526 |
/* transaction instance API functions */ |
527 |
ARM4_API_DYNAMIC(arm_error_t) |
528 |
arm_start_transaction( |
529 |
const arm_app_start_handle_t app_handle, |
530 |
const arm_id_t *tran_id, |
531 |
const arm_correlator_t *parent_correlator, |
532 |
const arm_int32_t flags, |
533 |
const arm_buffer4_t *buffer4, |
534 |
arm_tran_start_handle_t *tran_handle, |
535 |
arm_correlator_t *current_correlator); |
536 |
|
537 |
ARM4_API_DYNAMIC(arm_error_t) |
538 |
arm_stop_transaction( |
539 |
const arm_tran_start_handle_t tran_handle, |
540 |
const arm_tran_status_t tran_status, |
541 |
const arm_int32_t flags, |
542 |
const arm_buffer4_t *buffer4); |
543 |
|
544 |
ARM4_API_DYNAMIC(arm_error_t) |
545 |
arm_update_transaction( |
546 |
const arm_tran_start_handle_t tran_handle, |
547 |
const arm_int32_t flags, |
548 |
const arm_buffer4_t *buffer4); |
549 |
|
550 |
ARM4_API_DYNAMIC(arm_error_t) |
551 |
arm_discard_transaction( |
552 |
const arm_tran_start_handle_t tran_handle, |
553 |
const arm_int32_t flags, |
554 |
const arm_buffer4_t *buffer4); |
555 |
|
556 |
ARM4_API_DYNAMIC(arm_error_t) |
557 |
arm_block_transaction( |
558 |
const arm_tran_start_handle_t tran_handle, |
559 |
const arm_int32_t flags, |
560 |
const arm_buffer4_t *buffer4, |
561 |
arm_tran_block_handle_t *block_handle); |
562 |
|
563 |
ARM4_API_DYNAMIC(arm_error_t) |
564 |
arm_unblock_transaction( |
565 |
const arm_tran_start_handle_t tran_handle, |
566 |
const arm_tran_block_handle_t block_handle, |
567 |
const arm_int32_t flags, |
568 |
const arm_buffer4_t *buffer4); |
569 |
|
570 |
/* thread support API functions */ |
571 |
ARM4_API_DYNAMIC(arm_error_t) |
572 |
arm_bind_thread( |
573 |
const arm_tran_start_handle_t tran_handle, |
574 |
const arm_int32_t flags, |
575 |
const arm_buffer4_t *buffer4); |
576 |
|
577 |
ARM4_API_DYNAMIC(arm_error_t) |
578 |
arm_unbind_thread( |
579 |
const arm_tran_start_handle_t tran_handle, |
580 |
const arm_int32_t flags, |
581 |
const arm_buffer4_t *buffer4); |
582 |
|
583 |
/* report transaction data API function */ |
584 |
ARM4_API_DYNAMIC(arm_error_t) |
585 |
arm_report_transaction( |
586 |
const arm_app_start_handle_t app_handle, |
587 |
const arm_id_t *tran_id, |
588 |
const arm_tran_status_t tran_status, |
589 |
const arm_response_time_t response_time, |
590 |
const arm_stop_time_t stop_time, |
591 |
const arm_correlator_t *parent_correlator, |
592 |
const arm_correlator_t *current_correlator, |
593 |
const arm_int32_t flags, |
594 |
const arm_buffer4_t *buffer4); |
595 |
|
596 |
/* correlator API functions */ |
597 |
ARM4_API_DYNAMIC(arm_error_t) |
598 |
arm_generate_correlator( |
599 |
const arm_app_start_handle_t app_handle, |
600 |
const arm_id_t *tran_id, |
601 |
const arm_correlator_t *parent_correlator, |
602 |
const arm_int32_t flags, |
603 |
const arm_buffer4_t *buffer4, |
604 |
arm_correlator_t *current_correlator); |
605 |
|
606 |
ARM4_API_DYNAMIC(arm_error_t) |
607 |
arm_get_correlator_length( |
608 |
const arm_correlator_t *correlator, |
609 |
arm_correlator_length_t *length); |
610 |
|
611 |
ARM4_API_DYNAMIC(arm_error_t) |
612 |
arm_get_correlator_flags( |
613 |
const arm_correlator_t *correlator, |
614 |
const arm_int32_t corr_flag_num, |
615 |
arm_boolean_t *flag); |
616 |
|
617 |
/* miscellaneous API functions */ |
618 |
ARM4_API_DYNAMIC(arm_error_t) |
619 |
arm_get_arrival_time( |
620 |
arm_arrival_time_t *opaque_time); |
621 |
|
622 |
ARM4_API_DYNAMIC(arm_error_t) |
623 |
arm_get_error_message( |
624 |
const arm_charset_t charset, |
625 |
const arm_error_t code, |
626 |
arm_message_buffer_t msg); |
627 |
|
628 |
ARM4_API_DYNAMIC(arm_error_t) |
629 |
arm_is_charset_supported( |
630 |
const arm_charset_t charset, |
631 |
arm_boolean_t *supported); |
632 |
|
633 |
#ifdef __cplusplus |
634 |
} |
635 |
#endif /* __cplusplus */ |
636 |
|
637 |
#ifndef ARM4DYN_H_INCLUDED |
638 |
#include "arm4dyn.h" |
639 |
#endif /* !ARM4DYN_H_INCLUDED */ |
640 |
|
641 |
#endif /* ARM4_H_INCLUDED */ |
642 |
|