Titan TTCN3 Notes » History » Version 3
msuraev, 08/24/2017 04:50 PM
1 | 1 | laforge | h1. Titan TTCN3 Notes |
---|---|---|---|
2 | |||
3 | Some notes about developing in Titan TTCN3, specifically regarding test cases in the Osmocom universe. |
||
4 | |||
5 | h2. RAW coder |
||
6 | |||
7 | A lot of the messages (GSMTAP, LAPDm, L1CTL, ...) are described using the Titan extensions to the TTCN-3 type language and the associated RAW coder. |
||
8 | |||
9 | Section 4.23 of the _Programmer's Technical Reference Guide for the TITAN TTCN-3 Toolset_ contains the description of this RAW coder |
||
10 | |||
11 | h3. FIELDORDER |
||
12 | |||
13 | This determines the order of fields within a record or set type. |
||
14 | |||
15 | In (not only) GSM specs, typically the messages are described from first field at top to the last field at the bottom, so the logical choice here is to set "FIELDORDER(msb)" as we do in the GMS_Types.ttcn and other files. However, there's one CAVEAT: In GSM 04.08 (and derived specs), Information Elements with 1/2 (4bit) length are ordered un-intitively. |
||
16 | |||
17 | Example: TS 44.018 SYSTEM INFORMATION TYPE 4: |
||
18 | 2 | laforge | |
19 | 1 | laforge | * L1 Pseudl Length (1) |
20 | * protocol descriptor (1/2) |
||
21 | * skip indicator (1/2) |
||
22 | * Message Type (1) |
||
23 | |||
24 | which then translates to: |
||
25 | |||
26 | <pre> |
||
27 | type record RrHeader { |
||
28 | L2PseudoLength l2_plen, |
||
29 | uint4_t skip_indicator, |
||
30 | uint4_t rr_protocol_discriminator, |
||
31 | RrMessageType message_type |
||
32 | } with { variant "FIELDORDER(msb)" }; |
||
33 | </pre> |
||
34 | |||
35 | Note the skip_indicator and rr_protocol_discriminator fields are swapped in their order compared to the spec! |
||
36 | 3 | msuraev | |
37 | |||
38 | h2. Dependencies |
||
39 | |||
40 | @sysinfo/gen_links.sh@ needs following repositories under @BASEDIR@ directory: |
||
41 | <pre> |
||
42 | git clone https://github.com/eclipse/titan.TestPorts.IPL4asp.git |
||
43 | git clone https://github.com/eclipse/titan.TestPorts.TELNETasp.git |
||
44 | git clone https://github.com/eclipse/titan.TestPorts.Common_Components.Socket-API.git |
||
45 | git clone https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git |
||
46 | </pre> |