UsefulTtcn3Types.ttcn 3.25 KB
Newer Older
1 2 3 4 5 6 7 8
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     oneM2M
9
 *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/UsefulTtcn3Types.ttcn $
10 11 12 13
 *              $Id: UsefulTtcn3Types.ttcn 234 2017-03-20 16:37:29Z reinaortega $
 *  @desc       Useful types
 *
 */
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
module UsefulTtcn3Types {


    type integer byte (-128 .. 127) with { variant "/* 8 bit */" };

    type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" };

    type integer short (-32768 .. 32767) with { variant "/*16 bit*/" };

    type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" };

    type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" };

    type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" };

    type integer longlong /* (  -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" };

    type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" };

    type float IEEE754float with { variant "/*IEEE754 float*/" };

    type float IEEE754double with { variant "/*IEEE754 double*/" };

    type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" };

    type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" };

    type universal charstring utf8string with { variant "/*UTF-8*/" };

    type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" };

    type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" };

    type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" };

    type record IDLfixed
    {
    	unsignedshort digits,
    	short scale,
    	charstring value_
    }
    with {
    variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/";
    };

    /*
    type charstring char length (1);

    NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal
    charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as
    identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility
    with previous versions of the TTCN-3 standard. (except Titan doesn't)

    NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding
    for its values. Also, other properties of the base type can be changed by using attribute mechanisms.
    */

    type universal charstring uchar length (1);

    /*
    NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given
    encoding for its values. Also, other properties of the base type can be changed by using attribute
    mechanisms.
    */

    type bitstring bit length (1);

    type hexstring hex length (1);

    type octetstring octet length (1);

}
with {
encode "XML";
}