added any2unistr predefined function (artf724008)
[deliverable/titan.core.git] / compiler2 / ttcn3 / rawASTspec.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 * Szabados, Kristof
11 * Szabo, Janos Zoltan – initial implementation
12 * Szalai, Gabor
13 *
14 ******************************************************************************/
15 #ifndef RAWASTSPEC_H
16 #define RAWASTSPEC_H
17
18 #define XDEFUNSIGNED 1
19 #define XDEFCOMPL 2
20 #define XDEFSIGNBIT 3
21 #define XDEFYES 2
22 #define XDEFNO 1
23 #define XDEFREVERSE 3
24 #define XDEFMSB 1
25 #define XDEFLSB 2
26 #define XDEFBITS 1
27 #define XDEFOCTETS 2
28 #define XDEFLEFT 1
29 #define XDEFRIGHT 2
30 #define XDEFFIRST 1
31 #define XDEFLAST 2
32 #define XDEFLOW 1
33 #define XDEFHIGH 2
34 #define XDEFDEFAULT -1
35
36
37 typedef struct {
38 int bitorder; /* Invert bitorder of the encoded data */
39 }rawAST_toplevel;
40
41 typedef enum { MANDATORY_FIELD, OPTIONAL_FIELD, UNION_FIELD
42 } rawAST_coding_field_type;
43
44 typedef struct{
45 int nthfield;
46 const char* nthfieldname;
47 rawAST_coding_field_type fieldtype;
48 const char* type;
49 const char* typedescr;
50 }rawAST_coding_fields;
51
52 typedef struct{
53 int nElements;
54 rawAST_coding_fields* fields;
55 const char *value;
56 int start_pos;
57 int temporal_variable_index;
58 }rawAST_coding_field_list;
59
60 typedef struct{
61 const char* fieldName;
62 int fieldnum;
63 int nElements;
64 rawAST_coding_field_list* fields;
65 }rawAST_coding_taglist;
66
67 typedef struct{
68 int nElements;
69 rawAST_coding_taglist* list;
70 }rawAST_coding_taglist_list;
71
72 typedef struct{
73 int ext_bit;
74 int from;
75 int to;
76 }rawAST_coding_ext_group;
77
78 typedef struct{
79 int fieldlength;
80 int comp;
81 int byteorder; /* XDEFMSB, XDEFLSB */
82 int align; /* XDEFLEFT, XDEFRIGHT */
83 int bitorderinfield; /* XDEFMSB, XDEFLSB */
84 int bitorderinoctet; /* XDEFMSB, XDEFLSB */
85 int extension_bit; /* XDEFYES, XDEFNO
86 can be used for record fields:
87 variant (field1) EXTENSION_BIT(use)*/
88 int ext_bit_goup_num;
89 rawAST_coding_ext_group* ext_bit_groups;
90 int hexorder; /* XDEFLOW, XDEFHIGH */
91 int padding; /* XDEFYES: next field starts at next octet */
92 int fieldorder; /* XDEFMSB, XDEFLSB */
93 int lengthto_num;
94 int *lengthto; /* list of fields to generate length for */
95 int pointerto; /* pointer to the specified field is contained
96 in this field */
97 int ptrunit; /* number of bits in pointerto value */
98 int ptroffset; /* offset to the pointer value in bits
99 Actual position will be:
100 pointerto*ptrunit + ptroffset */
101 int pointerbase;
102 int unit; /* number of bits in an unit */
103 rawAST_coding_fields *lengthindex; /* stores subattribute of the lengthto
104 attribute */
105 rawAST_coding_taglist_list taglist;
106 rawAST_coding_taglist_list crosstaglist; /* field IDs in form of
107 [unionField.sub]field_N,
108 keyField.subfield_M = tagValue
109 multiple tagValues may be specified */
110 rawAST_coding_taglist presence; /* Presence indicator expressions for an
111 optional field */
112 int topleveleind;
113 rawAST_toplevel toplevel; /* Toplevel attributes */
114 int union_member_num;
115 const char **member_name;
116 int repeatable;
117 int length; /* used only for record fields: the length of the
118 field measured in bits, it is set to -1 if
119 variable */
120 }raw_attrib_struct;
121 /* RAW enc types */
122
123
124 #endif
125
126 /*
127 Local Variables:
128 mode: C
129 indent-tabs-mode: nil
130 c-basic-offset: 4
131 End:
132 */
This page took 0.033506 seconds and 5 git commands to generate.