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
15 * Szabo, Janos Zoltan – initial implementation
16 * Zalanyi, Balazs Andor
18 ******************************************************************************/
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. */
26 #define __attribute__(arg)
31 #define HAVE_GCC(maj, min) \
32 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
44 enum verdicttype
{ NONE
= 0, PASS
= 1, INCONC
= 2, FAIL
= 3, ERROR
= 4 };
45 extern const char * const verdict_name
[];
47 enum alt_status
{ ALT_UNCHECKED
, ALT_YES
, ALT_MAYBE
, ALT_NO
, ALT_REPEAT
,
50 enum null_type
{ NULL_VALUE
};
52 enum asn_null_type
{ ASN_NULL_VALUE
};
54 struct universal_char
{
55 unsigned char uc_group
, uc_plane
, uc_row
, uc_cell
;
57 bool is_char() const {
58 return uc_group
== 0 && uc_plane
== 0 && uc_row
== 0 && uc_cell
< 128;
62 typedef int component
;
64 /** @name Predefined component reference values.
67 #define NULL_COMPREF 0
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
79 /** Transport types for port connections */
81 enum transport_type_enum
{
83 TRANSPORT_INET_STREAM
= 1,
84 TRANSPORT_UNIX_STREAM
= 2,
88 /** File descriptor event types */
90 enum fd_event_type_enum
{
91 FD_EVENT_RD
= 1, FD_EVENT_WR
= 2, FD_EVENT_ERR
= 4
94 /** Structure for storing global identifiers of TTCN-3 definitions */
96 struct qualified_name
{
98 char *definition_name
;
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 */
109 /** Component identifier.
111 * This must be a POD because itself is a member of a union
112 * (%union in config_process.y).
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.
119 component_id_selector_enum id_selector
;
121 component id_compref
;
127 const char * const ns
;
128 const char * const px
;