Loading ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +2687 −2275 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +54 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,60 @@ module AtsMec_V2XInformationServiceAPI_TestControl { if (PICS_MEC_PLAT and PICS_SERVICES) { execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_001_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_001_BR()); execute(TC_MEC_MEC030_SRV_V2X_001_NF()); execute(TC_MEC_MEC030_SRV_V2X_002_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_002_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_002_BR()); execute(TC_MEC_MEC030_SRV_V2X_002_NF()); execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_003_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_003_BR()); execute(TC_MEC_MEC030_SRV_V2X_003_NF()); execute(TC_MEC_MEC030_SRV_V2X_004_OK()); execute(TC_MEC_MEC030_SRV_V2X_004_BR()); execute(TC_MEC_MEC030_SRV_V2X_004_NF()); execute(TC_MEC_MEC030_SRV_V2X_005_OK()); execute(TC_MEC_MEC030_SRV_V2X_005_BR()); execute(TC_MEC_MEC030_SRV_V2X_005_NF()); execute(TC_MEC_MEC030_SRV_V2X_006_OK()); execute(TC_MEC_MEC030_SRV_V2X_006_BR()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_007_BR()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_008_BR()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_009_BR()); execute(TC_MEC_MEC030_SRV_V2X_009_NF()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_010_BR()); execute(TC_MEC_MEC030_SRV_V2X_010_NF()); } } // End of 'control' statement Loading ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +160 −34 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ module V2XInformationServiceAPI_Functions { import from LibMec_Pixits all; function f_create_prov_uu_uni_subscription( out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -47,7 +48,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( Loading Loading @@ -82,8 +83,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_uu_uni_subscription := v_response.response.body.json_body.provChgUuUniSubscription; log("f_create_prov_uu_uni_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); log("f_create_prov_uu_uni_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); log("f_create_prov_uu_uni_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_uni_subscription: Expected message not received"); Loading @@ -93,7 +104,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_uni_subscription function f_delete_prov_uu_uni_subscription( in ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -101,7 +112,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -121,7 +132,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_uni_subscription function f_create_prov_uu_mbms_subscription( out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -130,7 +142,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( Loading Loading @@ -173,8 +185,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_uu_mbms_subscription := v_response.response.body.json_body.provChgUuMbmsSubscription; log("f_create_prov_uu_mbms_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_mbms_subscription); log("f_create_prov_uu_mbms_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_mbms_subscription: Expected message not received"); Loading @@ -184,7 +206,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_mbms_subscription function f_delete_prov_uu_mbms_subscription( in ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -192,7 +214,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -212,7 +234,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_mbms_subscription function f_create_prov_pc5_subscription( out ProvChgPc5Subscription p_prov_chg_pc5_subscription out ProvChgPc5Subscription p_prov_chg_pc5_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -221,7 +244,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( Loading Loading @@ -253,8 +276,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; log("f_create_prov_pc5_subscription: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); log("f_create_prov_pc5_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); log("f_create_prov_pc5_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_pc5_subscription: Expected message not received"); Loading @@ -264,7 +297,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_pc5_subscription function f_delete_prov_pc5_subscription( in ProvChgPc5Subscription p_prov_chg_pc5_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -272,7 +305,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -292,7 +325,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_pc5_subscription function f_create_v2x_msg_subscription( out V2xMsgSubscription p_v2x_msg_subscription out V2xMsgSubscription p_v2x_msg_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -301,7 +335,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( Loading @@ -324,8 +358,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_v2x_msg_subscription := v_response.response.body.json_body.v2xMsgSubscription; log("f_create_v2x_msg_subscription: IUT successfully registers subscription: ", p_v2x_msg_subscription); log("f_create_v2x_msg_subscription: INFO: IUT successfully registers subscription: ", p_v2x_msg_subscription); log("f_create_v2x_msg_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_v2x_msg_subscription: Expected message not received"); Loading @@ -335,7 +379,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_v2x_msg_subscription function f_delete_v2x_msg_subscription( in V2xMsgSubscription p_v2x_msg_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -343,7 +387,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & p_v2x_msg_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -362,4 +406,86 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_v2x_msg_subscription function f_create_pred_qos_subscription( out PredQosSubscription p_pred_qos_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_pred_qos_subscription( m_pred_qos_subscription( m_qos_pred_filter_criteria, PX_PRED_QOS_SUB_CALLBACK )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( mw_body_json_pred_qos_subscription( mw_pred_qos_subscription( -, PX_PRED_QOS_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_pred_qos_subscription := v_response.response.body.json_body.predQosSubscription; log("f_create_pred_qos_subscription: INFO: IUT successfully registers subscription: ", p_pred_qos_subscription); log("f_create_pred_qos_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_pred_qos_subscription: Expected message not received"); } } // End of 'alt' statement } // End of function f_create_pred_qos_subscription function f_delete_pred_qos_subscription( in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) { tc_ac.stop; } [] tc_ac.timeout { log("f_delete_pred_qos_subscription: Expected message not received"); } } // End of 'alt' statement } // End of function f_delete_pred_qos_subscription } // End of module V2XInformationServiceAPI_Functions ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_UNKNOWN_MNC := "796"; modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; modulepar Json.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; Loading @@ -34,6 +36,8 @@ module V2XInformationServiceAPI_Pixits { modulepar Json.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PRED_QOS_SUB_CALLBACK := ""; modulepar charstring PX_V2X_SERVER_IP_ADDRESS := ""; modulepar charstring PX_V2X_SERVER_UDP_PORT := ""; Loading @@ -48,4 +52,10 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_DST_LAYER_2_ID := ""; modulepar charstring PX_PROT_IMPLEMENTATION := ""; modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; } // End of module V2XInformationServiceAPI_Pixits ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +110 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,70 @@ module V2XInformationServiceAPI_Templates { proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( in template (value) V2xMsgDistributionServer p_v2xMsgDistributionServer, in template (omit) LocationInfo p_locationInfo := omit ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, locationInfo := p_locationInfo } // End of template m_v2x_msg_distribution_server_info template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( template (present) V2xMsgDistributionServer p_v2xMsgDistributionServer := ?, template LocationInfo p_locationInfo := * ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, locationInfo := p_locationInfo } // End of template mw_v2x_msg_distribution_server_info template (omit) V2xMsgDistributionServer m_v2x_msg_distribution_server( in template (value) InfoProtocol p_infoProtocol, in template (omit) InfoConnection p_infoConnection := omit ) := { infoProtocol := p_infoProtocol, infoConnection := p_infoConnection } // End of template m_v2x_msg_distribution_server template (present) V2xMsgDistributionServer mw_v2x_msg_distribution_server( template (present) InfoProtocol p_infoProtocol := ?, template InfoConnection p_infoConnection := * ) := { infoProtocol := p_infoProtocol, infoConnection := p_infoConnection } // End of template mw_v2x_msg_distribution_server template (value) InfoProtocol m_info_protocol( in MsgProtocol p_msgProtocol := MQTT_v3_1_1, in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, protImplementation := p_protImplementation } // End of template m_info_protocol template (present) InfoProtocol mw_info_protocol( template (present) MsgProtocol p_msgProtocol := MQTT_v3_1_1, template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, protImplementation := p_protImplementation } // End of template mw_info_protocol template (value) InfoConnection m_info_connection( in Json.String p_ipAddress, in Json.UInt16 p_port_number ) := { ipAddress := p_ipAddress, port_number := p_port_number } // End of template m_info_connection template (present) InfoConnection mw_info_connection( template (present) Json.String p_ipAddress := ?, template (present) Json.UInt16 p_port_number := ? ) := { ipAddress := p_ipAddress, port_number := p_port_number } // End of template mw_info_connection template (omit) PredictedQos m_predicted_qos( in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, in template (value) Json.String p_locationGranularity, Loading Loading @@ -582,4 +646,50 @@ module V2XInformationServiceAPI_Templates { locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria template (omit) PredQosSubscription m_pred_qos_subscription( in template (value) QosPredFilterCriteria p_filterCriteria, in template (omit) Json.AnyURI p_callbackReference := omit, in template (omit) Links p_links := omit, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "PredQosSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template m_pred_qos_subscription template (present) PredQosSubscription mw_pred_qos_subscription( template (present) QosPredFilterCriteria p_filterCriteria := ?, template Json.AnyURI p_callbackReference := *, template Links p_links := *, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { subscriptionType := "PredQosSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template mw_pred_qos_subscription template (omit) QosPredFilterCriteria m_qos_pred_filter_criteria( in template (omit) Json.String p_streamId := omit ) := { streamId := p_streamId } // End of template m_filterCriteria template QosPredFilterCriteria mw_qos_pred_filter_criteria( template Json.String p_streamId := * ) := { streamId := p_streamId } // End of template mw_filterCriteria } // End of module V2XInformationServiceAPI_Templates Loading
ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +2687 −2275 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +54 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,60 @@ module AtsMec_V2XInformationServiceAPI_TestControl { if (PICS_MEC_PLAT and PICS_SERVICES) { execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_001_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_001_BR()); execute(TC_MEC_MEC030_SRV_V2X_001_NF()); execute(TC_MEC_MEC030_SRV_V2X_002_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_002_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_002_BR()); execute(TC_MEC_MEC030_SRV_V2X_002_NF()); execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_003_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_003_BR()); execute(TC_MEC_MEC030_SRV_V2X_003_NF()); execute(TC_MEC_MEC030_SRV_V2X_004_OK()); execute(TC_MEC_MEC030_SRV_V2X_004_BR()); execute(TC_MEC_MEC030_SRV_V2X_004_NF()); execute(TC_MEC_MEC030_SRV_V2X_005_OK()); execute(TC_MEC_MEC030_SRV_V2X_005_BR()); execute(TC_MEC_MEC030_SRV_V2X_005_NF()); execute(TC_MEC_MEC030_SRV_V2X_006_OK()); execute(TC_MEC_MEC030_SRV_V2X_006_BR()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_007_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_007_BR()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_008_BR()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_009_BR()); execute(TC_MEC_MEC030_SRV_V2X_009_NF()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_02()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_010_BR()); execute(TC_MEC_MEC030_SRV_V2X_010_NF()); } } // End of 'control' statement Loading
ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +160 −34 Original line number Diff line number Diff line Loading @@ -38,7 +38,8 @@ module V2XInformationServiceAPI_Functions { import from LibMec_Pixits all; function f_create_prov_uu_uni_subscription( out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -47,7 +48,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( Loading Loading @@ -82,8 +83,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_uu_uni_subscription := v_response.response.body.json_body.provChgUuUniSubscription; log("f_create_prov_uu_uni_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); log("f_create_prov_uu_uni_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); log("f_create_prov_uu_uni_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_uni_subscription: Expected message not received"); Loading @@ -93,7 +104,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_uni_subscription function f_delete_prov_uu_uni_subscription( in ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -101,7 +112,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -121,7 +132,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_uni_subscription function f_create_prov_uu_mbms_subscription( out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -130,7 +142,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( Loading Loading @@ -173,8 +185,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_uu_mbms_subscription := v_response.response.body.json_body.provChgUuMbmsSubscription; log("f_create_prov_uu_mbms_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_mbms_subscription); log("f_create_prov_uu_mbms_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_mbms_subscription: Expected message not received"); Loading @@ -184,7 +206,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_mbms_subscription function f_delete_prov_uu_mbms_subscription( in ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -192,7 +214,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -212,7 +234,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_mbms_subscription function f_create_prov_pc5_subscription( out ProvChgPc5Subscription p_prov_chg_pc5_subscription out ProvChgPc5Subscription p_prov_chg_pc5_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -221,7 +244,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( Loading Loading @@ -253,8 +276,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; log("f_create_prov_pc5_subscription: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); log("f_create_prov_pc5_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); log("f_create_prov_pc5_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_pc5_subscription: Expected message not received"); Loading @@ -264,7 +297,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_pc5_subscription function f_delete_prov_pc5_subscription( in ProvChgPc5Subscription p_prov_chg_pc5_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -272,7 +305,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -292,7 +325,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_pc5_subscription function f_create_v2x_msg_subscription( out V2xMsgSubscription p_v2x_msg_subscription out V2xMsgSubscription p_v2x_msg_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; Loading @@ -301,7 +335,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( Loading @@ -324,8 +358,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_v2x_msg_subscription := v_response.response.body.json_body.v2xMsgSubscription; log("f_create_v2x_msg_subscription: IUT successfully registers subscription: ", p_v2x_msg_subscription); log("f_create_v2x_msg_subscription: INFO: IUT successfully registers subscription: ", p_v2x_msg_subscription); log("f_create_v2x_msg_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_v2x_msg_subscription: Expected message not received"); Loading @@ -335,7 +379,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_v2x_msg_subscription function f_delete_v2x_msg_subscription( in V2xMsgSubscription p_v2x_msg_subscription in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; Loading @@ -343,7 +387,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & p_v2x_msg_subscription.links.self_.href, PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); Loading @@ -362,4 +406,86 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_v2x_msg_subscription function f_create_pred_qos_subscription( out PredQosSubscription p_pred_qos_subscription, out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_pred_qos_subscription( m_pred_qos_subscription( m_qos_pred_filter_criteria, PX_PRED_QOS_SUB_CALLBACK )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( mw_body_json_pred_qos_subscription( mw_pred_qos_subscription( -, PX_PRED_QOS_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; f_get_header(v_response.response.header, "Location", v_subscription_id); // Extract HTTP subssription id p_subscription_id := regexp( v_subscription_id[0], "?+" & PX_ME_V2X_URI_SUB & "/(?*)", 0 ); p_pred_qos_subscription := v_response.response.body.json_body.predQosSubscription; log("f_create_pred_qos_subscription: INFO: IUT successfully registers subscription: ", p_pred_qos_subscription); log("f_create_pred_qos_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_pred_qos_subscription: Expected message not received"); } } // End of 'alt' statement } // End of function f_create_pred_qos_subscription function f_delete_pred_qos_subscription( in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content )) { tc_ac.stop; } [] tc_ac.timeout { log("f_delete_pred_qos_subscription: Expected message not received"); } } // End of 'alt' statement } // End of function f_delete_pred_qos_subscription } // End of module V2XInformationServiceAPI_Functions
ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_UNKNOWN_MNC := "796"; modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; modulepar Json.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; Loading @@ -34,6 +36,8 @@ module V2XInformationServiceAPI_Pixits { modulepar Json.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PRED_QOS_SUB_CALLBACK := ""; modulepar charstring PX_V2X_SERVER_IP_ADDRESS := ""; modulepar charstring PX_V2X_SERVER_UDP_PORT := ""; Loading @@ -48,4 +52,10 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_DST_LAYER_2_ID := ""; modulepar charstring PX_PROT_IMPLEMENTATION := ""; modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; } // End of module V2XInformationServiceAPI_Pixits
ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +110 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,70 @@ module V2XInformationServiceAPI_Templates { proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( in template (value) V2xMsgDistributionServer p_v2xMsgDistributionServer, in template (omit) LocationInfo p_locationInfo := omit ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, locationInfo := p_locationInfo } // End of template m_v2x_msg_distribution_server_info template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( template (present) V2xMsgDistributionServer p_v2xMsgDistributionServer := ?, template LocationInfo p_locationInfo := * ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, locationInfo := p_locationInfo } // End of template mw_v2x_msg_distribution_server_info template (omit) V2xMsgDistributionServer m_v2x_msg_distribution_server( in template (value) InfoProtocol p_infoProtocol, in template (omit) InfoConnection p_infoConnection := omit ) := { infoProtocol := p_infoProtocol, infoConnection := p_infoConnection } // End of template m_v2x_msg_distribution_server template (present) V2xMsgDistributionServer mw_v2x_msg_distribution_server( template (present) InfoProtocol p_infoProtocol := ?, template InfoConnection p_infoConnection := * ) := { infoProtocol := p_infoProtocol, infoConnection := p_infoConnection } // End of template mw_v2x_msg_distribution_server template (value) InfoProtocol m_info_protocol( in MsgProtocol p_msgProtocol := MQTT_v3_1_1, in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, protImplementation := p_protImplementation } // End of template m_info_protocol template (present) InfoProtocol mw_info_protocol( template (present) MsgProtocol p_msgProtocol := MQTT_v3_1_1, template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, protImplementation := p_protImplementation } // End of template mw_info_protocol template (value) InfoConnection m_info_connection( in Json.String p_ipAddress, in Json.UInt16 p_port_number ) := { ipAddress := p_ipAddress, port_number := p_port_number } // End of template m_info_connection template (present) InfoConnection mw_info_connection( template (present) Json.String p_ipAddress := ?, template (present) Json.UInt16 p_port_number := ? ) := { ipAddress := p_ipAddress, port_number := p_port_number } // End of template mw_info_connection template (omit) PredictedQos m_predicted_qos( in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, in template (value) Json.String p_locationGranularity, Loading Loading @@ -582,4 +646,50 @@ module V2XInformationServiceAPI_Templates { locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria template (omit) PredQosSubscription m_pred_qos_subscription( in template (value) QosPredFilterCriteria p_filterCriteria, in template (omit) Json.AnyURI p_callbackReference := omit, in template (omit) Links p_links := omit, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "PredQosSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template m_pred_qos_subscription template (present) PredQosSubscription mw_pred_qos_subscription( template (present) QosPredFilterCriteria p_filterCriteria := ?, template Json.AnyURI p_callbackReference := *, template Links p_links := *, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { subscriptionType := "PredQosSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template mw_pred_qos_subscription template (omit) QosPredFilterCriteria m_qos_pred_filter_criteria( in template (omit) Json.String p_streamId := omit ) := { streamId := p_streamId } // End of template m_filterCriteria template QosPredFilterCriteria mw_qos_pred_filter_criteria( template Json.String p_streamId := * ) := { streamId := p_streamId } // End of template mw_filterCriteria } // End of module V2XInformationServiceAPI_Templates