Commit e3a8892a authored by YannGarcia's avatar YannGarcia
Browse files

Issue #23: Rename MEC-011 TTCN-3 modules

parent eae602ba
Loading
Loading
Loading
Loading
+34 −34
Original line number Original line Diff line number Diff line
@@ -49,24 +49,24 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
    app_context.encode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    app_context.encode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = char2oct(CHARSTRING("{\"AppContext\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
    data = char2oct(CHARSTRING("{\"AppContext\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceInfo)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceInfo)) {
    const AppEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo();
    const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo();
    service_info.encode(AppEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    service_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
    data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) {
    const AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription();
    const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription();
    app.encode(AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
    data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) {
    const AppEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule();
    const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule();
    dns_rule.encode(AppEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"DnsRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
    data = /*char2oct(CHARSTRING("{\"DnsRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serAvailabilityNotificationSubscription)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serAvailabilityNotificationSubscription)) {
    const AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription& ser = msg.serAvailabilityNotificationSubscription();
    const EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription& ser = msg.serAvailabilityNotificationSubscription();
    ser.encode(AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    ser.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
    data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) {
    const AppEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule();
    const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule();
    traffic_rule.encode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
    data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) {
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) {
    const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo();
    const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo();
@@ -231,12 +231,12 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
      } // End of 'while' statement
      } // End of 'while' statement
      decoding_buffer.clear();
      decoding_buffer.clear();
      decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
      decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
      AppEnablementAPI__TypesAndValues::ServiceInfoList service_info_list;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList service_info_list;
      service_info_list.decode(AppEnablementAPI__TypesAndValues::ServiceInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      service_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.serviceInfoList() = service_info_list;
      msg.serviceInfoList() = service_info_list;
    } else {
    } else {
      AppEnablementAPI__TypesAndValues::ServiceInfo service_info;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo service_info;
      service_info.decode(AppEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.serviceInfo() = service_info;
      msg.serviceInfo() = service_info;
    }
    }
  } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order
  } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order
@@ -253,48 +253,48 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
    } // End of 'while' statement
    } // End of 'while' statement
    decoding_buffer.clear();
    decoding_buffer.clear();
    decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    AppEnablementAPI__TypesAndValues::TransportInfoList transport_info_list;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList transport_info_list;
    transport_info_list.decode(AppEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    transport_info_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.transportInfoList() = transport_info_list;
    msg.transportInfoList() = transport_info_list;
  } else if (it->second.find("\"trafficRuleId\"") != std::string::npos) {
  } else if (it->second.find("\"trafficRuleId\"") != std::string::npos) {
    if (it->second[0] == '[') {
    if (it->second[0] == '[') {
      AppEnablementAPI__TypesAndValues::TrafficRuleList traffic_rule_list;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList traffic_rule_list;
      traffic_rule_list.decode(AppEnablementAPI__TypesAndValues::TrafficRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      traffic_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.trafficRuleList() = traffic_rule_list;
      msg.trafficRuleList() = traffic_rule_list;
    } else {
    } else {
      AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule traffic_rule;
      traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      traffic_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.trafficRule() = traffic_rule;
      msg.trafficRule() = traffic_rule;
    }
    }
  } else if (it->second.find("\"dnsRuleId\"") != std::string::npos) {
  } else if (it->second.find("\"dnsRuleId\"") != std::string::npos) {
    if (it->second[0] == '[') {
    if (it->second[0] == '[') {
      AppEnablementAPI__TypesAndValues::DnsRuleList dns_rule_list;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList dns_rule_list;
      dns_rule_list.decode(AppEnablementAPI__TypesAndValues::DnsRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      dns_rule_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRuleList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.dnsRuleList() = dns_rule_list;
      msg.dnsRuleList() = dns_rule_list;
    } else {
    } else {
      AppEnablementAPI__TypesAndValues::DnsRule dns_rule;
      EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule dns_rule;
      dns_rule.decode(AppEnablementAPI__TypesAndValues::DnsRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      dns_rule.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.dnsRule() = dns_rule;
      msg.dnsRule() = dns_rule;
    }
    }
  } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("\"subscriptions\"") != std::string::npos)) {
  } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("\"subscriptions\"") != std::string::npos)) {
    AppEnablementAPI__TypesAndValues::SubscriptionLinkList sub_link_list;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList sub_link_list;
    sub_link_list.decode(AppEnablementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    sub_link_list.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.subscriptionLinkList__app__ens() = sub_link_list;
    msg.subscriptionLinkList__app__ens() = sub_link_list;
  } else if (it->second.find("\"AppTerminationNotificationSubscription\"") != std::string::npos) {
  } else if (it->second.find("\"AppTerminationNotificationSubscription\"") != std::string::npos) {
    AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term;
    app_term.decode(AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    app_term.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.appTerminationNotificationSubscription() = app_term;
    msg.appTerminationNotificationSubscription() = app_term;
  } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SerAvailabilityNotificationSubscription\"") != std::string::npos)) {
  } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SerAvailabilityNotificationSubscription\"") != std::string::npos)) {
    AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription ser_av;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription ser_av;
    ser_av.decode(AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    ser_av.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.serAvailabilityNotificationSubscription() = ser_av;
    msg.serAvailabilityNotificationSubscription() = ser_av;
  } else if ((it->second.find("\"ntpServers\"") != std::string::npos) || (it->second.find("{\"timeStamp\"") == 0)) {
  } else if ((it->second.find("\"ntpServers\"") != std::string::npos) || (it->second.find("{\"timeStamp\"") == 0)) {
    AppEnablementAPI__TypesAndValues::TimingCaps timing_caps;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps timing_caps;
    timing_caps.decode(AppEnablementAPI__TypesAndValues::TimingCaps_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    timing_caps.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TimingCaps_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.timingCaps() = timing_caps;
    msg.timingCaps() = timing_caps;
  } else if (it->second.find("\"timeSourceStatus\"") != std::string::npos) {
  } else if (it->second.find("\"timeSourceStatus\"") != std::string::npos) {
    AppEnablementAPI__TypesAndValues::CurrentTime current_time;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime current_time;
    current_time.decode(AppEnablementAPI__TypesAndValues::CurrentTime_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    current_time.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::CurrentTime_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.currentTime() = current_time;
    msg.currentTime() = current_time;
  } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) {
  } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) {
    RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription;
    RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription;
+231 −94

File changed.

Preview size limit exceeded, changes collapsed.

+76 −76

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@
 *                 All rights reserved.
 *                 All rights reserved.
 *    @see      ETSI GS MEC 003, Draft ETSI GS MEC 011 V2.2.1
 *    @see      ETSI GS MEC 003, Draft ETSI GS MEC 011 V2.2.1
 */
 */
module AtsMec_AppEnablementAPI_TestCases {
module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases {


  // Libcommon
  // Libcommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_BasicTypesAndValues all;
@@ -22,12 +22,12 @@ module AtsMec_AppEnablementAPI_TestCases {
  import from LibItsHttp_JsonTemplates all;
  import from LibItsHttp_JsonTemplates all;
  import from LibItsHttp_TestSystem all;
  import from LibItsHttp_TestSystem all;


  // LibMec/AppEnablementAPI
  // LibMec/EdgePlatformApplicationEnablementAPI
  import from AppEnablementAPI_TypesAndValues all;
  import from EdgePlatformApplicationEnablementAPI_TypesAndValues all;
  import from AppEnablementAPI_Templates all;
  import from EdgePlatformApplicationEnablementAPI_Templates all;
  import from AppEnablementAPI_Functions all;
  import from EdgePlatformApplicationEnablementAPI_Functions all;
  import from AppEnablementAPI_Pics all;
  import from EdgePlatformApplicationEnablementAPI_Pics all;
  import from AppEnablementAPI_Pixits all;
  import from EdgePlatformApplicationEnablementAPI_Pixits all;


  // LibMec
  // LibMec
  import from LibMec_TypesAndValues all;
  import from LibMec_TypesAndValues all;
@@ -3558,4 +3558,4 @@ module AtsMec_AppEnablementAPI_TestCases {
    
    
  } // End of group transport_rules
  } // End of group transport_rules


} // End of module AtsMec_AppEnablementAPI_TestCases
} // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases
+2 −2
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ module AtsMec_TestControl {
  // LibMec/TrafficManagementAPI
  // LibMec/TrafficManagementAPI
  import from TrafficManagementAPI_Pics all;
  import from TrafficManagementAPI_Pics all;
  // LibMec/AppEnablementAPI
  // LibMec/AppEnablementAPI
  import from AppEnablementAPI_Pics all;
  import from EdgePlatformApplicationEnablementAPI_Pics all;
  // LibMec/UEAppInterfaceAPI
  // LibMec/UEAppInterfaceAPI
  import from UEAppInterfaceAPI_Pics all;
  import from UEAppInterfaceAPI_Pics all;
  
  
@@ -22,7 +22,7 @@ module AtsMec_TestControl {
//  import from AtsMec_RadioNodeLocationAPI_TestCases all;
//  import from AtsMec_RadioNodeLocationAPI_TestCases all;
  import from AtsMec_RnisAPI_TestCases all;
  import from AtsMec_RnisAPI_TestCases all;
  import from AtsMec_TrafficManagementAPI_TestCases all;
  import from AtsMec_TrafficManagementAPI_TestCases all;
  import from AtsMec_AppEnablementAPI_TestCases all;
  import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all;
  import from AtsMec_UEAppInterfaceAPI_TestCases all;
  import from AtsMec_UEAppInterfaceAPI_TestCases all;
  
  
  control {
  control {
Loading