Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
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
/**
* @author STF 424_ITS_Test_Platform
* @version $id$
*/
package org.etsi.tool.testingtech;
import java.math.BigInteger;
import org.etsi.codec.ITciCDWrapper;
import org.etsi.ttcn.tci.FloatValue;
import org.etsi.ttcn.tci.IntegerValue;
import org.etsi.ttcn.tci.OctetstringValue;
import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value;
import de.tu_berlin.cs.uebb.muttcn.runtime.RB;
/** This class implements the ITciCDWrapper interface
*
* Note that the TCI Codec Interface (TCI-CD) describes the operations a TTCN-3 Executable is required to implement and the operations a codec implementation for a certain encoding scheme shall provide to the TE
*
* See ETSI ES 201 873-6 V4.2.1 - Clause 7.3.2.1 TCI-CD required
*/
public class TciCDWrapper implements ITciCDWrapper {
/**
* RuntimeBehavior instance reference
*/
private RB _rb;
/**
* Specialized ctor
* @param rb TTCN-3 runtime reference
*/
public TciCDWrapper(final RB rb) {
_rb = rb;
}
/** Constructs and returns a basic TTCN-3 float type
*
* See ETSI ES 201 873-6 V4.2.1 - 7.3.2.1.3 getFloat
* @return An instance of Type representing a TTCN-3 float type
*/
@Override
public FloatValue getFloat() {
return (FloatValue)_rb.getTciCDRequired().getFloat().newInstance();
}
/** Constructs and returns a basic TTCN-3 integer type
*
* See ETSI ES 201 873-6 V4.2.1 - 7.3.2.1.2 getInteger
* @return An instance of Type representing a TTCN-3 integer type
*/
@Override
public IntegerValue getInteger() {
return (IntegerValue)_rb.getTciCDRequired().getInteger().newInstance();
}
/** Constructs and returns a basic TTCN-3 integer type
*
* See ETSI ES 201 873-6 V4.2.1 - 7.3.2.1.2 getInteger
* @return An instance of Type representing a TTCN-3 integer type
*/
@Override
public OctetstringValue getOctetstring() {
return (OctetstringValue)_rb.getTciCDRequired().getOctetstring().newInstance();
}
@Override
public IntegerValue getBigInteger(BigInteger bigInt) {
return (IntegerValue)_rb.getTciCDRequired().getInteger().newInstance();
}
@Override
public Value getUnionValue(Type decodingHypothesis, String variantName) {
// TODO Auto-generated method stub
throw new RuntimeException("Not implemented for TTWB");
}
@Override
public Type getTypeForName(String type) {
return _rb.getTciCDRequired().getTypeForName(type);
}
} // End of class TciCDWrapper