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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
* @author STF 424_ITS_Test_Platform
* @version $id$
*/
package org.etsi.its.extfunc;
import org.etsi.ttcn.tci.CharstringValue;
import org.etsi.ttcn.tci.FloatValue;
import org.etsi.ttcn.tci.IntegerValue;
import org.etsi.ttcn.tci.OctetstringValue;
/**
* This interface provides the list of the TTCN-3 external function to be implemented
*
* Refer to TTCN-3 modules LibItsGeoNetworking_Functions and LibItsCommon_Functions
*/
public interface IItsExternalFunctionsProvider {
/**
* This external function gets the current time
* @return The current time in Epoch format
*
* TTCN-3 signature:
* external function fx_getCurrentTime() return TimestampIts;
*/
public IntegerValue fx_getCurrentTime();
/**
* This external function gets the current time
* @param p_latitudeA Latitude of node A
* @param p_longitudeA Longitude of node A
* @param p_latitudeB Latitude of node B
* @param p_longitudeB Longitude of node B
* @return The current time in Epoch format
*
* TTCN-3 signature:
* external function fx_computeDistance(in UInt32 p_latitudeA, in UInt32 p_longitudeA, in UInt32 p_latitudeB, in UInt32 p_longitudeB) return float;
*/
public FloatValue fx_computeDistance(final IntegerValue p_latitudeA, final IntegerValue p_longitudeA, final IntegerValue p_latitudeB, final IntegerValue p_longitudeB);
/**
* External function to compute a position using a reference position, a distance and an orientation
* @param p_iutLongPosVector Reference position
* @param p_distance Distance to the reference position (in meter)
* @param p_orientation Direction of the computed position (0 to 359; 0 means North)
* @param p_latitude Computed position's latitude
* @param p_longitude Computed position's longitude
*
* TTCN-3 signature:
* external function fx_computePositionUsingDistance(in UInt32 p_refLatitude, in Uint32 p_refLongitude, in integer p_distance, in integer p_orientation, out UInt32 p_latitude, out UInt32 p_longitude);
*/
public void fx_computePositionUsingDistance(final IntegerValue p_refLatitude, final IntegerValue p_refLongitude, final IntegerValue p_distance, final IntegerValue p_orientation, IntegerValue p_latitude, IntegerValue p_longitude);
/**
* External function to compute radius of a given circular area
* @param p_squareMeters Square meters of an circular area
* @return Computed radius in meters
*/
public FloatValue fx_computeRadiusFromCircularArea(final FloatValue p_squareMeters);
/**
* External function to compute timestamp based on current time
* @return Unix-Epoch-Time mod 2^32
*
* TTCN-3 signature:
* external function fx_computeGnTimestamp() return UInt32;
*/
public IntegerValue fx_computeGnTimestamp();
/**
* @desc Calculate ICMPv6 checksum on pseudo header according RFC 4443 - Clause 2.3
* @param p_sourceAddress Source address,
* @param p_destinationAddress Destination address
* @param p_payloadLength Upper-Layer Packet Length
* @param p_payload Upper-Layer payload
* @param p_nextHdr Next header value (e.g. 0x3a for ICMPv6)
* @return The checksum value
* @see RFC 2460 IPv6 Specification
*
* TTCN-3 signature:
* external function fx_computeIPv6CheckSum(
* in template (value) Ipv6Address p_sourceAddress,
* in template (value) Ipv6Address p_destinationAddress,
* in template (value) integer p_payloadLength,
* in template (value) octetstring p_payload,
* in template (value) integer p_nextHdr
* ) return Oct2;
* <pre>
* Pseudo header is defined by RFC 2460 - Clause 8.1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | |
* + +
* | |
* + Source Address +
* | |
* + +
* | |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | |
* + +
* | |
* + Destination Address +
* | |
* + +
* | |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Upper-Layer Packet Length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | zero | Next Header |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* </pre>
*/
public OctetstringValue fx_computeIPv6CheckSum(
final OctetstringValue p_sourceAddress,
final OctetstringValue p_destinationAddress,
final IntegerValue p_payloadLength,
final OctetstringValue p_payload,
final IntegerValue p_nextHdr
);
public OctetstringValue xf_parseIpv6Address(final CharstringValue p_textIpv6Address);
}