Commit 26b8f58b authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in AtsGeoNetworking: Some tests cases were missing

parent 4e18f38c
......@@ -199,7 +199,7 @@ module LibItsGeoNetworking_Functions {
// Disconnect
f_disconnect4SelfOrClientSync();
} // end f_cf01Down
} // End of function f_cf01Down
/**
* @desc This configuration features:
......@@ -270,7 +270,7 @@ module LibItsGeoNetworking_Functions {
}
}
} // end f_cf02Up
} // End of group f_cf02Up
/**
* @desc Deletes configuration cf02
......@@ -293,7 +293,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf02Down
} // End of group f_cf02Down
/**
* @desc This configuration features:
......@@ -364,7 +364,7 @@ module LibItsGeoNetworking_Functions {
}
}
} // end f_cf03Up
} // End of group f_cf03Up
/**
* @desc Deletes configuration cf03
......@@ -387,7 +387,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf03Down
} // End of group f_cf03Down
/**
* @desc This configuration features:
......@@ -460,7 +460,7 @@ module LibItsGeoNetworking_Functions {
}
}
} // end f_cf04Up
} // End of group f_cf04Up
/**
* @desc Deletes configuration cf04
......@@ -483,7 +483,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf04Down
} // End of group f_cf04Down
/**
* @desc This configuration features:
......@@ -574,7 +574,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf05Down
} // End of group f_cf05Down
/**
* @desc This configuration features:
......@@ -666,7 +666,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf06Down
} // End of group f_cf06Down
/**
* @desc This configuration features:
......@@ -757,7 +757,7 @@ module LibItsGeoNetworking_Functions {
unmap(self:utPort, system:utPort);
disconnect(self:syncPort, mtc:syncPort);
} // end f_cf07Down
} // End of group f_cf07Down
/**
* @desc Behavior function for initializing component's variables and tables
......@@ -778,7 +778,7 @@ module LibItsGeoNetworking_Functions {
vc_localSeqNumber := f_getInitialSequenceNumber();
vc_multipleMessagesCount := f_getMessageCount();
} // end f_initialiseComponent
} // End of function f_initialiseComponent
/**
* @desc Makes the simulated ITS node behave as a neighbour of IUT
......@@ -788,7 +788,7 @@ module LibItsGeoNetworking_Functions {
vc_neighbourDefault := activate(a_neighbourDefault());
f_acTriggerEvent(m_startBeaconing(m_beaconHeader(f_getPosition(vc_componentName)).beaconHeader));
f_sleepIgnoreDef(PX_NEIGHBOUR_DISCOVERY_DELAY);
} // end f_startBeingNeighbour
} // End of function f_startBeingNeighbour
/**
* @desc Makes the simulated ITS node behave as not being a neighbour of IUT
......@@ -799,7 +799,7 @@ module LibItsGeoNetworking_Functions {
if (PICS_GN_SECURITY == true) {
deactivate(vc_neighbourDefault);
}
} // end f_stopBeingNeighbour
} // End of function f_stopBeingNeighbour
/**
* @desc Initialise secure mode if required
......@@ -834,7 +834,7 @@ module LibItsGeoNetworking_Functions {
}
} // End of function f_uninitialiseSecuredMode()
} // end geoConfigurationFunctions
} // End of group geoConfigurationFunctions
group componentFunctions {
/**
......@@ -1201,7 +1201,7 @@ module LibItsGeoNetworking_Functions {
return fx_computeDistance(p_pointA.latitude, p_pointA.longitude, p_pointB.latitude, p_pointB.longitude);
}
} // end geoPositionFunctions
} // End of group geoPositionFunctions
group geoAltsteps {
......@@ -1397,7 +1397,7 @@ module LibItsGeoNetworking_Functions {
[vc_gnDefaultActive] a_receiveGeoUnicast(?, ?) {}
}
} // end geoGeoUnicastAltsteps
} // End of group geoGeoUnicastAltsteps
group geoGeoBroadcastAltsteps {
......@@ -1466,7 +1466,7 @@ module LibItsGeoNetworking_Functions {
}
}
} // end geoGeoBroadcastAltsteps
} // End of group geoGeoBroadcastAltsteps
group geoGeoAnycastAltsteps {
......@@ -1537,7 +1537,7 @@ module LibItsGeoNetworking_Functions {
}
}
} // end geoGeoAnycastAltsteps
} // End of group geoGeoAnycastAltsteps
group geoLocationServiceAltsteps {
......@@ -1610,10 +1610,10 @@ module LibItsGeoNetworking_Functions {
}
}
} // end geoLocationServiceAltsteps
} // End of group geoLocationServiceAltsteps
} // end geoAltsteps
} // End of group geoAltsteps
group preambles {
......@@ -1739,7 +1739,7 @@ module LibItsGeoNetworking_Functions {
return v_ret;
}
} // end preambles
} // End of group preambles
group postambles {
......@@ -1758,7 +1758,7 @@ module LibItsGeoNetworking_Functions {
f_poDefault();
}
} // end postambles
} // End of group postambles
group adapterControl {
......@@ -1918,7 +1918,7 @@ module LibItsGeoNetworking_Functions {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_loadScenario(p_scenario));
}
} // end f_acLoadScenario
} // End of function f_acLoadScenario
/**
* @desc Starts a loaded scenario
......@@ -1929,7 +1929,7 @@ module LibItsGeoNetworking_Functions {
f_acTriggerGnssEvent(m_startScenario);
vc_scenarioStarted := true;
}
} // end f_acStartScenario
} // End of function f_acStartScenario
/**
* @desc Stops a loaded scenario
......@@ -1940,7 +1940,7 @@ module LibItsGeoNetworking_Functions {
f_acTriggerGnssEvent(m_stopScenario);
vc_scenarioStarted := false;
}
} // end f_acStopScenario
} // End of function f_acStopScenario
function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsBaseGeoNetworking return FncRetCode {
var FncRetCode v_ret := e_success;
......@@ -1966,9 +1966,9 @@ module LibItsGeoNetworking_Functions {
}
return v_ret;
} // end f_acAwaitTimeInRunningScenario
} // End of function f_acAwaitTimeInRunningScenario
} // end adapterControl
} // End of group adapterControl
group commonFunctions {
......@@ -2009,7 +2009,7 @@ module LibItsGeoNetworking_Functions {
return v_timestamp;
}
} // end commonFunctions
} // End of group commonFunctions
group testerFunctions {
......@@ -2120,7 +2120,7 @@ module LibItsGeoNetworking_Functions {
return PX_MESSAGE_COUNT;
}
} // end testerFunctions
} // End of group testerFunctions
group iutFunctions {
......@@ -2155,19 +2155,19 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Gets the GeoUnicast forwarding algorithm
* @return IUT's GeoUnicast forwarding algorithm
* @see PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM
* @see PICS_GN_NON_AREA_FORWARDING_ALGORITHM
*/
function f_getGeoUnicastForwardingAlgorithm() return GeoUnicastForwardingAlgorithm {
return PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM;
function f_getNonAreaForwardingAlgorithm() return NonAreaForwardingAlgorithm {
return PICS_GN_NON_AREA_FORWARDING_ALGORITHM;
}
/**
* @desc Gets the GeoBroadcast forwarding algorithm
* @return IUT's GeoBroadcast forwarding algorithm
* @see PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM
* @see PICS_GN_AREA_FORWARDING_ALGORITHM
*/
function f_getGeoBroadcastForwardingAlgorithm() return GeoBroadcastForwardingAlgorithm {
return PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM;
function f_getAreaForwardingAlgorithm() return AreaForwardingAlgorithm {
return PICS_GN_AREA_FORWARDING_ALGORITHM;
}
/**
......@@ -2288,7 +2288,7 @@ module LibItsGeoNetworking_Functions {
var integer v_itsGnLocationServicePacketBufferSize := PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE;
return v_itsGnLocationServicePacketBufferSize;
} // end f_getLsPacketBufferSize
} // End of function f_getLsPacketBufferSize
/**
* @desc Gets the UC forwarding packet buffer size.
......@@ -2299,7 +2299,7 @@ module LibItsGeoNetworking_Functions {
var integer v_itsGnUcForwardingPacketBufferSize := PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE;
return v_itsGnUcForwardingPacketBufferSize * 1024;
} // end f_getUcForwardingPacketBufferSize
} // End of function f_getUcForwardingPacketBufferSize
/**
* @desc Gets the BC forwarding packet buffer size.
......@@ -2310,7 +2310,7 @@ module LibItsGeoNetworking_Functions {
var integer v_itsGnBcForwardingPacketBufferSize := PICS_GN_BC_FORWARDING_PACKET_BUFFER_SIZE;
return v_itsGnBcForwardingPacketBufferSize * 1024;
} // end f_getBcForwardingPacketBufferSize
} // End of function f_getBcForwardingPacketBufferSize
/**
* @desc Gets the maximum lifetime of a packet.
......@@ -2392,7 +2392,7 @@ module LibItsGeoNetworking_Functions {
var float v_itsGnLifetimeLocTableEntry := int2float(PICS_GN_LIFETIME_LOC_TE);
return v_itsGnLifetimeLocTableEntry;
} // end f_getLifetimeLocTableEntry
} // End of function f_getLifetimeLocTableEntry
/**
* @desc Gets the maximum communication range for CBF algorithm
......@@ -2403,37 +2403,25 @@ module LibItsGeoNetworking_Functions {
var integer v_maxCommunicationRange := PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE;
return v_maxCommunicationRange;
} // end f_getCbfMaxCommunicationRange
} // End of function f_getCbfMaxCommunicationRange
function f_getGeoUnicastCbfMaxTime() return integer {
var integer v_cbfMaxTime := PICS_GN_GEOUNICAST_CBF_MAX_TIME;
function f_getCbfMaxTime() return integer {
var integer v_cbfMaxTime := PICS_GN_CBF_MAX_TIME;
return v_cbfMaxTime;
} // end f_getGeoUnicastCbfMaxTime
return v_cbfMaxTime;
} // End of function f_getCbfMaxTime
function f_getGeoUnicastCbfMinTime() return integer {
var integer v_cbfMinTime := PICS_GN_GEOUNICAST_CBF_MIN_TIME;
function f_getCbfMinTime() return integer {
var integer v_cbfMinTime := PICS_GN_CBF_MIN_TIME;
return v_cbfMinTime;
} // end f_getGeoUnicastCbfMinTime
function f_getGeoBroadcastCbfMaxTime() return integer {
var integer v_cbfMaxTime := PICS_GN_GEOBROADCAST_CBF_MAX_TIME;
return v_cbfMaxTime;
} // end f_getGeoBroadcastCbfMaxTime
function f_getGeoBroadcastCbfMinTime() return integer {
var integer v_cbfMinTime := PICS_GN_GEOBROADCAST_CBF_MIN_TIME;
return v_cbfMinTime;
} // end f_getGeoBroadcastCbfMinTime
return v_cbfMinTime;
} // End of function f_getCbfMinTime
function f_getGnMaxAreaSize() return float {
var float v_maxAreaSize := PICS_GN_MAX_GEO_AREA_SIZE;
return v_maxAreaSize;
} // end f_getGnMaxAreaSize
} // End of function f_getGnMaxAreaSize
function f_getAdvancedGbcForwardingMaxCounter() return integer {
var integer v_maxCounter := PICS_GN_ADVANCED_BC_FORWARDING_MAX_COUNTER;
......@@ -2450,7 +2438,7 @@ module LibItsGeoNetworking_Functions {
f_acStartBeaconingMultipleNeighbour(v_nrNeighbour);
} // end f_setNrNeighbourLocTableDefault
} // End of function f_setNrNeighbourLocTableDefault
/**
* @desc Set the number of neighbour in the Location Table (medium).
......@@ -2462,7 +2450,7 @@ module LibItsGeoNetworking_Functions {
f_acStartBeaconingMultipleNeighbour(v_nrNeighbour);
} // end f_setNrNeighbourLocTableMedium
} // End of function f_setNrNeighbourLocTableMedium
/**
* @desc Set the number of neighbour in the Location Table (maximum).
......@@ -2474,9 +2462,9 @@ module LibItsGeoNetworking_Functions {
f_acStartBeaconingMultipleNeighbour(v_nrNeighbour);
} // end f_setNrNeighbourLocTableMaximum
} // End of function f_setNrNeighbourLocTableMaximum
} // end iutFunctions
} // End of group iutFunctions
group posVectorFunctions {
......@@ -2539,7 +2527,7 @@ module LibItsGeoNetworking_Functions {
return v_result;
}
} // end posVectorFunctions
} // End of group posVectorFunctions
group externalFunctions {
......@@ -2594,7 +2582,7 @@ module LibItsGeoNetworking_Functions {
) {
// Nothing to do
}
} // End of altstep a_securedMessageWithCertificate
} // End of 'altstep' a_securedMessageWithCertificate
/**
* @desc Receive GN message with security containing digest as a signer info
......@@ -2652,9 +2640,9 @@ module LibItsGeoNetworking_Functions {
* @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info
* @return the certificate chain used for sign received message
*/
function f_askForCertificateChain (in template(value) octetstring p_CamPayload)
runs on ItsGeoNetworking
return boolean {
function f_askForCertificateChain(
in template(value) octetstring p_CamPayload
) runs on ItsGeoNetworking return boolean {
var EtsiTs103097Data v_recv;
var boolean v_ret := false;
......@@ -2772,7 +2760,7 @@ module LibItsGeoNetworking_Functions {
m_geoNwSecPdu(
v_gnNonSecuredPacket,
v_securedMessage
) // End of template m_geoNwSecPdu
)
)); // End of template m_geoNwReq_linkLayerBroadcast
// Send Message
......@@ -2834,11 +2822,12 @@ module LibItsGeoNetworking_Functions {
* @param p_msg GeoNetworking packet
* @return the EtsiTs103097Data if any
*/
function f_getSecuredMessage(in GeoNetworkingPdu p_msg)
return EtsiTs103097Data {
function f_getSecuredMessage(
in GeoNetworkingPdu p_msg
) return EtsiTs103097Data {
return p_msg.gnPacket.securedMsg;
}
}
} // end LibItsGeoNetworking_Functions
} // End of module LibItsGeoNetworking_Functions
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Pics.ttcn $
* $Id: LibItsGeoNetworking_Pics.ttcn,v 1.4 2018/05/31 15:57:10 dte Exp $
* @version $URL$
* $Id$
* @desc GeoNetworking PICS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......@@ -23,7 +23,7 @@ module LibItsGeoNetworking_Pics {
/**
* @desc GeoNetworking address of the GeoAdhoc router
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar GN_Address PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_manual,
......@@ -34,43 +34,43 @@ module LibItsGeoNetworking_Pics {
/**
* @desc Is address manually configured
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar GnAddressConfigurationMethod PICS_GN_LOCAL_ADDR_CONF_METHOD := e_anonymous;
/**
* @desc Is the IUT mobile?
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar boolean PICS_GN_IS_MOBILE := true;
/**
* @desc Minimum update frequency of local position vector (LPV) in ms
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_MINIMUM_UPDATE_FREQUENCY_LPV := 1000;
/**
* @desc Maximum size of GN-SDU [bytes]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_MAX_SDU_SIZE := 1398;
/**
* @desc GN_MAX: Maximum size of GeoNetworking header [bytes]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_MAX_GN_HEADER_SIZE := 88;
/**
* @desc Lifetime of location table entry [s]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_LIFETIME_LOC_TE := 20;
/**
* @desc GN Security support enabled or disabled
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
* @remark This PIC is different than PICS_IS_IUT_SECURED.
* When set to true, this PIC indicates that the GeoNetworking is running with security ATS
* UtInitialse shall indicate which certificate the IUT shall use
......@@ -79,271 +79,289 @@ module LibItsGeoNetworking_Pics {
/**
* @desc Maximum number of retransmissions of LS_REQUEST packets
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_LOCATION_SERVICE_MAX_RETRANS := 10;
/**
* @desc Duration of Location service retransmit timer [ms]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_LOCATION_SERVICE_RETRANSMIT_TIMER := 1000;
/**
* @desc Size of Location service packet buffer [Byte]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE := 1024;
/**
* @desc Duration of Beacon service retransmit timer [ms]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_BEACON_SERVICE_RETRANSMIT_TIMER := 3000;
/**
* @desc Maximum beacon jitter [ms]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_BEACON_SERVICE_MAX_JITTER := 750;
/**
* @desc Default hop limit indicating the maximum number of hops a packet travels
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar UInt8 PICS_GN_DEFAULT_HOP_LIMIT := 10;
/**
* @desc Upper limit of the maximum lifetime [s]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_MAX_PACKET_LIFETIME := 600;
/**
* @desc Lower limit of the packet repetition interval [km^2]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar float PICS_GN_MAX_GEO_AREA_SIZE:= 10.0;
/**
* @desc Lower limit of the packet repetition interval [ms]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_MIN_PACKET_REPETITION_INTERVAL := 100;
/**
* @desc Default GeoUnicast forwarding algorithm
* @see ETSI TS 102 871-2 Table 4
* @desc Default NON-AREA forwarding algorithm
* @see ETSI TS 102 871-1 Table 1
*/
modulepar GeoUnicastForwardingAlgorithm PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM := e_greedy;
modulepar NonAreaForwardingAlgorithm PICS_GN_NON_AREA_FORWARDING_ALGORITHM := e_greedy;
/**
* @desc Default GeoBroadcast forwarding algorithm
* @see ETSI TS 102 871-2 Table 4
* @desc Default AREA forwarding algorithm
* @see ETSI TS 102 871-1 Table 1
*/
modulepar GeoBroadcastForwardingAlgorithm PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM := e_advanced;
modulepar AreaForwardingAlgorithm PICS_GN_AREA_FORWARDING_ALGORITHM := e_cbf;
/**
* @desc Minimum duration a GUC shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-2 Table 4
* @desc Minimum duration a packet shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_GEOUNICAST_CBF_MIN_TIME := 1;
modulepar integer PICS_GN_CBF_MIN_TIME := 1;
/**
* @desc Maximum duration a GUC shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-2 Table 4
* @desc Maximum duration a packet shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_GEOUNICAST_CBF_MAX_TIME := 100;
modulepar integer PICS_GN_CBF_MAX_TIME := 100;
/**
* @desc Minimum duration a GBC shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-2 Table 4
*/
modulepar integer PICS_GN_GEOBROADCAST_CBF_MIN_TIME := 1;
/**
* @desc Maximum duration a GBC shall be buffered in the CBF packet buffer [ms]
* @see ETSI TS 102 871-2 Table 4
*/
modulepar integer PICS_GN_GEOBROADCAST_CBF_MAX_TIME := 100;
/**
* @desc Default theoretical maximum communication range [m]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE := 1000;
/**
* @desc Size of UC forwarding packet buffer [Kbytes]
* @see ETSI TS 102 871-2 Table 4
* @see ETSI TS 102 871-1 Table 1
*/
modulepar integer PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE := 256;