Commit 0609ee42 authored by YannGarcia's avatar YannGarcia
Browse files

Move float2str in an external function as it is not defined in ETSI ES 201 873-1 V4.11.1 (2019-04)

parent 3fae238d
...@@ -17,8 +17,7 @@ namespace LibMec__Functions { ...@@ -17,8 +17,7 @@ namespace LibMec__Functions {
* @return Timestamp - current time since 01/01/2004 in milliseconds * @return Timestamp - current time since 01/01/2004 in milliseconds
* @see fx_getCurrentTime() return TimestampIts * @see fx_getCurrentTime() return TimestampIts
*/ */
INTEGER fx__getCurrentTime( INTEGER fx__getCurrentTime() {
) {
INTEGER i; INTEGER i;
i.set_long_long_val(base_time::get_instance().get_its_current_time_ms()); i.set_long_long_val(base_time::get_instance().get_its_current_time_ms());
loggers::get_instance().log_msg("<<< fx__getCurrentTime: ", i); loggers::get_instance().log_msg("<<< fx__getCurrentTime: ", i);
...@@ -35,4 +34,12 @@ namespace LibMec__Functions { ...@@ -35,4 +34,12 @@ namespace LibMec__Functions {
return i; return i;
} }
/**
* @desc Convert a float value into a string
* @return The string formated value
*/
CHARSTRING fx__float2str(const FLOAT& p_value) {
return float2str(p_value);
}
} // end of Namespace } // end of Namespace
...@@ -125,7 +125,7 @@ do ...@@ -125,7 +125,7 @@ do
done done
# Update libraries & CC files # Update libraries & CC files
TTCN_3_LIB_LIST='LibMec LibMec/LocationAPI LibMec/UEidentityAPI LibMec/RnisAPI LibMec/BwManagementAPI LibMec/Ams LibMec/AppEna LibMec/ApplCM LibMec/FixedAccessInformationAPI LibMec/MeoPkgm LibMec/MepmPkgm LibHttp LibCommon' TTCN_3_LIB_LIST='LibMec LibMec/Ams LibMec/AppEna LibMec/AppLCM LibMec/BwManagementAPI LibMec/FixedAccessInformationAPI LibMec/Grant LibMec/LocationAPI LibMec/MeoPkgm LibMec/MepmPkgm LibMec/RnisAPI LibMec/UEidentityAPI LibHttp LibCommon'
for i in ${TTCN_3_LIB_LIST} for i in ${TTCN_3_LIB_LIST}
do do
if [ ! -d ${TTCN_3_DST_PATH}/$i ] if [ ! -d ${TTCN_3_DST_PATH}/$i ]
...@@ -134,11 +134,7 @@ do ...@@ -134,11 +134,7 @@ do
fi fi
cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
# Update files # Update files
if [ "$i" == "LibMec" ] if [ "$i" == "LibHttp" ]
then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
elif [ "$i" == "LibHttp" ]
then then
cp ${TTCN_3_ORG_PATH}/LibIts/ttcn/Http/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/LibIts/ttcn/Http/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${CC_SRC_PATH}/EncDec/$i/*_Encdec.cc ${TTCN_3_DST_PATH}/$i/src cp ${CC_SRC_PATH}/EncDec/$i/*_Encdec.cc ${TTCN_3_DST_PATH}/$i/src
...@@ -153,6 +149,11 @@ do ...@@ -153,6 +149,11 @@ do
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
# Patch TITAN due to TTCN-3 compiler issues # Patch TITAN due to TTCN-3 compiler issues
cp ${SRC_MEC_PATH}/ttcn/patch_lib_common_titan/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${SRC_MEC_PATH}/ttcn/patch_lib_common_titan/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
elif [ "$i" == "LibMec/Ams" ]
then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
rm -f ${TTCN_3_DST_PATH}/$i/ttcn/Ams_sEncdecDeclarations.ttcn
else else
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
......
...@@ -446,7 +446,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -446,7 +446,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_get(
"/" & PICS_ROOT_API & PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), "/" & PICS_ROOT_API & PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & fx_float2str(PX_UE_COORD_LAT) & "&longitude=" & fx_float2str(PX_UE_COORD_LONG),
v_headers v_headers
) )
) )
...@@ -503,7 +503,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -503,7 +503,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_get(
"/" & PICS_ROOT_API & PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), "/" & PICS_ROOT_API & PX_UE_LOC_QRY_URI & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & fx_float2str(PX_UE_COORD_LAT) & "&longitude=" & fx_float2str(PX_UE_COORD_LONG),
v_headers v_headers
) )
) )
......
...@@ -16,4 +16,4 @@ module Grant_Pixits { ...@@ -16,4 +16,4 @@ module Grant_Pixits {
modulepar JSON.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; modulepar JSON.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID";
} } // End of module Grant_Pixits
...@@ -34,4 +34,4 @@ module MeoPkgm_Pixits { ...@@ -34,4 +34,4 @@ module MeoPkgm_Pixits {
modulepar NotificationType PX_NOTIFICATION_TYPE := ON_BOARDING; modulepar NotificationType PX_NOTIFICATION_TYPE := ON_BOARDING;
} // End of module LocationAPI_Pixits } // End of module MeoPkgm_Pixits
...@@ -36,4 +36,4 @@ module MepmPkgm_Pixits { ...@@ -36,4 +36,4 @@ module MepmPkgm_Pixits {
modulepar JSON.String PX_APP_D_ID := "5lkj4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; modulepar JSON.String PX_APP_D_ID := "5lkj4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
} // End of module LocationAPI_Pixits } // End of module MepmPkgm_Pixits
...@@ -122,6 +122,12 @@ module LibMec_Functions { ...@@ -122,6 +122,12 @@ module LibMec_Functions {
*/ */
external function fx_get_current_time_utc() return UInt64; external function fx_get_current_time_utc() return UInt64;
/**
* @desc Convert a float value into a string
* @return The string formated value
*/
external function fx_float2str(in float p_value) return charstring;
} // End of group external_functions } // End of group external_functions
group helpers { group helpers {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment