New Solaris Makefile.personal added
[deliverable/titan.core.git] / regression_test / ttcn2json / one.ttcn
CommitLineData
970ed795
EL
1/******************************************************************************
2 * Copyright (c) 2000-2014 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
8
9module one {
10type record Rec {
11 integer num,
12 universal charstring str
13} with {
14 variant(num) "JSON : default(0)";
15 variant(str) "JSON : default(empty)";
16}
17
18type set Set {
19 octetstring os,
20 boolean buul optional,
21 verdicttype verd optional,
22 float numbr
23} with {
24 variant(numbr) "JSON : default(-infinity)";
25 variant(buul) "JSON:omit as null";
26}
27
28type union Uni {
29 float numbr,
30 octetstring bytes
31}
32
33type record HasAny {
34 integer num,
35 anytype at
36}
37
38type enumerated Height { Short, Medium, Tall };
39
40type enumerated Width { Thin, Medium, Wide };
41
42external function f_enc_rec(in Rec x) return octetstring
43 with { extension "prototype(convert) encode(JSON)" }
44
45external function f_dec_rec(in octetstring octie) return Rec
46 with { extension "prototype(convert) decode(JSON) errorbehavior(ALL:WARNING,INVAL_MSG:ERROR)" }
47
48} with {
49 encode "JSON";
50 extension "anytype integer,boolean,bitstring";
51}
This page took 0.025048 seconds and 5 git commands to generate.