Project

General

Profile

Titan TTCN3 Notes » History » Revision 2

Revision 1 (laforge, 07/17/2017 06:00 PM) → Revision 2/31 (laforge, 07/17/2017 08:33 PM)

h1. Titan TTCN3 Notes 

 Some notes about developing in Titan TTCN3, specifically regarding test cases in the Osmocom universe. 

 h2. RAW coder 

 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. 

 Section 4.23 of the _Programmer's Technical Reference Guide for the TITAN TTCN-3 Toolset_ contains the description of this RAW coder 

 


 h3. FIELDORDER 

 This determines the order of fields within a record or set type. 

 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. 

 Example: TS 44.018 SYSTEM INFORMATION TYPE 4: 

  
  * L1 Pseudl Length (1) 
  * protocol descriptor (1/2) 
  * skip indicator (1/2) 
  * Message Type (1) 

 which then translates to: 

 <pre> 
         type record RrHeader { 
                 L2PseudoLength    l2_plen, 
                 uint4_t           skip_indicator, 
                 uint4_t           rr_protocol_discriminator, 
                 RrMessageType     message_type 
         } with { variant "FIELDORDER(msb)" }; 
 </pre> 

 Note the skip_indicator and rr_protocol_discriminator fields are swapped in their order compared to the spec! 


Add picture from clipboard (Maximum size: 48.8 MB)