diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index e422fff322dc797b5bdf095d22277ba84642ab1a..1017b3d8dbca0d29220fc62cc24ee3d7ac46f574 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -79,9 +79,24 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy msg.ueIdentityTagInfo() = ue_identity_tag_info; } else if (it->second.find("\"bwInfo\"") != std::string::npos) { BwManagementAPI__TypesAndValues::BwInfo bw_info; - bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + + // Need to change some enumerated string not supported by TTCN-3 language + if (str.find("not defined in the present document") != std::string::npos) { + str = regex_replace(str, regex("not defined in the present document"), "not_defined_in_the_present_document"); + } + if (str.find("00 = Downlink (towards the UE)") != std::string::npos) { + str = regex_replace(str, regex("00 = Downlink \\(towards the UE\\)"), "Downlink"); + } else if (str.find("01 = Uplink (towards the application/session)") != std::string::npos) { + str = regex_replace(str, regex("01 = Uplink \\(towards the application\\/session\\)"), "Uplink"); + } else if (str.find("10 = Symmetrical") != std::string::npos) { + str = regex_replace(str, regex("10 = Symmetrical"), "Symmetrical"); + } + //loggers::get_instance().log("json_codec::decode: ##########; %s", str.c_str()); + + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; - } else if (it->second.find("\"problemDetails\"") != std::string::npos) { + } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules UEidentityAPI__TypesAndValues::ProblemDetails problem_details; problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails__ue__identity() = problem_details; diff --git a/etc/AtsMec/AtsMec.cfg b/etc/AtsMec/AtsMec.cfg index 65a93edc611744ad0808f94a9fc945b6a4c0bd5c..ca750b9f820c76a2eadfb067c487d44f28c10165 100644 --- a/etc/AtsMec/AtsMec.cfg +++ b/etc/AtsMec/AtsMec.cfg @@ -8,12 +8,20 @@ LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; #LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87" -LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" +LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_MEC_PLAT := true -LibMec_Pics.PICS_RNIS := true +LibMec_Pics.PICS_RNIS := true + +LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true +LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true +LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true + +UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := true + +BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -31,7 +39,7 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. -system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.21,port=8081,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.5,port=8081,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, diff --git a/ttcn/AtsMec/AtsMec_TestControl.ttcn b/ttcn/AtsMec/AtsMec_TestControl.ttcn index c53cdbbb0061523124803846f9c7c8f7693cdafb..01418db873b0b7fa5c6b448c2dea77e934e17cdc 100644 --- a/ttcn/AtsMec/AtsMec_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_TestControl.ttcn @@ -39,8 +39,10 @@ module AtsMec_TestControl { } } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC025_RNIS_SUBSCRIPTION_005()); + if (PICS_RNIS) { + if (PICS_RNIS_ALL_SUBSCRIPTIONS) { + execute(TC_MEC025_RNIS_SUBSCRIPTION_005()); + } } if (PICS_BWMANAGEMENT_API_SUPPORTED) { diff --git a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn index 2c8f36f99c00458eec22defea837362b6eee9324..10fc131f9dc631104d8e30e0175051e977812886 100644 --- a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn @@ -90,7 +90,7 @@ module BwManagementAPI_TypesAndValues { * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document */ type enumerated FixedBWPriority { - reserved + not_defined_in_the_present_document } /**