Loading ttcn/CAM/LibItsCam_Functions.ttcn +2 −78 Original line number Diff line number Diff line Loading @@ -149,38 +149,6 @@ module LibItsCam_Functions { group externalFunctions { /** * @desc Generate a timestamp of the cureent time to be used in a generationTime field * @return TimeStamp<br> */ external function fx_generateTime() return TimeStamp; /** * @desc Wrapper function for fx_generateTime * * @see xf_generateTime * */ function f_generateTime() return TimeStamp { //Variables var TimeStamp v_generationTime:=0; v_generationTime := fx_generateTime(); if (v_generationTime!=0) { log("*** f_generateTime: INFO: OK - generationTime = " & int2str(v_generationTime) & " ***"); return v_generationTime ; } else { log("*** f_generateTime: ERROR: timestamp could not be generated ***"); setverdict( inconc ) ; return v_generationTime ; } } // end function f_generateTime /** * @desc function to get the PT Line Description * currently return the PIXIT value Loading @@ -198,23 +166,6 @@ module LibItsCam_Functions { } // end function f_getPtLineDescription /** * @desc function to get the stationID * currently return the PIXIT value * @see PX_TESTER_STATION_ID * */ function f_getStationId() return StationID { //Variables var StationID v_stationId := 0; v_stationId := PX_TESTER_STATION_ID; // PIXIT used! log("*** f_getStationId: INFO: OK - stationId = " & int2str(v_stationId) & " ***"); return v_stationId ; } // end function fx_getStationId /** * @desc get the stationCharacteristics of the tester * @return CoopAwareness.stationCharacteristics<br> Loading @@ -239,33 +190,6 @@ module LibItsCam_Functions { } // end function f_getStationCharacteristics /** * @desc get the ReferencePosition of the tester * @return ReferencePosition<br> */ external function fx_getReferencePosition() return ReferencePosition; /** * @desc Wrapper function for fx_getReferencePosition * * @see fx_getReferencePosition * */ function f_getReferencePosition() return ReferencePosition { //Variables var ReferencePosition v_referencePosition; v_referencePosition := fx_getReferencePosition(); log("*** f_getReferencePosition: INFO: OK - referencePosition received ***"); return v_referencePosition ; } // end function f_getReferencePosition } // end group externalFunctions } // end LibItsCam_Functions No newline at end of file ttcn/CAM/LibItsCam_Pixits.ttcn +0 −6 Original line number Diff line number Diff line Loading @@ -14,12 +14,6 @@ module LibItsCam_Pixits { group camPixits { /** * @desc Tester Station Id * Station Id used in CAM messages sent by the tester (IRS) */ modulepar StationID PX_TESTER_STATION_ID := 111111; /** * @desc Tester Longitude reference position */ Loading ttcn/CAM/LibItsCam_Templates.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ module LibItsCam_Templates { * @desc Check the receipt of a message at the LDM * @param p_message The message to check */ template (value) UtCamEvent m_checkLdmReceipt(CamReq p_message) := { template (value) UtCamEvent m_checkLdmReceipt(CamPdu p_message) := { checkLdmReceipt := p_message } Loading ttcn/CAM/LibItsCam_TypesAndValues.ttcn +1 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ module LibItsCam_TypesAndValues { import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; import from LibIts_Interface all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -96,7 +95,7 @@ module LibItsCam_TypesAndValues { ScheduleDeviation setScheduleDeviation, PTLineDescription setPtLineDescription, ExteriorLights setExteriorLightsStatus, CamReq checkLdmReceipt CamPdu checkLdmReceipt } } // end utPrimitives Loading ttcn/Common/LibItsCommon_Functions.ttcn +86 −18 Original line number Diff line number Diff line Loading @@ -8,13 +8,18 @@ module LibItsCommon_Functions { import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsCommon_Pixits all; /** @desc function to generate integer random values group generalFunctions { /** * @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range<br> * @param p_upperbound highest number in range<br> * @return integer<br> * @param p_lowerbound lowest number in range * @param p_upperbound highest number in range * @return random integer * */ function f_random( in integer p_lowerbound, Loading @@ -23,10 +28,73 @@ module LibItsCommon_Functions { //Variables var integer v_random := 0; v_random := float2int(int2float(p_upperbound - p_lowerbound +1)*rnd()) + p_lowerbound; // Here, upperbound and lowerbound denote highest and lowest number in range. log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** * @desc Gets the current time * @return Timestamp - current time in Epoch format */ function f_getCurrentTime() return TimeStamp { var TimeStamp v_timeStamp := 0; v_timeStamp := fx_getCurrentTime(); return v_timeStamp; } } // end generalFunctions group itsFunctions { /** * @desc Gets the station identifier of test system * @return Test system's station ID * @see PX_TESTER_STATION_ID */ function f_getTsStationId() return StationID { return PX_TESTER_STATION_ID; } // end f_getTsStationId /** * @desc Gets the current position of test system * @return Test system's position */ function f_getTsCurrentPosition() return ReferencePosition { // TODO: correct values required var ReferencePosition v_referencePosition := { longitude := {hemisphere := east, degree := 0}, latitude := {hemisphere := north, degree := 0}, elevation := 0, heading := omit, streetName := omit, positionConfidence := omit, elevationConfidence := omit, roadSegmentID :=0 } return v_referencePosition; } // end f_getTsCurrentPosition } // end itsFunctions group externalFunctions { /** * @desc Gets the current time * @return Timestamp - current time in Epoch format */ external function fx_getCurrentTime() return TimeStamp; } // end externalFunctions } // end of module No newline at end of file Loading
ttcn/CAM/LibItsCam_Functions.ttcn +2 −78 Original line number Diff line number Diff line Loading @@ -149,38 +149,6 @@ module LibItsCam_Functions { group externalFunctions { /** * @desc Generate a timestamp of the cureent time to be used in a generationTime field * @return TimeStamp<br> */ external function fx_generateTime() return TimeStamp; /** * @desc Wrapper function for fx_generateTime * * @see xf_generateTime * */ function f_generateTime() return TimeStamp { //Variables var TimeStamp v_generationTime:=0; v_generationTime := fx_generateTime(); if (v_generationTime!=0) { log("*** f_generateTime: INFO: OK - generationTime = " & int2str(v_generationTime) & " ***"); return v_generationTime ; } else { log("*** f_generateTime: ERROR: timestamp could not be generated ***"); setverdict( inconc ) ; return v_generationTime ; } } // end function f_generateTime /** * @desc function to get the PT Line Description * currently return the PIXIT value Loading @@ -198,23 +166,6 @@ module LibItsCam_Functions { } // end function f_getPtLineDescription /** * @desc function to get the stationID * currently return the PIXIT value * @see PX_TESTER_STATION_ID * */ function f_getStationId() return StationID { //Variables var StationID v_stationId := 0; v_stationId := PX_TESTER_STATION_ID; // PIXIT used! log("*** f_getStationId: INFO: OK - stationId = " & int2str(v_stationId) & " ***"); return v_stationId ; } // end function fx_getStationId /** * @desc get the stationCharacteristics of the tester * @return CoopAwareness.stationCharacteristics<br> Loading @@ -239,33 +190,6 @@ module LibItsCam_Functions { } // end function f_getStationCharacteristics /** * @desc get the ReferencePosition of the tester * @return ReferencePosition<br> */ external function fx_getReferencePosition() return ReferencePosition; /** * @desc Wrapper function for fx_getReferencePosition * * @see fx_getReferencePosition * */ function f_getReferencePosition() return ReferencePosition { //Variables var ReferencePosition v_referencePosition; v_referencePosition := fx_getReferencePosition(); log("*** f_getReferencePosition: INFO: OK - referencePosition received ***"); return v_referencePosition ; } // end function f_getReferencePosition } // end group externalFunctions } // end LibItsCam_Functions No newline at end of file
ttcn/CAM/LibItsCam_Pixits.ttcn +0 −6 Original line number Diff line number Diff line Loading @@ -14,12 +14,6 @@ module LibItsCam_Pixits { group camPixits { /** * @desc Tester Station Id * Station Id used in CAM messages sent by the tester (IRS) */ modulepar StationID PX_TESTER_STATION_ID := 111111; /** * @desc Tester Longitude reference position */ Loading
ttcn/CAM/LibItsCam_Templates.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ module LibItsCam_Templates { * @desc Check the receipt of a message at the LDM * @param p_message The message to check */ template (value) UtCamEvent m_checkLdmReceipt(CamReq p_message) := { template (value) UtCamEvent m_checkLdmReceipt(CamPdu p_message) := { checkLdmReceipt := p_message } Loading
ttcn/CAM/LibItsCam_TypesAndValues.ttcn +1 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ module LibItsCam_TypesAndValues { import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; import from LibIts_Interface all; import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -96,7 +95,7 @@ module LibItsCam_TypesAndValues { ScheduleDeviation setScheduleDeviation, PTLineDescription setPtLineDescription, ExteriorLights setExteriorLightsStatus, CamReq checkLdmReceipt CamPdu checkLdmReceipt } } // end utPrimitives Loading
ttcn/Common/LibItsCommon_Functions.ttcn +86 −18 Original line number Diff line number Diff line Loading @@ -8,13 +8,18 @@ module LibItsCommon_Functions { import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from LibItsCommon_Pixits all; /** @desc function to generate integer random values group generalFunctions { /** * @desc function to generate integer random values * * @see ttcn-3 - rnd() * @param p_lowerbound lowest number in range<br> * @param p_upperbound highest number in range<br> * @return integer<br> * @param p_lowerbound lowest number in range * @param p_upperbound highest number in range * @return random integer * */ function f_random( in integer p_lowerbound, Loading @@ -23,10 +28,73 @@ module LibItsCommon_Functions { //Variables var integer v_random := 0; v_random := float2int(int2float(p_upperbound - p_lowerbound +1)*rnd()) + p_lowerbound; // Here, upperbound and lowerbound denote highest and lowest number in range. log("*** f_random: INFO: OK - random value = " & int2str(v_random) & " ***"); return v_random; } // end function f_random /** * @desc Gets the current time * @return Timestamp - current time in Epoch format */ function f_getCurrentTime() return TimeStamp { var TimeStamp v_timeStamp := 0; v_timeStamp := fx_getCurrentTime(); return v_timeStamp; } } // end generalFunctions group itsFunctions { /** * @desc Gets the station identifier of test system * @return Test system's station ID * @see PX_TESTER_STATION_ID */ function f_getTsStationId() return StationID { return PX_TESTER_STATION_ID; } // end f_getTsStationId /** * @desc Gets the current position of test system * @return Test system's position */ function f_getTsCurrentPosition() return ReferencePosition { // TODO: correct values required var ReferencePosition v_referencePosition := { longitude := {hemisphere := east, degree := 0}, latitude := {hemisphere := north, degree := 0}, elevation := 0, heading := omit, streetName := omit, positionConfidence := omit, elevationConfidence := omit, roadSegmentID :=0 } return v_referencePosition; } // end f_getTsCurrentPosition } // end itsFunctions group externalFunctions { /** * @desc Gets the current time * @return Timestamp - current time in Epoch format */ external function fx_getCurrentTime() return TimeStamp; } // end externalFunctions } // end of module No newline at end of file