// This C++ source file was generated by the ASN.1 compiler // of the TTCN-3 Test Executor version 9.0.0 // The generation of user and time information were disabled by the -D flag. // Copyright (c) 2000-2023 Ericsson Telecom AB // Do not edit this file unless you know what you are doing. /* Including header files */ #include "RSPRO.hh" namespace RSPRO { /* Global variable definitions */ // No XER for OperationTag const int OperationTag_oer_ext_arr_[0] = {}; const int OperationTag_oer_p_[0] = {}; const TTCN_OERdescriptor_t OperationTag_oer_ = { 4, FALSE, -1, FALSE, 0, 0, OperationTag_oer_ext_arr_, 0, OperationTag_oer_p_}; static PerIntegerConstraint OperationTag_per_cons_(new INTEGER(0), new INTEGER(2147483647), FALSE); const ASN_PERdescriptor_t OperationTag_per_ = { &OperationTag_per_cons_ }; const TTCN_Typedescriptor_t OperationTag_descr_ = { "@RSPRO.OperationTag", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &OperationTag_oer_, &OperationTag_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING OperationTag_default_coding(""); // No XER for BankId const int BankId_oer_ext_arr_[0] = {}; const int BankId_oer_p_[0] = {}; const TTCN_OERdescriptor_t BankId_oer_ = { 2, FALSE, -1, FALSE, 0, 0, BankId_oer_ext_arr_, 0, BankId_oer_p_}; static PerIntegerConstraint BankId_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t BankId_per_ = { &BankId_per_cons_ }; const TTCN_Typedescriptor_t BankId_descr_ = { "@RSPRO.BankId", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &BankId_oer_, &BankId_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankId_default_coding(""); // No XER for ClientId const int ClientId_oer_ext_arr_[0] = {}; const int ClientId_oer_p_[0] = {}; const TTCN_OERdescriptor_t ClientId_oer_ = { 2, FALSE, -1, FALSE, 0, 0, ClientId_oer_ext_arr_, 0, ClientId_oer_p_}; static PerIntegerConstraint ClientId_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t ClientId_per_ = { &ClientId_per_cons_ }; const TTCN_Typedescriptor_t ClientId_descr_ = { "@RSPRO.ClientId", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &ClientId_oer_, &ClientId_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientId_default_coding(""); // No XER for ComponentType const TTCN_JSONdescriptor_t ComponentType_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ComponentType_oer_ext_arr_[0] = {}; const int ComponentType_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentType_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentType_oer_ext_arr_, 0, ComponentType_oer_p_}; const ASN_PERdescriptor_t ComponentType_per_ = { &ComponentType_per_cons_ }; const TTCN_Typedescriptor_t ComponentType_descr_ = { "@RSPRO.ComponentType", &ENUMERATED_ber_, NULL, NULL, NULL, &ComponentType_json_, &ComponentType_oer_, &ComponentType_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentType_default_coding(""); const TTCN_Typedescriptor_t& ComponentName_descr_ = IA5String_descr_; UNIVERSAL_CHARSTRING ComponentName_default_coding(""); UNIVERSAL_CHARSTRING ComponentIdentity_type___default_coding(""); UNIVERSAL_CHARSTRING ComponentIdentity_name_default_coding(""); const ASN_Tag_t ComponentIdentity_software_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t ComponentIdentity_software_ber_ = { 1u, ComponentIdentity_software_tag_ }; // No XER for ComponentIdentity_software const int ComponentIdentity_software_oer_ext_arr_[0] = {}; const int ComponentIdentity_software_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_software_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_software_oer_ext_arr_, 0, ComponentIdentity_software_oer_p_}; static PerConstraint ComponentIdentity_software_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_software_per_ = { &ComponentIdentity_software_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_software_descr_ = { "@RSPRO.ComponentIdentity.software", &ComponentIdentity_software_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_software_oer_, &ComponentIdentity_software_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_software_default_coding(""); const ASN_Tag_t ComponentIdentity_swVersion_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t ComponentIdentity_swVersion_ber_ = { 1u, ComponentIdentity_swVersion_tag_ }; // No XER for ComponentIdentity_swVersion const int ComponentIdentity_swVersion_oer_ext_arr_[0] = {}; const int ComponentIdentity_swVersion_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_swVersion_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_swVersion_oer_ext_arr_, 0, ComponentIdentity_swVersion_oer_p_}; static PerConstraint ComponentIdentity_swVersion_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_swVersion_per_ = { &ComponentIdentity_swVersion_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_swVersion_descr_ = { "@RSPRO.ComponentIdentity.swVersion", &ComponentIdentity_swVersion_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_swVersion_oer_, &ComponentIdentity_swVersion_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_swVersion_default_coding(""); // No XER for ComponentIdentity const TTCN_JSONdescriptor_t ComponentIdentity_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ComponentIdentity_oer_ext_arr_[0] = {}; const int ComponentIdentity_oer_p_[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const TTCN_OERdescriptor_t ComponentIdentity_oer_ = { -1, TRUE, -1, TRUE, 9, 0, ComponentIdentity_oer_ext_arr_, 9, ComponentIdentity_oer_p_}; const ASN_PERdescriptor_t ComponentIdentity_per_ = { &ComponentIdentity_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_descr_ = { "@RSPRO.ComponentIdentity", &SEQUENCE_ber_, NULL, NULL, NULL, &ComponentIdentity_json_, &ComponentIdentity_oer_, &ComponentIdentity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; const ASN_Tag_t ComponentIdentity_hwManufacturer_tag_[] = { { ASN_TAG_CONT, 2u }}; const ASN_BERdescriptor_t ComponentIdentity_hwManufacturer_ber_ = { 1u, ComponentIdentity_hwManufacturer_tag_ }; // No XER for ComponentIdentity_hwManufacturer const int ComponentIdentity_hwManufacturer_oer_ext_arr_[0] = {}; const int ComponentIdentity_hwManufacturer_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_hwManufacturer_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_hwManufacturer_oer_ext_arr_, 0, ComponentIdentity_hwManufacturer_oer_p_}; static PerConstraint ComponentIdentity_hwManufacturer_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_hwManufacturer_per_ = { &ComponentIdentity_hwManufacturer_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_hwManufacturer_descr_ = { "@RSPRO.ComponentIdentity.hwManufacturer", &ComponentIdentity_hwManufacturer_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_hwManufacturer_oer_, &ComponentIdentity_hwManufacturer_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_hwManufacturer_default_coding(""); const ASN_Tag_t ComponentIdentity_hwModel_tag_[] = { { ASN_TAG_CONT, 3u }}; const ASN_BERdescriptor_t ComponentIdentity_hwModel_ber_ = { 1u, ComponentIdentity_hwModel_tag_ }; // No XER for ComponentIdentity_hwModel const int ComponentIdentity_hwModel_oer_ext_arr_[0] = {}; const int ComponentIdentity_hwModel_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_hwModel_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_hwModel_oer_ext_arr_, 0, ComponentIdentity_hwModel_oer_p_}; static PerConstraint ComponentIdentity_hwModel_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_hwModel_per_ = { &ComponentIdentity_hwModel_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_hwModel_descr_ = { "@RSPRO.ComponentIdentity.hwModel", &ComponentIdentity_hwModel_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_hwModel_oer_, &ComponentIdentity_hwModel_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_hwModel_default_coding(""); const ASN_Tag_t ComponentIdentity_hwSerialNr_tag_[] = { { ASN_TAG_CONT, 4u }}; const ASN_BERdescriptor_t ComponentIdentity_hwSerialNr_ber_ = { 1u, ComponentIdentity_hwSerialNr_tag_ }; // No XER for ComponentIdentity_hwSerialNr const int ComponentIdentity_hwSerialNr_oer_ext_arr_[0] = {}; const int ComponentIdentity_hwSerialNr_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_hwSerialNr_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_hwSerialNr_oer_ext_arr_, 0, ComponentIdentity_hwSerialNr_oer_p_}; static PerConstraint ComponentIdentity_hwSerialNr_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_hwSerialNr_per_ = { &ComponentIdentity_hwSerialNr_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_hwSerialNr_descr_ = { "@RSPRO.ComponentIdentity.hwSerialNr", &ComponentIdentity_hwSerialNr_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_hwSerialNr_oer_, &ComponentIdentity_hwSerialNr_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_hwSerialNr_default_coding(""); const ASN_Tag_t ComponentIdentity_hwVersion_tag_[] = { { ASN_TAG_CONT, 5u }}; const ASN_BERdescriptor_t ComponentIdentity_hwVersion_ber_ = { 1u, ComponentIdentity_hwVersion_tag_ }; // No XER for ComponentIdentity_hwVersion const int ComponentIdentity_hwVersion_oer_ext_arr_[0] = {}; const int ComponentIdentity_hwVersion_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_hwVersion_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_hwVersion_oer_ext_arr_, 0, ComponentIdentity_hwVersion_oer_p_}; static PerConstraint ComponentIdentity_hwVersion_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_hwVersion_per_ = { &ComponentIdentity_hwVersion_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_hwVersion_descr_ = { "@RSPRO.ComponentIdentity.hwVersion", &ComponentIdentity_hwVersion_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_hwVersion_oer_, &ComponentIdentity_hwVersion_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_hwVersion_default_coding(""); const ASN_Tag_t ComponentIdentity_fwVersion_tag_[] = { { ASN_TAG_CONT, 6u }}; const ASN_BERdescriptor_t ComponentIdentity_fwVersion_ber_ = { 1u, ComponentIdentity_fwVersion_tag_ }; // No XER for ComponentIdentity_fwVersion const int ComponentIdentity_fwVersion_oer_ext_arr_[0] = {}; const int ComponentIdentity_fwVersion_oer_p_[0] = {}; const TTCN_OERdescriptor_t ComponentIdentity_fwVersion_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ComponentIdentity_fwVersion_oer_ext_arr_, 0, ComponentIdentity_fwVersion_oer_p_}; static PerConstraint ComponentIdentity_fwVersion_per_cons_; const ASN_PERdescriptor_t ComponentIdentity_fwVersion_per_ = { &ComponentIdentity_fwVersion_per_cons_ }; const TTCN_Typedescriptor_t ComponentIdentity_fwVersion_descr_ = { "@RSPRO.ComponentIdentity.fwVersion", &ComponentIdentity_fwVersion_ber_, NULL, NULL, NULL, &IA5String_json_, &ComponentIdentity_fwVersion_oer_, &ComponentIdentity_fwVersion_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ComponentIdentity_fwVersion_default_coding(""); UNIVERSAL_CHARSTRING ComponentIdentity_default_coding(""); // No XER for Ipv4Address const int Ipv4Address_oer_ext_arr_[0] = {}; const int Ipv4Address_oer_p_[0] = {}; const TTCN_OERdescriptor_t Ipv4Address_oer_ = { -1, TRUE, 4, FALSE, 0, 0, Ipv4Address_oer_ext_arr_, 0, Ipv4Address_oer_p_}; static PerIntegerConstraint Ipv4Address_per_cons_(PerIntegerConstraint::PER_INT_SINGLE_VALUE, new INTEGER(4), FALSE); const ASN_PERdescriptor_t Ipv4Address_per_ = { &Ipv4Address_per_cons_ }; const TTCN_Typedescriptor_t Ipv4Address_descr_ = { "@RSPRO.Ipv4Address", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &Ipv4Address_oer_, &Ipv4Address_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING Ipv4Address_default_coding(""); // No XER for Ipv6Address const int Ipv6Address_oer_ext_arr_[0] = {}; const int Ipv6Address_oer_p_[0] = {}; const TTCN_OERdescriptor_t Ipv6Address_oer_ = { -1, TRUE, 16, FALSE, 0, 0, Ipv6Address_oer_ext_arr_, 0, Ipv6Address_oer_p_}; static PerIntegerConstraint Ipv6Address_per_cons_(PerIntegerConstraint::PER_INT_SINGLE_VALUE, new INTEGER(16), FALSE); const ASN_PERdescriptor_t Ipv6Address_per_ = { &Ipv6Address_per_cons_ }; const TTCN_Typedescriptor_t Ipv6Address_descr_ = { "@RSPRO.Ipv6Address", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &Ipv6Address_oer_, &Ipv6Address_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING Ipv6Address_default_coding(""); // No XER for IpAddress const TTCN_JSONdescriptor_t IpAddress_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int IpAddress_oer_ext_arr_[0] = {}; const int IpAddress_oer_p_[0] = {}; const TTCN_OERdescriptor_t IpAddress_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IpAddress_oer_ext_arr_, 0, IpAddress_oer_p_}; const ASN_PERdescriptor_t IpAddress_per_ = { &IpAddress_per_cons_ }; const TTCN_Typedescriptor_t IpAddress_descr_ = { "@RSPRO.IpAddress", &CHOICE_ber_, NULL, NULL, NULL, &IpAddress_json_, &IpAddress_oer_, &IpAddress_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; const ASN_Tag_t IpAddress_ipv4_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t IpAddress_ipv4_ber_ = { 1u, IpAddress_ipv4_tag_ }; // No XER for IpAddress_ipv4 const int IpAddress_ipv4_oer_ext_arr_[0] = {}; const int IpAddress_ipv4_oer_p_[0] = {}; const TTCN_OERdescriptor_t IpAddress_ipv4_oer_ = { -1, TRUE, 4, FALSE, 0, 0, IpAddress_ipv4_oer_ext_arr_, 0, IpAddress_ipv4_oer_p_}; static PerIntegerConstraint IpAddress_ipv4_per_cons_(PerIntegerConstraint::PER_INT_SINGLE_VALUE, new INTEGER(4), FALSE); const ASN_PERdescriptor_t IpAddress_ipv4_per_ = { &IpAddress_ipv4_per_cons_ }; const TTCN_Typedescriptor_t IpAddress_ipv4_descr_ = { "@RSPRO.IpAddress.ipv4", &IpAddress_ipv4_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &IpAddress_ipv4_oer_, &IpAddress_ipv4_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IpAddress_ipv4_default_coding(""); const ASN_Tag_t IpAddress_ipv6_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t IpAddress_ipv6_ber_ = { 1u, IpAddress_ipv6_tag_ }; // No XER for IpAddress_ipv6 const int IpAddress_ipv6_oer_ext_arr_[0] = {}; const int IpAddress_ipv6_oer_p_[0] = {}; const TTCN_OERdescriptor_t IpAddress_ipv6_oer_ = { -1, TRUE, 16, FALSE, 0, 0, IpAddress_ipv6_oer_ext_arr_, 0, IpAddress_ipv6_oer_p_}; static PerIntegerConstraint IpAddress_ipv6_per_cons_(PerIntegerConstraint::PER_INT_SINGLE_VALUE, new INTEGER(16), FALSE); const ASN_PERdescriptor_t IpAddress_ipv6_per_ = { &IpAddress_ipv6_per_cons_ }; const TTCN_Typedescriptor_t IpAddress_ipv6_descr_ = { "@RSPRO.IpAddress.ipv6", &IpAddress_ipv6_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &IpAddress_ipv6_oer_, &IpAddress_ipv6_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IpAddress_ipv6_default_coding(""); UNIVERSAL_CHARSTRING IpAddress_default_coding(""); // No XER for PortNumber const int PortNumber_oer_ext_arr_[0] = {}; const int PortNumber_oer_p_[0] = {}; const TTCN_OERdescriptor_t PortNumber_oer_ = { 2, FALSE, -1, FALSE, 0, 0, PortNumber_oer_ext_arr_, 0, PortNumber_oer_p_}; static PerIntegerConstraint PortNumber_per_cons_(new INTEGER(0), new INTEGER(65535), FALSE); const ASN_PERdescriptor_t PortNumber_per_ = { &PortNumber_per_cons_ }; const TTCN_Typedescriptor_t PortNumber_descr_ = { "@RSPRO.PortNumber", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &PortNumber_oer_, &PortNumber_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PortNumber_default_coding(""); UNIVERSAL_CHARSTRING IpPort_ip_default_coding(""); // No XER for IpPort_port__ const int IpPort_port___oer_ext_arr_[0] = {}; const int IpPort_port___oer_p_[0] = {}; const TTCN_OERdescriptor_t IpPort_port___oer_ = { 2, FALSE, -1, FALSE, 0, 0, IpPort_port___oer_ext_arr_, 0, IpPort_port___oer_p_}; static PerIntegerConstraint IpPort_port___per_cons_(new INTEGER(0), new INTEGER(65535), FALSE); const ASN_PERdescriptor_t IpPort_port___per_ = { &IpPort_port___per_cons_ }; const TTCN_Typedescriptor_t IpPort_port___descr_ = { "@RSPRO.IpPort.port", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &IpPort_port___oer_, &IpPort_port___per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IpPort_port___default_coding(""); // No XER for IpPort const TTCN_JSONdescriptor_t IpPort_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int IpPort_oer_ext_arr_[0] = {}; const int IpPort_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t IpPort_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IpPort_oer_ext_arr_, 2, IpPort_oer_p_}; const ASN_PERdescriptor_t IpPort_per_ = { &IpPort_per_cons_ }; const TTCN_Typedescriptor_t IpPort_descr_ = { "@RSPRO.IpPort", &SEQUENCE_ber_, NULL, NULL, NULL, &IpPort_json_, &IpPort_oer_, &IpPort_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IpPort_default_coding(""); // No XER for ResultCode const TTCN_JSONdescriptor_t ResultCode_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ResultCode_oer_ext_arr_[0] = {}; const int ResultCode_oer_p_[0] = {}; const TTCN_OERdescriptor_t ResultCode_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ResultCode_oer_ext_arr_, 0, ResultCode_oer_p_}; const ASN_PERdescriptor_t ResultCode_per_ = { &ResultCode_per_cons_ }; const TTCN_Typedescriptor_t ResultCode_descr_ = { "@RSPRO.ResultCode", &ENUMERATED_ber_, NULL, NULL, NULL, &ResultCode_json_, &ResultCode_oer_, &ResultCode_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ResultCode_default_coding(""); // No XER for ErrorCode const TTCN_JSONdescriptor_t ErrorCode_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ErrorCode_oer_ext_arr_[0] = {}; const int ErrorCode_oer_p_[0] = {}; const TTCN_OERdescriptor_t ErrorCode_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ErrorCode_oer_ext_arr_, 0, ErrorCode_oer_p_}; const ASN_PERdescriptor_t ErrorCode_per_ = { &ErrorCode_per_cons_ }; const TTCN_Typedescriptor_t ErrorCode_descr_ = { "@RSPRO.ErrorCode", &ENUMERATED_ber_, NULL, NULL, NULL, &ErrorCode_json_, &ErrorCode_oer_, &ErrorCode_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ErrorCode_default_coding(""); const TTCN_Typedescriptor_t& ErrorString_descr_ = IA5String_descr_; UNIVERSAL_CHARSTRING ErrorString_default_coding(""); // No XER for ErrorSeverity const TTCN_JSONdescriptor_t ErrorSeverity_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ErrorSeverity_oer_ext_arr_[0] = {}; const int ErrorSeverity_oer_p_[0] = {}; const TTCN_OERdescriptor_t ErrorSeverity_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ErrorSeverity_oer_ext_arr_, 0, ErrorSeverity_oer_p_}; const ASN_PERdescriptor_t ErrorSeverity_per_ = { &ErrorSeverity_per_cons_ }; const TTCN_Typedescriptor_t ErrorSeverity_descr_ = { "@RSPRO.ErrorSeverity", &ENUMERATED_ber_, NULL, NULL, NULL, &ErrorSeverity_json_, &ErrorSeverity_oer_, &ErrorSeverity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ErrorSeverity_default_coding(""); // No XER for SlotNumber const int SlotNumber_oer_ext_arr_[0] = {}; const int SlotNumber_oer_p_[0] = {}; const TTCN_OERdescriptor_t SlotNumber_oer_ = { 2, FALSE, -1, FALSE, 0, 0, SlotNumber_oer_ext_arr_, 0, SlotNumber_oer_p_}; static PerIntegerConstraint SlotNumber_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t SlotNumber_per_ = { &SlotNumber_per_cons_ }; const TTCN_Typedescriptor_t SlotNumber_descr_ = { "@RSPRO.SlotNumber", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &SlotNumber_oer_, &SlotNumber_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SlotNumber_default_coding(""); // No XER for ClientSlot_clientId const int ClientSlot_clientId_oer_ext_arr_[0] = {}; const int ClientSlot_clientId_oer_p_[0] = {}; const TTCN_OERdescriptor_t ClientSlot_clientId_oer_ = { 2, FALSE, -1, FALSE, 0, 0, ClientSlot_clientId_oer_ext_arr_, 0, ClientSlot_clientId_oer_p_}; static PerIntegerConstraint ClientSlot_clientId_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t ClientSlot_clientId_per_ = { &ClientSlot_clientId_per_cons_ }; const TTCN_Typedescriptor_t ClientSlot_clientId_descr_ = { "@RSPRO.ClientSlot.clientId", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &ClientSlot_clientId_oer_, &ClientSlot_clientId_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlot_clientId_default_coding(""); // No XER for ClientSlot_slotNr const int ClientSlot_slotNr_oer_ext_arr_[0] = {}; const int ClientSlot_slotNr_oer_p_[0] = {}; const TTCN_OERdescriptor_t ClientSlot_slotNr_oer_ = { 2, FALSE, -1, FALSE, 0, 0, ClientSlot_slotNr_oer_ext_arr_, 0, ClientSlot_slotNr_oer_p_}; static PerIntegerConstraint ClientSlot_slotNr_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t ClientSlot_slotNr_per_ = { &ClientSlot_slotNr_per_cons_ }; const TTCN_Typedescriptor_t ClientSlot_slotNr_descr_ = { "@RSPRO.ClientSlot.slotNr", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &ClientSlot_slotNr_oer_, &ClientSlot_slotNr_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlot_slotNr_default_coding(""); // No XER for ClientSlot const TTCN_JSONdescriptor_t ClientSlot_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ClientSlot_oer_ext_arr_[0] = {}; const int ClientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ClientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ClientSlot_oer_ext_arr_, 2, ClientSlot_oer_p_}; const ASN_PERdescriptor_t ClientSlot_per_ = { &ClientSlot_per_cons_ }; const TTCN_Typedescriptor_t ClientSlot_descr_ = { "@RSPRO.ClientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &ClientSlot_oer_, &ClientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlot_default_coding(""); // No XER for BankSlot_bankId const int BankSlot_bankId_oer_ext_arr_[0] = {}; const int BankSlot_bankId_oer_p_[0] = {}; const TTCN_OERdescriptor_t BankSlot_bankId_oer_ = { 2, FALSE, -1, FALSE, 0, 0, BankSlot_bankId_oer_ext_arr_, 0, BankSlot_bankId_oer_p_}; static PerIntegerConstraint BankSlot_bankId_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t BankSlot_bankId_per_ = { &BankSlot_bankId_per_cons_ }; const TTCN_Typedescriptor_t BankSlot_bankId_descr_ = { "@RSPRO.BankSlot.bankId", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &BankSlot_bankId_oer_, &BankSlot_bankId_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlot_bankId_default_coding(""); // No XER for BankSlot_slotNr const int BankSlot_slotNr_oer_ext_arr_[0] = {}; const int BankSlot_slotNr_oer_p_[0] = {}; const TTCN_OERdescriptor_t BankSlot_slotNr_oer_ = { 2, FALSE, -1, FALSE, 0, 0, BankSlot_slotNr_oer_ext_arr_, 0, BankSlot_slotNr_oer_p_}; static PerIntegerConstraint BankSlot_slotNr_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t BankSlot_slotNr_per_ = { &BankSlot_slotNr_per_cons_ }; const TTCN_Typedescriptor_t BankSlot_slotNr_descr_ = { "@RSPRO.BankSlot.slotNr", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &BankSlot_slotNr_oer_, &BankSlot_slotNr_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlot_slotNr_default_coding(""); // No XER for BankSlot const TTCN_JSONdescriptor_t BankSlot_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int BankSlot_oer_ext_arr_[0] = {}; const int BankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t BankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, BankSlot_oer_ext_arr_, 2, BankSlot_oer_p_}; const ASN_PERdescriptor_t BankSlot_per_ = { &BankSlot_per_cons_ }; const TTCN_Typedescriptor_t BankSlot_descr_ = { "@RSPRO.BankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &BankSlot_oer_, &BankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlot_default_coding(""); // No XER for ATR const int ATR_oer_ext_arr_[0] = {}; const int ATR_oer_p_[0] = {}; const TTCN_OERdescriptor_t ATR_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ATR_oer_ext_arr_, 0, ATR_oer_p_}; static PerIntegerConstraint ATR_per_cons_(new INTEGER(1), new INTEGER(55), FALSE); const ASN_PERdescriptor_t ATR_per_ = { &ATR_per_cons_ }; const TTCN_Typedescriptor_t ATR_descr_ = { "@RSPRO.ATR", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &ATR_oer_, &ATR_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ATR_default_coding(""); UNIVERSAL_CHARSTRING TpduFlags_tpduHeaderPresent_default_coding(""); UNIVERSAL_CHARSTRING TpduFlags_finalPart_default_coding(""); UNIVERSAL_CHARSTRING TpduFlags_procByteContinueTx_default_coding(""); UNIVERSAL_CHARSTRING TpduFlags_procByteContinueRx_default_coding(""); // No XER for TpduFlags const TTCN_JSONdescriptor_t TpduFlags_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int TpduFlags_oer_ext_arr_[0] = {}; const int TpduFlags_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t TpduFlags_oer_ = { -1, TRUE, -1, TRUE, 4, 0, TpduFlags_oer_ext_arr_, 4, TpduFlags_oer_p_}; const ASN_PERdescriptor_t TpduFlags_per_ = { &TpduFlags_per_cons_ }; const TTCN_Typedescriptor_t TpduFlags_descr_ = { "@RSPRO.TpduFlags", &SEQUENCE_ber_, NULL, NULL, NULL, &TpduFlags_json_, &TpduFlags_oer_, &TpduFlags_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduFlags_default_coding(""); const ASN_Tag_t SlotPhysStatus_resetActive_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t SlotPhysStatus_resetActive_ber_ = { 1u, SlotPhysStatus_resetActive_tag_ }; // No XER for SlotPhysStatus_resetActive const int SlotPhysStatus_resetActive_oer_ext_arr_[0] = {}; const int SlotPhysStatus_resetActive_oer_p_[0] = {}; const TTCN_OERdescriptor_t SlotPhysStatus_resetActive_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SlotPhysStatus_resetActive_oer_ext_arr_, 0, SlotPhysStatus_resetActive_oer_p_}; const ASN_PERdescriptor_t SlotPhysStatus_resetActive_per_ = { &SlotPhysStatus_resetActive_per_cons_ }; const TTCN_Typedescriptor_t SlotPhysStatus_resetActive_descr_ = { "@RSPRO.SlotPhysStatus.resetActive", &SlotPhysStatus_resetActive_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, NULL, &BOOLEAN_json_, &SlotPhysStatus_resetActive_oer_, &SlotPhysStatus_resetActive_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SlotPhysStatus_resetActive_default_coding(""); // No XER for SlotPhysStatus const TTCN_JSONdescriptor_t SlotPhysStatus_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int SlotPhysStatus_oer_ext_arr_[0] = {}; const int SlotPhysStatus_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t SlotPhysStatus_oer_ = { -1, TRUE, -1, TRUE, 4, 0, SlotPhysStatus_oer_ext_arr_, 4, SlotPhysStatus_oer_p_}; const ASN_PERdescriptor_t SlotPhysStatus_per_ = { &SlotPhysStatus_per_cons_ }; const TTCN_Typedescriptor_t SlotPhysStatus_descr_ = { "@RSPRO.SlotPhysStatus", &SEQUENCE_ber_, NULL, NULL, NULL, &SlotPhysStatus_json_, &SlotPhysStatus_oer_, &SlotPhysStatus_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; const ASN_Tag_t SlotPhysStatus_vccPresent_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t SlotPhysStatus_vccPresent_ber_ = { 1u, SlotPhysStatus_vccPresent_tag_ }; // No XER for SlotPhysStatus_vccPresent const int SlotPhysStatus_vccPresent_oer_ext_arr_[0] = {}; const int SlotPhysStatus_vccPresent_oer_p_[0] = {}; const TTCN_OERdescriptor_t SlotPhysStatus_vccPresent_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SlotPhysStatus_vccPresent_oer_ext_arr_, 0, SlotPhysStatus_vccPresent_oer_p_}; const ASN_PERdescriptor_t SlotPhysStatus_vccPresent_per_ = { &SlotPhysStatus_vccPresent_per_cons_ }; const TTCN_Typedescriptor_t SlotPhysStatus_vccPresent_descr_ = { "@RSPRO.SlotPhysStatus.vccPresent", &SlotPhysStatus_vccPresent_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, NULL, &BOOLEAN_json_, &SlotPhysStatus_vccPresent_oer_, &SlotPhysStatus_vccPresent_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SlotPhysStatus_vccPresent_default_coding(""); const ASN_Tag_t SlotPhysStatus_clkActive_tag_[] = { { ASN_TAG_CONT, 2u }}; const ASN_BERdescriptor_t SlotPhysStatus_clkActive_ber_ = { 1u, SlotPhysStatus_clkActive_tag_ }; // No XER for SlotPhysStatus_clkActive const int SlotPhysStatus_clkActive_oer_ext_arr_[0] = {}; const int SlotPhysStatus_clkActive_oer_p_[0] = {}; const TTCN_OERdescriptor_t SlotPhysStatus_clkActive_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SlotPhysStatus_clkActive_oer_ext_arr_, 0, SlotPhysStatus_clkActive_oer_p_}; const ASN_PERdescriptor_t SlotPhysStatus_clkActive_per_ = { &SlotPhysStatus_clkActive_per_cons_ }; const TTCN_Typedescriptor_t SlotPhysStatus_clkActive_descr_ = { "@RSPRO.SlotPhysStatus.clkActive", &SlotPhysStatus_clkActive_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, NULL, &BOOLEAN_json_, &SlotPhysStatus_clkActive_oer_, &SlotPhysStatus_clkActive_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SlotPhysStatus_clkActive_default_coding(""); const ASN_Tag_t SlotPhysStatus_cardPresent_tag_[] = { { ASN_TAG_CONT, 3u }}; const ASN_BERdescriptor_t SlotPhysStatus_cardPresent_ber_ = { 1u, SlotPhysStatus_cardPresent_tag_ }; // No XER for SlotPhysStatus_cardPresent const int SlotPhysStatus_cardPresent_oer_ext_arr_[0] = {}; const int SlotPhysStatus_cardPresent_oer_p_[0] = {}; const TTCN_OERdescriptor_t SlotPhysStatus_cardPresent_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SlotPhysStatus_cardPresent_oer_ext_arr_, 0, SlotPhysStatus_cardPresent_oer_p_}; const ASN_PERdescriptor_t SlotPhysStatus_cardPresent_per_ = { &SlotPhysStatus_cardPresent_per_cons_ }; const TTCN_Typedescriptor_t SlotPhysStatus_cardPresent_descr_ = { "@RSPRO.SlotPhysStatus.cardPresent", &SlotPhysStatus_cardPresent_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, NULL, &BOOLEAN_json_, &SlotPhysStatus_cardPresent_oer_, &SlotPhysStatus_cardPresent_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SlotPhysStatus_cardPresent_default_coding(""); UNIVERSAL_CHARSTRING SlotPhysStatus_default_coding(""); // No XER for ConnectBankReq_identity const int ConnectBankReq_identity_oer_ext_arr_[0] = {}; const int ConnectBankReq_identity_oer_p_[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const TTCN_OERdescriptor_t ConnectBankReq_identity_oer_ = { -1, TRUE, -1, TRUE, 9, 0, ConnectBankReq_identity_oer_ext_arr_, 9, ConnectBankReq_identity_oer_p_}; const ASN_PERdescriptor_t ConnectBankReq_identity_per_ = { &ConnectBankReq_identity_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankReq_identity_descr_ = { "@RSPRO.ConnectBankReq.identity", &SEQUENCE_ber_, NULL, NULL, NULL, &ComponentIdentity_json_, &ConnectBankReq_identity_oer_, &ConnectBankReq_identity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankReq_identity_default_coding(""); // No XER for ConnectBankReq_bankId const int ConnectBankReq_bankId_oer_ext_arr_[0] = {}; const int ConnectBankReq_bankId_oer_p_[0] = {}; const TTCN_OERdescriptor_t ConnectBankReq_bankId_oer_ = { 2, FALSE, -1, FALSE, 0, 0, ConnectBankReq_bankId_oer_ext_arr_, 0, ConnectBankReq_bankId_oer_p_}; static PerIntegerConstraint ConnectBankReq_bankId_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t ConnectBankReq_bankId_per_ = { &ConnectBankReq_bankId_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankReq_bankId_descr_ = { "@RSPRO.ConnectBankReq.bankId", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &ConnectBankReq_bankId_oer_, &ConnectBankReq_bankId_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankReq_bankId_default_coding(""); // No XER for ConnectBankReq_numberOfSlots const int ConnectBankReq_numberOfSlots_oer_ext_arr_[0] = {}; const int ConnectBankReq_numberOfSlots_oer_p_[0] = {}; const TTCN_OERdescriptor_t ConnectBankReq_numberOfSlots_oer_ = { 2, FALSE, -1, FALSE, 0, 0, ConnectBankReq_numberOfSlots_oer_ext_arr_, 0, ConnectBankReq_numberOfSlots_oer_p_}; static PerIntegerConstraint ConnectBankReq_numberOfSlots_per_cons_(new INTEGER(0), new INTEGER(1023), FALSE); const ASN_PERdescriptor_t ConnectBankReq_numberOfSlots_per_ = { &ConnectBankReq_numberOfSlots_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankReq_numberOfSlots_descr_ = { "@RSPRO.ConnectBankReq.numberOfSlots", &INTEGER_ber_, NULL, NULL, NULL, &INTEGER_json_, &ConnectBankReq_numberOfSlots_oer_, &ConnectBankReq_numberOfSlots_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankReq_numberOfSlots_default_coding(""); // No XER for ConnectBankReq const TTCN_JSONdescriptor_t ConnectBankReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConnectBankReq_oer_ext_arr_[0] = {}; const int ConnectBankReq_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t ConnectBankReq_oer_ = { -1, TRUE, -1, TRUE, 4, 0, ConnectBankReq_oer_ext_arr_, 4, ConnectBankReq_oer_p_}; const ASN_PERdescriptor_t ConnectBankReq_per_ = { &ConnectBankReq_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankReq_descr_ = { "@RSPRO.ConnectBankReq", &SEQUENCE_ber_, NULL, NULL, NULL, &ConnectBankReq_json_, &ConnectBankReq_oer_, &ConnectBankReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ConnectBankReq_bound const int ConnectBankReq_bound_oer_ext_arr_[0] = {}; const int ConnectBankReq_bound_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConnectBankReq_bound_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ConnectBankReq_bound_oer_ext_arr_, 2, ConnectBankReq_bound_oer_p_}; const ASN_PERdescriptor_t ConnectBankReq_bound_per_ = { &ConnectBankReq_bound_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankReq_bound_descr_ = { "@RSPRO.ConnectBankReq.bound", &SEQUENCE_ber_, NULL, NULL, NULL, &IpPort_json_, &ConnectBankReq_bound_oer_, &ConnectBankReq_bound_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankReq_bound_default_coding(""); UNIVERSAL_CHARSTRING ConnectBankReq_default_coding(""); // No XER for ConnectBankRes_identity const int ConnectBankRes_identity_oer_ext_arr_[0] = {}; const int ConnectBankRes_identity_oer_p_[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const TTCN_OERdescriptor_t ConnectBankRes_identity_oer_ = { -1, TRUE, -1, TRUE, 9, 0, ConnectBankRes_identity_oer_ext_arr_, 9, ConnectBankRes_identity_oer_p_}; const ASN_PERdescriptor_t ConnectBankRes_identity_per_ = { &ConnectBankRes_identity_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankRes_identity_descr_ = { "@RSPRO.ConnectBankRes.identity", &SEQUENCE_ber_, NULL, NULL, NULL, &ComponentIdentity_json_, &ConnectBankRes_identity_oer_, &ConnectBankRes_identity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankRes_identity_default_coding(""); UNIVERSAL_CHARSTRING ConnectBankRes_result_default_coding(""); // No XER for ConnectBankRes const TTCN_JSONdescriptor_t ConnectBankRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConnectBankRes_oer_ext_arr_[0] = {}; const int ConnectBankRes_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConnectBankRes_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConnectBankRes_oer_ext_arr_, 2, ConnectBankRes_oer_p_}; const ASN_PERdescriptor_t ConnectBankRes_per_ = { &ConnectBankRes_per_cons_ }; const TTCN_Typedescriptor_t ConnectBankRes_descr_ = { "@RSPRO.ConnectBankRes", &SEQUENCE_ber_, NULL, NULL, NULL, &ConnectBankRes_json_, &ConnectBankRes_oer_, &ConnectBankRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectBankRes_default_coding(""); // No XER for ConnectClientReq_identity const int ConnectClientReq_identity_oer_ext_arr_[0] = {}; const int ConnectClientReq_identity_oer_p_[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const TTCN_OERdescriptor_t ConnectClientReq_identity_oer_ = { -1, TRUE, -1, TRUE, 9, 0, ConnectClientReq_identity_oer_ext_arr_, 9, ConnectClientReq_identity_oer_p_}; const ASN_PERdescriptor_t ConnectClientReq_identity_per_ = { &ConnectClientReq_identity_per_cons_ }; const TTCN_Typedescriptor_t ConnectClientReq_identity_descr_ = { "@RSPRO.ConnectClientReq.identity", &SEQUENCE_ber_, NULL, NULL, NULL, &ComponentIdentity_json_, &ConnectClientReq_identity_oer_, &ConnectClientReq_identity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectClientReq_identity_default_coding(""); // No XER for ConnectClientReq const TTCN_JSONdescriptor_t ConnectClientReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConnectClientReq_oer_ext_arr_[0] = {}; const int ConnectClientReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConnectClientReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConnectClientReq_oer_ext_arr_, 2, ConnectClientReq_oer_p_}; const ASN_PERdescriptor_t ConnectClientReq_per_ = { &ConnectClientReq_per_cons_ }; const TTCN_Typedescriptor_t ConnectClientReq_descr_ = { "@RSPRO.ConnectClientReq", &SEQUENCE_ber_, NULL, NULL, NULL, &ConnectClientReq_json_, &ConnectClientReq_oer_, &ConnectClientReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ConnectClientReq_clientSlot const int ConnectClientReq_clientSlot_oer_ext_arr_[0] = {}; const int ConnectClientReq_clientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConnectClientReq_clientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConnectClientReq_clientSlot_oer_ext_arr_, 2, ConnectClientReq_clientSlot_oer_p_}; const ASN_PERdescriptor_t ConnectClientReq_clientSlot_per_ = { &ConnectClientReq_clientSlot_per_cons_ }; const TTCN_Typedescriptor_t ConnectClientReq_clientSlot_descr_ = { "@RSPRO.ConnectClientReq.clientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &ConnectClientReq_clientSlot_oer_, &ConnectClientReq_clientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectClientReq_clientSlot_default_coding(""); UNIVERSAL_CHARSTRING ConnectClientReq_default_coding(""); // No XER for ConnectClientRes_identity const int ConnectClientRes_identity_oer_ext_arr_[0] = {}; const int ConnectClientRes_identity_oer_p_[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; const TTCN_OERdescriptor_t ConnectClientRes_identity_oer_ = { -1, TRUE, -1, TRUE, 9, 0, ConnectClientRes_identity_oer_ext_arr_, 9, ConnectClientRes_identity_oer_p_}; const ASN_PERdescriptor_t ConnectClientRes_identity_per_ = { &ConnectClientRes_identity_per_cons_ }; const TTCN_Typedescriptor_t ConnectClientRes_identity_descr_ = { "@RSPRO.ConnectClientRes.identity", &SEQUENCE_ber_, NULL, NULL, NULL, &ComponentIdentity_json_, &ConnectClientRes_identity_oer_, &ConnectClientRes_identity_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectClientRes_identity_default_coding(""); UNIVERSAL_CHARSTRING ConnectClientRes_result_default_coding(""); // No XER for ConnectClientRes const TTCN_JSONdescriptor_t ConnectClientRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConnectClientRes_oer_ext_arr_[0] = {}; const int ConnectClientRes_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConnectClientRes_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConnectClientRes_oer_ext_arr_, 2, ConnectClientRes_oer_p_}; const ASN_PERdescriptor_t ConnectClientRes_per_ = { &ConnectClientRes_per_cons_ }; const TTCN_Typedescriptor_t ConnectClientRes_descr_ = { "@RSPRO.ConnectClientRes", &SEQUENCE_ber_, NULL, NULL, NULL, &ConnectClientRes_json_, &ConnectClientRes_oer_, &ConnectClientRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConnectClientRes_default_coding(""); // No XER for CreateMappingReq_client const int CreateMappingReq_client_oer_ext_arr_[0] = {}; const int CreateMappingReq_client_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t CreateMappingReq_client_oer_ = { -1, TRUE, -1, TRUE, 2, 0, CreateMappingReq_client_oer_ext_arr_, 2, CreateMappingReq_client_oer_p_}; const ASN_PERdescriptor_t CreateMappingReq_client_per_ = { &CreateMappingReq_client_per_cons_ }; const TTCN_Typedescriptor_t CreateMappingReq_client_descr_ = { "@RSPRO.CreateMappingReq.client", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &CreateMappingReq_client_oer_, &CreateMappingReq_client_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING CreateMappingReq_client_default_coding(""); // No XER for CreateMappingReq_bank const int CreateMappingReq_bank_oer_ext_arr_[0] = {}; const int CreateMappingReq_bank_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t CreateMappingReq_bank_oer_ = { -1, TRUE, -1, TRUE, 2, 0, CreateMappingReq_bank_oer_ext_arr_, 2, CreateMappingReq_bank_oer_p_}; const ASN_PERdescriptor_t CreateMappingReq_bank_per_ = { &CreateMappingReq_bank_per_cons_ }; const TTCN_Typedescriptor_t CreateMappingReq_bank_descr_ = { "@RSPRO.CreateMappingReq.bank", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &CreateMappingReq_bank_oer_, &CreateMappingReq_bank_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING CreateMappingReq_bank_default_coding(""); // No XER for CreateMappingReq const TTCN_JSONdescriptor_t CreateMappingReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int CreateMappingReq_oer_ext_arr_[0] = {}; const int CreateMappingReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t CreateMappingReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, CreateMappingReq_oer_ext_arr_, 2, CreateMappingReq_oer_p_}; const ASN_PERdescriptor_t CreateMappingReq_per_ = { &CreateMappingReq_per_cons_ }; const TTCN_Typedescriptor_t CreateMappingReq_descr_ = { "@RSPRO.CreateMappingReq", &SEQUENCE_ber_, NULL, NULL, NULL, &CreateMappingReq_json_, &CreateMappingReq_oer_, &CreateMappingReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING CreateMappingReq_default_coding(""); UNIVERSAL_CHARSTRING CreateMappingRes_result_default_coding(""); // No XER for CreateMappingRes const TTCN_JSONdescriptor_t CreateMappingRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int CreateMappingRes_oer_ext_arr_[0] = {}; const int CreateMappingRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t CreateMappingRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, CreateMappingRes_oer_ext_arr_, 1, CreateMappingRes_oer_p_}; const ASN_PERdescriptor_t CreateMappingRes_per_ = { &CreateMappingRes_per_cons_ }; const TTCN_Typedescriptor_t CreateMappingRes_descr_ = { "@RSPRO.CreateMappingRes", &SEQUENCE_ber_, NULL, NULL, NULL, &CreateMappingRes_json_, &CreateMappingRes_oer_, &CreateMappingRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING CreateMappingRes_default_coding(""); // No XER for RemoveMappingReq_client const int RemoveMappingReq_client_oer_ext_arr_[0] = {}; const int RemoveMappingReq_client_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RemoveMappingReq_client_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RemoveMappingReq_client_oer_ext_arr_, 2, RemoveMappingReq_client_oer_p_}; const ASN_PERdescriptor_t RemoveMappingReq_client_per_ = { &RemoveMappingReq_client_per_cons_ }; const TTCN_Typedescriptor_t RemoveMappingReq_client_descr_ = { "@RSPRO.RemoveMappingReq.client", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &RemoveMappingReq_client_oer_, &RemoveMappingReq_client_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RemoveMappingReq_client_default_coding(""); // No XER for RemoveMappingReq_bank const int RemoveMappingReq_bank_oer_ext_arr_[0] = {}; const int RemoveMappingReq_bank_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RemoveMappingReq_bank_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RemoveMappingReq_bank_oer_ext_arr_, 2, RemoveMappingReq_bank_oer_p_}; const ASN_PERdescriptor_t RemoveMappingReq_bank_per_ = { &RemoveMappingReq_bank_per_cons_ }; const TTCN_Typedescriptor_t RemoveMappingReq_bank_descr_ = { "@RSPRO.RemoveMappingReq.bank", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &RemoveMappingReq_bank_oer_, &RemoveMappingReq_bank_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RemoveMappingReq_bank_default_coding(""); // No XER for RemoveMappingReq const TTCN_JSONdescriptor_t RemoveMappingReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int RemoveMappingReq_oer_ext_arr_[0] = {}; const int RemoveMappingReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RemoveMappingReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RemoveMappingReq_oer_ext_arr_, 2, RemoveMappingReq_oer_p_}; const ASN_PERdescriptor_t RemoveMappingReq_per_ = { &RemoveMappingReq_per_cons_ }; const TTCN_Typedescriptor_t RemoveMappingReq_descr_ = { "@RSPRO.RemoveMappingReq", &SEQUENCE_ber_, NULL, NULL, NULL, &RemoveMappingReq_json_, &RemoveMappingReq_oer_, &RemoveMappingReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RemoveMappingReq_default_coding(""); UNIVERSAL_CHARSTRING RemoveMappingRes_result_default_coding(""); // No XER for RemoveMappingRes const TTCN_JSONdescriptor_t RemoveMappingRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int RemoveMappingRes_oer_ext_arr_[0] = {}; const int RemoveMappingRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RemoveMappingRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RemoveMappingRes_oer_ext_arr_, 1, RemoveMappingRes_oer_p_}; const ASN_PERdescriptor_t RemoveMappingRes_per_ = { &RemoveMappingRes_per_cons_ }; const TTCN_Typedescriptor_t RemoveMappingRes_descr_ = { "@RSPRO.RemoveMappingRes", &SEQUENCE_ber_, NULL, NULL, NULL, &RemoveMappingRes_json_, &RemoveMappingRes_oer_, &RemoveMappingRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RemoveMappingRes_default_coding(""); // No XER for ConfigClientIdReq_clientSlot const int ConfigClientIdReq_clientSlot_oer_ext_arr_[0] = {}; const int ConfigClientIdReq_clientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConfigClientIdReq_clientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConfigClientIdReq_clientSlot_oer_ext_arr_, 2, ConfigClientIdReq_clientSlot_oer_p_}; const ASN_PERdescriptor_t ConfigClientIdReq_clientSlot_per_ = { &ConfigClientIdReq_clientSlot_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientIdReq_clientSlot_descr_ = { "@RSPRO.ConfigClientIdReq.clientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &ConfigClientIdReq_clientSlot_oer_, &ConfigClientIdReq_clientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientIdReq_clientSlot_default_coding(""); // No XER for ConfigClientIdReq const TTCN_JSONdescriptor_t ConfigClientIdReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConfigClientIdReq_oer_ext_arr_[0] = {}; const int ConfigClientIdReq_oer_p_[1] = {0}; const TTCN_OERdescriptor_t ConfigClientIdReq_oer_ = { -1, TRUE, -1, TRUE, 1, 0, ConfigClientIdReq_oer_ext_arr_, 1, ConfigClientIdReq_oer_p_}; const ASN_PERdescriptor_t ConfigClientIdReq_per_ = { &ConfigClientIdReq_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientIdReq_descr_ = { "@RSPRO.ConfigClientIdReq", &SEQUENCE_ber_, NULL, NULL, NULL, &ConfigClientIdReq_json_, &ConfigClientIdReq_oer_, &ConfigClientIdReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientIdReq_default_coding(""); UNIVERSAL_CHARSTRING ConfigClientIdRes_result_default_coding(""); // No XER for ConfigClientIdRes const TTCN_JSONdescriptor_t ConfigClientIdRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConfigClientIdRes_oer_ext_arr_[0] = {}; const int ConfigClientIdRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t ConfigClientIdRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, ConfigClientIdRes_oer_ext_arr_, 1, ConfigClientIdRes_oer_p_}; const ASN_PERdescriptor_t ConfigClientIdRes_per_ = { &ConfigClientIdRes_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientIdRes_descr_ = { "@RSPRO.ConfigClientIdRes", &SEQUENCE_ber_, NULL, NULL, NULL, &ConfigClientIdRes_json_, &ConfigClientIdRes_oer_, &ConfigClientIdRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientIdRes_default_coding(""); // No XER for ConfigClientBankReq_bankSlot const int ConfigClientBankReq_bankSlot_oer_ext_arr_[0] = {}; const int ConfigClientBankReq_bankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConfigClientBankReq_bankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConfigClientBankReq_bankSlot_oer_ext_arr_, 2, ConfigClientBankReq_bankSlot_oer_p_}; const ASN_PERdescriptor_t ConfigClientBankReq_bankSlot_per_ = { &ConfigClientBankReq_bankSlot_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientBankReq_bankSlot_descr_ = { "@RSPRO.ConfigClientBankReq.bankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &ConfigClientBankReq_bankSlot_oer_, &ConfigClientBankReq_bankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientBankReq_bankSlot_default_coding(""); // No XER for ConfigClientBankReq_bankd const int ConfigClientBankReq_bankd_oer_ext_arr_[0] = {}; const int ConfigClientBankReq_bankd_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConfigClientBankReq_bankd_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ConfigClientBankReq_bankd_oer_ext_arr_, 2, ConfigClientBankReq_bankd_oer_p_}; const ASN_PERdescriptor_t ConfigClientBankReq_bankd_per_ = { &ConfigClientBankReq_bankd_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientBankReq_bankd_descr_ = { "@RSPRO.ConfigClientBankReq.bankd", &SEQUENCE_ber_, NULL, NULL, NULL, &IpPort_json_, &ConfigClientBankReq_bankd_oer_, &ConfigClientBankReq_bankd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientBankReq_bankd_default_coding(""); // No XER for ConfigClientBankReq const TTCN_JSONdescriptor_t ConfigClientBankReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConfigClientBankReq_oer_ext_arr_[0] = {}; const int ConfigClientBankReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ConfigClientBankReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ConfigClientBankReq_oer_ext_arr_, 2, ConfigClientBankReq_oer_p_}; const ASN_PERdescriptor_t ConfigClientBankReq_per_ = { &ConfigClientBankReq_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientBankReq_descr_ = { "@RSPRO.ConfigClientBankReq", &SEQUENCE_ber_, NULL, NULL, NULL, &ConfigClientBankReq_json_, &ConfigClientBankReq_oer_, &ConfigClientBankReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientBankReq_default_coding(""); UNIVERSAL_CHARSTRING ConfigClientBankRes_result_default_coding(""); // No XER for ConfigClientBankRes const TTCN_JSONdescriptor_t ConfigClientBankRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ConfigClientBankRes_oer_ext_arr_[0] = {}; const int ConfigClientBankRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t ConfigClientBankRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, ConfigClientBankRes_oer_ext_arr_, 1, ConfigClientBankRes_oer_p_}; const ASN_PERdescriptor_t ConfigClientBankRes_per_ = { &ConfigClientBankRes_per_cons_ }; const TTCN_Typedescriptor_t ConfigClientBankRes_descr_ = { "@RSPRO.ConfigClientBankRes", &SEQUENCE_ber_, NULL, NULL, NULL, &ConfigClientBankRes_json_, &ConfigClientBankRes_oer_, &ConfigClientBankRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ConfigClientBankRes_default_coding(""); // No XER for SetAtrReq_slot const int SetAtrReq_slot_oer_ext_arr_[0] = {}; const int SetAtrReq_slot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t SetAtrReq_slot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, SetAtrReq_slot_oer_ext_arr_, 2, SetAtrReq_slot_oer_p_}; const ASN_PERdescriptor_t SetAtrReq_slot_per_ = { &SetAtrReq_slot_per_cons_ }; const TTCN_Typedescriptor_t SetAtrReq_slot_descr_ = { "@RSPRO.SetAtrReq.slot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &SetAtrReq_slot_oer_, &SetAtrReq_slot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SetAtrReq_slot_default_coding(""); // No XER for SetAtrReq_atr const int SetAtrReq_atr_oer_ext_arr_[0] = {}; const int SetAtrReq_atr_oer_p_[0] = {}; const TTCN_OERdescriptor_t SetAtrReq_atr_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SetAtrReq_atr_oer_ext_arr_, 0, SetAtrReq_atr_oer_p_}; static PerIntegerConstraint SetAtrReq_atr_per_cons_(new INTEGER(1), new INTEGER(55), FALSE); const ASN_PERdescriptor_t SetAtrReq_atr_per_ = { &SetAtrReq_atr_per_cons_ }; const TTCN_Typedescriptor_t SetAtrReq_atr_descr_ = { "@RSPRO.SetAtrReq.atr", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, NULL, &OCTETSTRING_json_, &SetAtrReq_atr_oer_, &SetAtrReq_atr_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SetAtrReq_atr_default_coding(""); // No XER for SetAtrReq const TTCN_JSONdescriptor_t SetAtrReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int SetAtrReq_oer_ext_arr_[0] = {}; const int SetAtrReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t SetAtrReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, SetAtrReq_oer_ext_arr_, 2, SetAtrReq_oer_p_}; const ASN_PERdescriptor_t SetAtrReq_per_ = { &SetAtrReq_per_cons_ }; const TTCN_Typedescriptor_t SetAtrReq_descr_ = { "@RSPRO.SetAtrReq", &SEQUENCE_ber_, NULL, NULL, NULL, &SetAtrReq_json_, &SetAtrReq_oer_, &SetAtrReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SetAtrReq_default_coding(""); UNIVERSAL_CHARSTRING SetAtrRes_result_default_coding(""); // No XER for SetAtrRes const TTCN_JSONdescriptor_t SetAtrRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int SetAtrRes_oer_ext_arr_[0] = {}; const int SetAtrRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t SetAtrRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, SetAtrRes_oer_ext_arr_, 1, SetAtrRes_oer_p_}; const ASN_PERdescriptor_t SetAtrRes_per_ = { &SetAtrRes_per_cons_ }; const TTCN_Typedescriptor_t SetAtrRes_descr_ = { "@RSPRO.SetAtrRes", &SEQUENCE_ber_, NULL, NULL, NULL, &SetAtrRes_json_, &SetAtrRes_oer_, &SetAtrRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING SetAtrRes_default_coding(""); // No XER for TpduModemToCard_fromClientSlot const int TpduModemToCard_fromClientSlot_oer_ext_arr_[0] = {}; const int TpduModemToCard_fromClientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t TpduModemToCard_fromClientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, TpduModemToCard_fromClientSlot_oer_ext_arr_, 2, TpduModemToCard_fromClientSlot_oer_p_}; const ASN_PERdescriptor_t TpduModemToCard_fromClientSlot_per_ = { &TpduModemToCard_fromClientSlot_per_cons_ }; const TTCN_Typedescriptor_t TpduModemToCard_fromClientSlot_descr_ = { "@RSPRO.TpduModemToCard.fromClientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &TpduModemToCard_fromClientSlot_oer_, &TpduModemToCard_fromClientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduModemToCard_fromClientSlot_default_coding(""); // No XER for TpduModemToCard_toBankSlot const int TpduModemToCard_toBankSlot_oer_ext_arr_[0] = {}; const int TpduModemToCard_toBankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t TpduModemToCard_toBankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, TpduModemToCard_toBankSlot_oer_ext_arr_, 2, TpduModemToCard_toBankSlot_oer_p_}; const ASN_PERdescriptor_t TpduModemToCard_toBankSlot_per_ = { &TpduModemToCard_toBankSlot_per_cons_ }; const TTCN_Typedescriptor_t TpduModemToCard_toBankSlot_descr_ = { "@RSPRO.TpduModemToCard.toBankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &TpduModemToCard_toBankSlot_oer_, &TpduModemToCard_toBankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduModemToCard_toBankSlot_default_coding(""); // No XER for TpduModemToCard_flags const int TpduModemToCard_flags_oer_ext_arr_[0] = {}; const int TpduModemToCard_flags_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t TpduModemToCard_flags_oer_ = { -1, TRUE, -1, TRUE, 4, 0, TpduModemToCard_flags_oer_ext_arr_, 4, TpduModemToCard_flags_oer_p_}; const ASN_PERdescriptor_t TpduModemToCard_flags_per_ = { &TpduModemToCard_flags_per_cons_ }; const TTCN_Typedescriptor_t TpduModemToCard_flags_descr_ = { "@RSPRO.TpduModemToCard.flags", &SEQUENCE_ber_, NULL, NULL, NULL, &TpduFlags_json_, &TpduModemToCard_flags_oer_, &TpduModemToCard_flags_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduModemToCard_flags_default_coding(""); UNIVERSAL_CHARSTRING TpduModemToCard_data_default_coding(""); // No XER for TpduModemToCard const TTCN_JSONdescriptor_t TpduModemToCard_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int TpduModemToCard_oer_ext_arr_[0] = {}; const int TpduModemToCard_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t TpduModemToCard_oer_ = { -1, TRUE, -1, TRUE, 4, 0, TpduModemToCard_oer_ext_arr_, 4, TpduModemToCard_oer_p_}; const ASN_PERdescriptor_t TpduModemToCard_per_ = { &TpduModemToCard_per_cons_ }; const TTCN_Typedescriptor_t TpduModemToCard_descr_ = { "@RSPRO.TpduModemToCard", &SEQUENCE_ber_, NULL, NULL, NULL, &TpduModemToCard_json_, &TpduModemToCard_oer_, &TpduModemToCard_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduModemToCard_default_coding(""); // No XER for TpduCardToModem_fromBankSlot const int TpduCardToModem_fromBankSlot_oer_ext_arr_[0] = {}; const int TpduCardToModem_fromBankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t TpduCardToModem_fromBankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, TpduCardToModem_fromBankSlot_oer_ext_arr_, 2, TpduCardToModem_fromBankSlot_oer_p_}; const ASN_PERdescriptor_t TpduCardToModem_fromBankSlot_per_ = { &TpduCardToModem_fromBankSlot_per_cons_ }; const TTCN_Typedescriptor_t TpduCardToModem_fromBankSlot_descr_ = { "@RSPRO.TpduCardToModem.fromBankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &TpduCardToModem_fromBankSlot_oer_, &TpduCardToModem_fromBankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduCardToModem_fromBankSlot_default_coding(""); // No XER for TpduCardToModem_toClientSlot const int TpduCardToModem_toClientSlot_oer_ext_arr_[0] = {}; const int TpduCardToModem_toClientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t TpduCardToModem_toClientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, TpduCardToModem_toClientSlot_oer_ext_arr_, 2, TpduCardToModem_toClientSlot_oer_p_}; const ASN_PERdescriptor_t TpduCardToModem_toClientSlot_per_ = { &TpduCardToModem_toClientSlot_per_cons_ }; const TTCN_Typedescriptor_t TpduCardToModem_toClientSlot_descr_ = { "@RSPRO.TpduCardToModem.toClientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &TpduCardToModem_toClientSlot_oer_, &TpduCardToModem_toClientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduCardToModem_toClientSlot_default_coding(""); // No XER for TpduCardToModem_flags const int TpduCardToModem_flags_oer_ext_arr_[0] = {}; const int TpduCardToModem_flags_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t TpduCardToModem_flags_oer_ = { -1, TRUE, -1, TRUE, 4, 0, TpduCardToModem_flags_oer_ext_arr_, 4, TpduCardToModem_flags_oer_p_}; const ASN_PERdescriptor_t TpduCardToModem_flags_per_ = { &TpduCardToModem_flags_per_cons_ }; const TTCN_Typedescriptor_t TpduCardToModem_flags_descr_ = { "@RSPRO.TpduCardToModem.flags", &SEQUENCE_ber_, NULL, NULL, NULL, &TpduFlags_json_, &TpduCardToModem_flags_oer_, &TpduCardToModem_flags_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduCardToModem_flags_default_coding(""); UNIVERSAL_CHARSTRING TpduCardToModem_data_default_coding(""); // No XER for TpduCardToModem const TTCN_JSONdescriptor_t TpduCardToModem_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int TpduCardToModem_oer_ext_arr_[0] = {}; const int TpduCardToModem_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t TpduCardToModem_oer_ = { -1, TRUE, -1, TRUE, 4, 0, TpduCardToModem_oer_ext_arr_, 4, TpduCardToModem_oer_p_}; const ASN_PERdescriptor_t TpduCardToModem_per_ = { &TpduCardToModem_per_cons_ }; const TTCN_Typedescriptor_t TpduCardToModem_descr_ = { "@RSPRO.TpduCardToModem", &SEQUENCE_ber_, NULL, NULL, NULL, &TpduCardToModem_json_, &TpduCardToModem_oer_, &TpduCardToModem_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING TpduCardToModem_default_coding(""); // No XER for ClientSlotStatusInd_fromClientSlot const int ClientSlotStatusInd_fromClientSlot_oer_ext_arr_[0] = {}; const int ClientSlotStatusInd_fromClientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ClientSlotStatusInd_fromClientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ClientSlotStatusInd_fromClientSlot_oer_ext_arr_, 2, ClientSlotStatusInd_fromClientSlot_oer_p_}; const ASN_PERdescriptor_t ClientSlotStatusInd_fromClientSlot_per_ = { &ClientSlotStatusInd_fromClientSlot_per_cons_ }; const TTCN_Typedescriptor_t ClientSlotStatusInd_fromClientSlot_descr_ = { "@RSPRO.ClientSlotStatusInd.fromClientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &ClientSlotStatusInd_fromClientSlot_oer_, &ClientSlotStatusInd_fromClientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlotStatusInd_fromClientSlot_default_coding(""); // No XER for ClientSlotStatusInd_toBankSlot const int ClientSlotStatusInd_toBankSlot_oer_ext_arr_[0] = {}; const int ClientSlotStatusInd_toBankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ClientSlotStatusInd_toBankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ClientSlotStatusInd_toBankSlot_oer_ext_arr_, 2, ClientSlotStatusInd_toBankSlot_oer_p_}; const ASN_PERdescriptor_t ClientSlotStatusInd_toBankSlot_per_ = { &ClientSlotStatusInd_toBankSlot_per_cons_ }; const TTCN_Typedescriptor_t ClientSlotStatusInd_toBankSlot_descr_ = { "@RSPRO.ClientSlotStatusInd.toBankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &ClientSlotStatusInd_toBankSlot_oer_, &ClientSlotStatusInd_toBankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlotStatusInd_toBankSlot_default_coding(""); // No XER for ClientSlotStatusInd_slotPhysStatus const int ClientSlotStatusInd_slotPhysStatus_oer_ext_arr_[0] = {}; const int ClientSlotStatusInd_slotPhysStatus_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t ClientSlotStatusInd_slotPhysStatus_oer_ = { -1, TRUE, -1, TRUE, 4, 0, ClientSlotStatusInd_slotPhysStatus_oer_ext_arr_, 4, ClientSlotStatusInd_slotPhysStatus_oer_p_}; const ASN_PERdescriptor_t ClientSlotStatusInd_slotPhysStatus_per_ = { &ClientSlotStatusInd_slotPhysStatus_per_cons_ }; const TTCN_Typedescriptor_t ClientSlotStatusInd_slotPhysStatus_descr_ = { "@RSPRO.ClientSlotStatusInd.slotPhysStatus", &SEQUENCE_ber_, NULL, NULL, NULL, &SlotPhysStatus_json_, &ClientSlotStatusInd_slotPhysStatus_oer_, &ClientSlotStatusInd_slotPhysStatus_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlotStatusInd_slotPhysStatus_default_coding(""); // No XER for ClientSlotStatusInd const TTCN_JSONdescriptor_t ClientSlotStatusInd_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ClientSlotStatusInd_oer_ext_arr_[0] = {}; const int ClientSlotStatusInd_oer_p_[3] = {0, 1, 2}; const TTCN_OERdescriptor_t ClientSlotStatusInd_oer_ = { -1, TRUE, -1, TRUE, 3, 0, ClientSlotStatusInd_oer_ext_arr_, 3, ClientSlotStatusInd_oer_p_}; const ASN_PERdescriptor_t ClientSlotStatusInd_per_ = { &ClientSlotStatusInd_per_cons_ }; const TTCN_Typedescriptor_t ClientSlotStatusInd_descr_ = { "@RSPRO.ClientSlotStatusInd", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlotStatusInd_json_, &ClientSlotStatusInd_oer_, &ClientSlotStatusInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ClientSlotStatusInd_default_coding(""); // No XER for BankSlotStatusInd_fromBankSlot const int BankSlotStatusInd_fromBankSlot_oer_ext_arr_[0] = {}; const int BankSlotStatusInd_fromBankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t BankSlotStatusInd_fromBankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, BankSlotStatusInd_fromBankSlot_oer_ext_arr_, 2, BankSlotStatusInd_fromBankSlot_oer_p_}; const ASN_PERdescriptor_t BankSlotStatusInd_fromBankSlot_per_ = { &BankSlotStatusInd_fromBankSlot_per_cons_ }; const TTCN_Typedescriptor_t BankSlotStatusInd_fromBankSlot_descr_ = { "@RSPRO.BankSlotStatusInd.fromBankSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlot_json_, &BankSlotStatusInd_fromBankSlot_oer_, &BankSlotStatusInd_fromBankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlotStatusInd_fromBankSlot_default_coding(""); // No XER for BankSlotStatusInd_toClientSlot const int BankSlotStatusInd_toClientSlot_oer_ext_arr_[0] = {}; const int BankSlotStatusInd_toClientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t BankSlotStatusInd_toClientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, BankSlotStatusInd_toClientSlot_oer_ext_arr_, 2, BankSlotStatusInd_toClientSlot_oer_p_}; const ASN_PERdescriptor_t BankSlotStatusInd_toClientSlot_per_ = { &BankSlotStatusInd_toClientSlot_per_cons_ }; const TTCN_Typedescriptor_t BankSlotStatusInd_toClientSlot_descr_ = { "@RSPRO.BankSlotStatusInd.toClientSlot", &SEQUENCE_ber_, NULL, NULL, NULL, &ClientSlot_json_, &BankSlotStatusInd_toClientSlot_oer_, &BankSlotStatusInd_toClientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlotStatusInd_toClientSlot_default_coding(""); // No XER for BankSlotStatusInd_slotPhysStatus const int BankSlotStatusInd_slotPhysStatus_oer_ext_arr_[0] = {}; const int BankSlotStatusInd_slotPhysStatus_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t BankSlotStatusInd_slotPhysStatus_oer_ = { -1, TRUE, -1, TRUE, 4, 0, BankSlotStatusInd_slotPhysStatus_oer_ext_arr_, 4, BankSlotStatusInd_slotPhysStatus_oer_p_}; const ASN_PERdescriptor_t BankSlotStatusInd_slotPhysStatus_per_ = { &BankSlotStatusInd_slotPhysStatus_per_cons_ }; const TTCN_Typedescriptor_t BankSlotStatusInd_slotPhysStatus_descr_ = { "@RSPRO.BankSlotStatusInd.slotPhysStatus", &SEQUENCE_ber_, NULL, NULL, NULL, &SlotPhysStatus_json_, &BankSlotStatusInd_slotPhysStatus_oer_, &BankSlotStatusInd_slotPhysStatus_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlotStatusInd_slotPhysStatus_default_coding(""); // No XER for BankSlotStatusInd const TTCN_JSONdescriptor_t BankSlotStatusInd_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int BankSlotStatusInd_oer_ext_arr_[0] = {}; const int BankSlotStatusInd_oer_p_[3] = {0, 1, 2}; const TTCN_OERdescriptor_t BankSlotStatusInd_oer_ = { -1, TRUE, -1, TRUE, 3, 0, BankSlotStatusInd_oer_ext_arr_, 3, BankSlotStatusInd_oer_p_}; const ASN_PERdescriptor_t BankSlotStatusInd_per_ = { &BankSlotStatusInd_per_cons_ }; const TTCN_Typedescriptor_t BankSlotStatusInd_descr_ = { "@RSPRO.BankSlotStatusInd", &SEQUENCE_ber_, NULL, NULL, NULL, &BankSlotStatusInd_json_, &BankSlotStatusInd_oer_, &BankSlotStatusInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING BankSlotStatusInd_default_coding(""); UNIVERSAL_CHARSTRING ErrorInd_sender___default_coding(""); UNIVERSAL_CHARSTRING ErrorInd_severity_default_coding(""); UNIVERSAL_CHARSTRING ErrorInd_code_default_coding(""); // No XER for ErrorInd const TTCN_JSONdescriptor_t ErrorInd_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ErrorInd_oer_ext_arr_[0] = {}; const int ErrorInd_oer_p_[6] = {0, 1, 2, 3, 4, 5}; const TTCN_OERdescriptor_t ErrorInd_oer_ = { -1, TRUE, -1, TRUE, 6, 0, ErrorInd_oer_ext_arr_, 6, ErrorInd_oer_p_}; const ASN_PERdescriptor_t ErrorInd_per_ = { &ErrorInd_per_cons_ }; const TTCN_Typedescriptor_t ErrorInd_descr_ = { "@RSPRO.ErrorInd", &SEQUENCE_ber_, NULL, NULL, NULL, &ErrorInd_json_, &ErrorInd_oer_, &ErrorInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; const ASN_Tag_t ErrorInd_bankSlot_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t ErrorInd_bankSlot_ber_ = { 1u, ErrorInd_bankSlot_tag_ }; // No XER for ErrorInd_bankSlot const int ErrorInd_bankSlot_oer_ext_arr_[0] = {}; const int ErrorInd_bankSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ErrorInd_bankSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ErrorInd_bankSlot_oer_ext_arr_, 2, ErrorInd_bankSlot_oer_p_}; const ASN_PERdescriptor_t ErrorInd_bankSlot_per_ = { &ErrorInd_bankSlot_per_cons_ }; const TTCN_Typedescriptor_t ErrorInd_bankSlot_descr_ = { "@RSPRO.ErrorInd.bankSlot", &ErrorInd_bankSlot_ber_, NULL, NULL, NULL, &BankSlot_json_, &ErrorInd_bankSlot_oer_, &ErrorInd_bankSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ErrorInd_bankSlot_default_coding(""); const ASN_Tag_t ErrorInd_clientSlot_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t ErrorInd_clientSlot_ber_ = { 1u, ErrorInd_clientSlot_tag_ }; // No XER for ErrorInd_clientSlot const int ErrorInd_clientSlot_oer_ext_arr_[0] = {}; const int ErrorInd_clientSlot_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t ErrorInd_clientSlot_oer_ = { -1, TRUE, -1, TRUE, 2, 0, ErrorInd_clientSlot_oer_ext_arr_, 2, ErrorInd_clientSlot_oer_p_}; const ASN_PERdescriptor_t ErrorInd_clientSlot_per_ = { &ErrorInd_clientSlot_per_cons_ }; const TTCN_Typedescriptor_t ErrorInd_clientSlot_descr_ = { "@RSPRO.ErrorInd.clientSlot", &ErrorInd_clientSlot_ber_, NULL, NULL, NULL, &ClientSlot_json_, &ErrorInd_clientSlot_oer_, &ErrorInd_clientSlot_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ErrorInd_clientSlot_default_coding(""); const ASN_Tag_t ErrorInd_errorString_tag_[] = { { ASN_TAG_CONT, 2u }}; const ASN_BERdescriptor_t ErrorInd_errorString_ber_ = { 1u, ErrorInd_errorString_tag_ }; // No XER for ErrorInd_errorString const int ErrorInd_errorString_oer_ext_arr_[0] = {}; const int ErrorInd_errorString_oer_p_[0] = {}; const TTCN_OERdescriptor_t ErrorInd_errorString_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ErrorInd_errorString_oer_ext_arr_, 0, ErrorInd_errorString_oer_p_}; static PerConstraint ErrorInd_errorString_per_cons_; const ASN_PERdescriptor_t ErrorInd_errorString_per_ = { &ErrorInd_errorString_per_cons_ }; const TTCN_Typedescriptor_t ErrorInd_errorString_descr_ = { "@RSPRO.ErrorInd.errorString", &ErrorInd_errorString_ber_, NULL, NULL, NULL, &IA5String_json_, &ErrorInd_errorString_oer_, &ErrorInd_errorString_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ErrorInd_errorString_default_coding(""); UNIVERSAL_CHARSTRING ErrorInd_default_coding(""); // No XER for ResetStateReq const TTCN_JSONdescriptor_t ResetStateReq_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ResetStateReq_oer_ext_arr_[0] = {}; const int ResetStateReq_oer_p_[0] = {}; const TTCN_OERdescriptor_t ResetStateReq_oer_ = { -1, TRUE, -1, TRUE, 0, 0, ResetStateReq_oer_ext_arr_, 0, ResetStateReq_oer_p_}; const ASN_PERdescriptor_t ResetStateReq_per_ = { &ResetStateReq_per_cons_ }; const TTCN_Typedescriptor_t ResetStateReq_descr_ = { "@RSPRO.ResetStateReq", &SEQUENCE_ber_, NULL, NULL, NULL, &ResetStateReq_json_, &ResetStateReq_oer_, &ResetStateReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ResetStateReq_default_coding(""); UNIVERSAL_CHARSTRING ResetStateRes_result_default_coding(""); // No XER for ResetStateRes const TTCN_JSONdescriptor_t ResetStateRes_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int ResetStateRes_oer_ext_arr_[0] = {}; const int ResetStateRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t ResetStateRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, ResetStateRes_oer_ext_arr_, 1, ResetStateRes_oer_p_}; const ASN_PERdescriptor_t ResetStateRes_per_ = { &ResetStateRes_per_cons_ }; const TTCN_Typedescriptor_t ResetStateRes_descr_ = { "@RSPRO.ResetStateRes", &SEQUENCE_ber_, NULL, NULL, NULL, &ResetStateRes_json_, &ResetStateRes_oer_, &ResetStateRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ResetStateRes_default_coding(""); // No XER for RsproPDUchoice const TTCN_JSONdescriptor_t RsproPDUchoice_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int RsproPDUchoice_oer_ext_arr_[0] = {}; const int RsproPDUchoice_oer_p_[0] = {}; const TTCN_OERdescriptor_t RsproPDUchoice_oer_ = { -1, TRUE, -1, TRUE, 21, 0, RsproPDUchoice_oer_ext_arr_, 0, RsproPDUchoice_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_per_ = { &RsproPDUchoice_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_descr_ = { "@RSPRO.RsproPDUchoice", &CHOICE_ber_, NULL, NULL, NULL, &RsproPDUchoice_json_, &RsproPDUchoice_oer_, &RsproPDUchoice_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; const ASN_Tag_t RsproPDUchoice_connectBankReq_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t RsproPDUchoice_connectBankReq_ber_ = { 1u, RsproPDUchoice_connectBankReq_tag_ }; // No XER for RsproPDUchoice_connectBankReq const int RsproPDUchoice_connectBankReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_connectBankReq_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t RsproPDUchoice_connectBankReq_oer_ = { -1, TRUE, -1, TRUE, 4, 0, RsproPDUchoice_connectBankReq_oer_ext_arr_, 4, RsproPDUchoice_connectBankReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_connectBankReq_per_ = { &RsproPDUchoice_connectBankReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_connectBankReq_descr_ = { "@RSPRO.RsproPDUchoice.connectBankReq", &RsproPDUchoice_connectBankReq_ber_, NULL, NULL, NULL, &ConnectBankReq_json_, &RsproPDUchoice_connectBankReq_oer_, &RsproPDUchoice_connectBankReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_connectBankReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_connectBankRes_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t RsproPDUchoice_connectBankRes_ber_ = { 1u, RsproPDUchoice_connectBankRes_tag_ }; // No XER for RsproPDUchoice_connectBankRes const int RsproPDUchoice_connectBankRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_connectBankRes_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_connectBankRes_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_connectBankRes_oer_ext_arr_, 2, RsproPDUchoice_connectBankRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_connectBankRes_per_ = { &RsproPDUchoice_connectBankRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_connectBankRes_descr_ = { "@RSPRO.RsproPDUchoice.connectBankRes", &RsproPDUchoice_connectBankRes_ber_, NULL, NULL, NULL, &ConnectBankRes_json_, &RsproPDUchoice_connectBankRes_oer_, &RsproPDUchoice_connectBankRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_connectBankRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_connectClientReq_tag_[] = { { ASN_TAG_CONT, 2u }}; const ASN_BERdescriptor_t RsproPDUchoice_connectClientReq_ber_ = { 1u, RsproPDUchoice_connectClientReq_tag_ }; // No XER for RsproPDUchoice_connectClientReq const int RsproPDUchoice_connectClientReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_connectClientReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_connectClientReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_connectClientReq_oer_ext_arr_, 2, RsproPDUchoice_connectClientReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_connectClientReq_per_ = { &RsproPDUchoice_connectClientReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_connectClientReq_descr_ = { "@RSPRO.RsproPDUchoice.connectClientReq", &RsproPDUchoice_connectClientReq_ber_, NULL, NULL, NULL, &ConnectClientReq_json_, &RsproPDUchoice_connectClientReq_oer_, &RsproPDUchoice_connectClientReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_connectClientReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_connectClientRes_tag_[] = { { ASN_TAG_CONT, 3u }}; const ASN_BERdescriptor_t RsproPDUchoice_connectClientRes_ber_ = { 1u, RsproPDUchoice_connectClientRes_tag_ }; // No XER for RsproPDUchoice_connectClientRes const int RsproPDUchoice_connectClientRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_connectClientRes_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_connectClientRes_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_connectClientRes_oer_ext_arr_, 2, RsproPDUchoice_connectClientRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_connectClientRes_per_ = { &RsproPDUchoice_connectClientRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_connectClientRes_descr_ = { "@RSPRO.RsproPDUchoice.connectClientRes", &RsproPDUchoice_connectClientRes_ber_, NULL, NULL, NULL, &ConnectClientRes_json_, &RsproPDUchoice_connectClientRes_oer_, &RsproPDUchoice_connectClientRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_connectClientRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_createMappingReq_tag_[] = { { ASN_TAG_CONT, 4u }}; const ASN_BERdescriptor_t RsproPDUchoice_createMappingReq_ber_ = { 1u, RsproPDUchoice_createMappingReq_tag_ }; // No XER for RsproPDUchoice_createMappingReq const int RsproPDUchoice_createMappingReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_createMappingReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_createMappingReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_createMappingReq_oer_ext_arr_, 2, RsproPDUchoice_createMappingReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_createMappingReq_per_ = { &RsproPDUchoice_createMappingReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_createMappingReq_descr_ = { "@RSPRO.RsproPDUchoice.createMappingReq", &RsproPDUchoice_createMappingReq_ber_, NULL, NULL, NULL, &CreateMappingReq_json_, &RsproPDUchoice_createMappingReq_oer_, &RsproPDUchoice_createMappingReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_createMappingReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_createMappingRes_tag_[] = { { ASN_TAG_CONT, 5u }}; const ASN_BERdescriptor_t RsproPDUchoice_createMappingRes_ber_ = { 1u, RsproPDUchoice_createMappingRes_tag_ }; // No XER for RsproPDUchoice_createMappingRes const int RsproPDUchoice_createMappingRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_createMappingRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_createMappingRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_createMappingRes_oer_ext_arr_, 1, RsproPDUchoice_createMappingRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_createMappingRes_per_ = { &RsproPDUchoice_createMappingRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_createMappingRes_descr_ = { "@RSPRO.RsproPDUchoice.createMappingRes", &RsproPDUchoice_createMappingRes_ber_, NULL, NULL, NULL, &CreateMappingRes_json_, &RsproPDUchoice_createMappingRes_oer_, &RsproPDUchoice_createMappingRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_createMappingRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_removeMappingReq_tag_[] = { { ASN_TAG_CONT, 6u }}; const ASN_BERdescriptor_t RsproPDUchoice_removeMappingReq_ber_ = { 1u, RsproPDUchoice_removeMappingReq_tag_ }; // No XER for RsproPDUchoice_removeMappingReq const int RsproPDUchoice_removeMappingReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_removeMappingReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_removeMappingReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_removeMappingReq_oer_ext_arr_, 2, RsproPDUchoice_removeMappingReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_removeMappingReq_per_ = { &RsproPDUchoice_removeMappingReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_removeMappingReq_descr_ = { "@RSPRO.RsproPDUchoice.removeMappingReq", &RsproPDUchoice_removeMappingReq_ber_, NULL, NULL, NULL, &RemoveMappingReq_json_, &RsproPDUchoice_removeMappingReq_oer_, &RsproPDUchoice_removeMappingReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_removeMappingReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_removeMappingRes_tag_[] = { { ASN_TAG_CONT, 7u }}; const ASN_BERdescriptor_t RsproPDUchoice_removeMappingRes_ber_ = { 1u, RsproPDUchoice_removeMappingRes_tag_ }; // No XER for RsproPDUchoice_removeMappingRes const int RsproPDUchoice_removeMappingRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_removeMappingRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_removeMappingRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_removeMappingRes_oer_ext_arr_, 1, RsproPDUchoice_removeMappingRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_removeMappingRes_per_ = { &RsproPDUchoice_removeMappingRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_removeMappingRes_descr_ = { "@RSPRO.RsproPDUchoice.removeMappingRes", &RsproPDUchoice_removeMappingRes_ber_, NULL, NULL, NULL, &RemoveMappingRes_json_, &RsproPDUchoice_removeMappingRes_oer_, &RsproPDUchoice_removeMappingRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_removeMappingRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_configClientIdReq_tag_[] = { { ASN_TAG_CONT, 8u }}; const ASN_BERdescriptor_t RsproPDUchoice_configClientIdReq_ber_ = { 1u, RsproPDUchoice_configClientIdReq_tag_ }; // No XER for RsproPDUchoice_configClientIdReq const int RsproPDUchoice_configClientIdReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_configClientIdReq_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_configClientIdReq_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_configClientIdReq_oer_ext_arr_, 1, RsproPDUchoice_configClientIdReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_configClientIdReq_per_ = { &RsproPDUchoice_configClientIdReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_configClientIdReq_descr_ = { "@RSPRO.RsproPDUchoice.configClientIdReq", &RsproPDUchoice_configClientIdReq_ber_, NULL, NULL, NULL, &ConfigClientIdReq_json_, &RsproPDUchoice_configClientIdReq_oer_, &RsproPDUchoice_configClientIdReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_configClientIdReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_configClientIdRes_tag_[] = { { ASN_TAG_CONT, 9u }}; const ASN_BERdescriptor_t RsproPDUchoice_configClientIdRes_ber_ = { 1u, RsproPDUchoice_configClientIdRes_tag_ }; // No XER for RsproPDUchoice_configClientIdRes const int RsproPDUchoice_configClientIdRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_configClientIdRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_configClientIdRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_configClientIdRes_oer_ext_arr_, 1, RsproPDUchoice_configClientIdRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_configClientIdRes_per_ = { &RsproPDUchoice_configClientIdRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_configClientIdRes_descr_ = { "@RSPRO.RsproPDUchoice.configClientIdRes", &RsproPDUchoice_configClientIdRes_ber_, NULL, NULL, NULL, &ConfigClientIdRes_json_, &RsproPDUchoice_configClientIdRes_oer_, &RsproPDUchoice_configClientIdRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_configClientIdRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_configClientBankReq_tag_[] = { { ASN_TAG_CONT, 17u }}; const ASN_BERdescriptor_t RsproPDUchoice_configClientBankReq_ber_ = { 1u, RsproPDUchoice_configClientBankReq_tag_ }; // No XER for RsproPDUchoice_configClientBankReq const int RsproPDUchoice_configClientBankReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_configClientBankReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_configClientBankReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_configClientBankReq_oer_ext_arr_, 2, RsproPDUchoice_configClientBankReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_configClientBankReq_per_ = { &RsproPDUchoice_configClientBankReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_configClientBankReq_descr_ = { "@RSPRO.RsproPDUchoice.configClientBankReq", &RsproPDUchoice_configClientBankReq_ber_, NULL, NULL, NULL, &ConfigClientBankReq_json_, &RsproPDUchoice_configClientBankReq_oer_, &RsproPDUchoice_configClientBankReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_configClientBankReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_configClientBankRes_tag_[] = { { ASN_TAG_CONT, 18u }}; const ASN_BERdescriptor_t RsproPDUchoice_configClientBankRes_ber_ = { 1u, RsproPDUchoice_configClientBankRes_tag_ }; // No XER for RsproPDUchoice_configClientBankRes const int RsproPDUchoice_configClientBankRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_configClientBankRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_configClientBankRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_configClientBankRes_oer_ext_arr_, 1, RsproPDUchoice_configClientBankRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_configClientBankRes_per_ = { &RsproPDUchoice_configClientBankRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_configClientBankRes_descr_ = { "@RSPRO.RsproPDUchoice.configClientBankRes", &RsproPDUchoice_configClientBankRes_ber_, NULL, NULL, NULL, &ConfigClientBankRes_json_, &RsproPDUchoice_configClientBankRes_oer_, &RsproPDUchoice_configClientBankRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_configClientBankRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_errorInd_tag_[] = { { ASN_TAG_CONT, 16u }}; const ASN_BERdescriptor_t RsproPDUchoice_errorInd_ber_ = { 1u, RsproPDUchoice_errorInd_tag_ }; // No XER for RsproPDUchoice_errorInd const int RsproPDUchoice_errorInd_oer_ext_arr_[0] = {}; const int RsproPDUchoice_errorInd_oer_p_[6] = {0, 1, 2, 3, 4, 5}; const TTCN_OERdescriptor_t RsproPDUchoice_errorInd_oer_ = { -1, TRUE, -1, TRUE, 6, 0, RsproPDUchoice_errorInd_oer_ext_arr_, 6, RsproPDUchoice_errorInd_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_errorInd_per_ = { &RsproPDUchoice_errorInd_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_errorInd_descr_ = { "@RSPRO.RsproPDUchoice.errorInd", &RsproPDUchoice_errorInd_ber_, NULL, NULL, NULL, &ErrorInd_json_, &RsproPDUchoice_errorInd_oer_, &RsproPDUchoice_errorInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_errorInd_default_coding(""); const ASN_Tag_t RsproPDUchoice_resetStateReq_tag_[] = { { ASN_TAG_CONT, 19u }}; const ASN_BERdescriptor_t RsproPDUchoice_resetStateReq_ber_ = { 1u, RsproPDUchoice_resetStateReq_tag_ }; // No XER for RsproPDUchoice_resetStateReq const int RsproPDUchoice_resetStateReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_resetStateReq_oer_p_[0] = {}; const TTCN_OERdescriptor_t RsproPDUchoice_resetStateReq_oer_ = { -1, TRUE, -1, TRUE, 0, 0, RsproPDUchoice_resetStateReq_oer_ext_arr_, 0, RsproPDUchoice_resetStateReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_resetStateReq_per_ = { &RsproPDUchoice_resetStateReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_resetStateReq_descr_ = { "@RSPRO.RsproPDUchoice.resetStateReq", &RsproPDUchoice_resetStateReq_ber_, NULL, NULL, NULL, &ResetStateReq_json_, &RsproPDUchoice_resetStateReq_oer_, &RsproPDUchoice_resetStateReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_resetStateReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_resetStateRes_tag_[] = { { ASN_TAG_CONT, 20u }}; const ASN_BERdescriptor_t RsproPDUchoice_resetStateRes_ber_ = { 1u, RsproPDUchoice_resetStateRes_tag_ }; // No XER for RsproPDUchoice_resetStateRes const int RsproPDUchoice_resetStateRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_resetStateRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_resetStateRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_resetStateRes_oer_ext_arr_, 1, RsproPDUchoice_resetStateRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_resetStateRes_per_ = { &RsproPDUchoice_resetStateRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_resetStateRes_descr_ = { "@RSPRO.RsproPDUchoice.resetStateRes", &RsproPDUchoice_resetStateRes_ber_, NULL, NULL, NULL, &ResetStateRes_json_, &RsproPDUchoice_resetStateRes_oer_, &RsproPDUchoice_resetStateRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_resetStateRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_setAtrReq_tag_[] = { { ASN_TAG_CONT, 10u }}; const ASN_BERdescriptor_t RsproPDUchoice_setAtrReq_ber_ = { 1u, RsproPDUchoice_setAtrReq_tag_ }; // No XER for RsproPDUchoice_setAtrReq const int RsproPDUchoice_setAtrReq_oer_ext_arr_[0] = {}; const int RsproPDUchoice_setAtrReq_oer_p_[2] = {0, 1}; const TTCN_OERdescriptor_t RsproPDUchoice_setAtrReq_oer_ = { -1, TRUE, -1, TRUE, 2, 0, RsproPDUchoice_setAtrReq_oer_ext_arr_, 2, RsproPDUchoice_setAtrReq_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_setAtrReq_per_ = { &RsproPDUchoice_setAtrReq_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_setAtrReq_descr_ = { "@RSPRO.RsproPDUchoice.setAtrReq", &RsproPDUchoice_setAtrReq_ber_, NULL, NULL, NULL, &SetAtrReq_json_, &RsproPDUchoice_setAtrReq_oer_, &RsproPDUchoice_setAtrReq_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_setAtrReq_default_coding(""); const ASN_Tag_t RsproPDUchoice_setAtrRes_tag_[] = { { ASN_TAG_CONT, 11u }}; const ASN_BERdescriptor_t RsproPDUchoice_setAtrRes_ber_ = { 1u, RsproPDUchoice_setAtrRes_tag_ }; // No XER for RsproPDUchoice_setAtrRes const int RsproPDUchoice_setAtrRes_oer_ext_arr_[0] = {}; const int RsproPDUchoice_setAtrRes_oer_p_[1] = {0}; const TTCN_OERdescriptor_t RsproPDUchoice_setAtrRes_oer_ = { -1, TRUE, -1, TRUE, 1, 0, RsproPDUchoice_setAtrRes_oer_ext_arr_, 1, RsproPDUchoice_setAtrRes_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_setAtrRes_per_ = { &RsproPDUchoice_setAtrRes_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_setAtrRes_descr_ = { "@RSPRO.RsproPDUchoice.setAtrRes", &RsproPDUchoice_setAtrRes_ber_, NULL, NULL, NULL, &SetAtrRes_json_, &RsproPDUchoice_setAtrRes_oer_, &RsproPDUchoice_setAtrRes_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_setAtrRes_default_coding(""); const ASN_Tag_t RsproPDUchoice_tpduModemToCard_tag_[] = { { ASN_TAG_CONT, 12u }}; const ASN_BERdescriptor_t RsproPDUchoice_tpduModemToCard_ber_ = { 1u, RsproPDUchoice_tpduModemToCard_tag_ }; // No XER for RsproPDUchoice_tpduModemToCard const int RsproPDUchoice_tpduModemToCard_oer_ext_arr_[0] = {}; const int RsproPDUchoice_tpduModemToCard_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t RsproPDUchoice_tpduModemToCard_oer_ = { -1, TRUE, -1, TRUE, 4, 0, RsproPDUchoice_tpduModemToCard_oer_ext_arr_, 4, RsproPDUchoice_tpduModemToCard_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_tpduModemToCard_per_ = { &RsproPDUchoice_tpduModemToCard_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_tpduModemToCard_descr_ = { "@RSPRO.RsproPDUchoice.tpduModemToCard", &RsproPDUchoice_tpduModemToCard_ber_, NULL, NULL, NULL, &TpduModemToCard_json_, &RsproPDUchoice_tpduModemToCard_oer_, &RsproPDUchoice_tpduModemToCard_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_tpduModemToCard_default_coding(""); const ASN_Tag_t RsproPDUchoice_tpduCardToModem_tag_[] = { { ASN_TAG_CONT, 13u }}; const ASN_BERdescriptor_t RsproPDUchoice_tpduCardToModem_ber_ = { 1u, RsproPDUchoice_tpduCardToModem_tag_ }; // No XER for RsproPDUchoice_tpduCardToModem const int RsproPDUchoice_tpduCardToModem_oer_ext_arr_[0] = {}; const int RsproPDUchoice_tpduCardToModem_oer_p_[4] = {0, 1, 2, 3}; const TTCN_OERdescriptor_t RsproPDUchoice_tpduCardToModem_oer_ = { -1, TRUE, -1, TRUE, 4, 0, RsproPDUchoice_tpduCardToModem_oer_ext_arr_, 4, RsproPDUchoice_tpduCardToModem_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_tpduCardToModem_per_ = { &RsproPDUchoice_tpduCardToModem_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_tpduCardToModem_descr_ = { "@RSPRO.RsproPDUchoice.tpduCardToModem", &RsproPDUchoice_tpduCardToModem_ber_, NULL, NULL, NULL, &TpduCardToModem_json_, &RsproPDUchoice_tpduCardToModem_oer_, &RsproPDUchoice_tpduCardToModem_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_tpduCardToModem_default_coding(""); const ASN_Tag_t RsproPDUchoice_clientSlotStatusInd_tag_[] = { { ASN_TAG_CONT, 14u }}; const ASN_BERdescriptor_t RsproPDUchoice_clientSlotStatusInd_ber_ = { 1u, RsproPDUchoice_clientSlotStatusInd_tag_ }; // No XER for RsproPDUchoice_clientSlotStatusInd const int RsproPDUchoice_clientSlotStatusInd_oer_ext_arr_[0] = {}; const int RsproPDUchoice_clientSlotStatusInd_oer_p_[3] = {0, 1, 2}; const TTCN_OERdescriptor_t RsproPDUchoice_clientSlotStatusInd_oer_ = { -1, TRUE, -1, TRUE, 3, 0, RsproPDUchoice_clientSlotStatusInd_oer_ext_arr_, 3, RsproPDUchoice_clientSlotStatusInd_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_clientSlotStatusInd_per_ = { &RsproPDUchoice_clientSlotStatusInd_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_clientSlotStatusInd_descr_ = { "@RSPRO.RsproPDUchoice.clientSlotStatusInd", &RsproPDUchoice_clientSlotStatusInd_ber_, NULL, NULL, NULL, &ClientSlotStatusInd_json_, &RsproPDUchoice_clientSlotStatusInd_oer_, &RsproPDUchoice_clientSlotStatusInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_clientSlotStatusInd_default_coding(""); const ASN_Tag_t RsproPDUchoice_bankSlotStatusInd_tag_[] = { { ASN_TAG_CONT, 15u }}; const ASN_BERdescriptor_t RsproPDUchoice_bankSlotStatusInd_ber_ = { 1u, RsproPDUchoice_bankSlotStatusInd_tag_ }; // No XER for RsproPDUchoice_bankSlotStatusInd const int RsproPDUchoice_bankSlotStatusInd_oer_ext_arr_[0] = {}; const int RsproPDUchoice_bankSlotStatusInd_oer_p_[3] = {0, 1, 2}; const TTCN_OERdescriptor_t RsproPDUchoice_bankSlotStatusInd_oer_ = { -1, TRUE, -1, TRUE, 3, 0, RsproPDUchoice_bankSlotStatusInd_oer_ext_arr_, 3, RsproPDUchoice_bankSlotStatusInd_oer_p_}; const ASN_PERdescriptor_t RsproPDUchoice_bankSlotStatusInd_per_ = { &RsproPDUchoice_bankSlotStatusInd_per_cons_ }; const TTCN_Typedescriptor_t RsproPDUchoice_bankSlotStatusInd_descr_ = { "@RSPRO.RsproPDUchoice.bankSlotStatusInd", &RsproPDUchoice_bankSlotStatusInd_ber_, NULL, NULL, NULL, &BankSlotStatusInd_json_, &RsproPDUchoice_bankSlotStatusInd_oer_, &RsproPDUchoice_bankSlotStatusInd_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDUchoice_bankSlotStatusInd_default_coding(""); UNIVERSAL_CHARSTRING RsproPDUchoice_default_coding(""); const ASN_Tag_t RsproPDU_version_tag_[] = { { ASN_TAG_CONT, 0u }}; const ASN_BERdescriptor_t RsproPDU_version_ber_ = { 1u, RsproPDU_version_tag_ }; // No XER for RsproPDU_version const int RsproPDU_version_oer_ext_arr_[0] = {}; const int RsproPDU_version_oer_p_[0] = {}; const TTCN_OERdescriptor_t RsproPDU_version_oer_ = { 1, FALSE, -1, FALSE, 0, 0, RsproPDU_version_oer_ext_arr_, 0, RsproPDU_version_oer_p_}; static PerIntegerConstraint RsproPDU_version_per_cons_(new INTEGER(0), new INTEGER(32), FALSE); const ASN_PERdescriptor_t RsproPDU_version_per_ = { &RsproPDU_version_per_cons_ }; const TTCN_Typedescriptor_t RsproPDU_version_descr_ = { "@RSPRO.RsproPDU.version", &RsproPDU_version_ber_, NULL, NULL, NULL, &INTEGER_json_, &RsproPDU_version_oer_, &RsproPDU_version_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDU_version_default_coding(""); const ASN_Tag_t RsproPDU_tag_tag_[] = { { ASN_TAG_CONT, 1u }}; const ASN_BERdescriptor_t RsproPDU_tag_ber_ = { 1u, RsproPDU_tag_tag_ }; // No XER for RsproPDU_tag const int RsproPDU_tag_oer_ext_arr_[0] = {}; const int RsproPDU_tag_oer_p_[0] = {}; const TTCN_OERdescriptor_t RsproPDU_tag_oer_ = { 4, FALSE, -1, FALSE, 0, 0, RsproPDU_tag_oer_ext_arr_, 0, RsproPDU_tag_oer_p_}; static PerIntegerConstraint RsproPDU_tag_per_cons_(new INTEGER(0), new INTEGER(2147483647), FALSE); const ASN_PERdescriptor_t RsproPDU_tag_per_ = { &RsproPDU_tag_per_cons_ }; const TTCN_Typedescriptor_t RsproPDU_tag_descr_ = { "@RSPRO.RsproPDU.tag", &RsproPDU_tag_ber_, NULL, NULL, NULL, &INTEGER_json_, &RsproPDU_tag_oer_, &RsproPDU_tag_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDU_tag_default_coding(""); const ASN_Tag_t RsproPDU_msg_tag_[] = { { ASN_TAG_CONT, 2u }}; const ASN_BERdescriptor_t RsproPDU_msg_ber_ = { 1u, RsproPDU_msg_tag_ }; // No XER for RsproPDU_msg const int RsproPDU_msg_oer_ext_arr_[0] = {}; const int RsproPDU_msg_oer_p_[0] = {}; const TTCN_OERdescriptor_t RsproPDU_msg_oer_ = { -1, TRUE, -1, TRUE, 21, 0, RsproPDU_msg_oer_ext_arr_, 0, RsproPDU_msg_oer_p_}; const ASN_PERdescriptor_t RsproPDU_msg_per_ = { &RsproPDU_msg_per_cons_ }; const TTCN_Typedescriptor_t RsproPDU_msg_descr_ = { "@RSPRO.RsproPDU.msg", &RsproPDU_msg_ber_, NULL, NULL, NULL, &RsproPDUchoice_json_, &RsproPDU_msg_oer_, &RsproPDU_msg_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDU_msg_default_coding(""); // No XER for RsproPDU const TTCN_JSONdescriptor_t RsproPDU_json_ = { FALSE, NULL, FALSE, { JD_UNSET, NULL, NULL }, FALSE, FALSE, FALSE, 0, NULL, FALSE, ESCAPE_AS_SHORT }; const int RsproPDU_oer_ext_arr_[0] = {}; const int RsproPDU_oer_p_[3] = {0, 1, 2}; const TTCN_OERdescriptor_t RsproPDU_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RsproPDU_oer_ext_arr_, 3, RsproPDU_oer_p_}; const ASN_PERdescriptor_t RsproPDU_per_ = { &RsproPDU_per_cons_ }; const TTCN_Typedescriptor_t RsproPDU_descr_ = { "@RSPRO.RsproPDU", &SEQUENCE_ber_, NULL, NULL, NULL, &RsproPDU_json_, &RsproPDU_oer_, &RsproPDU_per_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RsproPDU_default_coding(""); TTCN_Module module_object("RSPRO", __DATE__, __TIME__, NULL, NULL); const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_9, current_runtime_version.requires_minor_version_0, current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1); /* Member functions of C++ classes */ ComponentType::ComponentType() { enum_value = UNBOUND_VALUE; } ComponentType::ComponentType(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @RSPRO.ComponentType with invalid numeric value %d.", other_value); enum_value = (enum_type)other_value; } ComponentType::ComponentType(enum_type other_value) { enum_value = other_value; } ComponentType::ComponentType(const ComponentType& other_value) : Base_Type() { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @RSPRO.ComponentType."); enum_value = other_value.enum_value; } ComponentType& ComponentType::operator=(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @RSPRO.ComponentType.", other_value); enum_value = (enum_type)other_value; return *this; } ComponentType& ComponentType::operator=(enum_type other_value) { enum_value = other_value; return *this; } ComponentType& ComponentType::operator=(const ComponentType& other_value) { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @RSPRO.ComponentType."); enum_value = other_value.enum_value; return *this; } boolean ComponentType::operator==(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value == other_value; } boolean ComponentType::operator==(const ComponentType& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value == other_value.enum_value; } boolean ComponentType::operator<(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value < other_value; } boolean ComponentType::operator<(const ComponentType& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value < other_value.enum_value; } boolean ComponentType::operator>(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value > other_value; } boolean ComponentType::operator>(const ComponentType& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RSPRO.ComponentType."); return enum_value > other_value.enum_value; } const char *ComponentType::enum_to_str(enum_type enum_par) { switch (enum_par) { case remsimClient: return "remsimClient"; case remsimServer: return "remsimServer"; case remsimBankd: return "remsimBankd"; default: return ""; } } ComponentType::enum_type ComponentType::str_to_enum(const char *str_par) { if (!strcmp(str_par, "remsimClient")) return remsimClient; else if (!strcmp(str_par, "remsimServer")) return remsimServer; else if (!strcmp(str_par, "remsimBankd")) return remsimBankd; else return UNKNOWN_VALUE; } boolean ComponentType::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: case 2: return TRUE; default: return FALSE; } } int ComponentType::enum2int(enum_type enum_par) { if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RSPRO.ComponentType.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int ComponentType::enum2int(const ComponentType& enum_par) { if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RSPRO.ComponentType.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void ComponentType::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @RSPRO.ComponentType.", int_val); enum_value = (enum_type)int_val; } ComponentType::operator ComponentType::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @RSPRO.ComponentType."); return enum_value; } void ComponentType::log() const { if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value); else TTCN_Logger::log_event_unbound(); } void ComponentType::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "enumerated value"); if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@RSPRO.ComponentType"); enum_value = str_to_enum(param.get_enumerated()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @RSPRO.ComponentType."); } } void ComponentType::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @RSPRO.ComponentType."); text_buf.push_int(enum_value); } void ComponentType::decode_text(Text_Buf& text_buf) { enum_value = (enum_type)text_buf.pull_int().get_val(); if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @RSPRO.ComponentType.", enum_value); } void ComponentType::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name); unsigned BER_coding=va_arg(pvar, unsigned); BER_encode_chk_coding(BER_coding); ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding); tlv->put_in_buffer(p_buf); ASN_BER_TLV_t::destruct(tlv); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); RAW_enc_tr_pos rp; rp.level=0; rp.pos=NULL; RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw); RAW_encode(p_td, root); root.put_to_buf(p_buf); break;} case TTCN_EncDec::CT_TEXT: { TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); TEXT_encode(p_td,p_buf); break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0); p_buf.put_c('\n'); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok(va_arg(pvar, int) != 0); JSON_encode(p_td, tok, FALSE); p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_encode(p_td, p_buf); break;} default: TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name); } va_end(pvar); } void ComponentType::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name); unsigned L_form=va_arg(pvar, unsigned); ASN_BER_TLV_t tlv; BER_decode_str2TLV(p_buf, tlv, L_form); BER_decode_TLV(p_td, tlv, L_form); if(tlv.isComplete) p_buf.increase_pos(tlv.get_len()); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); raw_order_t r_order; switch(p_td.raw->top_bit_order) { case TOP_BIT_LEFT: r_order=ORDER_LSB; break; case TOP_BIT_RIGHT: default: r_order=ORDER_MSB; } int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order); if(rawr<0) switch (-rawr) { case TTCN_EncDec::ET_INCOMPL_MSG: case TTCN_EncDec::ET_LEN_ERR: ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name); break; case 1: default: ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name); break; } break;} case TTCN_EncDec::CT_TEXT: { Limit_Token_List limit; TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); const unsigned char *b_data=p_buf.get_data(); int null_added=0; if(b_data[p_buf.get_len()-1]!='\0'){ null_added=1; p_buf.set_pos(p_buf.get_len()); p_buf.put_zero(8,ORDER_LSB); p_buf.rewind(); } if(TEXT_decode(p_td,p_buf,limit)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); if(null_added){ size_t actpos=p_buf.get_pos(); p_buf.set_pos(p_buf.get_len()-1); p_buf.cut_end(); p_buf.set_pos(actpos); } break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XmlReaderWrap reader(p_buf); for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) { if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break; } XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0); size_t bytes = reader.ByteConsumed(); p_buf.set_pos(bytes); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len()); if(JSON_decode(p_td, tok, FALSE, FALSE)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); p_buf.set_pos(tok.get_buf_pos()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_struct p_oer; OER_decode(p_td, p_buf, p_oer); break;} default: TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name); } va_end(pvar); } ASN_BER_TLV_t* ComponentType::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const { BER_chk_descr(p_td); ASN_BER_TLV_t *new_tlv=BER_encode_chk_bound(is_bound()); if(!new_tlv) { BER_encode_chk_enum_valid(p_td, is_valid_enum(enum_value), enum_value); new_tlv=BER_encode_TLV_INTEGER(p_coding, enum_value); } new_tlv=ASN_BER_V2TLV(new_tlv, p_td, p_coding); return new_tlv; } boolean ComponentType::BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form) { enum_value = UNBOUND_VALUE; BER_chk_descr(p_td); ASN_BER_TLV_t stripped_tlv; BER_decode_strip_tags(*p_td.ber, p_tlv, L_form, stripped_tlv); TTCN_EncDec_ErrorContext ec("While decoding ENUMERATED type @RSPRO.ComponentType: "); int tmp_mfr; if (BER_decode_TLV_INTEGER(stripped_tlv, L_form, tmp_mfr)) { BER_decode_chk_enum_valid(p_td, is_valid_enum(tmp_mfr), tmp_mfr); enum_value = (enum_type)tmp_mfr; return TRUE; } else return FALSE; } int ComponentType::JSON_encode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& p_tok, boolean) const { if (enum_value == UNBOUND_VALUE) { TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value of enumerated type @RSPRO.ComponentType."); return -1; } if (p_td.json->use_null) { return p_tok.put_next_token(JSON_TOKEN_LITERAL_NULL); } char* tmp_str; if (p_td.json->as_number) { tmp_str = mprintf("%d", enum_value); } else { boolean text_found = false; for (size_t i = 0; i < p_td.json->nof_enum_texts; ++i) { if (p_td.json->enum_texts[i].index == enum_value) { tmp_str = mprintf("\"%s\"", p_td.json->enum_texts[i].text); text_found = true; break; } } if (!text_found) { tmp_str = mprintf("\"%s\"", enum_to_str(enum_value)); } } int enc_len = p_tok.put_next_token(p_td.json->as_number ? JSON_TOKEN_NUMBER : JSON_TOKEN_STRING, tmp_str); Free(tmp_str); return enc_len; } int ComponentType::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& p_tok, boolean p_silent, boolean, int) { json_token_t token = JSON_TOKEN_NONE; char* value = 0; size_t value_len = 0; boolean error = FALSE; size_t dec_len = 0; boolean use_default = FALSE; if (p_td.json->default_value.type == JD_STANDARD && 0 == p_tok.get_buffer_length()) { *this = *static_cast(p_td.json->default_value.val); return dec_len; } if (p_td.json->default_value.type == JD_LEGACY && 0 == p_tok.get_buffer_length()) { value = const_cast(p_td.json->default_value.str); value_len = strlen(value); use_default = TRUE; } else { dec_len = p_tok.get_next_token(&token, &value, &value_len); } if (JSON_TOKEN_ERROR == token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_BAD_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; } else if (JSON_TOKEN_LITERAL_NULL == token && p_td.json->use_null) { enum_value = remsimClient; } else if (!p_td.json->use_null && ((JSON_TOKEN_STRING == token && !p_td.json->as_number) || use_default)) { if (use_default || (value_len > 2 && value[0] == '\"' && value[value_len - 1] == '\"')) { if (!use_default) value[value_len - 1] = 0; boolean text_found = false; for (size_t i = 0; i < p_td.json->nof_enum_texts; ++i) { if (strcmp(p_td.json->enum_texts[i].text, value + (use_default ? 0 : 1)) == 0) { enum_value = static_cast(p_td.json->enum_texts[i].index); text_found = true; break; } } if (!text_found) { enum_value = str_to_enum(value + (use_default ? 0 : 1)); } if (!use_default) value[value_len - 1] = '\"'; if (UNKNOWN_VALUE == enum_value) { error = TRUE; } } else { error = TRUE; } } else if (!p_td.json->use_null && JSON_TOKEN_NUMBER == token && p_td.json->as_number) { char* value_str = mcopystrn(value, value_len); int number = atoi(value_str); if (strchr(value_str, '.') != NULL || strchr(value_str, 'e') != NULL || strchr(value_str, 'E') != NULL) { error = TRUE; } else if (is_valid_enum(number)) { enum_value = static_cast(number); } else { error = TRUE; } Free(value_str); } else { enum_value = UNBOUND_VALUE; return JSON_ERROR_INVALID_TOKEN; } if (error) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FORMAT_ERROR, p_td.json->as_number ? "number" : "string", "enumerated"); enum_value = UNBOUND_VALUE; return JSON_ERROR_FATAL; } return (int)dec_len; } int ComponentType::OER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf) const { if (enum_value == UNBOUND_VALUE) { TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value of enumerated type @RSPRO.ComponentType."); return -1; } if (enum_value >= 0 && enum_value < 128) { char c = enum_value; p_buf.put_c(c); } else { INTEGER intval(enum_value); TTCN_Buffer buf; intval.OER_encode(INTEGER_descr_, buf); unsigned char* uc = const_cast(buf.get_data()); *uc |= 1 << 7; p_buf.put_buf(buf); } return 0; } int ComponentType::OER_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf, OER_struct& p_oer) { const unsigned char* uc = p_buf.get_read_data(); if (!(uc[0] & 0x80)) { if (is_valid_enum(uc[0])) { enum_value = static_cast(uc[0]); } else { enum_value = UNKNOWN_VALUE; } p_buf.increase_pos(1); } else { unsigned char* uc2 = const_cast(p_buf.get_read_data()); uc2[0] &= ~0x80; INTEGER intval; intval.OER_decode(INTEGER_descr_, p_buf, p_oer); if (is_valid_enum(intval.get_val().get_val())) { enum_value = static_cast(intval.get_val().get_val()); } else { enum_value = UNKNOWN_VALUE; } } return 0; } void ComponentType_template::copy_template(const ComponentType_template& other_value) { set_selection(other_value); switch (template_selection) { case SPECIFIC_VALUE: single_value = other_value.single_value; break; case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new ComponentType_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new ComponentType_template(*other_value.implication_.precondition); implication_.implied_template = new ComponentType_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of enumerated type @RSPRO.ComponentType."); } } ComponentType_template::ComponentType_template() { } ComponentType_template::ComponentType_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ComponentType_template::ComponentType_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!ComponentType::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @RSPRO.ComponentType with unknown numeric value %d.", other_value); single_value = (ComponentType::enum_type)other_value; } ComponentType_template::ComponentType_template(ComponentType::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } ComponentType_template::ComponentType_template(const ComponentType& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == ComponentType::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @RSPRO.ComponentType."); single_value = other_value.enum_value; } ComponentType_template::ComponentType_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (ComponentType::enum_type)(const ComponentType&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @RSPRO.ComponentType from an unbound optional field."); } } ComponentType_template::ComponentType_template(ComponentType_template* p_precondition, ComponentType_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ComponentType_template::ComponentType_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ComponentType_template::ComponentType_template(const ComponentType_template& other_value) : Base_Template() { copy_template(other_value); } ComponentType_template::~ComponentType_template() { clean_up(); } boolean ComponentType_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean ComponentType_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != ComponentType::UNBOUND_VALUE; } void ComponentType_template::clean_up() { switch (template_selection) { case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } ComponentType_template& ComponentType_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ComponentType_template& ComponentType_template::operator=(int other_value) { if (!ComponentType::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @RSPRO.ComponentType.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (ComponentType::enum_type)other_value; return *this; } ComponentType_template& ComponentType_template::operator=(ComponentType::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } ComponentType_template& ComponentType_template::operator=(const ComponentType& other_value) { if (other_value.enum_value == ComponentType::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @RSPRO.ComponentType to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } ComponentType_template& ComponentType_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (ComponentType::enum_type)(const ComponentType&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of enumerated type @RSPRO.ComponentType."); } return *this; } ComponentType_template& ComponentType_template::operator=(const ComponentType_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ComponentType_template::match(ComponentType::enum_type other_value, boolean) const { switch (template_selection) { case SPECIFIC_VALUE: return single_value == other_value; case OMIT_VALUE: return FALSE; case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of enumerated type @RSPRO.ComponentType."); } return FALSE; } boolean ComponentType_template::match(const ComponentType& other_value, boolean) const { if (other_value.enum_value == ComponentType::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @RSPRO.ComponentType with an unbound value."); return match(other_value.enum_value); } ComponentType::enum_type ComponentType_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @RSPRO.ComponentType."); return single_value; } void ComponentType_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list type for a template of enumerated type @RSPRO.ComponentType."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ComponentType_template[list_length]; } ComponentType_template& ComponentType_template::list_item(unsigned int list_index) { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @RSPRO.ComponentType."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @RSPRO.ComponentType."); return value_list.list_value[list_index]; } void ComponentType_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(ComponentType::enum_to_str(single_value), single_value); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[elem_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void ComponentType_template::log_match(const ComponentType& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void ComponentType_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @RSPRO.ComponentType."); } } void ComponentType_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (ComponentType::enum_type)text_buf.pull_int().get_val(); if (!ComponentType::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @RSPRO.ComponentType.", single_value); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new ComponentType_template[value_list.n_values]; for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @RSPRO.ComponentType."); } } boolean ComponentType_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ComponentType_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int i=0; iget_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { ComponentType_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Enumerated: { ComponentType::enum_type enum_val = ComponentType::str_to_enum(m_p->get_enumerated()); if (!ComponentType::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @RSPRO.ComponentType."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { ComponentType_template* precondition = new ComponentType_template; precondition->set_param(*m_p->get_elem(0)); ComponentType_template* implied_template = new ComponentType_template; implied_template->set_param(*m_p->get_elem(1)); *this = ComponentType_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@RSPRO.ComponentType"); } is_ifpresent = param.get_ifpresent(); } void ComponentType_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_VALUE: if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return; break; case TR_OMIT: if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return; break; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@RSPRO.ComponentType"); } ComponentIdentity::ComponentIdentity() { } ComponentIdentity::ComponentIdentity(const ComponentType& par_type__, const CHARSTRING& par_name, const CHARSTRING& par_software, const CHARSTRING& par_swVersion, const OPTIONAL< CHARSTRING >& par_hwManufacturer, const OPTIONAL< CHARSTRING >& par_hwModel, const OPTIONAL< CHARSTRING >& par_hwSerialNr, const OPTIONAL< CHARSTRING >& par_hwVersion, const OPTIONAL< CHARSTRING >& par_fwVersion) : field_type__(par_type__), field_name(par_name), field_software(par_software), field_swVersion(par_swVersion), field_hwManufacturer(par_hwManufacturer), field_hwModel(par_hwModel), field_hwSerialNr(par_hwSerialNr), field_hwVersion(par_hwVersion), field_fwVersion(par_fwVersion) { } ComponentIdentity::ComponentIdentity(const ComponentIdentity& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RSPRO.ComponentIdentity."); if (other_value.type__().is_bound()) field_type__ = other_value.type__(); else field_type__.clean_up(); if (other_value.name().is_bound()) field_name = other_value.name(); else field_name.clean_up(); if (other_value.software().is_bound()) field_software = other_value.software(); else field_software.clean_up(); if (other_value.swVersion().is_bound()) field_swVersion = other_value.swVersion(); else field_swVersion.clean_up(); if (other_value.hwManufacturer().is_bound()) field_hwManufacturer = other_value.hwManufacturer(); else field_hwManufacturer.clean_up(); if (other_value.hwModel().is_bound()) field_hwModel = other_value.hwModel(); else field_hwModel.clean_up(); if (other_value.hwSerialNr().is_bound()) field_hwSerialNr = other_value.hwSerialNr(); else field_hwSerialNr.clean_up(); if (other_value.hwVersion().is_bound()) field_hwVersion = other_value.hwVersion(); else field_hwVersion.clean_up(); if (other_value.fwVersion().is_bound()) field_fwVersion = other_value.fwVersion(); else field_fwVersion.clean_up(); } void ComponentIdentity::clean_up() { field_type__.clean_up(); field_name.clean_up(); field_software.clean_up(); field_swVersion.clean_up(); field_hwManufacturer.clean_up(); field_hwModel.clean_up(); field_hwSerialNr.clean_up(); field_hwVersion.clean_up(); field_fwVersion.clean_up(); } const TTCN_Typedescriptor_t* ComponentIdentity::get_descriptor() const { return &ComponentIdentity_descr_; } ComponentIdentity& ComponentIdentity::operator=(const ComponentIdentity& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RSPRO.ComponentIdentity."); if (other_value.type__().is_bound()) field_type__ = other_value.type__(); else field_type__.clean_up(); if (other_value.name().is_bound()) field_name = other_value.name(); else field_name.clean_up(); if (other_value.software().is_bound()) field_software = other_value.software(); else field_software.clean_up(); if (other_value.swVersion().is_bound()) field_swVersion = other_value.swVersion(); else field_swVersion.clean_up(); if (other_value.hwManufacturer().is_bound()) field_hwManufacturer = other_value.hwManufacturer(); else field_hwManufacturer.clean_up(); if (other_value.hwModel().is_bound()) field_hwModel = other_value.hwModel(); else field_hwModel.clean_up(); if (other_value.hwSerialNr().is_bound()) field_hwSerialNr = other_value.hwSerialNr(); else field_hwSerialNr.clean_up(); if (other_value.hwVersion().is_bound()) field_hwVersion = other_value.hwVersion(); else field_hwVersion.clean_up(); if (other_value.fwVersion().is_bound()) field_fwVersion = other_value.fwVersion(); else field_fwVersion.clean_up(); } return *this; } boolean ComponentIdentity::operator==(const ComponentIdentity& other_value) const { return field_type__==other_value.field_type__ && field_name==other_value.field_name && field_software==other_value.field_software && field_swVersion==other_value.field_swVersion && field_hwManufacturer==other_value.field_hwManufacturer && field_hwModel==other_value.field_hwModel && field_hwSerialNr==other_value.field_hwSerialNr && field_hwVersion==other_value.field_hwVersion && field_fwVersion==other_value.field_fwVersion; } boolean ComponentIdentity::is_bound() const { return (field_type__.is_bound()) || (field_name.is_bound()) || (field_software.is_bound()) || (field_swVersion.is_bound()) || (OPTIONAL_OMIT == field_hwManufacturer.get_selection() || field_hwManufacturer.is_bound()) || (OPTIONAL_OMIT == field_hwModel.get_selection() || field_hwModel.is_bound()) || (OPTIONAL_OMIT == field_hwSerialNr.get_selection() || field_hwSerialNr.is_bound()) || (OPTIONAL_OMIT == field_hwVersion.get_selection() || field_hwVersion.is_bound()) || (OPTIONAL_OMIT == field_fwVersion.get_selection() || field_fwVersion.is_bound()); } boolean ComponentIdentity::is_value() const { return field_type__.is_value() && field_name.is_value() && field_software.is_value() && field_swVersion.is_value() && (OPTIONAL_OMIT == field_hwManufacturer.get_selection() || field_hwManufacturer.is_value()) && (OPTIONAL_OMIT == field_hwModel.get_selection() || field_hwModel.is_value()) && (OPTIONAL_OMIT == field_hwSerialNr.get_selection() || field_hwSerialNr.is_value()) && (OPTIONAL_OMIT == field_hwVersion.get_selection() || field_hwVersion.is_value()) && (OPTIONAL_OMIT == field_fwVersion.get_selection() || field_fwVersion.is_value()); } int ComponentIdentity::size_of() const { int ret_val = 4; if (field_hwManufacturer.ispresent()) ret_val++; if (field_hwModel.ispresent()) ret_val++; if (field_hwSerialNr.ispresent()) ret_val++; if (field_hwVersion.ispresent()) ret_val++; if (field_fwVersion.ispresent()) ret_val++; return ret_val; } void ComponentIdentity::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ type_ := "); field_type__.log(); TTCN_Logger::log_event_str(", name := "); field_name.log(); TTCN_Logger::log_event_str(", software := "); field_software.log(); TTCN_Logger::log_event_str(", swVersion := "); field_swVersion.log(); TTCN_Logger::log_event_str(", hwManufacturer := "); field_hwManufacturer.log(); TTCN_Logger::log_event_str(", hwModel := "); field_hwModel.log(); TTCN_Logger::log_event_str(", hwSerialNr := "); field_hwSerialNr.log(); TTCN_Logger::log_event_str(", hwVersion := "); field_hwVersion.log(); TTCN_Logger::log_event_str(", fwVersion := "); field_fwVersion.log(); TTCN_Logger::log_event_str(" }"); } void ComponentIdentity::set_implicit_omit() { if (type__().is_bound()) type__().set_implicit_omit(); if (name().is_bound()) name().set_implicit_omit(); if (software().is_bound()) software().set_implicit_omit(); if (swVersion().is_bound()) swVersion().set_implicit_omit(); if (!hwManufacturer().is_bound()) hwManufacturer() = OMIT_VALUE; else hwManufacturer().set_implicit_omit(); if (!hwModel().is_bound()) hwModel() = OMIT_VALUE; else hwModel().set_implicit_omit(); if (!hwSerialNr().is_bound()) hwSerialNr() = OMIT_VALUE; else hwSerialNr().set_implicit_omit(); if (!hwVersion().is_bound()) hwVersion() = OMIT_VALUE; else hwVersion().set_implicit_omit(); if (!fwVersion().is_bound()) fwVersion() = OMIT_VALUE; else fwVersion().set_implicit_omit(); } void ComponentIdentity::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (90 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) type__().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) name().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) software().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) swVersion().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) hwManufacturer().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) hwModel().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) hwSerialNr().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) hwVersion().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) fwVersion().set_param(*param.get_elem(8)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "type_")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { type__().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "name")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { name().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "software")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { software().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "swVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { swVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwManufacturer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwManufacturer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwModel")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwModel().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwSerialNr")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwSerialNr().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "fwVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { fwVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RSPRO.ComponentIdentity: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RSPRO.ComponentIdentity"); } } void ComponentIdentity::encode_text(Text_Buf& text_buf) const { field_type__.encode_text(text_buf); field_name.encode_text(text_buf); field_software.encode_text(text_buf); field_swVersion.encode_text(text_buf); field_hwManufacturer.encode_text(text_buf); field_hwModel.encode_text(text_buf); field_hwSerialNr.encode_text(text_buf); field_hwVersion.encode_text(text_buf); field_fwVersion.encode_text(text_buf); } void ComponentIdentity::decode_text(Text_Buf& text_buf) { field_type__.decode_text(text_buf); field_name.decode_text(text_buf); field_software.decode_text(text_buf); field_swVersion.decode_text(text_buf); field_hwManufacturer.decode_text(text_buf); field_hwModel.decode_text(text_buf); field_hwSerialNr.decode_text(text_buf); field_hwVersion.decode_text(text_buf); field_fwVersion.decode_text(text_buf); } void ComponentIdentity::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name); unsigned BER_coding=va_arg(pvar, unsigned); BER_encode_chk_coding(BER_coding); ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding); tlv->put_in_buffer(p_buf); ASN_BER_TLV_t::destruct(tlv); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); RAW_enc_tr_pos rp; rp.level=0; rp.pos=NULL; RAW_enc_tree root(FALSE, NULL, &rp, 1, p_td.raw); RAW_encode(p_td, root); root.put_to_buf(p_buf); break;} case TTCN_EncDec::CT_TEXT: { TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); TEXT_encode(p_td,p_buf); break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0); p_buf.put_c('\n'); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok(va_arg(pvar, int) != 0); JSON_encode(p_td, tok, FALSE); p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_encode(p_td, p_buf); break;} default: TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name); } va_end(pvar); } void ComponentIdentity::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name); unsigned L_form=va_arg(pvar, unsigned); ASN_BER_TLV_t tlv; BER_decode_str2TLV(p_buf, tlv, L_form); BER_decode_TLV(p_td, tlv, L_form); if(tlv.isComplete) p_buf.increase_pos(tlv.get_len()); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); raw_order_t r_order; switch(p_td.raw->top_bit_order) { case TOP_BIT_LEFT: r_order=ORDER_LSB; break; case TOP_BIT_RIGHT: default: r_order=ORDER_MSB; } int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order); if(rawr<0) switch (-rawr) { case TTCN_EncDec::ET_INCOMPL_MSG: case TTCN_EncDec::ET_LEN_ERR: ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name); break; case 1: default: ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name); break; } break;} case TTCN_EncDec::CT_TEXT: { Limit_Token_List limit; TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); const unsigned char *b_data=p_buf.get_data(); int null_added=0; if(b_data[p_buf.get_len()-1]!='\0'){ null_added=1; p_buf.set_pos(p_buf.get_len()); p_buf.put_zero(8,ORDER_LSB); p_buf.rewind(); } if(TEXT_decode(p_td,p_buf,limit)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); if(null_added){ size_t actpos=p_buf.get_pos(); p_buf.set_pos(p_buf.get_len()-1); p_buf.cut_end(); p_buf.set_pos(actpos); } break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XmlReaderWrap reader(p_buf); for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) { if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break; } XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0); size_t bytes = reader.ByteConsumed(); p_buf.set_pos(bytes); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len()); if(JSON_decode(p_td, tok, FALSE, FALSE)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); p_buf.set_pos(tok.get_buf_pos()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_struct p_oer; OER_decode(p_td, p_buf, p_oer); break;} default: TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name); } va_end(pvar); } ASN_BER_TLV_t* ComponentIdentity::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const { if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value."); BER_chk_descr(p_td); ASN_BER_TLV_t *new_tlv=ASN_BER_TLV_t::construct(NULL); TTCN_EncDec_ErrorContext ec_0("Component '"); TTCN_EncDec_ErrorContext ec_1; ec_1.set_msg("type_': "); new_tlv->add_TLV(field_type__.BER_encode_TLV(ComponentType_descr_, p_coding)); ec_1.set_msg("name': "); new_tlv->add_TLV(field_name.BER_encode_TLV(IA5String_descr_, p_coding)); ec_1.set_msg("software': "); new_tlv->add_TLV(field_software.BER_encode_TLV(ComponentIdentity_software_descr_, p_coding)); ec_1.set_msg("swVersion': "); new_tlv->add_TLV(field_swVersion.BER_encode_TLV(ComponentIdentity_swVersion_descr_, p_coding)); ec_1.set_msg("hwManufacturer': "); new_tlv->add_TLV(field_hwManufacturer.BER_encode_TLV(ComponentIdentity_hwManufacturer_descr_, p_coding)); ec_1.set_msg("hwModel': "); new_tlv->add_TLV(field_hwModel.BER_encode_TLV(ComponentIdentity_hwModel_descr_, p_coding)); ec_1.set_msg("hwSerialNr': "); new_tlv->add_TLV(field_hwSerialNr.BER_encode_TLV(ComponentIdentity_hwSerialNr_descr_, p_coding)); ec_1.set_msg("hwVersion': "); new_tlv->add_TLV(field_hwVersion.BER_encode_TLV(ComponentIdentity_hwVersion_descr_, p_coding)); ec_1.set_msg("fwVersion': "); new_tlv->add_TLV(field_fwVersion.BER_encode_TLV(ComponentIdentity_fwVersion_descr_, p_coding)); new_tlv=ASN_BER_V2TLV(new_tlv, p_td, p_coding); return new_tlv; } boolean ComponentIdentity::BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form) { BER_chk_descr(p_td); ASN_BER_TLV_t stripped_tlv; BER_decode_strip_tags(*p_td.ber, p_tlv, L_form, stripped_tlv); TTCN_EncDec_ErrorContext ec_0("While decoding '@RSPRO.ComponentIdentity' type: "); stripped_tlv.chk_constructed_flag(TRUE); size_t V_pos=0; ASN_BER_TLV_t tmp_tlv; boolean tlv_present=FALSE; { TTCN_EncDec_ErrorContext ec_1("Component '"); TTCN_EncDec_ErrorContext ec_2; ec_2.set_msg("type_': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present){ ec_2.error(TTCN_EncDec::ET_INCOMPL_MSG,"Invalid or incomplete message was received."); return FALSE; } field_type__.BER_decode_TLV(ComponentType_descr_, tmp_tlv, L_form); tlv_present=FALSE; ec_2.set_msg("name': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present){ ec_2.error(TTCN_EncDec::ET_INCOMPL_MSG,"Invalid or incomplete message was received."); return FALSE; } field_name.BER_decode_TLV(IA5String_descr_, tmp_tlv, L_form); tlv_present=FALSE; ec_2.set_msg("software': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present){ ec_2.error(TTCN_EncDec::ET_INCOMPL_MSG,"Invalid or incomplete message was received."); return FALSE; } field_software.BER_decode_TLV(ComponentIdentity_software_descr_, tmp_tlv, L_form); tlv_present=FALSE; ec_2.set_msg("swVersion': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present){ ec_2.error(TTCN_EncDec::ET_INCOMPL_MSG,"Invalid or incomplete message was received."); return FALSE; } field_swVersion.BER_decode_TLV(ComponentIdentity_swVersion_descr_, tmp_tlv, L_form); tlv_present=FALSE; ec_2.set_msg("hwManufacturer': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present) field_hwManufacturer=OMIT_VALUE; else { field_hwManufacturer.BER_decode_TLV(ComponentIdentity_hwManufacturer_descr_, tmp_tlv, L_form); if(field_hwManufacturer.ispresent()) tlv_present=FALSE; } ec_2.set_msg("hwModel': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present) field_hwModel=OMIT_VALUE; else { field_hwModel.BER_decode_TLV(ComponentIdentity_hwModel_descr_, tmp_tlv, L_form); if(field_hwModel.ispresent()) tlv_present=FALSE; } ec_2.set_msg("hwSerialNr': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present) field_hwSerialNr=OMIT_VALUE; else { field_hwSerialNr.BER_decode_TLV(ComponentIdentity_hwSerialNr_descr_, tmp_tlv, L_form); if(field_hwSerialNr.ispresent()) tlv_present=FALSE; } ec_2.set_msg("hwVersion': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present) field_hwVersion=OMIT_VALUE; else { field_hwVersion.BER_decode_TLV(ComponentIdentity_hwVersion_descr_, tmp_tlv, L_form); if(field_hwVersion.ispresent()) tlv_present=FALSE; } ec_2.set_msg("fwVersion': "); if(!tlv_present) tlv_present=BER_decode_constdTLV_next(stripped_tlv, V_pos, L_form, tmp_tlv); if(!tlv_present) field_fwVersion=OMIT_VALUE; else { field_fwVersion.BER_decode_TLV(ComponentIdentity_fwVersion_descr_, tmp_tlv, L_form); if(field_fwVersion.ispresent()) tlv_present=FALSE; } } BER_decode_constdTLV_end(stripped_tlv, V_pos, L_form, tmp_tlv, tlv_present); return TRUE; } int ComponentIdentity::JSON_encode(const TTCN_Typedescriptor_t&, JSON_Tokenizer& p_tok, boolean p_parent_is_map) const { if (!is_bound()) { TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value of type @RSPRO.ComponentIdentity."); return -1; } int enc_len = p_tok.put_next_token(JSON_TOKEN_OBJECT_START, NULL); { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "type_"); enc_len += field_type__.JSON_encode(ComponentType_descr_, p_tok, FALSE); } { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "name"); enc_len += field_name.JSON_encode(IA5String_descr_, p_tok, FALSE); } { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "software"); enc_len += field_software.JSON_encode(ComponentIdentity_software_descr_, p_tok, FALSE); } { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "swVersion"); enc_len += field_swVersion.JSON_encode(ComponentIdentity_swVersion_descr_, p_tok, FALSE); } if (field_hwManufacturer.is_present()) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "hwManufacturer"); enc_len += field_hwManufacturer.JSON_encode(ComponentIdentity_hwManufacturer_descr_, p_tok, FALSE); } if (field_hwModel.is_present()) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "hwModel"); enc_len += field_hwModel.JSON_encode(ComponentIdentity_hwModel_descr_, p_tok, FALSE); } if (field_hwSerialNr.is_present()) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "hwSerialNr"); enc_len += field_hwSerialNr.JSON_encode(ComponentIdentity_hwSerialNr_descr_, p_tok, FALSE); } if (field_hwVersion.is_present()) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "hwVersion"); enc_len += field_hwVersion.JSON_encode(ComponentIdentity_hwVersion_descr_, p_tok, FALSE); } if (field_fwVersion.is_present()) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "fwVersion"); enc_len += field_fwVersion.JSON_encode(ComponentIdentity_fwVersion_descr_, p_tok, FALSE); } enc_len += p_tok.put_next_token(JSON_TOKEN_OBJECT_END, NULL); return enc_len; } int ComponentIdentity::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& p_tok, boolean p_silent, boolean p_parent_is_map, int) { if (p_td.json->default_value.type == JD_STANDARD && 0 == p_tok.get_buffer_length()) { *this = *static_cast(p_td.json->default_value.val); return 0; } json_token_t j_token = JSON_TOKEN_NONE; size_t dec_len = p_tok.get_next_token(&j_token, NULL, NULL); if (JSON_TOKEN_ERROR == j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_BAD_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; } else if (JSON_TOKEN_OBJECT_START != j_token) { return JSON_ERROR_INVALID_TOKEN; } boolean type___found = FALSE; boolean name_found = FALSE; boolean software_found = FALSE; boolean swVersion_found = FALSE; boolean hwManufacturer_found = FALSE; boolean hwModel_found = FALSE; boolean hwSerialNr_found = FALSE; boolean hwVersion_found = FALSE; boolean fwVersion_found = FALSE; while (TRUE) { char* fld_name = 0; size_t name_len = 0; size_t buf_pos = p_tok.get_buf_pos(); dec_len += p_tok.get_next_token(&j_token, &fld_name, &name_len); if (JSON_TOKEN_ERROR == j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_NAME_TOKEN_ERROR); return JSON_ERROR_FATAL; } else if (JSON_TOKEN_NAME != j_token) { p_tok.set_buf_pos(buf_pos); break; } else { if (5 == name_len && 0 == strncmp(fld_name, "type_", name_len)) { type___found = TRUE; int ret_val = field_type__.JSON_decode(ComponentType_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 5, "type_"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (4 == name_len && 0 == strncmp(fld_name, "name", name_len)) { name_found = TRUE; int ret_val = field_name.JSON_decode(IA5String_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 4, "name"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (8 == name_len && 0 == strncmp(fld_name, "software", name_len)) { software_found = TRUE; int ret_val = field_software.JSON_decode(ComponentIdentity_software_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 8, "software"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (9 == name_len && 0 == strncmp(fld_name, "swVersion", name_len)) { swVersion_found = TRUE; int ret_val = field_swVersion.JSON_decode(ComponentIdentity_swVersion_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 9, "swVersion"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (14 == name_len && 0 == strncmp(fld_name, "hwManufacturer", name_len)) { hwManufacturer_found = TRUE; int ret_val = field_hwManufacturer.JSON_decode(ComponentIdentity_hwManufacturer_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 14, "hwManufacturer"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (7 == name_len && 0 == strncmp(fld_name, "hwModel", name_len)) { hwModel_found = TRUE; int ret_val = field_hwModel.JSON_decode(ComponentIdentity_hwModel_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 7, "hwModel"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (10 == name_len && 0 == strncmp(fld_name, "hwSerialNr", name_len)) { hwSerialNr_found = TRUE; int ret_val = field_hwSerialNr.JSON_decode(ComponentIdentity_hwSerialNr_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 10, "hwSerialNr"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (9 == name_len && 0 == strncmp(fld_name, "hwVersion", name_len)) { hwVersion_found = TRUE; int ret_val = field_hwVersion.JSON_decode(ComponentIdentity_hwVersion_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 9, "hwVersion"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else if (9 == name_len && 0 == strncmp(fld_name, "fwVersion", name_len)) { fwVersion_found = TRUE; int ret_val = field_fwVersion.JSON_decode(ComponentIdentity_fwVersion_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 9, "fwVersion"); } return JSON_ERROR_FATAL; } dec_len += (size_t)ret_val; } else { if (p_silent) { return JSON_ERROR_INVALID_TOKEN; } JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_INVALID_NAME_ERROR, (int)name_len, fld_name); dec_len += p_tok.get_next_token(&j_token, NULL, NULL); if (JSON_TOKEN_NUMBER != j_token && JSON_TOKEN_STRING != j_token && JSON_TOKEN_LITERAL_TRUE != j_token && JSON_TOKEN_LITERAL_FALSE != j_token && JSON_TOKEN_LITERAL_NULL != j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, (int)name_len, fld_name); return JSON_ERROR_FATAL; } } } } dec_len += p_tok.get_next_token(&j_token, NULL, NULL); if (JSON_TOKEN_OBJECT_END != j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_OBJECT_END_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; } if (!type___found) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_MISSING_FIELD_ERROR, "type_"); return JSON_ERROR_FATAL; } if (!name_found) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_MISSING_FIELD_ERROR, "name"); return JSON_ERROR_FATAL; } if (!software_found) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_MISSING_FIELD_ERROR, "software"); return JSON_ERROR_FATAL; } if (!swVersion_found) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_MISSING_FIELD_ERROR, "swVersion"); return JSON_ERROR_FATAL; } if (!hwManufacturer_found) { field_hwManufacturer = OMIT_VALUE; } if (!hwModel_found) { field_hwModel = OMIT_VALUE; } if (!hwSerialNr_found) { field_hwSerialNr = OMIT_VALUE; } if (!hwVersion_found) { field_hwVersion = OMIT_VALUE; } if (!fwVersion_found) { field_fwVersion = OMIT_VALUE; } return (int)dec_len; } int ComponentIdentity::OER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf) const { if (!is_bound()) { TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound record value."); return -1; } char c = 0; if (field_hwManufacturer.is_present()) { c |= 64; } if (field_hwModel.is_present()) { c |= 32; } if (field_hwSerialNr.is_present()) { c |= 16; } if (field_hwVersion.is_present()) { c |= 8; } if (field_fwVersion.is_present()) { c |= 4; } p_buf.put_c(c); field_type__.OER_encode(ComponentType_descr_, p_buf); field_name.OER_encode(IA5String_descr_, p_buf); field_software.OER_encode(ComponentIdentity_software_descr_, p_buf); field_swVersion.OER_encode(ComponentIdentity_swVersion_descr_, p_buf); if (field_hwManufacturer.is_present()) field_hwManufacturer.OER_encode(ComponentIdentity_hwManufacturer_descr_, p_buf); if (field_hwModel.is_present()) field_hwModel.OER_encode(ComponentIdentity_hwModel_descr_, p_buf); if (field_hwSerialNr.is_present()) field_hwSerialNr.OER_encode(ComponentIdentity_hwSerialNr_descr_, p_buf); if (field_hwVersion.is_present()) field_hwVersion.OER_encode(ComponentIdentity_hwVersion_descr_, p_buf); if (field_fwVersion.is_present()) field_fwVersion.OER_encode(ComponentIdentity_fwVersion_descr_, p_buf); return 0; } int ComponentIdentity::OER_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf, OER_struct& p_oer) { const unsigned char* uc = p_buf.get_read_data(); p_buf.increase_pos(1); boolean has_extension = FALSE; if (uc[0] & 0x80) { has_extension = TRUE; } field_type__.OER_decode(ComponentType_descr_, p_buf, p_oer); field_name.OER_decode(IA5String_descr_, p_buf, p_oer); field_software.OER_decode(ComponentIdentity_software_descr_, p_buf, p_oer); field_swVersion.OER_decode(ComponentIdentity_swVersion_descr_, p_buf, p_oer); if (uc[0] & 64) field_hwManufacturer.OER_decode(ComponentIdentity_hwManufacturer_descr_, p_buf, p_oer); else field_hwManufacturer = OMIT_VALUE; if (uc[0] & 32) field_hwModel.OER_decode(ComponentIdentity_hwModel_descr_, p_buf, p_oer); else field_hwModel = OMIT_VALUE; if (uc[0] & 16) field_hwSerialNr.OER_decode(ComponentIdentity_hwSerialNr_descr_, p_buf, p_oer); else field_hwSerialNr = OMIT_VALUE; if (uc[0] & 8) field_hwVersion.OER_decode(ComponentIdentity_hwVersion_descr_, p_buf, p_oer); else field_hwVersion = OMIT_VALUE; if (uc[0] & 4) field_fwVersion.OER_decode(ComponentIdentity_fwVersion_descr_, p_buf, p_oer); else field_fwVersion = OMIT_VALUE; if (has_extension) { size_t bytes = decode_oer_length(p_buf, FALSE); uc = p_buf.get_read_data(); p_buf.increase_pos(bytes); uc++; } return 0; } struct ComponentIdentity_template::single_value_struct { ComponentType_template field_type__; CHARSTRING_template field_name; CHARSTRING_template field_software; CHARSTRING_template field_swVersion; CHARSTRING_template field_hwManufacturer; CHARSTRING_template field_hwModel; CHARSTRING_template field_hwSerialNr; CHARSTRING_template field_hwVersion; CHARSTRING_template field_fwVersion; }; void ComponentIdentity_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_type__ = ANY_VALUE; single_value->field_name = ANY_VALUE; single_value->field_software = ANY_VALUE; single_value->field_swVersion = ANY_VALUE; single_value->field_hwManufacturer = ANY_OR_OMIT; single_value->field_hwModel = ANY_OR_OMIT; single_value->field_hwSerialNr = ANY_OR_OMIT; single_value->field_hwVersion = ANY_OR_OMIT; single_value->field_fwVersion = ANY_OR_OMIT; } } } void ComponentIdentity_template::copy_value(const ComponentIdentity& other_value) { single_value = new single_value_struct; if (other_value.type__().is_bound()) { single_value->field_type__ = other_value.type__(); } else { single_value->field_type__.clean_up(); } if (other_value.name().is_bound()) { single_value->field_name = other_value.name(); } else { single_value->field_name.clean_up(); } if (other_value.software().is_bound()) { single_value->field_software = other_value.software(); } else { single_value->field_software.clean_up(); } if (other_value.swVersion().is_bound()) { single_value->field_swVersion = other_value.swVersion(); } else { single_value->field_swVersion.clean_up(); } if (other_value.hwManufacturer().is_bound()) { if (other_value.hwManufacturer().ispresent()) single_value->field_hwManufacturer = other_value.hwManufacturer()(); else single_value->field_hwManufacturer = OMIT_VALUE; } else { single_value->field_hwManufacturer.clean_up(); } if (other_value.hwModel().is_bound()) { if (other_value.hwModel().ispresent()) single_value->field_hwModel = other_value.hwModel()(); else single_value->field_hwModel = OMIT_VALUE; } else { single_value->field_hwModel.clean_up(); } if (other_value.hwSerialNr().is_bound()) { if (other_value.hwSerialNr().ispresent()) single_value->field_hwSerialNr = other_value.hwSerialNr()(); else single_value->field_hwSerialNr = OMIT_VALUE; } else { single_value->field_hwSerialNr.clean_up(); } if (other_value.hwVersion().is_bound()) { if (other_value.hwVersion().ispresent()) single_value->field_hwVersion = other_value.hwVersion()(); else single_value->field_hwVersion = OMIT_VALUE; } else { single_value->field_hwVersion.clean_up(); } if (other_value.fwVersion().is_bound()) { if (other_value.fwVersion().ispresent()) single_value->field_fwVersion = other_value.fwVersion()(); else single_value->field_fwVersion = OMIT_VALUE; } else { single_value->field_fwVersion.clean_up(); } set_selection(SPECIFIC_VALUE); } void ComponentIdentity_template::copy_template(const ComponentIdentity_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.type__().get_selection()) { single_value->field_type__ = other_value.type__(); } else { single_value->field_type__.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.name().get_selection()) { single_value->field_name = other_value.name(); } else { single_value->field_name.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.software().get_selection()) { single_value->field_software = other_value.software(); } else { single_value->field_software.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.swVersion().get_selection()) { single_value->field_swVersion = other_value.swVersion(); } else { single_value->field_swVersion.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.hwManufacturer().get_selection()) { single_value->field_hwManufacturer = other_value.hwManufacturer(); } else { single_value->field_hwManufacturer.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.hwModel().get_selection()) { single_value->field_hwModel = other_value.hwModel(); } else { single_value->field_hwModel.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.hwSerialNr().get_selection()) { single_value->field_hwSerialNr = other_value.hwSerialNr(); } else { single_value->field_hwSerialNr.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.hwVersion().get_selection()) { single_value->field_hwVersion = other_value.hwVersion(); } else { single_value->field_hwVersion.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.fwVersion().get_selection()) { single_value->field_fwVersion = other_value.fwVersion(); } else { single_value->field_fwVersion.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new ComponentIdentity_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new ComponentIdentity_template(*other_value.implication_.precondition); implication_.implied_template = new ComponentIdentity_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @RSPRO.ComponentIdentity."); break; } set_selection(other_value); } ComponentIdentity_template::ComponentIdentity_template() { } ComponentIdentity_template::ComponentIdentity_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ComponentIdentity_template::ComponentIdentity_template(const ComponentIdentity& other_value) { copy_value(other_value); } ComponentIdentity_template::ComponentIdentity_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ComponentIdentity&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RSPRO.ComponentIdentity from an unbound optional field."); } } ComponentIdentity_template::ComponentIdentity_template(ComponentIdentity_template* p_precondition, ComponentIdentity_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ComponentIdentity_template::ComponentIdentity_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ComponentIdentity_template::ComponentIdentity_template(const ComponentIdentity_template& other_value) : Base_Template() { copy_template(other_value); } ComponentIdentity_template::~ComponentIdentity_template() { clean_up(); } ComponentIdentity_template& ComponentIdentity_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ComponentIdentity_template& ComponentIdentity_template::operator=(const ComponentIdentity& other_value) { clean_up(); copy_value(other_value); return *this; } ComponentIdentity_template& ComponentIdentity_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ComponentIdentity&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @RSPRO.ComponentIdentity."); } return *this; } ComponentIdentity_template& ComponentIdentity_template::operator=(const ComponentIdentity_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ComponentIdentity_template::match(const ComponentIdentity& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.type__().is_bound()) return FALSE; if(!single_value->field_type__.match(other_value.type__(), legacy))return FALSE; if(!other_value.name().is_bound()) return FALSE; if(!single_value->field_name.match(other_value.name(), legacy))return FALSE; if(!other_value.software().is_bound()) return FALSE; if(!single_value->field_software.match(other_value.software(), legacy))return FALSE; if(!other_value.swVersion().is_bound()) return FALSE; if(!single_value->field_swVersion.match(other_value.swVersion(), legacy))return FALSE; if(!other_value.hwManufacturer().is_bound()) return FALSE; if((other_value.hwManufacturer().ispresent() ? !single_value->field_hwManufacturer.match((const CHARSTRING&)other_value.hwManufacturer(), legacy) : !single_value->field_hwManufacturer.match_omit(legacy)))return FALSE; if(!other_value.hwModel().is_bound()) return FALSE; if((other_value.hwModel().ispresent() ? !single_value->field_hwModel.match((const CHARSTRING&)other_value.hwModel(), legacy) : !single_value->field_hwModel.match_omit(legacy)))return FALSE; if(!other_value.hwSerialNr().is_bound()) return FALSE; if((other_value.hwSerialNr().ispresent() ? !single_value->field_hwSerialNr.match((const CHARSTRING&)other_value.hwSerialNr(), legacy) : !single_value->field_hwSerialNr.match_omit(legacy)))return FALSE; if(!other_value.hwVersion().is_bound()) return FALSE; if((other_value.hwVersion().ispresent() ? !single_value->field_hwVersion.match((const CHARSTRING&)other_value.hwVersion(), legacy) : !single_value->field_hwVersion.match_omit(legacy)))return FALSE; if(!other_value.fwVersion().is_bound()) return FALSE; if((other_value.fwVersion().ispresent() ? !single_value->field_fwVersion.match((const CHARSTRING&)other_value.fwVersion(), legacy) : !single_value->field_fwVersion.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @RSPRO.ComponentIdentity."); } return FALSE; } boolean ComponentIdentity_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_type__.is_bound() || single_value->field_name.is_bound() || single_value->field_software.is_bound() || single_value->field_swVersion.is_bound() || (single_value->field_hwManufacturer.is_omit() || single_value->field_hwManufacturer.is_bound()) || (single_value->field_hwModel.is_omit() || single_value->field_hwModel.is_bound()) || (single_value->field_hwSerialNr.is_omit() || single_value->field_hwSerialNr.is_bound()) || (single_value->field_hwVersion.is_omit() || single_value->field_hwVersion.is_bound()) || (single_value->field_fwVersion.is_omit() || single_value->field_fwVersion.is_bound()); } boolean ComponentIdentity_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_type__.is_value() && single_value->field_name.is_value() && single_value->field_software.is_value() && single_value->field_swVersion.is_value() && (single_value->field_hwManufacturer.is_omit() || single_value->field_hwManufacturer.is_value()) && (single_value->field_hwModel.is_omit() || single_value->field_hwModel.is_value()) && (single_value->field_hwSerialNr.is_omit() || single_value->field_hwSerialNr.is_value()) && (single_value->field_hwVersion.is_omit() || single_value->field_hwVersion.is_value()) && (single_value->field_fwVersion.is_omit() || single_value->field_fwVersion.is_value()); } void ComponentIdentity_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } ComponentIdentity ComponentIdentity_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @RSPRO.ComponentIdentity."); ComponentIdentity ret_val; if (single_value->field_type__.is_bound()) { ret_val.type__() = single_value->field_type__.valueof(); } if (single_value->field_name.is_bound()) { ret_val.name() = single_value->field_name.valueof(); } if (single_value->field_software.is_bound()) { ret_val.software() = single_value->field_software.valueof(); } if (single_value->field_swVersion.is_bound()) { ret_val.swVersion() = single_value->field_swVersion.valueof(); } if (single_value->field_hwManufacturer.is_omit()) ret_val.hwManufacturer() = OMIT_VALUE; else if (single_value->field_hwManufacturer.is_bound()) { ret_val.hwManufacturer() = single_value->field_hwManufacturer.valueof(); } if (single_value->field_hwModel.is_omit()) ret_val.hwModel() = OMIT_VALUE; else if (single_value->field_hwModel.is_bound()) { ret_val.hwModel() = single_value->field_hwModel.valueof(); } if (single_value->field_hwSerialNr.is_omit()) ret_val.hwSerialNr() = OMIT_VALUE; else if (single_value->field_hwSerialNr.is_bound()) { ret_val.hwSerialNr() = single_value->field_hwSerialNr.valueof(); } if (single_value->field_hwVersion.is_omit()) ret_val.hwVersion() = OMIT_VALUE; else if (single_value->field_hwVersion.is_bound()) { ret_val.hwVersion() = single_value->field_hwVersion.valueof(); } if (single_value->field_fwVersion.is_omit()) ret_val.fwVersion() = OMIT_VALUE; else if (single_value->field_fwVersion.is_bound()) { ret_val.fwVersion() = single_value->field_fwVersion.valueof(); } return ret_val; } void ComponentIdentity_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @RSPRO.ComponentIdentity."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ComponentIdentity_template[list_length]; } ComponentIdentity_template& ComponentIdentity_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @RSPRO.ComponentIdentity."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RSPRO.ComponentIdentity."); return value_list.list_value[list_index]; } ComponentType_template& ComponentIdentity_template::type__() { set_specific(); return single_value->field_type__; } const ComponentType_template& ComponentIdentity_template::type__() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field type_ of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_type__; } CHARSTRING_template& ComponentIdentity_template::name() { set_specific(); return single_value->field_name; } const CHARSTRING_template& ComponentIdentity_template::name() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field name of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_name; } CHARSTRING_template& ComponentIdentity_template::software() { set_specific(); return single_value->field_software; } const CHARSTRING_template& ComponentIdentity_template::software() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field software of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_software; } CHARSTRING_template& ComponentIdentity_template::swVersion() { set_specific(); return single_value->field_swVersion; } const CHARSTRING_template& ComponentIdentity_template::swVersion() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field swVersion of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_swVersion; } CHARSTRING_template& ComponentIdentity_template::hwManufacturer() { set_specific(); return single_value->field_hwManufacturer; } const CHARSTRING_template& ComponentIdentity_template::hwManufacturer() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field hwManufacturer of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_hwManufacturer; } CHARSTRING_template& ComponentIdentity_template::hwModel() { set_specific(); return single_value->field_hwModel; } const CHARSTRING_template& ComponentIdentity_template::hwModel() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field hwModel of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_hwModel; } CHARSTRING_template& ComponentIdentity_template::hwSerialNr() { set_specific(); return single_value->field_hwSerialNr; } const CHARSTRING_template& ComponentIdentity_template::hwSerialNr() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field hwSerialNr of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_hwSerialNr; } CHARSTRING_template& ComponentIdentity_template::hwVersion() { set_specific(); return single_value->field_hwVersion; } const CHARSTRING_template& ComponentIdentity_template::hwVersion() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field hwVersion of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_hwVersion; } CHARSTRING_template& ComponentIdentity_template::fwVersion() { set_specific(); return single_value->field_fwVersion; } const CHARSTRING_template& ComponentIdentity_template::fwVersion() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field fwVersion of a non-specific template of type @RSPRO.ComponentIdentity."); return single_value->field_fwVersion; } int ComponentIdentity_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 4; if (single_value->field_hwManufacturer.is_present()) ret_val++; if (single_value->field_hwModel.is_present()) ret_val++; if (single_value->field_hwSerialNr.is_present()) ret_val++; if (single_value->field_hwVersion.is_present()) ret_val++; if (single_value->field_fwVersion.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RSPRO.ComponentIdentity containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RSPRO.ComponentIdentity."); } return 0; } void ComponentIdentity_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ type_ := "); single_value->field_type__.log(); TTCN_Logger::log_event_str(", name := "); single_value->field_name.log(); TTCN_Logger::log_event_str(", software := "); single_value->field_software.log(); TTCN_Logger::log_event_str(", swVersion := "); single_value->field_swVersion.log(); TTCN_Logger::log_event_str(", hwManufacturer := "); single_value->field_hwManufacturer.log(); TTCN_Logger::log_event_str(", hwModel := "); single_value->field_hwModel.log(); TTCN_Logger::log_event_str(", hwSerialNr := "); single_value->field_hwSerialNr.log(); TTCN_Logger::log_event_str(", hwVersion := "); single_value->field_hwVersion.log(); TTCN_Logger::log_event_str(", fwVersion := "); single_value->field_fwVersion.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void ComponentIdentity_template::log_match(const ComponentIdentity& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if(!single_value->field_type__.match(match_value.type__(), legacy)){ TTCN_Logger::log_logmatch_info(".type_"); single_value->field_type__.log_match(match_value.type__(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_name.match(match_value.name(), legacy)){ TTCN_Logger::log_logmatch_info(".name"); single_value->field_name.log_match(match_value.name(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_software.match(match_value.software(), legacy)){ TTCN_Logger::log_logmatch_info(".software"); single_value->field_software.log_match(match_value.software(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_swVersion.match(match_value.swVersion(), legacy)){ TTCN_Logger::log_logmatch_info(".swVersion"); single_value->field_swVersion.log_match(match_value.swVersion(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.hwManufacturer().ispresent()){ if(!single_value->field_hwManufacturer.match(match_value.hwManufacturer(), legacy)){ TTCN_Logger::log_logmatch_info(".hwManufacturer"); single_value->field_hwManufacturer.log_match(match_value.hwManufacturer(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_hwManufacturer.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".hwManufacturer := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_hwManufacturer.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.hwModel().ispresent()){ if(!single_value->field_hwModel.match(match_value.hwModel(), legacy)){ TTCN_Logger::log_logmatch_info(".hwModel"); single_value->field_hwModel.log_match(match_value.hwModel(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_hwModel.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".hwModel := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_hwModel.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.hwSerialNr().ispresent()){ if(!single_value->field_hwSerialNr.match(match_value.hwSerialNr(), legacy)){ TTCN_Logger::log_logmatch_info(".hwSerialNr"); single_value->field_hwSerialNr.log_match(match_value.hwSerialNr(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_hwSerialNr.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".hwSerialNr := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_hwSerialNr.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.hwVersion().ispresent()){ if(!single_value->field_hwVersion.match(match_value.hwVersion(), legacy)){ TTCN_Logger::log_logmatch_info(".hwVersion"); single_value->field_hwVersion.log_match(match_value.hwVersion(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_hwVersion.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".hwVersion := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_hwVersion.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.fwVersion().ispresent()){ if(!single_value->field_fwVersion.match(match_value.fwVersion(), legacy)){ TTCN_Logger::log_logmatch_info(".fwVersion"); single_value->field_fwVersion.log_match(match_value.fwVersion(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_fwVersion.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".fwVersion := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_fwVersion.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ type_ := "); single_value->field_type__.log_match(match_value.type__(), legacy); TTCN_Logger::log_event_str(", name := "); single_value->field_name.log_match(match_value.name(), legacy); TTCN_Logger::log_event_str(", software := "); single_value->field_software.log_match(match_value.software(), legacy); TTCN_Logger::log_event_str(", swVersion := "); single_value->field_swVersion.log_match(match_value.swVersion(), legacy); TTCN_Logger::log_event_str(", hwManufacturer := "); if (match_value.hwManufacturer().ispresent()) { single_value->field_hwManufacturer.log_match(match_value.hwManufacturer(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_hwManufacturer.log(); if (single_value->field_hwManufacturer.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", hwModel := "); if (match_value.hwModel().ispresent()) { single_value->field_hwModel.log_match(match_value.hwModel(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_hwModel.log(); if (single_value->field_hwModel.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", hwSerialNr := "); if (match_value.hwSerialNr().ispresent()) { single_value->field_hwSerialNr.log_match(match_value.hwSerialNr(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_hwSerialNr.log(); if (single_value->field_hwSerialNr.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", hwVersion := "); if (match_value.hwVersion().ispresent()) { single_value->field_hwVersion.log_match(match_value.hwVersion(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_hwVersion.log(); if (single_value->field_hwVersion.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", fwVersion := "); if (match_value.fwVersion().ispresent()) { single_value->field_fwVersion.log_match(match_value.fwVersion(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_fwVersion.log(); if (single_value->field_fwVersion.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void ComponentIdentity_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_type__.encode_text(text_buf); single_value->field_name.encode_text(text_buf); single_value->field_software.encode_text(text_buf); single_value->field_swVersion.encode_text(text_buf); single_value->field_hwManufacturer.encode_text(text_buf); single_value->field_hwModel.encode_text(text_buf); single_value->field_hwSerialNr.encode_text(text_buf); single_value->field_hwVersion.encode_text(text_buf); single_value->field_fwVersion.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @RSPRO.ComponentIdentity."); } } void ComponentIdentity_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_type__.decode_text(text_buf); single_value->field_name.decode_text(text_buf); single_value->field_software.decode_text(text_buf); single_value->field_swVersion.decode_text(text_buf); single_value->field_hwManufacturer.decode_text(text_buf); single_value->field_hwModel.decode_text(text_buf); single_value->field_hwSerialNr.decode_text(text_buf); single_value->field_hwVersion.decode_text(text_buf); single_value->field_fwVersion.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new ComponentIdentity_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @RSPRO.ComponentIdentity."); } } void ComponentIdentity_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { ComponentIdentity_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) type__().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) name().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) software().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) swVersion().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) hwManufacturer().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) hwModel().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) hwSerialNr().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) hwVersion().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) fwVersion().set_param(*param.get_elem(8)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "type_")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { type__().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "name")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { name().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "software")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { software().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "swVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { swVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwManufacturer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwManufacturer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwModel")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwModel().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwSerialNr")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwSerialNr().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "hwVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { hwVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "fwVersion")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { fwVersion().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RSPRO.ComponentIdentity: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { ComponentIdentity_template* precondition = new ComponentIdentity_template; precondition->set_param(*param.get_elem(0)); ComponentIdentity_template* implied_template = new ComponentIdentity_template; implied_template->set_param(*param.get_elem(1)); *this = ComponentIdentity_template(precondition, implied_template); } break; default: param.type_error("record template", "@RSPRO.ComponentIdentity"); } is_ifpresent = param.get_ifpresent(); } void ComponentIdentity_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_type__.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_name.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_software.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_swVersion.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_hwManufacturer.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_hwModel.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_hwSerialNr.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_hwVersion.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); single_value->field_fwVersion.check_restriction(t_res, t_name ? t_name : "@RSPRO.ComponentIdentity"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@RSPRO.ComponentIdentity"); } boolean ComponentIdentity_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ComponentIdentity_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idxis_value(); case ALT_ipv6: return field_ipv6->is_value(); default: TTCN_error("Invalid selection in union is_bound");} } void IpAddress::clean_up() { switch (union_selection) { case ALT_ipv4: delete field_ipv4; break; case ALT_ipv6: delete field_ipv6; break; default: break; } union_selection = UNBOUND_VALUE; } void IpAddress::log() const { switch (union_selection) { case ALT_ipv4: TTCN_Logger::log_event_str("{ ipv4 := "); field_ipv4->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_ipv6: TTCN_Logger::log_event_str("{ ipv6 := "); field_ipv6->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_unbound(); } } void IpAddress::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "union value"); Module_Param_Ptr m_p = ¶m; if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return; if (m_p->get_type()!=Module_Param::MP_Assignment_List) { param.error("union value with field name was expected"); } Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "ipv4")) { ipv4().set_param(*mp_last); if (!ipv4().is_bound()) clean_up(); return; } if (!strcmp(last_name, "ipv6")) { ipv6().set_param(*mp_last); if (!ipv6().is_bound()) clean_up(); return; } mp_last->error("Field %s does not exist in type @RSPRO.IpAddress.", last_name); } void IpAddress::set_implicit_omit() { switch (union_selection) { case ALT_ipv4: field_ipv4->set_implicit_omit(); break; case ALT_ipv6: field_ipv6->set_implicit_omit(); break; default: break; } } void IpAddress::encode_text(Text_Buf& text_buf) const { text_buf.push_int(union_selection); switch (union_selection) { case ALT_ipv4: field_ipv4->encode_text(text_buf); break; case ALT_ipv6: field_ipv6->encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an unbound value of union type @RSPRO.IpAddress."); } } void IpAddress::decode_text(Text_Buf& text_buf) { switch ((union_selection_type)text_buf.pull_int().get_val()) { case ALT_ipv4: ipv4().decode_text(text_buf); break; case ALT_ipv6: ipv6().decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for type @RSPRO.IpAddress."); } } void IpAddress::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name); unsigned BER_coding=va_arg(pvar, unsigned); BER_encode_chk_coding(BER_coding); ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding); tlv->put_in_buffer(p_buf); ASN_BER_TLV_t::destruct(tlv); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); RAW_enc_tr_pos rp; rp.level=0; rp.pos=NULL; RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw); RAW_encode(p_td, root); root.put_to_buf(p_buf); break;} case TTCN_EncDec::CT_TEXT: { TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); TEXT_encode(p_td,p_buf); break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0); p_buf.put_c('\n'); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok(va_arg(pvar, int) != 0); JSON_encode(p_td, tok, FALSE); p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_encode(p_td, p_buf); break;} default: TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name); } va_end(pvar); } void IpAddress::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name); unsigned L_form=va_arg(pvar, unsigned); ASN_BER_TLV_t tlv; BER_decode_str2TLV(p_buf, tlv, L_form); BER_decode_TLV(p_td, tlv, L_form); if(tlv.isComplete) p_buf.increase_pos(tlv.get_len()); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); raw_order_t r_order; switch(p_td.raw->top_bit_order) { case TOP_BIT_LEFT: r_order=ORDER_LSB; break; case TOP_BIT_RIGHT: default: r_order=ORDER_MSB; } int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order); if(rawr<0) switch (-rawr) { case TTCN_EncDec::ET_INCOMPL_MSG: case TTCN_EncDec::ET_LEN_ERR: ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name); break; case 1: default: ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name); break; } break;} case TTCN_EncDec::CT_TEXT: { Limit_Token_List limit; TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); const unsigned char *b_data=p_buf.get_data(); int null_added=0; if(b_data[p_buf.get_len()-1]!='\0'){ null_added=1; p_buf.set_pos(p_buf.get_len()); p_buf.put_zero(8,ORDER_LSB); p_buf.rewind(); } if(TEXT_decode(p_td,p_buf,limit)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); if(null_added){ size_t actpos=p_buf.get_pos(); p_buf.set_pos(p_buf.get_len()-1); p_buf.cut_end(); p_buf.set_pos(actpos); } break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XmlReaderWrap reader(p_buf); for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) { if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break; } XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0); size_t bytes = reader.ByteConsumed(); p_buf.set_pos(bytes); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len()); if(JSON_decode(p_td, tok, FALSE, FALSE)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); p_buf.set_pos(tok.get_buf_pos()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_struct p_oer; OER_decode(p_td, p_buf, p_oer); break;} default: TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name); } va_end(pvar); } ASN_BER_TLV_t *IpAddress::BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const { BER_chk_descr(p_td); ASN_BER_TLV_t *new_tlv; TTCN_EncDec_ErrorContext ec_0("Alternative '"); TTCN_EncDec_ErrorContext ec_1; switch (union_selection) { case ALT_ipv4: ec_1.set_msg("ipv4': "); new_tlv = field_ipv4->BER_encode_TLV(IpAddress_ipv4_descr_, p_coding); break; case ALT_ipv6: ec_1.set_msg("ipv6': "); new_tlv = field_ipv6->BER_encode_TLV(IpAddress_ipv6_descr_, p_coding); break; case UNBOUND_VALUE: new_tlv = BER_encode_chk_bound(FALSE); break; default: TTCN_EncDec_ErrorContext::error_internal("Unknown selection."); new_tlv = NULL; } return ASN_BER_V2TLV(new_tlv, p_td, p_coding); } boolean IpAddress::BER_decode_set_selection(const ASN_BER_TLV_t& p_tlv) { clean_up(); field_ipv4 = new OCTETSTRING; union_selection = ALT_ipv4; if (field_ipv4->BER_decode_isMyMsg(IpAddress_ipv4_descr_, p_tlv)) return TRUE; delete field_ipv4; field_ipv6 = new OCTETSTRING; union_selection = ALT_ipv6; if (field_ipv6->BER_decode_isMyMsg(IpAddress_ipv6_descr_, p_tlv)) return TRUE; delete field_ipv6; union_selection = UNBOUND_VALUE; return FALSE; } boolean IpAddress::BER_decode_isMyMsg(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv) { if (p_td.ber->n_tags == 0) { IpAddress tmp_type; return tmp_type.BER_decode_set_selection(p_tlv); } else return Base_Type::BER_decode_isMyMsg(p_td, p_tlv); } boolean IpAddress::BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form) { BER_chk_descr(p_td); ASN_BER_TLV_t stripped_tlv; BER_decode_strip_tags(*p_td.ber, p_tlv, L_form, stripped_tlv); TTCN_EncDec_ErrorContext ec_0("While decoding '@RSPRO.IpAddress' type: "); ASN_BER_TLV_t tmp_tlv; if (!BER_decode_TLV_CHOICE(*p_td.ber, stripped_tlv, L_form, tmp_tlv) || !BER_decode_CHOICE_selection(BER_decode_set_selection(tmp_tlv), tmp_tlv)) return FALSE; TTCN_EncDec_ErrorContext ec_1("Alternative '"); TTCN_EncDec_ErrorContext ec_2; switch (union_selection) { case ALT_ipv4: ec_2.set_msg("ipv4': "); field_ipv4->BER_decode_TLV(IpAddress_ipv4_descr_, tmp_tlv, L_form); break; case ALT_ipv6: ec_2.set_msg("ipv6': "); field_ipv6->BER_decode_TLV(IpAddress_ipv6_descr_, tmp_tlv, L_form); break; default: return FALSE; } return TRUE; } int IpAddress::JSON_encode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& p_tok, boolean) const { boolean as_value = p_td.json->as_value; int enc_len = as_value ? 0 : p_tok.put_next_token(JSON_TOKEN_OBJECT_START, NULL); switch(union_selection) { case ALT_ipv4: if (!as_value) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "ipv4"); } enc_len += field_ipv4->JSON_encode(IpAddress_ipv4_descr_, p_tok, FALSE); break; case ALT_ipv6: if (!as_value) { enc_len += p_tok.put_next_token(JSON_TOKEN_NAME, "ipv6"); } enc_len += field_ipv6->JSON_encode(IpAddress_ipv6_descr_, p_tok, FALSE); break; default: TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value of type @RSPRO.IpAddress."); return -1; } if (!as_value) { enc_len += p_tok.put_next_token(JSON_TOKEN_OBJECT_END, NULL); } return enc_len; } int IpAddress::JSON_decode(const TTCN_Typedescriptor_t& p_td, JSON_Tokenizer& p_tok, boolean p_silent, boolean, int p_chosen_field) { if (0 <= p_chosen_field && 2 > p_chosen_field) { switch (p_chosen_field) { case 0: return ipv4().JSON_decode(IpAddress_ipv4_descr_, p_tok, TRUE, FALSE); case 1: return ipv6().JSON_decode(IpAddress_ipv6_descr_, p_tok, TRUE, FALSE); } } if (p_td.json->default_value.type == JD_STANDARD && 0 == p_tok.get_buffer_length()) { *this = *static_cast(p_td.json->default_value.val); return 0; } json_token_t j_token = JSON_TOKEN_NONE; if (p_td.json->as_value) { size_t buf_pos = p_tok.get_buf_pos(); p_tok.get_next_token(&j_token, NULL, NULL); int ret_val = 0; switch(j_token) { case JSON_TOKEN_NUMBER: { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_AS_VALUE_ERROR, "number '@RSPRO.IpAddress'"); clean_up(); return JSON_ERROR_FATAL; } case JSON_TOKEN_STRING: { p_tok.set_buf_pos(buf_pos); ret_val = ipv4().JSON_decode(IpAddress_ipv4_descr_, p_tok, TRUE, FALSE); if (0 <= ret_val) { return ret_val; } p_tok.set_buf_pos(buf_pos); ret_val = ipv6().JSON_decode(IpAddress_ipv6_descr_, p_tok, TRUE, FALSE); if (0 <= ret_val) { return ret_val; } JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_AS_VALUE_ERROR, "string '@RSPRO.IpAddress'"); clean_up(); return JSON_ERROR_FATAL; } case JSON_TOKEN_LITERAL_TRUE: case JSON_TOKEN_LITERAL_FALSE: { char* literal_str = mprintf("literal (%s)", (JSON_TOKEN_LITERAL_TRUE == j_token) ? "true" : "false"); try { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_AS_VALUE_ERROR, literal_str); } catch (const TC_Error&) { Free(literal_str); throw; } Free(literal_str); clean_up(); return JSON_ERROR_FATAL; } case JSON_TOKEN_ARRAY_START: { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_AS_VALUE_ERROR, "array '@RSPRO.IpAddress'"); clean_up(); return JSON_ERROR_FATAL; } case JSON_TOKEN_OBJECT_START: { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_AS_VALUE_ERROR, "object '@RSPRO.IpAddress'"); clean_up(); return JSON_ERROR_FATAL; } case JSON_TOKEN_LITERAL_NULL: { clean_up(); return JSON_ERROR_INVALID_TOKEN; } case JSON_TOKEN_ERROR: JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_BAD_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; default: return JSON_ERROR_INVALID_TOKEN; } return ret_val; } else { size_t dec_len = p_tok.get_next_token(&j_token, NULL, NULL); if (JSON_TOKEN_ERROR == j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_BAD_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; } else if (JSON_TOKEN_OBJECT_START != j_token) { return JSON_ERROR_INVALID_TOKEN; } char* fld_name = 0; size_t name_len = 0; dec_len += p_tok.get_next_token(&j_token, &fld_name, &name_len); if (JSON_TOKEN_NAME != j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_NAME_TOKEN_ERROR); return JSON_ERROR_FATAL; } else { if (4 == name_len && 0 == strncmp(fld_name, "ipv4", name_len)) { int ret_val = ipv4().JSON_decode(IpAddress_ipv4_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 4, "ipv4"); } return JSON_ERROR_FATAL; } else { dec_len += (size_t)ret_val; } } else if (4 == name_len && 0 == strncmp(fld_name, "ipv6", name_len)) { int ret_val = ipv6().JSON_decode(IpAddress_ipv6_descr_, p_tok, p_silent, FALSE); if (0 > ret_val) { if (JSON_ERROR_INVALID_TOKEN == ret_val) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_FIELD_TOKEN_ERROR, 4, "ipv6"); } return JSON_ERROR_FATAL; } else { dec_len += (size_t)ret_val; } } else { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_INVALID_NAME_ERROR, (int)name_len, fld_name); return JSON_ERROR_FATAL; } } dec_len += p_tok.get_next_token(&j_token, NULL, NULL); if (JSON_TOKEN_OBJECT_END != j_token) { JSON_ERROR(TTCN_EncDec::ET_INVAL_MSG, JSON_DEC_STATIC_OBJECT_END_TOKEN_ERROR, ""); return JSON_ERROR_FATAL; } return (int)dec_len; } } int IpAddress::OER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf) const { switch(union_selection) { case ALT_ipv4: {TTCN_Buffer buf; encode_oer_tag(*IpAddress_ipv4_descr_.ber, p_buf); field_ipv4->OER_encode(IpAddress_ipv4_descr_, buf); p_buf.put_buf(buf); break; } case ALT_ipv6: {TTCN_Buffer buf; encode_oer_tag(*IpAddress_ipv6_descr_.ber, p_buf); field_ipv6->OER_encode(IpAddress_ipv6_descr_, buf); p_buf.put_buf(buf); break; } default: TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value of type @RSPRO.IpAddress."); return -1; } return 0; } int IpAddress::OER_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer& p_buf, OER_struct& p_oer) { const ASN_Tag_t& descr = decode_oer_tag(p_buf); if (IpAddress_ipv4_descr_.ber->tags[IpAddress_ipv4_descr_.ber->n_tags-1].tagclass == descr.tagclass && IpAddress_ipv4_descr_.ber->tags[IpAddress_ipv4_descr_.ber->n_tags-1].tagnumber == descr.tagnumber) { ipv4().OER_decode(IpAddress_ipv4_descr_, p_buf, p_oer); } else if (IpAddress_ipv6_descr_.ber->tags[IpAddress_ipv6_descr_.ber->n_tags-1].tagclass == descr.tagclass && IpAddress_ipv6_descr_.ber->tags[IpAddress_ipv6_descr_.ber->n_tags-1].tagnumber == descr.tagnumber) { ipv6().OER_decode(IpAddress_ipv6_descr_, p_buf, p_oer); } else { TTCN_error("Cannot find matching tag for type IpAddress"); } return 0; } void IpAddress_template::copy_value(const IpAddress& other_value) { single_value.union_selection = other_value.get_selection(); switch (single_value.union_selection) { case IpAddress::ALT_ipv4: single_value.field_ipv4 = new OCTETSTRING_template(other_value.ipv4()); break; case IpAddress::ALT_ipv6: single_value.field_ipv6 = new OCTETSTRING_template(other_value.ipv6()); break; default: TTCN_error("Initializing a template with an unbound value of type @RSPRO.IpAddress."); } set_selection(SPECIFIC_VALUE); } void IpAddress_template::copy_template(const IpAddress_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value.union_selection = other_value.single_value.union_selection; switch (single_value.union_selection) { case IpAddress::ALT_ipv4: single_value.field_ipv4 = new OCTETSTRING_template(*other_value.single_value.field_ipv4); break; case IpAddress::ALT_ipv6: single_value.field_ipv6 = new OCTETSTRING_template(*other_value.single_value.field_ipv6); break; default: TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @RSPRO.IpAddress."); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new IpAddress_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new IpAddress_template(*other_value.implication_.precondition); implication_.implied_template = new IpAddress_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized template of union type @RSPRO.IpAddress."); } set_selection(other_value); } IpAddress_template::IpAddress_template() { } IpAddress_template::IpAddress_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } IpAddress_template::IpAddress_template(const IpAddress& other_value) { copy_value(other_value); } IpAddress_template::IpAddress_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const IpAddress&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of union type @RSPRO.IpAddress from an unbound optional field."); } } IpAddress_template::IpAddress_template(IpAddress_template* p_precondition, IpAddress_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } IpAddress_template::IpAddress_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } IpAddress_template::IpAddress_template(const IpAddress_template& other_value) : Base_Template(){ copy_template(other_value); } IpAddress_template::~IpAddress_template() { clean_up(); } void IpAddress_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case IpAddress::ALT_ipv4: delete single_value.field_ipv4; break; case IpAddress::ALT_ipv6: delete single_value.field_ipv6; default: break; } break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } IpAddress_template& IpAddress_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } IpAddress_template& IpAddress_template::operator=(const IpAddress& other_value) { clean_up(); copy_value(other_value); return *this; } IpAddress_template& IpAddress_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const IpAddress&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of union type @RSPRO.IpAddress."); } return *this; } IpAddress_template& IpAddress_template::operator=(const IpAddress_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean IpAddress_template::match(const IpAddress& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: { IpAddress::union_selection_type value_selection = other_value.get_selection(); if (value_selection == IpAddress::UNBOUND_VALUE) return FALSE; if (value_selection != single_value.union_selection) return FALSE; switch (value_selection) { case IpAddress::ALT_ipv4: return single_value.field_ipv4->match(other_value.ipv4(), legacy); case IpAddress::ALT_ipv6: return single_value.field_ipv6->match(other_value.ipv6(), legacy); default: TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @RSPRO.IpAddress."); } } case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error ("Matching an uninitialized template of union type @RSPRO.IpAddress."); } return FALSE; } boolean IpAddress_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; switch (single_value.union_selection) { case IpAddress::ALT_ipv4: return single_value.field_ipv4->is_value(); case IpAddress::ALT_ipv6: return single_value.field_ipv6->is_value(); default: TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @RSPRO.IpAddress."); } } IpAddress IpAddress_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of union type @RSPRO.IpAddress."); IpAddress ret_val; switch (single_value.union_selection) { case IpAddress::ALT_ipv4: ret_val.ipv4() = single_value.field_ipv4->valueof(); break; case IpAddress::ALT_ipv6: ret_val.ipv6() = single_value.field_ipv6->valueof(); break; default: TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @RSPRO.IpAddress."); } return ret_val; } IpAddress_template& IpAddress_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @RSPRO.IpAddress."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @RSPRO.IpAddress."); return value_list.list_value[list_index]; } void IpAddress_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @RSPRO.IpAddress."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new IpAddress_template[list_length]; } OCTETSTRING_template& IpAddress_template::ipv4() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IpAddress::ALT_ipv4) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ipv4 = new OCTETSTRING_template(ANY_VALUE); else single_value.field_ipv4 = new OCTETSTRING_template; single_value.union_selection = IpAddress::ALT_ipv4; set_selection(SPECIFIC_VALUE); } return *single_value.field_ipv4; } const OCTETSTRING_template& IpAddress_template::ipv4() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ipv4 in a non-specific template of union type @RSPRO.IpAddress."); if (single_value.union_selection != IpAddress::ALT_ipv4) TTCN_error("Accessing non-selected field ipv4 in a template of union type @RSPRO.IpAddress."); return *single_value.field_ipv4; } OCTETSTRING_template& IpAddress_template::ipv6() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IpAddress::ALT_ipv6) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ipv6 = new OCTETSTRING_template(ANY_VALUE); else single_value.field_ipv6 = new OCTETSTRING_template; single_value.union_selection = IpAddress::ALT_ipv6; set_selection(SPECIFIC_VALUE); } return *single_value.field_ipv6; } const OCTETSTRING_template& IpAddress_template::ipv6() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ipv6 in a non-specific template of union type @RSPRO.IpAddress."); if (single_value.union_selection != IpAddress::ALT_ipv6) TTCN_error("Accessing non-selected field ipv6 in a template of union type @RSPRO.IpAddress."); return *single_value.field_ipv6; } boolean IpAddress_template::ischosen(IpAddress::union_selection_type checked_selection) const { if (checked_selection == IpAddress::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @RSPRO.IpAddress."); switch (template_selection) { case SPECIFIC_VALUE: if (single_value.union_selection == IpAddress::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @RSPRO.IpAddress."); return single_value.union_selection == checked_selection; case VALUE_LIST: { if (value_list.n_values < 1) TTCN_error("Internal error: Performing ischosen() operation on a template of union type @RSPRO.IpAddress containing an empty list."); boolean ret_val = value_list.list_value[0].ischosen(checked_selection); for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) { ret_val = value_list.list_value[list_count].ischosen(checked_selection); } return ret_val; } default: return FALSE; } return FALSE; } void IpAddress_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case IpAddress::ALT_ipv4: TTCN_Logger::log_event_str("{ ipv4 := "); single_value.field_ipv4->log(); TTCN_Logger::log_event_str(" }"); break; case IpAddress::ALT_ipv6: TTCN_Logger::log_event_str("{ ipv6 := "); single_value.field_ipv6->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_str(""); } break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void IpAddress_template::log_match(const IpAddress& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); return; } if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); switch (single_value.union_selection) { case IpAddress::ALT_ipv4: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".ipv4"); single_value.field_ipv4->log_match(match_value.ipv4(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ ipv4 := "); single_value.field_ipv4->log_match(match_value.ipv4(), legacy); TTCN_Logger::log_event_str(" }"); } break; case IpAddress::ALT_ipv6: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".ipv6"); single_value.field_ipv6->log_match(match_value.ipv6(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ ipv6 := "); single_value.field_ipv6->log_match(match_value.ipv6(), legacy); TTCN_Logger::log_event_str(" }"); } break; default: TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(""); } } else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void IpAddress_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value.union_selection); switch (single_value.union_selection) { case IpAddress::ALT_ipv4: single_value.field_ipv4->encode_text(text_buf); break; case IpAddress::ALT_ipv6: single_value.field_ipv6->encode_text(text_buf); break; default: TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @RSPRO.IpAddress."); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized template of type @RSPRO.IpAddress."); } } void IpAddress_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: { single_value.union_selection = IpAddress::UNBOUND_VALUE; IpAddress::union_selection_type new_selection = (IpAddress::union_selection_type)text_buf.pull_int().get_val(); switch (new_selection) { case IpAddress::ALT_ipv4: single_value.field_ipv4 = new OCTETSTRING_template; single_value.field_ipv4->decode_text(text_buf); break; case IpAddress::ALT_ipv6: single_value.field_ipv6 = new OCTETSTRING_template; single_value.field_ipv6->decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @RSPRO.IpAddress."); } single_value.union_selection = new_selection; } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new IpAddress_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized selector was received in a template of type @RSPRO.IpAddress."); } } boolean IpAddress_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean IpAddress_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int v_idx=0; v_idx(param.get_id()) != NULL && param.get_id()->next_name()) { char* param_field = param.get_id()->get_current_name(); if (param_field[0] >= '0' && param_field[0] <= '9') { param.error("Unexpected array index in module parameter, expected a valid field" " name for union template type `@RSPRO.IpAddress'"); } if (strcmp("ipv4", param_field) == 0) { ipv4().set_param(param); return; } else if (strcmp("ipv6", param_field) == 0) { ipv6().set_param(param); return; } else param.error("Field `%s' not found in union template type `@RSPRO.IpAddress'", param_field); } param.basic_check(Module_Param::BC_TEMPLATE, "union template"); Module_Param_Ptr m_p = ¶m; switch (m_p->get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { IpAddress_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Value_List: if (m_p->get_size()==0) break; param.type_error("union template", "@RSPRO.IpAddress"); break; case Module_Param::MP_Assignment_List: { Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "ipv4")) { ipv4().set_param(*mp_last); break; } if (!strcmp(last_name, "ipv6")) { ipv6().set_param(*mp_last); break; } mp_last->error("Field %s does not exist in type @RSPRO.IpAddress.", last_name); } break; case Module_Param::MP_Implication_Template: { IpAddress_template* precondition = new IpAddress_template; precondition->set_param(*m_p->get_elem(0)); IpAddress_template* implied_template = new IpAddress_template; implied_template->set_param(*m_p->get_elem(1)); *this = IpAddress_template(precondition, implied_template); } break; default: param.type_error("union template", "@RSPRO.IpAddress"); } is_ifpresent = param.get_ifpresent(); } void IpAddress_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; switch (single_value.union_selection) { case IpAddress::ALT_ipv4: single_value.field_ipv4->check_restriction(t_res, t_name ? t_name : "@RSPRO.IpAddress"); return; case IpAddress::ALT_ipv6: single_value.field_ipv6->check_restriction(t_res, t_name ? t_name : "@RSPRO.IpAddress"); return; default: TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @RSPRO.IpAddress."); } case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@RSPRO.IpAddress"); } } /* end of namespace */