1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 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 ///////////////////////////////////////////////////////////////////////////////
12 /** If a C compiler other than GCC is used the macro below will substitute all
13 * GCC-specific non-standard attributes with an empty string. */
15 #define __attribute__(arg)
20 #define HAVE_GCC(maj, min) \
21 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
33 enum verdicttype
{ NONE
= 0, PASS
= 1, INCONC
= 2, FAIL
= 3, ERROR
= 4 };
34 extern const char * const verdict_name
[];
36 enum alt_status
{ ALT_UNCHECKED
, ALT_YES
, ALT_MAYBE
, ALT_NO
, ALT_REPEAT
,
39 enum null_type
{ NULL_VALUE
};
41 enum asn_null_type
{ ASN_NULL_VALUE
};
43 struct universal_char
{
44 unsigned char uc_group
, uc_plane
, uc_row
, uc_cell
;
46 bool is_char() const {
47 return uc_group
== 0 && uc_plane
== 0 && uc_row
== 0 && uc_cell
< 128;
51 typedef int component
;
53 /** @name Predefined component reference values.
56 #define NULL_COMPREF 0
58 #define SYSTEM_COMPREF 2
59 #define FIRST_PTC_COMPREF 3
60 #define ANY_COMPREF -1
61 #define ALL_COMPREF -2
62 #define UNBOUND_COMPREF -3
63 /** Pseudo-component for logging when the MTC is executing a controlpart */
64 #define CONTROL_COMPREF -4
68 /** Transport types for port connections */
70 enum transport_type_enum
{
72 TRANSPORT_INET_STREAM
= 1,
73 TRANSPORT_UNIX_STREAM
= 2,
77 /** File descriptor event types */
79 enum fd_event_type_enum
{
80 FD_EVENT_RD
= 1, FD_EVENT_WR
= 2, FD_EVENT_ERR
= 4
83 /** Structure for storing global identifiers of TTCN-3 definitions */
85 struct qualified_name
{
87 char *definition_name
;
90 /** How a component is identified */
91 enum component_id_selector_enum
{
92 COMPONENT_ID_NAME
, /**< Identified by name */
93 COMPONENT_ID_COMPREF
, /**< Identified by component reference */
94 COMPONENT_ID_ALL
, /**< All components */
95 COMPONENT_ID_SYSTEM
/**< System component */
98 /** Component identifier.
100 * This must be a POD because itself is a member of a union
101 * (%union in config_process.y).
103 struct component_id_t
{
104 /** How the component is identified.
105 * COMPONENT_ID_NAME identifies by name, COMPONENT_ID_COMPREF by number.
106 * Any other selector identifies the component directly.
108 component_id_selector_enum id_selector
;
110 component id_compref
;
116 const char * const ns
;
117 const char * const px
;