Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / core / Types.h
1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Beres, Szabolcs
11 * Feher, Csaba
12 * Forstner, Matyas
13 * Kovacs, Ferenc
14 * Raduly, Csaba
15 * Szabo, Janos Zoltan – initial implementation
16 * Zalanyi, Balazs Andor
17 *
18 ******************************************************************************/
19 #ifndef TYPES_H
20 #define TYPES_H
21
22 #ifndef __GNUC__
23 /** If a C compiler other than GCC is used the macro below will substitute all
24 * GCC-specific non-standard attributes with an empty string. */
25 #ifndef __attribute__
26 #define __attribute__(arg)
27 #endif
28
29 #else
30
31 #define HAVE_GCC(maj, min) \
32 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
33
34 #endif
35
36 #include <stddef.h>
37
38 /* Generic C types */
39
40 typedef bool boolean;
41 #define FALSE false
42 #define TRUE true
43
44 enum verdicttype { NONE = 0, PASS = 1, INCONC = 2, FAIL = 3, ERROR = 4 };
45 extern const char * const verdict_name[];
46
47 enum alt_status { ALT_UNCHECKED, ALT_YES, ALT_MAYBE, ALT_NO, ALT_REPEAT,
48 ALT_BREAK };
49
50 enum null_type { NULL_VALUE };
51
52 enum asn_null_type { ASN_NULL_VALUE };
53
54 struct universal_char {
55 unsigned char uc_group, uc_plane, uc_row, uc_cell;
56
57 bool is_char() const {
58 return uc_group == 0 && uc_plane == 0 && uc_row == 0 && uc_cell < 128;
59 }
60 };
61
62 typedef int component;
63
64 /** @name Predefined component reference values.
65 @{
66 */
67 #define NULL_COMPREF 0
68 #define MTC_COMPREF 1
69 #define SYSTEM_COMPREF 2
70 #define FIRST_PTC_COMPREF 3
71 #define ANY_COMPREF -1
72 #define ALL_COMPREF -2
73 #define UNBOUND_COMPREF -3
74 /** Pseudo-component for logging when the MTC is executing a controlpart */
75 #define CONTROL_COMPREF -4
76
77 /** @} */
78
79 /** Transport types for port connections */
80
81 enum transport_type_enum {
82 TRANSPORT_LOCAL = 0,
83 TRANSPORT_INET_STREAM = 1,
84 TRANSPORT_UNIX_STREAM = 2,
85 TRANSPORT_NUM = 3
86 };
87
88 /** File descriptor event types */
89
90 enum fd_event_type_enum {
91 FD_EVENT_RD = 1, FD_EVENT_WR = 2, FD_EVENT_ERR = 4
92 };
93
94 /** Structure for storing global identifiers of TTCN-3 definitions */
95
96 struct qualified_name {
97 char *module_name;
98 char *definition_name;
99 };
100
101 /** How a component is identified */
102 enum component_id_selector_enum {
103 COMPONENT_ID_NAME, /**< Identified by name */
104 COMPONENT_ID_COMPREF, /**< Identified by component reference */
105 COMPONENT_ID_ALL, /**< All components */
106 COMPONENT_ID_SYSTEM /**< System component */
107 };
108
109 /** Component identifier.
110 *
111 * This must be a POD because itself is a member of a union
112 * (%union in config_process.y).
113 */
114 struct component_id_t {
115 /** How the component is identified.
116 * COMPONENT_ID_NAME identifies by name, COMPONENT_ID_COMPREF by number.
117 * Any other selector identifies the component directly.
118 */
119 component_id_selector_enum id_selector;
120 union {
121 component id_compref;
122 char *id_name;
123 };
124 };
125
126 struct namespace_t {
127 const char * const ns;
128 const char * const px;
129 };
130
131 #endif
This page took 0.033754 seconds and 5 git commands to generate.