Loading ccsrc/Protocols/Json/json_codec.cc +8 −0 Original line number Original line Diff line number Diff line Loading @@ -191,6 +191,14 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes } else if (it->second.find("\"notificationSubscriptionList\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); LocationAPI__TypesAndValues::NotificationSubscriptionList notification_subscription_list; notification_subscription_list.decode(LocationAPI__TypesAndValues::NotificationSubscriptionList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.notificationSubscriptionList() = notification_subscription_list; Loading ccsrc/Protocols/Json/json_codec_factory.hh +1 −1 Original line number Original line Diff line number Diff line /*! /*! * \file json_codec_factory.hh * \file json_codec_factory.hh * \brief Header file for ITS JSON/IP protocol codec factory. * \brief Header file for ITS JSON/IP protocol codec factory. * \author ETSI STF569 * \author ETSI STF569 / TTF T027 * \copyright ETSI Copyright Notification * \copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * The copyright and the foregoing restriction extend to reproduction in all media. Loading etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +14 −14 Original line number Original line Diff line number Diff line Loading @@ -8,13 +8,13 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibHttp_Pics.PICS_HEADER_HOST := "mec-platform.etsi.org" #"192.168.1.39" LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true LibHttp_Pics.PICS_USE_TOKEN_HEADER := true #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" LibMec_Pics.PICS_ROOT_API := "/sbx1w3aaas/mep1" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' LibMec_Pics.PICS_MEC_PLAT := true LibMec_Pics.PICS_MEC_PLAT := true Loading @@ -26,9 +26,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_CALLBACK_REF_URL := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 Loading ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1917,6 +1917,8 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables // Local variables var Headers v_headers; var Headers v_headers; var UserLocationEventNotification v_user_location_event_notification; var charstring v_subscription_id; // Test control // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { Loading @@ -1931,6 +1933,7 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Test adapter configuration // Preamble // Preamble f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( httpPort.send( m_http_request( m_http_request( Loading Loading @@ -1962,6 +1965,7 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement } // End of 'alt' statement // Postamble // Postamble f_delete_user_location_event_subscription(v_subscription_id); f_cf_01_http_down(); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK Loading ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +2 −2 Original line number Original line Diff line number Diff line Loading @@ -215,7 +215,7 @@ module LocationAPI_Templates { } // End of template mw_subscription } // End of template mw_subscription template (omit) NotificationSubscriptionList m_notification_subscription_list( template (omit) NotificationSubscriptionList m_notification_subscription_list( in template (value) ResourceURL p_resourceURL, in template (value) LinkType p_resourceURL, in template (omit) Subscriptions p_subscription := omit in template (omit) Subscriptions p_subscription := omit ) := { ) := { subscription := p_subscription, subscription := p_subscription, Loading @@ -223,7 +223,7 @@ module LocationAPI_Templates { } // End of template m_notification_subscription_list } // End of template m_notification_subscription_list template (present) NotificationSubscriptionList mw_notification_subscription_list( template (present) NotificationSubscriptionList mw_notification_subscription_list( template (present) ResourceURL p_resourceURL := ?, template (present) LinkType p_resourceURL := ?, template Subscriptions p_subscription := * template Subscriptions p_subscription := * ) := { ) := { subscription := p_subscription, subscription := p_subscription, Loading Loading
ccsrc/Protocols/Json/json_codec.cc +8 −0 Original line number Original line Diff line number Diff line Loading @@ -191,6 +191,14 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes } else if (it->second.find("\"notificationSubscriptionList\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); LocationAPI__TypesAndValues::NotificationSubscriptionList notification_subscription_list; notification_subscription_list.decode(LocationAPI__TypesAndValues::NotificationSubscriptionList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.notificationSubscriptionList() = notification_subscription_list; Loading
ccsrc/Protocols/Json/json_codec_factory.hh +1 −1 Original line number Original line Diff line number Diff line /*! /*! * \file json_codec_factory.hh * \file json_codec_factory.hh * \brief Header file for ITS JSON/IP protocol codec factory. * \brief Header file for ITS JSON/IP protocol codec factory. * \author ETSI STF569 * \author ETSI STF569 / TTF T027 * \copyright ETSI Copyright Notification * \copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * The copyright and the foregoing restriction extend to reproduction in all media. Loading
etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +14 −14 Original line number Original line Diff line number Diff line Loading @@ -8,13 +8,13 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; LibHttp_Pics.PICS_HEADER_HOST := "mec-platform.etsi.org" #"192.168.1.39" LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true LibHttp_Pics.PICS_USE_TOKEN_HEADER := true #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" LibMec_Pics.PICS_ROOT_API := "/sbx1w3aaas/mep1" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' LibMec_Pics.PICS_MEC_PLAT := true LibMec_Pics.PICS_MEC_PLAT := true Loading @@ -26,9 +26,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_CALLBACK_REF_URL := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net/location/v3/notif/1" LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 Loading
ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1917,6 +1917,8 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables // Local variables var Headers v_headers; var Headers v_headers; var UserLocationEventNotification v_user_location_event_notification; var charstring v_subscription_id; // Test control // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { Loading @@ -1931,6 +1933,7 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Test adapter configuration // Preamble // Preamble f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( httpPort.send( m_http_request( m_http_request( Loading Loading @@ -1962,6 +1965,7 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement } // End of 'alt' statement // Postamble // Postamble f_delete_user_location_event_subscription(v_subscription_id); f_cf_01_http_down(); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK Loading
ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +2 −2 Original line number Original line Diff line number Diff line Loading @@ -215,7 +215,7 @@ module LocationAPI_Templates { } // End of template mw_subscription } // End of template mw_subscription template (omit) NotificationSubscriptionList m_notification_subscription_list( template (omit) NotificationSubscriptionList m_notification_subscription_list( in template (value) ResourceURL p_resourceURL, in template (value) LinkType p_resourceURL, in template (omit) Subscriptions p_subscription := omit in template (omit) Subscriptions p_subscription := omit ) := { ) := { subscription := p_subscription, subscription := p_subscription, Loading @@ -223,7 +223,7 @@ module LocationAPI_Templates { } // End of template m_notification_subscription_list } // End of template m_notification_subscription_list template (present) NotificationSubscriptionList mw_notification_subscription_list( template (present) NotificationSubscriptionList mw_notification_subscription_list( template (present) ResourceURL p_resourceURL := ?, template (present) LinkType p_resourceURL := ?, template Subscriptions p_subscription := * template Subscriptions p_subscription := * ) := { ) := { subscription := p_subscription, subscription := p_subscription, Loading