Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
ebd44bfd
Commit
ebd44bfd
authored
Nov 07, 2016
by
garciay
Browse files
Add external function fx_getDSecond()
parent
a4441d41
Changes
5
Hide whitespace changes
Inline
Side-by-side
javasrc/extfunc/org/etsi/its/extfunc/IItsExternalFunctionsProvider.java
View file @
ebd44bfd
...
...
@@ -46,6 +46,15 @@ public interface IItsExternalFunctionsProvider {
*/
public
IntegerValue
fx_getMinuteOfTheYear
();
/**
* This external function gets the milliseconds point in the current UTC minute
* @return The milliseconds point in the current UTC minute (0..60000)
*
* TTCN-3 signature:
* external function fx_getDSecond() return DSecond;
*/
public
IntegerValue
fx_getDSecond
();
/**
* This external function gets the current time
* @param p_latitudeA Latitude of node A
...
...
javasrc/extfunc/org/etsi/its/extfunc/ItsExternalFunctionsProvider.java
View file @
ebd44bfd
...
...
@@ -155,6 +155,17 @@ public class ItsExternalFunctionsProvider implements IItsExternalFunctionsProvid
return
now
;
}
public
IntegerValue
fx_getDSecond
()
{
IntegerValue
now
=
null
;
//TERFactory.getInstance().logDebug("ItsExternalFunctionsProvider", "fx_getDSecond");
ZonedDateTime
t
=
ZonedDateTime
.
now
(
ZoneOffset
.
UTC
);
now
=
_tcicdWrapper
.
setInteger
(
new
Integer
(
t
.
getSecond
()
+
Math
.
round
(
t
.
getNano
()
/
1000
)));
//TERFactory.getInstance().logDebug("ItsExternalFunctionsProvider", "fx_getDSecond", String.format("%4d", _tcicdWrapper.getBigInteger(now)));
return
now
;
}
/**
* This external function gets the current time
*
...
...
@@ -993,6 +1004,6 @@ public class ItsExternalFunctionsProvider implements IItsExternalFunctionsProvid
}
return
result
;
}
}
// End of class ExternalFunctions
javasrc/tool/org/etsi/its/tool/elvior/PluginAdapter.java
View file @
ebd44bfd
...
...
@@ -287,6 +287,9 @@ public class PluginAdapter implements TriCommunicationSA, TriCommunicationTE, xT
}
else
if
(
functionId
.
getFunctionName
().
endsWith
(
"fx_getMinuteOfTheYear"
))
{
// Gets the the minutes of current UTC year
exec_getMinuteOfTheYear
(
returnValue
);
}
else
if
(
functionId
.
getFunctionName
().
endsWith
(
"fx_getDSecond"
))
{
// Gets the milliseconds point in the current UTC minute
exec_getDSecond
(
returnValue
);
}
else
if
(
functionId
.
getFunctionName
().
endsWith
(
"xf_parseIpv6Address"
))
{
exec_parseIpv6Address
(
parameterList
,
returnValue
);
}
else
if
(
functionId
.
getFunctionName
().
endsWith
(
"fx_hashWithSha256"
)
&&
(
parameterList
.
size
()
==
1
))
{
...
...
@@ -736,6 +739,23 @@ public class PluginAdapter implements TriCommunicationSA, TriCommunicationTE, xT
//_logger.exiting("PluginAdapter", "exec_getMinuteOfTheYear: ", ByteHelper.byteArrayToString(returnValue.getEncodedParameter()));
}
// End of method exec_getMinuteOfTheYear
private
void
exec_getDSecond
(
TriParameter
returnValue
)
{
//_logger.entering("PluginAdapter", "exec_getDSecond");
// Execute the function
IntegerValue
time
=
_extfuncsImpl
.
fx_getDSecond
();
//_logger.info(String.format("exec_getDSecond returns %d", ((IntegerValueEx)time).getInt64()));
returnValue
.
setParameterPassingMode
(
TriParameterPassingMode
.
TRI_OUT
);
returnValue
.
setNumberOfBits
(
Long
.
SIZE
);
returnValue
.
setEncodedParameter
(
ByteHelper
.
longToByteArray
(
((
IntegerValueEx
)
time
).
getInt64
(),
2
/*Short.SIZE / Byte.SIZE*/
// Encoding on 16 bits
));
//_logger.exiting("PluginAdapter", "exec_getDSecond: ", ByteHelper.byteArrayToString(returnValue.getEncodedParameter()));
}
// End of method exec_getDSecond
private
void
exec_generateKeyPair
(
TriParameterList
parameterList
,
TriParameter
returnValue
)
{
_logger
.
entering
(
"PluginAdapter"
,
"exec_generateKeyPair"
);
...
...
javasrc/tool/org/etsi/its/tool/elvior/res/ta.properties
View file @
ebd44bfd
# Debug level - Authorized values: OFF, ALL, INFO, SEVERE
DEBUG_ENABLED
=
OFF
# Define the port/layer configuration for CAM
camPort
=
BTP/GN/ETH
#camPort=BTP/GN/UdpIpCSG
#camPort=BTP/GN/CSG
#camPort=BTP/GN/UdpIpMarben
# Define the port/layer configuration for DENM
denmPort
=
BTP/GN/ETH
#denmPort=BTP/GN/UdpIpCSG
#denmPort=BTP/GN/CSG
#denmPort=BTP/GN/UdpIpMarben
# Define the port/layer configuration for MAPEM-SPATEM
mapemSpatemPort
=
BTP/GN/ETH
#mapemSpatemPort=BTP/GN/CSG
# Define the port/layer configuration for IVIM
ivimPort
=
BTP/GN/ETH
#ivimPort=BTP/GN/CSG
# Define the port/layer configuration for SREM-SSEM
sremSsemPort
=
BTP/GN/ETH
#sremSsemPort=BTP/GN/CSG
# Define the port/layer configuration for BTP
btpPort
=
GN/ETH
# Define the port/layer configuration for GeoNetworking
geoNetworkingPort
=
ETH
#
geoNetworkingPort=ETH
#geoNetworkingPort=UdpIpCSG
#
geoNetworkingPort=CSG
geoNetworkingPort
=
CSG
#geoNetworkingPort=UdpIpMarben
# Define the port/layer configuration for GeoNetworking over IPv6
ipv6OverGeoNetworkingPort
=
Debug
# Define the port/layer configuration for CALM FNTP
#fntpPort=FNTP/ETH
#fntpPort=FNTP/UdpIp
# Define the port/layer configuration for CALM FSAP
#fsapPort=FSAP/UdpIp
#fsapPort=FSAP/UdpIp
# Commsignia RSU and OBU Simulator
#
UpperTesterSettings=10.200.1.101:12345
UpperTesterSettings
=
10.200.1.101:12345
# Commsignia Wireless OBU
#UpperTesterSettings=80.98.62.165:18502
# Savari/VPN
...
...
@@ -44,59 +54,68 @@ ipv6OverGeoNetworkingPort=Debug
# Yogoko/VPN
#UpperTesterSettings=192.168.201.2:12345
# Home laptop
UpperTesterSettings
=
192.168.1.53:12345
#
UpperTesterSettings=192.168.1.53:12345
# Marben Jupiter VM32G upper tester
#UpperTesterSettings=192.168.7.182:10005
# Nordsys upper tester
#UpperTesterSettings=172.23.0.1:1234
# RSU simulator
ConfigTesterSettings
=
10.200.1.102:12346
# Peer ITS station
#LinkLayer_Peer=001C6B0D0
1
99
#LinkLayer_Peer=001C6B0D0
0
99
# Define the MAC address of the Ethernet interface connected to the IUT device
# Home laptop VMWare MAC address
#LocalEthernetMAC=005056C00008
# Home laptop MAC address (Wireless)
LocalEthernetMAC
=
DC536045AF7E
#LocalEthernetMAC=DC536045AF7E
# Home laptop MAC address (Wired)
LocalEthernetMAC
=
F8CAB8083918
# Home laptop/VPN MAC address
#LocalEthernetMAC=00FF6BADBFC2
# ETSI computer MAC address
#LocalEthernetMAC=0022191B7FDB
# G5 bridge connected on USB3/Ethernet
#LocalEthernetMAC=00E08F008855
# Post-mortem ATS execution mode (G5 raw Ethernet only)
OfflineMode
=
false
#PcapFile=pcap/vendor/Livorno 20160914-2 DENM Full packet.pcap
PcapFile
=
F:/FSCOM/ETSI/ITS/STF517_ITS_Valid_Conform_Frmwk.2016/ITS-CMS5 PreQ/Savari/TC_SEC_ITSS_SND_MSG_01_01_BV.pcap
# Start at time in seconds since 1970-01-01, e.g. 1421661427.233361
OffsetTime
=
0
# Define the Ethernet type value used by the IUT
IutEthernetTypeValue
=
0x8947
# Node Ethernet addresses
LinkLayer_MTC
=
001C6B0D0
1
00
LinkLayer_MTC
=
001C6B0D0
0
00
# Link-Layer address of component NodeA
LinkLayer_NodeA
=
001C6B0D0
1
01
LinkLayer_NodeA
=
001C6B0D0
0
01
# Link-Layer address of component NodeB
LinkLayer_NodeB
=
001C6B0D0
1
02
LinkLayer_NodeB
=
001C6B0D0
0
02
# Link-Layer address of component NodeC
LinkLayer_NodeC
=
001C6B0D0
1
03
LinkLayer_NodeC
=
001C6B0D0
0
03
# Link-Layer address of component NodeD
LinkLayer_NodeD
=
001C6B0D0
1
04
LinkLayer_NodeD
=
001C6B0D0
0
04
# Link-Layer address of component NodeE
LinkLayer_NodeE
=
001C6B0D0
1
05
LinkLayer_NodeE
=
001C6B0D0
0
05
# Link-Layer address of component NodeF
LinkLayer_NodeF
=
001C6B0D0
1
06
LinkLayer_NodeF
=
001C6B0D0
0
06
# Link-Layer address of component NodeG
LinkLayer_NodeG
=
001C6B0D0
1
07
LinkLayer_NodeG
=
001C6B0D0
0
07
# Link-Layer address of component NodeH
LinkLayer_NodeH
=
001C6B0D0
1
08
LinkLayer_NodeH
=
001C6B0D0
0
08
# Link-Layer address of component NodeI
LinkLayer_NodeI
=
001C6B0D0
1
09
LinkLayer_NodeI
=
001C6B0D0
0
09
# Link-Layer address of component NodeJ
LinkLayer_NodeJ
=
001C6B0D010A
LinkLayer_NodeJ
=
001C6B0D000A
# Interval between each beacon sent by TS (ms)
TsBeaconInterval
=
1000
# Latitude of Test System
#Commsignia TsLatitude=435525450
#Yogoko TsLatitude=481210840
...
...
@@ -120,4 +139,3 @@ TsSecuredRootPath=data/certificates
# Secured root path to access certificates and private keys
TsSecuredConfiId
=
javasrc/tool/org/etsi/its/tool/testingtech/ExternalFunctionsPluginProvider.java
View file @
ebd44bfd
...
...
@@ -158,6 +158,17 @@ public class ExternalFunctionsPluginProvider implements ExternalFunctionsProvide
return
_externalFunctionsPluginProvider
.
fx_getMinuteOfTheYear
();
}
/**
* This external function gets the milliseconds point in the current UTC minute
* @return The milliseconds point in the current UTC minute (0..60000)
*
* TTCN-3 signature:
* external function fx_getDSecond() return DSecond;
*/
public
IntegerValue
fx_getDSecond
()
{
return
_externalFunctionsPluginProvider
.
fx_getDSecond
();
}
/**
* External function to compute timestamp based on current time
* @return Unix-Epoch-Time mod 2^32
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment