TTCN example

x
 
1
module Templates {
2
  /* import types from ASN.1 */
3
  import from Types language "ASN.1:1997" all;
4
5
  /* During the conversion phase from ASN.1 to TTCN-3 */
6
  /* - the minus sign (Message-Type) within the identifiers will be replaced by underscore (Message_Type)*/
7
  /* - the ASN.1 identifiers matching a TTCN-3 keyword (objid) will be postfixed with an underscore (objid_)*/
8
9
  // simple types
10
11
  template SenderID localObjid := objid {itu_t(0) identified_organization(4) etsi(0)};
12
13
  // complex types
14
15
  /* ASN.1 Message-Type mapped to TTCN-3 Message_Type */
16
  template Message receiveMsg(template (present) Message_Type p_messageType) := {
17
    header := p_messageType,
18
    body := ?
19
  }
20
21
  /* ASN.1 objid mapped to TTCN-3 objid_ */
22
  template Message sendInviteMsg := {
23
      header := inviteType,
24
      body := {
25
        /* optional fields may be assigned by omit or may be ignored/skipped */
26
        description := "Invite Message",
27
        data := 'FF'O,
28
        objid_ := localObjid

Language: Testing and Test Control Notation (TTCN)

MIME types defined: text/x-ttcn, text/x-ttcn3, text/x-ttcnpp.


The development of this mode has been sponsored by Ericsson .

Coded by Asmelash Tsegay Gebretsadkan