Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * Copyright (c) 2004, 2014 Ericsson 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 | * Zoltan Jasz - initial implementation and initial documentation |
| 10 | * Abhishek Gupta |
| 11 | * Attila Balasko |
| 12 | * Endre Kulcsar |
| 13 | * Gabor Bettesch |
| 14 | * Gabor Szalai |
| 15 | * Janos Kovesdi |
| 16 | * Sandor Palugyai |
| 17 | * Tibor Csondes |
| 18 | ******************************************************************************/ |
| 19 | // |
| 20 | // File: general_typedefs.ttcn |
| 21 | // Rev: R9A |
| 22 | // Prodnr: CNL 113 368 |
| 23 | // Reference: |
| 24 | |
| 25 | module general_typedefs |
| 26 | { |
| 27 | |
| 28 | group SimpleNativeTypes |
| 29 | { |
| 30 | //octetstring with fixed length |
| 31 | type octetstring OCT0n length(0); |
| 32 | type octetstring OCT1n length(1); |
| 33 | type octetstring OCT2n length(2); |
| 34 | type octetstring OCT3n length(3); |
| 35 | type octetstring OCT4n length(4); |
| 36 | type octetstring OCT5n length(5); |
| 37 | type octetstring OCT6n length(6); |
| 38 | type octetstring OCT7n length(7); |
| 39 | type octetstring OCT8n length(8); |
| 40 | type octetstring OCT9n length(9); |
| 41 | type octetstring OCT10n length(10); |
| 42 | type octetstring OCT11n length(11); |
| 43 | type octetstring OCT12n length(12); |
| 44 | type octetstring OCT13n length(13); |
| 45 | type octetstring OCT14n length(14); |
| 46 | type octetstring OCT15n length(15); |
| 47 | type octetstring OCT16n length(16); |
| 48 | type octetstring OCT17n length(17); |
| 49 | type octetstring OCT18n length(18); |
| 50 | type octetstring OCT19n length(19); |
| 51 | type octetstring OCT20n length(20); |
| 52 | type octetstring OCT28n length(28); |
| 53 | type octetstring OCT32n length(32); |
| 54 | type octetstring OCT34n length(34); |
| 55 | type octetstring OCT46n length(46); |
| 56 | type octetstring OCT50n length(50); |
| 57 | type octetstring OCT69n length(69); |
| 58 | type octetstring OCT100n length(100); |
| 59 | type octetstring OCT128n length(128); |
| 60 | type octetstring OCT500n length(500); |
| 61 | type octetstring OCTNn; |
| 62 | |
| 63 | //octetstring with length interval |
| 64 | type octetstring OCT1_3n length(1..3); |
| 65 | type octetstring OCT1_4n length(1..4); |
| 66 | type octetstring OCT1_5n length(1..5); |
| 67 | type octetstring OCT1_6n length(1..6); |
| 68 | type octetstring OCT1_7n length(1..7); |
| 69 | type octetstring OCT1_8n length(1..8); |
| 70 | type octetstring OCT1_12n length(1..12); |
| 71 | type octetstring OCT1_15n length(1..15); |
| 72 | type octetstring OCT1_16n length(1..16); |
| 73 | type octetstring OCT1_18n length(1..18); |
| 74 | type octetstring OCT1_20n length(1..20); |
| 75 | type octetstring OCT1_24n length(1..24); |
| 76 | type octetstring OCT1_34n length(1..34); |
| 77 | type octetstring OCT1_46n length(1..46); |
| 78 | type octetstring OCT1_50n length(1..50); |
| 79 | type octetstring OCT1_112n length(1..112); |
| 80 | type octetstring OCT1_127n length(1..127); |
| 81 | type octetstring OCT1_128n length(1..128); |
| 82 | type octetstring OCT1_172n length(1..172); |
| 83 | type octetstring OCT3_5n length(3..5); |
| 84 | type octetstring OCT3_7n length(3..7); |
| 85 | type octetstring OCT3_8n length(3..8); |
| 86 | type octetstring OCT3_17n length(3..17); |
| 87 | type octetstring OCT4_8n length(4..8); |
| 88 | |
| 89 | //hexstring with fixed length |
| 90 | type hexstring HEX24n length(24); |
| 91 | |
| 92 | //hexstring with length interval |
| 93 | type hexstring HEX0_18n length(0..18); |
| 94 | type hexstring HEX1_20n length(1..20); |
| 95 | |
| 96 | |
| 97 | //bitstring with fixed length |
| 98 | type bitstring BIT1n length(1); |
| 99 | type bitstring BIT2n length(2); |
| 100 | type bitstring BIT3n length(3); |
| 101 | type bitstring BIT4n length(4); |
| 102 | type bitstring BIT5n length(5); |
| 103 | type bitstring BIT6n length(6); |
| 104 | type bitstring BIT7n length(7); |
| 105 | type bitstring BIT8n length(8); |
| 106 | type bitstring BIT9n length(9); |
| 107 | type bitstring BIT12n length(12); |
| 108 | type bitstring BIT14n length(14); |
| 109 | type bitstring BIT15n length(15); |
| 110 | type bitstring BIT16n length(16); |
| 111 | type bitstring BIT56n length(56); |
| 112 | |
| 113 | //bitstring with length interval |
| 114 | type bitstring BIT14_24n length(14..24); |
| 115 | |
| 116 | //bitstring to be padded with fixed length |
| 117 | type bitstring BIT1np length(1); |
| 118 | type bitstring BIT2np length(2); |
| 119 | type bitstring BIT3np length(3); |
| 120 | type bitstring BIT4np length(4); |
| 121 | type bitstring BIT5np length(5); |
| 122 | type bitstring BIT6np length(6); |
| 123 | type bitstring BIT7np length(7); |
| 124 | type bitstring BIT15np length(15); |
| 125 | |
| 126 | //integer with fixed bit number |
| 127 | type integer INT3nb (0..7); |
| 128 | type integer INT4nb (0..15); |
| 129 | type integer INT5nb (0..31); |
| 130 | type integer INT8nb (0..255); |
| 131 | |
| 132 | //integer with fixed bit number and with padding |
| 133 | type integer INT2nbp (0..3); |
| 134 | type integer INT1nbp (0..1); |
| 135 | type integer INT3nbp (0..7); |
| 136 | type integer INT5nbp (0..31); |
| 137 | type integer INT9nbp (0..511); |
| 138 | type integer INT13nbp (0..8095); |
| 139 | type integer INT15nbp (0..32767); |
| 140 | |
| 141 | }// end group NativeTypes |
| 142 | |
| 143 | group SimpleRAWEncodedTypes |
| 144 | { |
| 145 | //octetstring with fixed length |
| 146 | type octetstring Dummy length(0) with { variant "FIELDLENGTH(0)" }; |
| 147 | type octetstring OCT0 length(0) with { variant "FIELDLENGTH(0)" }; |
| 148 | type octetstring OCT1 length(1) with { variant "FIELDLENGTH(1)" }; |
| 149 | type octetstring OCT2 length(2) with { variant "FIELDLENGTH(2)" }; |
| 150 | type octetstring OCT3 length(3) with { variant "FIELDLENGTH(3)" }; |
| 151 | type octetstring OCT4 length(4) with { variant "FIELDLENGTH(4)" }; |
| 152 | type octetstring OCT5 length(5) with { variant "FIELDLENGTH(5)" }; |
| 153 | type octetstring OCT6 length(6) with { variant "FIELDLENGTH(6)" }; |
| 154 | type octetstring OCT7 length(7) with { variant "FIELDLENGTH(7)" }; |
| 155 | type octetstring OCT8 length(8) with { variant "FIELDLENGTH(8)" }; |
| 156 | type octetstring OCT9 length(9) with { variant "FIELDLENGTH(9)" }; |
| 157 | type octetstring OCT10 length(10) with { variant "FIELDLENGTH(10)" }; |
| 158 | type octetstring OCT11 length(11) with { variant "FIELDLENGTH(11)" }; |
| 159 | type octetstring OCT12 length(12) with { variant "FIELDLENGTH(12)" }; |
| 160 | type octetstring OCT13 length(13) with { variant "FIELDLENGTH(13)" }; |
| 161 | type octetstring OCT14 length(14) with { variant "FIELDLENGTH(14)" }; |
| 162 | type octetstring OCT15 length(15) with { variant "FIELDLENGTH(15)" }; |
| 163 | type octetstring OCT16 length(16) with { variant "FIELDLENGTH(16)" }; |
| 164 | type octetstring OCT17 length(17) with { variant "FIELDLENGTH(17)" }; |
| 165 | type octetstring OCT18 length(18) with { variant "FIELDLENGTH(18)" }; |
| 166 | type octetstring OCT19 length(19) with { variant "FIELDLENGTH(19)" }; |
| 167 | type octetstring OCT20 length(20) with { variant "FIELDLENGTH(20)" }; |
| 168 | type octetstring OCT32 length(32) with { variant "FIELDLENGTH(32)" }; |
| 169 | type octetstring OCT34 length(34) with { variant "FIELDLENGTH(34)" }; |
| 170 | type octetstring OCT46 length(46) with { variant "FIELDLENGTH(46)" }; |
| 171 | |
| 172 | //octetstring with length interval |
| 173 | type octetstring OCT1_12 length(1..12) with { variant "" }; |
| 174 | type octetstring OCT1_8 length(1..8) with { variant "" }; |
| 175 | type octetstring OCT3_8 length(3..8) with { variant "" }; |
| 176 | type octetstring OCT1_50 length(1..50) with { variant "" }; |
| 177 | type octetstring OCTN with { variant "" }; |
| 178 | |
| 179 | //bitstring with fixed length |
| 180 | type bitstring BIT1 length(1) with { variant "FIELDLENGTH (1)" }; |
| 181 | type bitstring BIT2 length(2) with { variant "FIELDLENGTH(2)" }; |
| 182 | type bitstring BIT3 length(3) with { variant "FIELDLENGTH(3)" }; |
| 183 | type bitstring BIT4 length(4) with { variant "FIELDLENGTH(4)" }; |
| 184 | type bitstring BIT5 length(5) with { variant "FIELDLENGTH(5)" }; |
| 185 | type bitstring BIT6 length(6) with { variant "FIELDLENGTH(6)" }; |
| 186 | type bitstring BIT7 length(7) with { variant "FIELDLENGTH(7)" }; |
| 187 | type bitstring BIT8 length(8) with { variant "FIELDLENGTH(8)" }; |
| 188 | type bitstring BIT9 length(9) with { variant "FIELDLENGTH(9)" }; |
| 189 | type bitstring BIT12 length(12) with { variant "FIELDLENGTH(12)" }; |
| 190 | type bitstring BIT14 length(14) with { variant "FIELDLENGTH(14)" }; |
| 191 | type bitstring BIT15 length(15) with { variant "FIELDLENGTH(15)" }; |
| 192 | type bitstring BIT16 length(16) with { variant "FIELDLENGTH(16)" }; |
| 193 | type bitstring BIT24 length(24) with { variant "FIELDLENGTH(24)" }; |
| 194 | type bitstring BIT31 length(31) with { variant "FIELDLENGTH(31)" }; |
| 195 | type bitstring BIT56 length(56) with { variant "FIELDLENGTH(56)" }; |
| 196 | |
| 197 | type hexstring HEX1 length(1) with {variant "FIELDLENGTH(1)"}; |
| 198 | |
| 199 | //integer with fixed octet number |
| 200 | type integer INT1 (0..255) with { variant "FIELDLENGTH(8)" }; |
| 201 | type integer LIN1 (0..255) with { variant "FIELDLENGTH(8)" } |
| 202 | type integer LIN2 (0..65535) with { variant "FIELDLENGTH(16)" } |
| 203 | |
| 204 | //integer with fixed bit number |
| 205 | type integer INT7b (0..127) with { variant "FIELDLENGTH(7)" }; |
| 206 | |
| 207 | //integer record |
| 208 | type record of integer Integers; |
| 209 | type record of Integers Integer_array; |
| 210 | |
| 211 | } with {encode "RAW"} // end group SimpleRAWEncodedTypes |
| 212 | |
| 213 | group ComponentTypes |
| 214 | { |
| 215 | type component Dummy_comptype {} |
| 216 | } |
| 217 | |
| 218 | group CompositeTypes |
| 219 | { |
| 220 | type enumerated Protocols |
| 221 | { mtp3, sccp, isup, bicc, qaal2, gcp, bssap, bssmap, ranap, dtap } |
| 222 | |
| 223 | type record of OCT1 OCT1List; |
| 224 | type record of OCT2 OCT2List; |
| 225 | type record of OCT3 OCT3List; |
| 226 | type record of OCT4 OCT4List; |
| 227 | type record of OCT5 OCT5List; |
| 228 | type record of OCT6 OCT6List; |
| 229 | type record of OCT7 OCT7List; |
| 230 | |
| 231 | type record of Dummy_comptype ListOfDummy_comptype; |
| 232 | |
| 233 | type record of Protocols ProtocolList; |
| 234 | } |
| 235 | |
| 236 | }with { encode "RAW"} /* End of module general_typedefs */ |