Loading ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +52 −38 Original line number Original line Diff line number Diff line Loading @@ -21,41 +21,6 @@ module LibItsGeoNetworking_Functions { import from LibItsGeoNetworking_Pixits all; import from LibItsGeoNetworking_Pixits all; import from LibItsGeoNetworking_Pics all; import from LibItsGeoNetworking_Pics all; /** * @desc Create Facility component and connects GeoNetworking port * @remark Only used when ItsFa is a PTC * @param p_ptcDenm returned Facility component variable */ function f_ptcGeoNetworkingUp(out ItsNt p_ptcGeoNetworking) { // Create Facility component p_ptcGeoNetworking := ItsNt.create("GeoNetworking Tester"); // map ports map(p_ptcGeoNetworking:geoNetworkingPort, system:geoNetworkingPort); } // end f_ptcGeoNetworkingUp /** * @desc Wait for component to finish and unmap GeoNetworking ports * @remark Only used when ItsFa is a PTC * @param p_camPtc Facility component variable */ function f_ptcGeoNetworkingDown(in ItsNt p_ptcGeoNetworking) runs on ItsMtc { tc_guard.start; alt { [] p_ptcGeoNetworking.done { tc_guard.stop; } [] tc_guard.timeout { f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcGeoNetworkingDown: Timeout while waiting for component ***"); } } unmap(p_ptcGeoNetworking:geoNetworkingPort); } // end f_ptcGeoNetworkingDown group geoConfigurationFunctions { group geoConfigurationFunctions { /** /** Loading Loading @@ -1136,7 +1101,7 @@ module LibItsGeoNetworking_Functions { * @return * @return */ */ function f_getLSRetransmitTimerMedium() return float { function f_getLSRetransmitTimerMedium() return float { var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PIXIT_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PX_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); return v_itsGnLocationServiceRetransmitTimerMedium; return v_itsGnLocationServiceRetransmitTimerMedium; } } Loading @@ -1146,7 +1111,7 @@ module LibItsGeoNetworking_Functions { * @return * @return */ */ function f_getLSRetransmitTimerMaximum() return float { function f_getLSRetransmitTimerMaximum() return float { var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PIXIT_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); return v_itsGnLocationServiceRetransmitTimerMaximum; return v_itsGnLocationServiceRetransmitTimerMaximum; } } Loading Loading @@ -1310,6 +1275,27 @@ module LibItsGeoNetworking_Functions { return v_itsGnLifetimeLocTE; return v_itsGnLifetimeLocTE; } // end f_getLifetimeLocTE } // end f_getLifetimeLocTE /** * @desc Gets the maximum communication range for CBF algorithm */ function f_getCbfMaxCommunicationRange() return integer { var integer v_maxCommunicationRange := PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE; return v_maxCommunicationRange; } // end f_getCbfMaxCommunicationRange function f_getGeoUnicastCbfMaxTime() return integer { var integer v_cbfMaxTime := PICS_GN_GEOUNICAST_CBF_MAX_TIME; return v_cbfMaxTime; } // end f_getGeoUnicastCbfMaxTime function f_getGeoUnicastCbfMinTime() return integer { var integer v_cbfMinTime := PICS_GN_GEOUNICAST_CBF_MIN_TIME; return v_cbfMinTime; } // end f_getGeoUnicastCbfMinTime /** /** * @desc Set the number of neighbour in the Location Table. * @desc Set the number of neighbour in the Location Table. * @return * @return Loading Loading @@ -1365,6 +1351,20 @@ module LibItsGeoNetworking_Functions { return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); } } /** * @desc 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) * @return LongPosVector */ function f_computePositionUsingDistance(in LongPosVector p_iutLongPosVector, in integer p_distance, in integer p_orientation) return LongPosVector { var LongPosVector v_result := p_iutLongPosVector; fx_computePositionUsingDistance(p_iutLongPosVector, p_distance, p_orientation, v_result.latitude, v_result.longitude); return v_result; } } // end posVectorFunctions } // end posVectorFunctions group externalFunctions { group externalFunctions { Loading @@ -1374,6 +1374,20 @@ module LibItsGeoNetworking_Functions { in UInt32 p_latitudeB, in UInt32 p_longitudeB in UInt32 p_latitudeB, in UInt32 p_longitudeB ) return float; ) return float; /** * @desc 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) * @return LongPosVector */ function fx_computePositionUsingDistance( in LongPosVector p_iutLongPosVector, in integer p_distance, in integer p_orientation, out UInt32 p_latitude, out UInt32 p_longitude ); } } } // end LibItsGeoNetworking_Functions } // end LibItsGeoNetworking_Functions No newline at end of file ttcn/GeoNetworking/LibItsGeoNetworking_Pics.ttcn +18 −0 Original line number Original line Diff line number Diff line Loading @@ -165,6 +165,24 @@ module LibItsGeoNetworking_Pics { */ */ modulepar integer PICS_GN_APPLICATION_MAX_RETRANS := 10; modulepar integer PICS_GN_APPLICATION_MAX_RETRANS := 10; /** * @desc Default theoretical maximum communication range [m] * @see */ modulepar integer PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE := 1000; /** * @desc Minimum duration a packet shall be buffered in the CBF packet buffer [ms] * @see */ modulepar integer PICS_GN_GEOUNICAST_CBF_MIN_TIME := 1; /** * @desc Maximum duration a packet shall be buffered in the CBF packet buffer [ms] * @see */ modulepar integer PICS_GN_GEOUNICAST_CBF_MAX_TIME := 100; } // end geoNwPics } // end geoNwPics } // end LibItsGeoNetworking_Pics } // end LibItsGeoNetworking_Pics No newline at end of file ttcn/GeoNetworking/LibItsGeoNetworking_Pixits.ttcn +2 −2 Original line number Original line Diff line number Diff line Loading @@ -125,12 +125,12 @@ module LibItsGeoNetworking_Pixits { /** /** * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = medium (cong. ctrl) * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = medium (cong. ctrl) */ */ modulepar integer PIXIT_GN_LOCATION_SERVICE_TIMER_MEDIUM := 2000; modulepar integer PX_GN_LOCATION_SERVICE_TIMER_MEDIUM := 2000; /** /** * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = maximum (cong. ctrl) * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = maximum (cong. ctrl) */ */ modulepar integer PIXIT_GN_LOCATION_SERVICE_TIMER_MAXIMUM := 3000; modulepar integer PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM := 3000; /** /** * @desc Duration of Application retransmit timer [ms] * @desc Duration of Application retransmit timer [ms] Loading Loading
ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn +52 −38 Original line number Original line Diff line number Diff line Loading @@ -21,41 +21,6 @@ module LibItsGeoNetworking_Functions { import from LibItsGeoNetworking_Pixits all; import from LibItsGeoNetworking_Pixits all; import from LibItsGeoNetworking_Pics all; import from LibItsGeoNetworking_Pics all; /** * @desc Create Facility component and connects GeoNetworking port * @remark Only used when ItsFa is a PTC * @param p_ptcDenm returned Facility component variable */ function f_ptcGeoNetworkingUp(out ItsNt p_ptcGeoNetworking) { // Create Facility component p_ptcGeoNetworking := ItsNt.create("GeoNetworking Tester"); // map ports map(p_ptcGeoNetworking:geoNetworkingPort, system:geoNetworkingPort); } // end f_ptcGeoNetworkingUp /** * @desc Wait for component to finish and unmap GeoNetworking ports * @remark Only used when ItsFa is a PTC * @param p_camPtc Facility component variable */ function f_ptcGeoNetworkingDown(in ItsNt p_ptcGeoNetworking) runs on ItsMtc { tc_guard.start; alt { [] p_ptcGeoNetworking.done { tc_guard.stop; } [] tc_guard.timeout { f_selfOrClientSyncAndVerdict("error", e_timeout, "*** f_ptcGeoNetworkingDown: Timeout while waiting for component ***"); } } unmap(p_ptcGeoNetworking:geoNetworkingPort); } // end f_ptcGeoNetworkingDown group geoConfigurationFunctions { group geoConfigurationFunctions { /** /** Loading Loading @@ -1136,7 +1101,7 @@ module LibItsGeoNetworking_Functions { * @return * @return */ */ function f_getLSRetransmitTimerMedium() return float { function f_getLSRetransmitTimerMedium() return float { var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PIXIT_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PX_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); return v_itsGnLocationServiceRetransmitTimerMedium; return v_itsGnLocationServiceRetransmitTimerMedium; } } Loading @@ -1146,7 +1111,7 @@ module LibItsGeoNetworking_Functions { * @return * @return */ */ function f_getLSRetransmitTimerMaximum() return float { function f_getLSRetransmitTimerMaximum() return float { var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PIXIT_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); return v_itsGnLocationServiceRetransmitTimerMaximum; return v_itsGnLocationServiceRetransmitTimerMaximum; } } Loading Loading @@ -1310,6 +1275,27 @@ module LibItsGeoNetworking_Functions { return v_itsGnLifetimeLocTE; return v_itsGnLifetimeLocTE; } // end f_getLifetimeLocTE } // end f_getLifetimeLocTE /** * @desc Gets the maximum communication range for CBF algorithm */ function f_getCbfMaxCommunicationRange() return integer { var integer v_maxCommunicationRange := PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE; return v_maxCommunicationRange; } // end f_getCbfMaxCommunicationRange function f_getGeoUnicastCbfMaxTime() return integer { var integer v_cbfMaxTime := PICS_GN_GEOUNICAST_CBF_MAX_TIME; return v_cbfMaxTime; } // end f_getGeoUnicastCbfMaxTime function f_getGeoUnicastCbfMinTime() return integer { var integer v_cbfMinTime := PICS_GN_GEOUNICAST_CBF_MIN_TIME; return v_cbfMinTime; } // end f_getGeoUnicastCbfMinTime /** /** * @desc Set the number of neighbour in the Location Table. * @desc Set the number of neighbour in the Location Table. * @return * @return Loading Loading @@ -1365,6 +1351,20 @@ module LibItsGeoNetworking_Functions { return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); return f_longPosVector2ShortPosVector(f_getIutLongPosVector()); } } /** * @desc 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) * @return LongPosVector */ function f_computePositionUsingDistance(in LongPosVector p_iutLongPosVector, in integer p_distance, in integer p_orientation) return LongPosVector { var LongPosVector v_result := p_iutLongPosVector; fx_computePositionUsingDistance(p_iutLongPosVector, p_distance, p_orientation, v_result.latitude, v_result.longitude); return v_result; } } // end posVectorFunctions } // end posVectorFunctions group externalFunctions { group externalFunctions { Loading @@ -1374,6 +1374,20 @@ module LibItsGeoNetworking_Functions { in UInt32 p_latitudeB, in UInt32 p_longitudeB in UInt32 p_latitudeB, in UInt32 p_longitudeB ) return float; ) return float; /** * @desc 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) * @return LongPosVector */ function fx_computePositionUsingDistance( in LongPosVector p_iutLongPosVector, in integer p_distance, in integer p_orientation, out UInt32 p_latitude, out UInt32 p_longitude ); } } } // end LibItsGeoNetworking_Functions } // end LibItsGeoNetworking_Functions No newline at end of file
ttcn/GeoNetworking/LibItsGeoNetworking_Pics.ttcn +18 −0 Original line number Original line Diff line number Diff line Loading @@ -165,6 +165,24 @@ module LibItsGeoNetworking_Pics { */ */ modulepar integer PICS_GN_APPLICATION_MAX_RETRANS := 10; modulepar integer PICS_GN_APPLICATION_MAX_RETRANS := 10; /** * @desc Default theoretical maximum communication range [m] * @see */ modulepar integer PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE := 1000; /** * @desc Minimum duration a packet shall be buffered in the CBF packet buffer [ms] * @see */ modulepar integer PICS_GN_GEOUNICAST_CBF_MIN_TIME := 1; /** * @desc Maximum duration a packet shall be buffered in the CBF packet buffer [ms] * @see */ modulepar integer PICS_GN_GEOUNICAST_CBF_MAX_TIME := 100; } // end geoNwPics } // end geoNwPics } // end LibItsGeoNetworking_Pics } // end LibItsGeoNetworking_Pics No newline at end of file
ttcn/GeoNetworking/LibItsGeoNetworking_Pixits.ttcn +2 −2 Original line number Original line Diff line number Diff line Loading @@ -125,12 +125,12 @@ module LibItsGeoNetworking_Pixits { /** /** * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = medium (cong. ctrl) * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = medium (cong. ctrl) */ */ modulepar integer PIXIT_GN_LOCATION_SERVICE_TIMER_MEDIUM := 2000; modulepar integer PX_GN_LOCATION_SERVICE_TIMER_MEDIUM := 2000; /** /** * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = maximum (cong. ctrl) * @desc Duration of Location service retransmit timer [ms] for NetRepInterval = maximum (cong. ctrl) */ */ modulepar integer PIXIT_GN_LOCATION_SERVICE_TIMER_MAXIMUM := 3000; modulepar integer PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM := 3000; /** /** * @desc Duration of Application retransmit timer [ms] * @desc Duration of Application retransmit timer [ms] Loading