Project

General

Profile

Titan TTCN3 Notes » History » Version 5

msuraev, 08/29/2017 09:34 AM

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
h2. Dependencies
38
39 5 msuraev
You'll need recent enough eclipse-titan installed: 6.2.0 is working fine, 5.5.1 is too old.
40
41 3 msuraev
@sysinfo/gen_links.sh@ needs following repositories under @BASEDIR@ directory:
42
<pre>
43
git clone https://github.com/eclipse/titan.TestPorts.IPL4asp.git
44
git clone https://github.com/eclipse/titan.TestPorts.TELNETasp.git
45
git clone https://github.com/eclipse/titan.TestPorts.Common_Components.Socket-API.git
46
git clone https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git
47 1 laforge
</pre>
48 4 laforge
49
See http://git.osmocom.org/docker-playground/tree/debian-stretch-titan/Dockerfile for a full list of dependencies
Add picture from clipboard (Maximum size: 48.8 MB)