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