Added demo directory
Signed-off-by: Lenard Nagy <lenard.nagy@ericsson.com>
diff --git a/demo/Bcm.cc b/demo/Bcm.cc
new file mode 100644
index 0000000..92d5e2d
--- /dev/null
+++ b/demo/Bcm.cc
@@ -0,0 +1,6364 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "Bcm.hh"
+
+namespace Bcm {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char module_checksum[] = { 0x42, 0xd3, 0x31, 0x8a, 0x5d, 0xa7, 0x3a, 0x27, 0x33, 0xab, 0xa8, 0x67, 0x69, 0x35, 0x6f, 0x9e };
+
+/* Global variable definitions */
+
+static INTEGER const_CAN__FRAME__MAX__NUMBER;
+const INTEGER& CAN__FRAME__MAX__NUMBER = const_CAN__FRAME__MAX__NUMBER;
+// No XER for BcmFlagsBitIndex__enum
+const TTCN_Typedescriptor_t BcmFlagsBitIndex__enum_descr_ = { "@Bcm.BcmFlagsBitIndex_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for BcmFlags__enum
+const TTCN_Typedescriptor_t BcmFlags__enum_descr_ = { "@Bcm.BcmFlags_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for BcmOpcode__enum
+const TTCN_Typedescriptor_t BcmOpcode__enum_descr_ = { "@Bcm.BcmOpcode_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Bcm__long_xer_ = { {"Bcm_long>\n", "Bcm_long>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Bcm__long_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Bcm__long_descr_ = { "@Bcm.Bcm_long", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Bcm__long_xer_, &INTEGER_json_, &Bcm__long_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Bcm__timeval_tv__sec_xer_ = { {"tv_sec>\n", "tv_sec>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Bcm__timeval_tv__sec_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Bcm__timeval_tv__sec_descr_ = { "@Bcm.Bcm_timeval.tv_sec", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Bcm__timeval_tv__sec_xer_, &INTEGER_json_, &Bcm__timeval_tv__sec_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Bcm__timeval_tv__usec_xer_ = { {"tv_usec>\n", "tv_usec>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Bcm__timeval_tv__usec_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Bcm__timeval_tv__usec_descr_ = { "@Bcm.Bcm_timeval.tv_usec", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Bcm__timeval_tv__usec_xer_, &INTEGER_json_, &Bcm__timeval_tv__usec_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for Bcm__timeval
+const TTCN_Typedescriptor_t Bcm__timeval_descr_ = { "@Bcm.Bcm_timeval", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t SocketCAN__bcm__frame_opcode_xer_ = { {"opcode>\n", "opcode>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int SocketCAN__bcm__frame_opcode_oer_ext_arr_[0] = {};
+const int SocketCAN__bcm__frame_opcode_oer_p_[0] = {};
+const TTCN_OERdescriptor_t SocketCAN__bcm__frame_opcode_oer_ = { -1, TRUE, 4, FALSE, 0, 0, SocketCAN__bcm__frame_opcode_oer_ext_arr_, 0, SocketCAN__bcm__frame_opcode_oer_p_};
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_opcode_descr_ = { "@Bcm.SocketCAN_bcm_frame.opcode", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &SocketCAN__bcm__frame_opcode_xer_, &OCTETSTRING_json_, &SocketCAN__bcm__frame_opcode_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t SocketCAN__bcm__frame_flags_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t SocketCAN__bcm__frame_flags_xer_ = { {"flags>\n", "flags>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t SocketCAN__bcm__frame_flags_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_flags_descr_ = { "@Bcm.SocketCAN_bcm_frame.flags", &BITSTRING_ber_, &SocketCAN__bcm__frame_flags_raw_, NULL, &SocketCAN__bcm__frame_flags_xer_, &BITSTRING_json_, &SocketCAN__bcm__frame_flags_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t SocketCAN__bcm__frame_count_xer_ = { {"count>\n", "count>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t SocketCAN__bcm__frame_count_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_count_descr_ = { "@Bcm.SocketCAN_bcm_frame.count", &INTEGER_ber_, &General__Types::LIN4__BO__LAST_raw_, &INTEGER_text_, &SocketCAN__bcm__frame_count_xer_, &INTEGER_json_, &SocketCAN__bcm__frame_count_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t SocketCAN__bcm__frame_can__id_xer_ = { {"can_id>\n", "can_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int SocketCAN__bcm__frame_can__id_oer_ext_arr_[0] = {};
+const int SocketCAN__bcm__frame_can__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t SocketCAN__bcm__frame_can__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, SocketCAN__bcm__frame_can__id_oer_ext_arr_, 0, SocketCAN__bcm__frame_can__id_oer_p_};
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_can__id_descr_ = { "@Bcm.SocketCAN_bcm_frame.can_id", &OCTETSTRING_ber_, &Can::CAN__id_raw_, &OCTETSTRING_text_, &SocketCAN__bcm__frame_can__id_xer_, &OCTETSTRING_json_, &SocketCAN__bcm__frame_can__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for SocketCAN__bcm__frame_frames
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_descr_ = { "@Bcm.SocketCAN_bcm_frame.frames", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for SocketCAN__bcm__frame_frames_can__frame
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_can__frame_descr_ = { "@Bcm.SocketCAN_bcm_frame.frames.can_frame", NULL, NULL, NULL, NULL, NULL, NULL, &Can::CAN__frame_descr_, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for SocketCAN__bcm__frame_frames_canfd__frame
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_canfd__frame_descr_ = { "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame", NULL, NULL, NULL, NULL, NULL, NULL, &Can::CANFD__frame_descr_, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for SocketCAN__bcm__frame
+const TTCN_Typedescriptor_t SocketCAN__bcm__frame_descr_ = { "@Bcm.SocketCAN_bcm_frame", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("Bcm", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+BcmFlagsBitIndex__enum::BcmFlagsBitIndex__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+BcmFlagsBitIndex__enum::BcmFlagsBitIndex__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Bcm.BcmFlagsBitIndex_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+BcmFlagsBitIndex__enum::BcmFlagsBitIndex__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+BcmFlagsBitIndex__enum::BcmFlagsBitIndex__enum(const BcmFlagsBitIndex__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+enum_value = other_value.enum_value;
+}
+
+BcmFlagsBitIndex__enum& BcmFlagsBitIndex__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Bcm.BcmFlagsBitIndex_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+BcmFlagsBitIndex__enum& BcmFlagsBitIndex__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+BcmFlagsBitIndex__enum& BcmFlagsBitIndex__enum::operator=(const BcmFlagsBitIndex__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean BcmFlagsBitIndex__enum::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 @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value == other_value;
+}
+
+boolean BcmFlagsBitIndex__enum::operator==(const BcmFlagsBitIndex__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean BcmFlagsBitIndex__enum::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 @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value < other_value;
+}
+
+boolean BcmFlagsBitIndex__enum::operator<(const BcmFlagsBitIndex__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean BcmFlagsBitIndex__enum::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 @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value > other_value;
+}
+
+boolean BcmFlagsBitIndex__enum::operator>(const BcmFlagsBitIndex__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *BcmFlagsBitIndex__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case e__CAN__BCM__SETTIMER__BITINDEX: return "e_CAN_BCM_SETTIMER_BITINDEX";
+case e__CAN__BCM__STARTTIMER__BITINDEX: return "e_CAN_BCM_STARTTIMER_BITINDEX";
+case e__CAN__BCM__TX__COUNTEVT__BITINDEX: return "e_CAN_BCM_TX_COUNTEVT_BITINDEX";
+case e__CAN__BCM__TX__ANNOUNCE__BITINDEX: return "e_CAN_BCM_TX_ANNOUNCE_BITINDEX";
+case e__CAN__BCM__TX__CP__CAN__ID__BITINDEX: return "e_CAN_BCM_TX_CP_CAN_ID_BITINDEX";
+case e__CAN__BCM__RX__FILTER__ID__BITINDEX: return "e_CAN_BCM_RX_FILTER_ID_BITINDEX";
+case e__CAN__BCM__RX__CHECK__DLC__BITINDEX: return "e_CAN_BCM_RX_CHECK_DLC_BITINDEX";
+case e__CAN__BCM__RX__NO__AUTOTIMER__BITINDEX: return "e_CAN_BCM_RX_NO_AUTOTIMER_BITINDEX";
+case e__CAN__BCM__RX__ANNOUNCE__RESUME__BITINDEX: return "e_CAN_BCM_RX_ANNOUNCE_RESUME_BITINDEX";
+case e__CAN__BCM__TX__RESET__MULTI__IDX__BITINDEX: return "e_CAN_BCM_TX_RESET_MULTI_IDX_BITINDEX";
+case e__CAN__BCM__RX__RTR__FRAME__BITINDEX: return "e_CAN_BCM_RX_RTR_FRAME_BITINDEX";
+default: return "<unknown>";
+}
+}
+
+BcmFlagsBitIndex__enum::enum_type BcmFlagsBitIndex__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "e_CAN_BCM_SETTIMER_BITINDEX")) return e__CAN__BCM__SETTIMER__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_STARTTIMER_BITINDEX")) return e__CAN__BCM__STARTTIMER__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_COUNTEVT_BITINDEX")) return e__CAN__BCM__TX__COUNTEVT__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_ANNOUNCE_BITINDEX")) return e__CAN__BCM__TX__ANNOUNCE__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_CP_CAN_ID_BITINDEX")) return e__CAN__BCM__TX__CP__CAN__ID__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_FILTER_ID_BITINDEX")) return e__CAN__BCM__RX__FILTER__ID__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_CHECK_DLC_BITINDEX")) return e__CAN__BCM__RX__CHECK__DLC__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_NO_AUTOTIMER_BITINDEX")) return e__CAN__BCM__RX__NO__AUTOTIMER__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_ANNOUNCE_RESUME_BITINDEX")) return e__CAN__BCM__RX__ANNOUNCE__RESUME__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_RESET_MULTI_IDX_BITINDEX")) return e__CAN__BCM__TX__RESET__MULTI__IDX__BITINDEX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_RTR_FRAME_BITINDEX")) return e__CAN__BCM__RX__RTR__FRAME__BITINDEX;
+else return UNKNOWN_VALUE;
+}
+
+boolean BcmFlagsBitIndex__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 0:
+case 1:
+case 2:
+case 3:
+case 4:
+case 5:
+case 6:
+case 7:
+case 8:
+case 9:
+case 10:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int BcmFlagsBitIndex__enum::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 @Bcm.BcmFlagsBitIndex_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int BcmFlagsBitIndex__enum::enum2int(const BcmFlagsBitIndex__enum& 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 @Bcm.BcmFlagsBitIndex_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void BcmFlagsBitIndex__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Bcm.BcmFlagsBitIndex_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+BcmFlagsBitIndex__enum::operator BcmFlagsBitIndex__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+return enum_value;
+}
+
+void BcmFlagsBitIndex__enum::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 BcmFlagsBitIndex__enum::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", "@Bcm.BcmFlagsBitIndex_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmFlagsBitIndex_enum.");
+ }
+}
+
+void BcmFlagsBitIndex__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+text_buf.push_int(enum_value);
+}
+
+void BcmFlagsBitIndex__enum::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 @Bcm.BcmFlagsBitIndex_enum.", enum_value);
+}
+
+void BcmFlagsBitIndex__enum_template::copy_template(const BcmFlagsBitIndex__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new BcmFlagsBitIndex__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+}
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template()
+{
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!BcmFlagsBitIndex__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Bcm.BcmFlagsBitIndex_enum with unknown numeric value %d.", other_value);
+single_value = (BcmFlagsBitIndex__enum::enum_type)other_value;
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(BcmFlagsBitIndex__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(const BcmFlagsBitIndex__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == BcmFlagsBitIndex__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+single_value = other_value.enum_value;
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(const OPTIONAL<BcmFlagsBitIndex__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlagsBitIndex__enum::enum_type)(const BcmFlagsBitIndex__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Bcm.BcmFlagsBitIndex_enum from an unbound optional field.");
+}
+}
+
+BcmFlagsBitIndex__enum_template::BcmFlagsBitIndex__enum_template(const BcmFlagsBitIndex__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+BcmFlagsBitIndex__enum_template::~BcmFlagsBitIndex__enum_template()
+{
+clean_up();
+}
+
+boolean BcmFlagsBitIndex__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean BcmFlagsBitIndex__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != BcmFlagsBitIndex__enum::UNBOUND_VALUE;
+}
+
+void BcmFlagsBitIndex__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(int other_value)
+{
+if (!BcmFlagsBitIndex__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Bcm.BcmFlagsBitIndex_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlagsBitIndex__enum::enum_type)other_value;
+return *this;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(BcmFlagsBitIndex__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(const BcmFlagsBitIndex__enum& other_value)
+{
+if (other_value.enum_value == BcmFlagsBitIndex__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmFlagsBitIndex_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(const OPTIONAL<BcmFlagsBitIndex__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlagsBitIndex__enum::enum_type)(const BcmFlagsBitIndex__enum&)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 @Bcm.BcmFlagsBitIndex_enum.");
+}
+return *this;
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::operator=(const BcmFlagsBitIndex__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean BcmFlagsBitIndex__enum_template::match(BcmFlagsBitIndex__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+}
+return FALSE;
+}
+
+boolean BcmFlagsBitIndex__enum_template::match(const BcmFlagsBitIndex__enum& other_value, boolean) const
+{
+if (other_value.enum_value == BcmFlagsBitIndex__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Bcm.BcmFlagsBitIndex_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+BcmFlagsBitIndex__enum::enum_type BcmFlagsBitIndex__enum_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 @Bcm.BcmFlagsBitIndex_enum.");
+return single_value;
+}
+
+void BcmFlagsBitIndex__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new BcmFlagsBitIndex__enum_template[list_length];
+}
+
+BcmFlagsBitIndex__enum_template& BcmFlagsBitIndex__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Bcm.BcmFlagsBitIndex_enum.");
+return value_list.list_value[list_index];
+}
+
+void BcmFlagsBitIndex__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(BcmFlagsBitIndex__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void BcmFlagsBitIndex__enum_template::log_match(const BcmFlagsBitIndex__enum& 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 BcmFlagsBitIndex__enum_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 @Bcm.BcmFlagsBitIndex_enum.");
+}
+}
+
+void BcmFlagsBitIndex__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (BcmFlagsBitIndex__enum::enum_type)text_buf.pull_int().get_val();
+if (!BcmFlagsBitIndex__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Bcm.BcmFlagsBitIndex_enum.", 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 BcmFlagsBitIndex__enum_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 @Bcm.BcmFlagsBitIndex_enum.");
+}
+}
+
+boolean BcmFlagsBitIndex__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean BcmFlagsBitIndex__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void BcmFlagsBitIndex__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ BcmFlagsBitIndex__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ BcmFlagsBitIndex__enum::enum_type enum_val = BcmFlagsBitIndex__enum::str_to_enum(m_p->get_enumerated());
+ if (!BcmFlagsBitIndex__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmFlagsBitIndex_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Bcm.BcmFlagsBitIndex_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void BcmFlagsBitIndex__enum_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 : "@Bcm.BcmFlagsBitIndex_enum");
+}
+
+BcmFlags__enum::BcmFlags__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+BcmFlags__enum::BcmFlags__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Bcm.BcmFlags_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+BcmFlags__enum::BcmFlags__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+BcmFlags__enum::BcmFlags__enum(const BcmFlags__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+enum_value = other_value.enum_value;
+}
+
+BcmFlags__enum& BcmFlags__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Bcm.BcmFlags_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+BcmFlags__enum& BcmFlags__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+BcmFlags__enum& BcmFlags__enum::operator=(const BcmFlags__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean BcmFlags__enum::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 @Bcm.BcmFlags_enum.");
+return enum_value == other_value;
+}
+
+boolean BcmFlags__enum::operator==(const BcmFlags__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean BcmFlags__enum::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 @Bcm.BcmFlags_enum.");
+return enum_value < other_value;
+}
+
+boolean BcmFlags__enum::operator<(const BcmFlags__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean BcmFlags__enum::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 @Bcm.BcmFlags_enum.");
+return enum_value > other_value;
+}
+
+boolean BcmFlags__enum::operator>(const BcmFlags__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *BcmFlags__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case e__CAN__BCM__SETTIMER: return "e_CAN_BCM_SETTIMER";
+case e__CAN__BCM__STARTTIMER: return "e_CAN_BCM_STARTTIMER";
+case e__CAN__BCM__TX__COUNTEVT: return "e_CAN_BCM_TX_COUNTEVT";
+case e__CAN__BCM__TX__ANNOUNCE: return "e_CAN_BCM_TX_ANNOUNCE";
+case e__CAN__BCM__TX__CP__CAN__ID: return "e_CAN_BCM_TX_CP_CAN_ID";
+case e__CAN__BCM__RX__FILTER__ID: return "e_CAN_BCM_RX_FILTER_ID";
+case e__CAN__BCM__RX__CHECK__DLC: return "e_CAN_BCM_RX_CHECK_DLC";
+case e__CAN__BCM__RX__NO__AUTOTIMER: return "e_CAN_BCM_RX_NO_AUTOTIMER";
+case e__CAN__BCM__RX__ANNOUNCE__RESUME: return "e_CAN_BCM_RX_ANNOUNCE_RESUME";
+case e__CAN__BCM__TX__RESET__MULTI__IDX: return "e_CAN_BCM_TX_RESET_MULTI_IDX";
+case e__CAN__BCM__RX__RTR__FRAME: return "e_CAN_BCM_RX_RTR_FRAME";
+default: return "<unknown>";
+}
+}
+
+BcmFlags__enum::enum_type BcmFlags__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "e_CAN_BCM_SETTIMER")) return e__CAN__BCM__SETTIMER;
+else if (!strcmp(str_par, "e_CAN_BCM_STARTTIMER")) return e__CAN__BCM__STARTTIMER;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_COUNTEVT")) return e__CAN__BCM__TX__COUNTEVT;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_ANNOUNCE")) return e__CAN__BCM__TX__ANNOUNCE;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_CP_CAN_ID")) return e__CAN__BCM__TX__CP__CAN__ID;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_FILTER_ID")) return e__CAN__BCM__RX__FILTER__ID;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_CHECK_DLC")) return e__CAN__BCM__RX__CHECK__DLC;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_NO_AUTOTIMER")) return e__CAN__BCM__RX__NO__AUTOTIMER;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_ANNOUNCE_RESUME")) return e__CAN__BCM__RX__ANNOUNCE__RESUME;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_RESET_MULTI_IDX")) return e__CAN__BCM__TX__RESET__MULTI__IDX;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_RTR_FRAME")) return e__CAN__BCM__RX__RTR__FRAME;
+else return UNKNOWN_VALUE;
+}
+
+boolean BcmFlags__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 1:
+case 2:
+case 4:
+case 8:
+case 16:
+case 32:
+case 64:
+case 128:
+case 256:
+case 512:
+case 1024:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int BcmFlags__enum::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 @Bcm.BcmFlags_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int BcmFlags__enum::enum2int(const BcmFlags__enum& 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 @Bcm.BcmFlags_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void BcmFlags__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Bcm.BcmFlags_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+BcmFlags__enum::operator BcmFlags__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Bcm.BcmFlags_enum.");
+return enum_value;
+}
+
+void BcmFlags__enum::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 BcmFlags__enum::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", "@Bcm.BcmFlags_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmFlags_enum.");
+ }
+}
+
+void BcmFlags__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+text_buf.push_int(enum_value);
+}
+
+void BcmFlags__enum::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 @Bcm.BcmFlags_enum.", enum_value);
+}
+
+void BcmFlags__enum_template::copy_template(const BcmFlags__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new BcmFlags__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Bcm.BcmFlags_enum.");
+}
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template()
+{
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!BcmFlags__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Bcm.BcmFlags_enum with unknown numeric value %d.", other_value);
+single_value = (BcmFlags__enum::enum_type)other_value;
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(BcmFlags__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(const BcmFlags__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == BcmFlags__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Bcm.BcmFlags_enum.");
+single_value = other_value.enum_value;
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(const OPTIONAL<BcmFlags__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlags__enum::enum_type)(const BcmFlags__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Bcm.BcmFlags_enum from an unbound optional field.");
+}
+}
+
+BcmFlags__enum_template::BcmFlags__enum_template(const BcmFlags__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+BcmFlags__enum_template::~BcmFlags__enum_template()
+{
+clean_up();
+}
+
+boolean BcmFlags__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean BcmFlags__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != BcmFlags__enum::UNBOUND_VALUE;
+}
+
+void BcmFlags__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(int other_value)
+{
+if (!BcmFlags__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Bcm.BcmFlags_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlags__enum::enum_type)other_value;
+return *this;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(BcmFlags__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(const BcmFlags__enum& other_value)
+{
+if (other_value.enum_value == BcmFlags__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmFlags_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(const OPTIONAL<BcmFlags__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmFlags__enum::enum_type)(const BcmFlags__enum&)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 @Bcm.BcmFlags_enum.");
+}
+return *this;
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::operator=(const BcmFlags__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean BcmFlags__enum_template::match(BcmFlags__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Bcm.BcmFlags_enum.");
+}
+return FALSE;
+}
+
+boolean BcmFlags__enum_template::match(const BcmFlags__enum& other_value, boolean) const
+{
+if (other_value.enum_value == BcmFlags__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Bcm.BcmFlags_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+BcmFlags__enum::enum_type BcmFlags__enum_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 @Bcm.BcmFlags_enum.");
+return single_value;
+}
+
+void BcmFlags__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Bcm.BcmFlags_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new BcmFlags__enum_template[list_length];
+}
+
+BcmFlags__enum_template& BcmFlags__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Bcm.BcmFlags_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Bcm.BcmFlags_enum.");
+return value_list.list_value[list_index];
+}
+
+void BcmFlags__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(BcmFlags__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void BcmFlags__enum_template::log_match(const BcmFlags__enum& 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 BcmFlags__enum_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 @Bcm.BcmFlags_enum.");
+}
+}
+
+void BcmFlags__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (BcmFlags__enum::enum_type)text_buf.pull_int().get_val();
+if (!BcmFlags__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Bcm.BcmFlags_enum.", 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 BcmFlags__enum_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 @Bcm.BcmFlags_enum.");
+}
+}
+
+boolean BcmFlags__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean BcmFlags__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void BcmFlags__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ BcmFlags__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ BcmFlags__enum::enum_type enum_val = BcmFlags__enum::str_to_enum(m_p->get_enumerated());
+ if (!BcmFlags__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmFlags_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Bcm.BcmFlags_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void BcmFlags__enum_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 : "@Bcm.BcmFlags_enum");
+}
+
+BcmOpcode__enum::BcmOpcode__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+BcmOpcode__enum::BcmOpcode__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Bcm.BcmOpcode_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+BcmOpcode__enum::BcmOpcode__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+BcmOpcode__enum::BcmOpcode__enum(const BcmOpcode__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+enum_value = other_value.enum_value;
+}
+
+BcmOpcode__enum& BcmOpcode__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Bcm.BcmOpcode_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+BcmOpcode__enum& BcmOpcode__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+BcmOpcode__enum& BcmOpcode__enum::operator=(const BcmOpcode__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean BcmOpcode__enum::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 @Bcm.BcmOpcode_enum.");
+return enum_value == other_value;
+}
+
+boolean BcmOpcode__enum::operator==(const BcmOpcode__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean BcmOpcode__enum::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 @Bcm.BcmOpcode_enum.");
+return enum_value < other_value;
+}
+
+boolean BcmOpcode__enum::operator<(const BcmOpcode__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean BcmOpcode__enum::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 @Bcm.BcmOpcode_enum.");
+return enum_value > other_value;
+}
+
+boolean BcmOpcode__enum::operator>(const BcmOpcode__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *BcmOpcode__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case e__CAN__BCM__TX__SETUP: return "e_CAN_BCM_TX_SETUP";
+case e__CAN__BCM__TX__DELETE: return "e_CAN_BCM_TX_DELETE";
+case e__CAN__BCM__TX__READ: return "e_CAN_BCM_TX_READ";
+case e__CAN__BCM__TX__SEND: return "e_CAN_BCM_TX_SEND";
+case e__CAN__BCM__RX__SETUP: return "e_CAN_BCM_RX_SETUP";
+case e__CAN__BCM__RX__DELETE: return "e_CAN_BCM_RX_DELETE";
+case e__CAN__BCM__RX__READ: return "e_CAN_BCM_RX_READ";
+case e__CAN__BCM__TX__STATUS: return "e_CAN_BCM_TX_STATUS";
+case e__CAN__BCM__TX__EXPIRED: return "e_CAN_BCM_TX_EXPIRED";
+case e__CAN__BCM__RX__STATUS: return "e_CAN_BCM_RX_STATUS";
+case e__CAN__BCM__RX__TIMEOUT: return "e_CAN_BCM_RX_TIMEOUT";
+case e__CAN__BCM__RX__CHANGED: return "e_CAN_BCM_RX_CHANGED";
+default: return "<unknown>";
+}
+}
+
+BcmOpcode__enum::enum_type BcmOpcode__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "e_CAN_BCM_TX_SETUP")) return e__CAN__BCM__TX__SETUP;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_DELETE")) return e__CAN__BCM__TX__DELETE;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_READ")) return e__CAN__BCM__TX__READ;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_SEND")) return e__CAN__BCM__TX__SEND;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_SETUP")) return e__CAN__BCM__RX__SETUP;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_DELETE")) return e__CAN__BCM__RX__DELETE;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_READ")) return e__CAN__BCM__RX__READ;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_STATUS")) return e__CAN__BCM__TX__STATUS;
+else if (!strcmp(str_par, "e_CAN_BCM_TX_EXPIRED")) return e__CAN__BCM__TX__EXPIRED;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_STATUS")) return e__CAN__BCM__RX__STATUS;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_TIMEOUT")) return e__CAN__BCM__RX__TIMEOUT;
+else if (!strcmp(str_par, "e_CAN_BCM_RX_CHANGED")) return e__CAN__BCM__RX__CHANGED;
+else return UNKNOWN_VALUE;
+}
+
+boolean BcmOpcode__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 1:
+case 2:
+case 3:
+case 4:
+case 5:
+case 6:
+case 7:
+case 8:
+case 9:
+case 10:
+case 11:
+case 12:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int BcmOpcode__enum::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 @Bcm.BcmOpcode_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int BcmOpcode__enum::enum2int(const BcmOpcode__enum& 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 @Bcm.BcmOpcode_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void BcmOpcode__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Bcm.BcmOpcode_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+BcmOpcode__enum::operator BcmOpcode__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Bcm.BcmOpcode_enum.");
+return enum_value;
+}
+
+void BcmOpcode__enum::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 BcmOpcode__enum::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", "@Bcm.BcmOpcode_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmOpcode_enum.");
+ }
+}
+
+void BcmOpcode__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+text_buf.push_int(enum_value);
+}
+
+void BcmOpcode__enum::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 @Bcm.BcmOpcode_enum.", enum_value);
+}
+
+void BcmOpcode__enum_template::copy_template(const BcmOpcode__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new BcmOpcode__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Bcm.BcmOpcode_enum.");
+}
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template()
+{
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!BcmOpcode__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Bcm.BcmOpcode_enum with unknown numeric value %d.", other_value);
+single_value = (BcmOpcode__enum::enum_type)other_value;
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(BcmOpcode__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(const BcmOpcode__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == BcmOpcode__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Bcm.BcmOpcode_enum.");
+single_value = other_value.enum_value;
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(const OPTIONAL<BcmOpcode__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmOpcode__enum::enum_type)(const BcmOpcode__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Bcm.BcmOpcode_enum from an unbound optional field.");
+}
+}
+
+BcmOpcode__enum_template::BcmOpcode__enum_template(const BcmOpcode__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+BcmOpcode__enum_template::~BcmOpcode__enum_template()
+{
+clean_up();
+}
+
+boolean BcmOpcode__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean BcmOpcode__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != BcmOpcode__enum::UNBOUND_VALUE;
+}
+
+void BcmOpcode__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(int other_value)
+{
+if (!BcmOpcode__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Bcm.BcmOpcode_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmOpcode__enum::enum_type)other_value;
+return *this;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(BcmOpcode__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(const BcmOpcode__enum& other_value)
+{
+if (other_value.enum_value == BcmOpcode__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Bcm.BcmOpcode_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(const OPTIONAL<BcmOpcode__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (BcmOpcode__enum::enum_type)(const BcmOpcode__enum&)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 @Bcm.BcmOpcode_enum.");
+}
+return *this;
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::operator=(const BcmOpcode__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean BcmOpcode__enum_template::match(BcmOpcode__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Bcm.BcmOpcode_enum.");
+}
+return FALSE;
+}
+
+boolean BcmOpcode__enum_template::match(const BcmOpcode__enum& other_value, boolean) const
+{
+if (other_value.enum_value == BcmOpcode__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Bcm.BcmOpcode_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+BcmOpcode__enum::enum_type BcmOpcode__enum_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 @Bcm.BcmOpcode_enum.");
+return single_value;
+}
+
+void BcmOpcode__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Bcm.BcmOpcode_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new BcmOpcode__enum_template[list_length];
+}
+
+BcmOpcode__enum_template& BcmOpcode__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Bcm.BcmOpcode_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Bcm.BcmOpcode_enum.");
+return value_list.list_value[list_index];
+}
+
+void BcmOpcode__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(BcmOpcode__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void BcmOpcode__enum_template::log_match(const BcmOpcode__enum& 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 BcmOpcode__enum_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 @Bcm.BcmOpcode_enum.");
+}
+}
+
+void BcmOpcode__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (BcmOpcode__enum::enum_type)text_buf.pull_int().get_val();
+if (!BcmOpcode__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Bcm.BcmOpcode_enum.", 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 BcmOpcode__enum_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 @Bcm.BcmOpcode_enum.");
+}
+}
+
+boolean BcmOpcode__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean BcmOpcode__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void BcmOpcode__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ BcmOpcode__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ BcmOpcode__enum::enum_type enum_val = BcmOpcode__enum::str_to_enum(m_p->get_enumerated());
+ if (!BcmOpcode__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Bcm.BcmOpcode_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Bcm.BcmOpcode_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void BcmOpcode__enum_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 : "@Bcm.BcmOpcode_enum");
+}
+
+Bcm__timeval::Bcm__timeval()
+{
+}
+
+Bcm__timeval::Bcm__timeval(const INTEGER& par_tv__sec,
+ const INTEGER& par_tv__usec)
+ : field_tv__sec(par_tv__sec),
+ field_tv__usec(par_tv__usec)
+{
+}
+
+Bcm__timeval::Bcm__timeval(const Bcm__timeval& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Bcm.Bcm_timeval.");
+if (other_value.tv__sec().is_bound()) field_tv__sec = other_value.tv__sec();
+else field_tv__sec.clean_up();
+if (other_value.tv__usec().is_bound()) field_tv__usec = other_value.tv__usec();
+else field_tv__usec.clean_up();
+}
+
+void Bcm__timeval::clean_up()
+{
+field_tv__sec.clean_up();
+field_tv__usec.clean_up();
+}
+
+const TTCN_Typedescriptor_t* Bcm__timeval::get_descriptor() const { return &Bcm__timeval_descr_; }
+Bcm__timeval& Bcm__timeval::operator=(const Bcm__timeval& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Bcm.Bcm_timeval.");
+ if (other_value.tv__sec().is_bound()) field_tv__sec = other_value.tv__sec();
+ else field_tv__sec.clean_up();
+ if (other_value.tv__usec().is_bound()) field_tv__usec = other_value.tv__usec();
+ else field_tv__usec.clean_up();
+}
+return *this;
+}
+
+boolean Bcm__timeval::operator==(const Bcm__timeval& other_value) const
+{
+return field_tv__sec==other_value.field_tv__sec
+ && field_tv__usec==other_value.field_tv__usec;
+}
+
+boolean Bcm__timeval::is_bound() const
+{
+return (field_tv__sec.is_bound())
+ || (field_tv__usec.is_bound());
+}
+boolean Bcm__timeval::is_value() const
+{
+return field_tv__sec.is_value()
+ && field_tv__usec.is_value();
+}
+void Bcm__timeval::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ tv_sec := ");
+field_tv__sec.log();
+TTCN_Logger::log_event_str(", tv_usec := ");
+field_tv__usec.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void Bcm__timeval::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 (2<param.get_size()) {
+ param.error("record value of type @Bcm.Bcm_timeval has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) tv__sec().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) tv__usec().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "tv_sec")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ tv__sec().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "tv_usec")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ tv__usec().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Bcm.Bcm_timeval: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Bcm.Bcm_timeval");
+ }
+}
+
+void Bcm__timeval::set_implicit_omit()
+{
+if (tv__sec().is_bound()) tv__sec().set_implicit_omit();
+if (tv__usec().is_bound()) tv__usec().set_implicit_omit();
+}
+
+void Bcm__timeval::encode_text(Text_Buf& text_buf) const
+{
+field_tv__sec.encode_text(text_buf);
+field_tv__usec.encode_text(text_buf);
+}
+
+void Bcm__timeval::decode_text(Text_Buf& text_buf)
+{
+field_tv__sec.decode_text(text_buf);
+field_tv__usec.decode_text(text_buf);
+}
+
+struct Bcm__timeval_template::single_value_struct {
+INTEGER_template field_tv__sec;
+INTEGER_template field_tv__usec;
+};
+
+void Bcm__timeval_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_tv__sec = ANY_VALUE;
+single_value->field_tv__usec = ANY_VALUE;
+}
+}
+}
+
+void Bcm__timeval_template::copy_value(const Bcm__timeval& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.tv__sec().is_bound()) {
+ single_value->field_tv__sec = other_value.tv__sec();
+} else {
+ single_value->field_tv__sec.clean_up();
+}
+if (other_value.tv__usec().is_bound()) {
+ single_value->field_tv__usec = other_value.tv__usec();
+} else {
+ single_value->field_tv__usec.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void Bcm__timeval_template::copy_template(const Bcm__timeval_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.tv__sec().get_selection()) {
+single_value->field_tv__sec = other_value.tv__sec();
+} else {
+single_value->field_tv__sec.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.tv__usec().get_selection()) {
+single_value->field_tv__usec = other_value.tv__usec();
+} else {
+single_value->field_tv__usec.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new Bcm__timeval_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Bcm.Bcm_timeval.");
+break;
+}
+set_selection(other_value);
+}
+
+Bcm__timeval_template::Bcm__timeval_template()
+{
+}
+
+Bcm__timeval_template::Bcm__timeval_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+Bcm__timeval_template::Bcm__timeval_template(const Bcm__timeval& other_value)
+{
+copy_value(other_value);
+}
+
+Bcm__timeval_template::Bcm__timeval_template(const OPTIONAL<Bcm__timeval>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Bcm__timeval&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Bcm.Bcm_timeval from an unbound optional field.");
+}
+}
+
+Bcm__timeval_template::Bcm__timeval_template(const Bcm__timeval_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+Bcm__timeval_template::~Bcm__timeval_template()
+{
+clean_up();
+}
+
+Bcm__timeval_template& Bcm__timeval_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+Bcm__timeval_template& Bcm__timeval_template::operator=(const Bcm__timeval& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+Bcm__timeval_template& Bcm__timeval_template::operator=(const OPTIONAL<Bcm__timeval>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Bcm__timeval&)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 @Bcm.Bcm_timeval.");
+}
+return *this;
+}
+
+Bcm__timeval_template& Bcm__timeval_template::operator=(const Bcm__timeval_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean Bcm__timeval_template::match(const Bcm__timeval& 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.tv__sec().is_bound()) return FALSE;
+if(!single_value->field_tv__sec.match(other_value.tv__sec(), legacy))return FALSE;
+if(!other_value.tv__usec().is_bound()) return FALSE;
+if(!single_value->field_tv__usec.match(other_value.tv__usec(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Bcm.Bcm_timeval.");
+}
+return FALSE;
+}
+
+boolean Bcm__timeval_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_tv__sec.is_bound()
+
+ ||single_value->field_tv__usec.is_bound()
+;
+}
+
+boolean Bcm__timeval_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_tv__sec.is_value()
+ &&single_value->field_tv__usec.is_value();
+}
+
+void Bcm__timeval_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+Bcm__timeval Bcm__timeval_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 @Bcm.Bcm_timeval.");
+Bcm__timeval ret_val;
+if (single_value->field_tv__sec.is_bound()) {
+ret_val.tv__sec() = single_value->field_tv__sec.valueof();
+}
+if (single_value->field_tv__usec.is_bound()) {
+ret_val.tv__usec() = single_value->field_tv__usec.valueof();
+}
+return ret_val;
+}
+
+void Bcm__timeval_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Bcm.Bcm_timeval.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new Bcm__timeval_template[list_length];
+}
+
+Bcm__timeval_template& Bcm__timeval_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Bcm.Bcm_timeval.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Bcm.Bcm_timeval.");
+return value_list.list_value[list_index];
+}
+
+INTEGER_template& Bcm__timeval_template::tv__sec()
+{
+set_specific();
+return single_value->field_tv__sec;
+}
+
+const INTEGER_template& Bcm__timeval_template::tv__sec() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field tv_sec of a non-specific template of type @Bcm.Bcm_timeval.");
+return single_value->field_tv__sec;
+}
+
+INTEGER_template& Bcm__timeval_template::tv__usec()
+{
+set_specific();
+return single_value->field_tv__usec;
+}
+
+const INTEGER_template& Bcm__timeval_template::tv__usec() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field tv_usec of a non-specific template of type @Bcm.Bcm_timeval.");
+return single_value->field_tv__usec;
+}
+
+int Bcm__timeval_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Bcm.Bcm_timeval which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Bcm.Bcm_timeval 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 @Bcm.Bcm_timeval containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.Bcm_timeval containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.Bcm_timeval containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.Bcm_timeval containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Bcm.Bcm_timeval.");
+ }
+ return 0;
+}
+
+void Bcm__timeval_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ tv_sec := ");
+single_value->field_tv__sec.log();
+TTCN_Logger::log_event_str(", tv_usec := ");
+single_value->field_tv__usec.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void Bcm__timeval_template::log_match(const Bcm__timeval& 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_tv__sec.match(match_value.tv__sec(), legacy)){
+TTCN_Logger::log_logmatch_info(".tv_sec");
+single_value->field_tv__sec.log_match(match_value.tv__sec(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_tv__usec.match(match_value.tv__usec(), legacy)){
+TTCN_Logger::log_logmatch_info(".tv_usec");
+single_value->field_tv__usec.log_match(match_value.tv__usec(), legacy);
+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("{ tv_sec := ");
+single_value->field_tv__sec.log_match(match_value.tv__sec(), legacy);
+TTCN_Logger::log_event_str(", tv_usec := ");
+single_value->field_tv__usec.log_match(match_value.tv__usec(), legacy);
+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 Bcm__timeval_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_tv__sec.encode_text(text_buf);
+single_value->field_tv__usec.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 @Bcm.Bcm_timeval.");
+}
+}
+
+void Bcm__timeval_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_tv__sec.decode_text(text_buf);
+single_value->field_tv__usec.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 Bcm__timeval_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 @Bcm.Bcm_timeval.");
+}
+}
+
+void Bcm__timeval_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: {
+ Bcm__timeval_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @Bcm.Bcm_timeval has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) tv__sec().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) tv__usec().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "tv_sec")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ tv__sec().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "tv_usec")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ tv__usec().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Bcm.Bcm_timeval: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Bcm.Bcm_timeval");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void Bcm__timeval_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_tv__sec.check_restriction(t_res, t_name ? t_name : "@Bcm.Bcm_timeval");
+single_value->field_tv__usec.check_restriction(t_res, t_name ? t_name : "@Bcm.Bcm_timeval");
+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 : "@Bcm.Bcm_timeval");
+}
+
+boolean Bcm__timeval_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean Bcm__timeval_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void SocketCAN__bcm__frame_frames::copy_value(const SocketCAN__bcm__frame_frames& other_value)
+{
+switch (other_value.union_selection) {
+case ALT_can__frame:
+field_can__frame = new SocketCAN__bcm__frame_frames_can__frame(*other_value.field_can__frame);
+break;
+case ALT_canfd__frame:
+field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame(*other_value.field_canfd__frame);
+break;
+default:
+TTCN_error("Assignment of an unbound union value of type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+union_selection = other_value.union_selection;
+}
+
+SocketCAN__bcm__frame_frames::SocketCAN__bcm__frame_frames()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+SocketCAN__bcm__frame_frames::SocketCAN__bcm__frame_frames(const SocketCAN__bcm__frame_frames& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+SocketCAN__bcm__frame_frames::~SocketCAN__bcm__frame_frames()
+{
+clean_up();
+}
+
+SocketCAN__bcm__frame_frames& SocketCAN__bcm__frame_frames::operator=(const SocketCAN__bcm__frame_frames& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame_frames::operator==(const SocketCAN__bcm__frame_frames& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @Bcm.SocketCAN_bcm_frame.frames.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @Bcm.SocketCAN_bcm_frame.frames.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+case ALT_can__frame:
+return *field_can__frame == *other_value.field_can__frame;
+case ALT_canfd__frame:
+return *field_canfd__frame == *other_value.field_canfd__frame;
+default:
+return FALSE;
+}
+}
+
+SocketCAN__bcm__frame_frames_can__frame& SocketCAN__bcm__frame_frames::can__frame()
+{
+if (union_selection != ALT_can__frame) {
+clean_up();
+field_can__frame = new SocketCAN__bcm__frame_frames_can__frame;
+union_selection = ALT_can__frame;
+}
+return *field_can__frame;
+}
+
+const SocketCAN__bcm__frame_frames_can__frame& SocketCAN__bcm__frame_frames::can__frame() const
+{
+if (union_selection != ALT_can__frame) TTCN_error("Using non-selected field can_frame in a value of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return *field_can__frame;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame& SocketCAN__bcm__frame_frames::canfd__frame()
+{
+if (union_selection != ALT_canfd__frame) {
+clean_up();
+field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame;
+union_selection = ALT_canfd__frame;
+}
+return *field_canfd__frame;
+}
+
+const SocketCAN__bcm__frame_frames_canfd__frame& SocketCAN__bcm__frame_frames::canfd__frame() const
+{
+if (union_selection != ALT_canfd__frame) TTCN_error("Using non-selected field canfd_frame in a value of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return *field_canfd__frame;
+}
+
+boolean SocketCAN__bcm__frame_frames::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return union_selection == checked_selection;
+}
+
+boolean SocketCAN__bcm__frame_frames::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean SocketCAN__bcm__frame_frames::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+case ALT_can__frame: return field_can__frame->is_value();
+case ALT_canfd__frame: return field_canfd__frame->is_value();
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void SocketCAN__bcm__frame_frames::clean_up()
+{
+switch (union_selection) {
+case ALT_can__frame:
+ delete field_can__frame;
+ break;
+case ALT_canfd__frame:
+ delete field_canfd__frame;
+ break;
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void SocketCAN__bcm__frame_frames::log() const
+{
+switch (union_selection) {
+case ALT_can__frame:
+TTCN_Logger::log_event_str("{ can_frame := ");
+field_can__frame->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_canfd__frame:
+TTCN_Logger::log_event_str("{ canfd_frame := ");
+field_canfd__frame->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void SocketCAN__bcm__frame_frames::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, "can_frame")) {
+ can__frame().set_param(*mp_last);
+ if (!can__frame().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "canfd_frame")) {
+ canfd__frame().set_param(*mp_last);
+ if (!canfd__frame().is_bound()) clean_up();
+ return;
+ }
+ mp_last->error("Field %s does not exist in type @Bcm.SocketCAN_bcm_frame.frames.", last_name);
+}
+
+void SocketCAN__bcm__frame_frames::set_implicit_omit()
+{
+switch (union_selection) {
+case ALT_can__frame:
+field_can__frame->set_implicit_omit(); break;
+case ALT_canfd__frame:
+field_canfd__frame->set_implicit_omit(); break;
+default: break;
+}
+}
+
+void SocketCAN__bcm__frame_frames::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+case ALT_can__frame:
+field_can__frame->encode_text(text_buf);
+break;
+case ALT_canfd__frame:
+field_canfd__frame->encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+
+void SocketCAN__bcm__frame_frames::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+case ALT_can__frame:
+can__frame().decode_text(text_buf);
+break;
+case ALT_canfd__frame:
+canfd__frame().decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+
+void SocketCAN__bcm__frame_frames_template::copy_value(const SocketCAN__bcm__frame_frames& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+single_value.field_can__frame = new SocketCAN__bcm__frame_frames_can__frame_template(other_value.can__frame());
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+single_value.field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame_template(other_value.canfd__frame());
+break;
+default:
+TTCN_error("Initializing a template with an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void SocketCAN__bcm__frame_frames_template::copy_template(const SocketCAN__bcm__frame_frames_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 SocketCAN__bcm__frame_frames::ALT_can__frame:
+single_value.field_can__frame = new SocketCAN__bcm__frame_frames_can__frame_template(*other_value.single_value.field_can__frame);
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+single_value.field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame_template(*other_value.single_value.field_canfd__frame);
+break;
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new SocketCAN__bcm__frame_frames_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+set_selection(other_value);
+}
+
+SocketCAN__bcm__frame_frames_template::SocketCAN__bcm__frame_frames_template()
+{
+}
+
+SocketCAN__bcm__frame_frames_template::SocketCAN__bcm__frame_frames_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+SocketCAN__bcm__frame_frames_template::SocketCAN__bcm__frame_frames_template(const SocketCAN__bcm__frame_frames& other_value)
+{
+copy_value(other_value);
+}
+
+SocketCAN__bcm__frame_frames_template::SocketCAN__bcm__frame_frames_template(const OPTIONAL<SocketCAN__bcm__frame_frames>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @Bcm.SocketCAN_bcm_frame.frames from an unbound optional field.");
+}
+}
+
+SocketCAN__bcm__frame_frames_template::SocketCAN__bcm__frame_frames_template(const SocketCAN__bcm__frame_frames_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+SocketCAN__bcm__frame_frames_template::~SocketCAN__bcm__frame_frames_template()
+{
+clean_up();
+}
+
+void SocketCAN__bcm__frame_frames_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+delete single_value.field_can__frame;
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+delete single_value.field_canfd__frame;
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_frames_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_frames_template::operator=(const SocketCAN__bcm__frame_frames& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_frames_template::operator=(const OPTIONAL<SocketCAN__bcm__frame_frames>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames&)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 @Bcm.SocketCAN_bcm_frame.frames.");
+}
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_frames_template::operator=(const SocketCAN__bcm__frame_frames_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame_frames_template::match(const SocketCAN__bcm__frame_frames& 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:
+{
+SocketCAN__bcm__frame_frames::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == SocketCAN__bcm__frame_frames::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+return single_value.field_can__frame->match(other_value.can__frame(), legacy);
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+return single_value.field_canfd__frame->match(other_value.canfd__frame(), legacy);
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+return FALSE;
+}
+
+boolean SocketCAN__bcm__frame_frames_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+return single_value.field_can__frame->is_value();
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+return single_value.field_canfd__frame->is_value();
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+
+SocketCAN__bcm__frame_frames SocketCAN__bcm__frame_frames_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 @Bcm.SocketCAN_bcm_frame.frames.");
+SocketCAN__bcm__frame_frames ret_val;
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+ret_val.can__frame() = single_value.field_can__frame->valueof();
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+ret_val.canfd__frame() = single_value.field_canfd__frame->valueof();
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_frames_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return value_list.list_value[list_index];
+}
+void SocketCAN__bcm__frame_frames_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new SocketCAN__bcm__frame_frames_template[list_length];
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_template::can__frame()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SocketCAN__bcm__frame_frames::ALT_can__frame) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_can__frame = new SocketCAN__bcm__frame_frames_can__frame_template(ANY_VALUE);
+else single_value.field_can__frame = new SocketCAN__bcm__frame_frames_can__frame_template;
+single_value.union_selection = SocketCAN__bcm__frame_frames::ALT_can__frame;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_can__frame;
+}
+
+const SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_template::can__frame() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field can_frame in a non-specific template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+if (single_value.union_selection != SocketCAN__bcm__frame_frames::ALT_can__frame) TTCN_error("Accessing non-selected field can_frame in a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return *single_value.field_can__frame;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_template::canfd__frame()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SocketCAN__bcm__frame_frames::ALT_canfd__frame) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame_template(ANY_VALUE);
+else single_value.field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame_template;
+single_value.union_selection = SocketCAN__bcm__frame_frames::ALT_canfd__frame;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_canfd__frame;
+}
+
+const SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_template::canfd__frame() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field canfd_frame in a non-specific template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+if (single_value.union_selection != SocketCAN__bcm__frame_frames::ALT_canfd__frame) TTCN_error("Accessing non-selected field canfd_frame in a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+return *single_value.field_canfd__frame;
+}
+
+boolean SocketCAN__bcm__frame_frames_template::ischosen(SocketCAN__bcm__frame_frames::union_selection_type checked_selection) const
+{
+if (checked_selection == SocketCAN__bcm__frame_frames::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @Bcm.SocketCAN_bcm_frame.frames.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == SocketCAN__bcm__frame_frames::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+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 @Bcm.SocketCAN_bcm_frame.frames 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 SocketCAN__bcm__frame_frames_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+TTCN_Logger::log_event_str("{ can_frame := ");
+single_value.field_can__frame->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+TTCN_Logger::log_event_str("{ canfd_frame := ");
+single_value.field_canfd__frame->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void SocketCAN__bcm__frame_frames_template::log_match(const SocketCAN__bcm__frame_frames& 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()) {
+switch (single_value.union_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".can_frame");
+single_value.field_can__frame->log_match(match_value.can__frame(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ can_frame := ");
+single_value.field_can__frame->log_match(match_value.can__frame(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".canfd_frame");
+single_value.field_canfd__frame->log_match(match_value.canfd__frame(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ canfd_frame := ");
+single_value.field_canfd__frame->log_match(match_value.canfd__frame(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 SocketCAN__bcm__frame_frames_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 SocketCAN__bcm__frame_frames::ALT_can__frame:
+single_value.field_can__frame->encode_text(text_buf);
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+single_value.field_canfd__frame->encode_text(text_buf);
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+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 @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+
+void SocketCAN__bcm__frame_frames_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+{
+single_value.union_selection = SocketCAN__bcm__frame_frames::UNBOUND_VALUE;
+SocketCAN__bcm__frame_frames::union_selection_type new_selection = (SocketCAN__bcm__frame_frames::union_selection_type)text_buf.pull_int().get_val();
+switch (new_selection) {
+case SocketCAN__bcm__frame_frames::ALT_can__frame:
+single_value.field_can__frame = new SocketCAN__bcm__frame_frames_can__frame_template;
+single_value.field_can__frame->decode_text(text_buf);
+break;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+single_value.field_canfd__frame = new SocketCAN__bcm__frame_frames_canfd__frame_template;
+single_value.field_canfd__frame->decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+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 SocketCAN__bcm__frame_frames_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 @Bcm.SocketCAN_bcm_frame.frames.");
+}
+}
+
+boolean SocketCAN__bcm__frame_frames_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean SocketCAN__bcm__frame_frames_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
+if (value_list.list_value[v_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void SocketCAN__bcm__frame_frames_template::set_param(Module_Param& param)
+{
+ if (dynamic_cast<Module_Param_Name*>(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 `@Bcm.SocketCAN_bcm_frame.frames'");
+ }
+ if (strcmp("can_frame", param_field) == 0) {
+ can__frame().set_param(param);
+ return;
+ } else if (strcmp("canfd_frame", param_field) == 0) {
+ canfd__frame().set_param(param);
+ return;
+ } else param.error("Field `%s' not found in union template type `@Bcm.SocketCAN_bcm_frame.frames'", 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: {
+ SocketCAN__bcm__frame_frames_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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", "@Bcm.SocketCAN_bcm_frame.frames");
+ 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, "can_frame")) {
+ can__frame().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "canfd_frame")) {
+ canfd__frame().set_param(*mp_last);
+ break;
+ }
+ mp_last->error("Field %s does not exist in type @Bcm.SocketCAN_bcm_frame.frames.", last_name);
+ } break;
+ default:
+ param.type_error("union template", "@Bcm.SocketCAN_bcm_frame.frames");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void SocketCAN__bcm__frame_frames_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 SocketCAN__bcm__frame_frames::ALT_can__frame:
+single_value.field_can__frame->check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame.frames");
+return;
+case SocketCAN__bcm__frame_frames::ALT_canfd__frame:
+single_value.field_canfd__frame->check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame.frames");
+return;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @Bcm.SocketCAN_bcm_frame.frames.");
+}
+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 : "@Bcm.SocketCAN_bcm_frame.frames");
+}
+
+
+const Can::CAN__frame SocketCAN__bcm__frame_frames_can__frame::UNBOUND_ELEM;
+SocketCAN__bcm__frame_frames_can__frame::SocketCAN__bcm__frame_frames_can__frame()
+{
+val_ptr = NULL;
+}
+
+SocketCAN__bcm__frame_frames_can__frame::SocketCAN__bcm__frame_frames_can__frame(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+SocketCAN__bcm__frame_frames_can__frame::SocketCAN__bcm__frame_frames_can__frame(const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+SocketCAN__bcm__frame_frames_can__frame::~SocketCAN__bcm__frame_frames_can__frame()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+SocketCAN__bcm__frame_frames_can__frame& SocketCAN__bcm__frame_frames_can__frame::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_can__frame& SocketCAN__bcm__frame_frames_can__frame::operator=(const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame::operator==(const SocketCAN__bcm__frame_frames_can__frame& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+Can::CAN__frame& SocketCAN__bcm__frame_frames_can__frame::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @Bcm.SocketCAN_bcm_frame.frames.can_frame using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (Can::CAN__frame**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Can::CAN__frame(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new Can::CAN__frame;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+Can::CAN__frame& SocketCAN__bcm__frame_frames_can__frame::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return (*this)[(int)index_value];
+}
+
+const Can::CAN__frame& SocketCAN__bcm__frame_frames_can__frame::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (index_value < 0) TTCN_error("Accessing an element of type @Bcm.SocketCAN_bcm_frame.frames.can_frame using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const Can::CAN__frame& SocketCAN__bcm__frame_frames_can__frame::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return (*this)[(int)index_value];
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+SocketCAN__bcm__frame_frames_can__frame ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new Can::CAN__frame(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::operator+(const SocketCAN__bcm__frame_frames_can__frame& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @Bcm.SocketCAN_bcm_frame.frames.can_frame concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+SocketCAN__bcm__frame_frames_can__frame ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CAN__frame(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new Can::CAN__frame(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@Bcm.SocketCAN_bcm_frame.frames.can_frame","element");
+SocketCAN__bcm__frame_frames_can__frame ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CAN__frame(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@Bcm.SocketCAN_bcm_frame.frames.can_frame","element");
+SocketCAN__bcm__frame_frames_can__frame ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CAN__frame(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new Can::CAN__frame(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new Can::CAN__frame(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame::replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (Can::CAN__frame**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Can::CAN__frame(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (Can::CAN__frame**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @Bcm.SocketCAN_bcm_frame.frames.can_frame: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (Can::CAN__frame**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int SocketCAN__bcm__frame_frames_can__frame::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return val_ptr->n_elements;
+}
+
+int SocketCAN__bcm__frame_frames_can__frame::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@Bcm.SocketCAN_bcm_frame.frames.can_frame");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@Bcm.SocketCAN_bcm_frame.frames.can_frame");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void SocketCAN__bcm__frame_frames_can__frame::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+val_ptr->value_elements = (Can::CAN__frame**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new Can::CAN__frame;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::copy_value(const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (Can::CAN__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new Can::CAN__frame_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Can::CAN__frame_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::copy_template(const SocketCAN__bcm__frame_frames_can__frame_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (Can::CAN__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new Can::CAN__frame_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Can::CAN__frame_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new SocketCAN__bcm__frame_frames_can__frame_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const SocketCAN__bcm__frame_frames_can__frame_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const SocketCAN__bcm__frame_frames_can__frame*)value_ptr)[value_index], legacy);
+else return ((const SocketCAN__bcm__frame_frames_can__frame_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template()
+{
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template(const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+copy_value(other_value);
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template(const OPTIONAL<SocketCAN__bcm__frame_frames_can__frame>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames_can__frame&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame from an unbound optional field.");
+}
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::SocketCAN__bcm__frame_frames_can__frame_template(const SocketCAN__bcm__frame_frames_can__frame_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template::~SocketCAN__bcm__frame_frames_can__frame_template()
+{
+clean_up();
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator=(const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator=(const OPTIONAL<SocketCAN__bcm__frame_frames_can__frame>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames_can__frame&)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 @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+}
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator=(const SocketCAN__bcm__frame_frames_can__frame_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+Can::CAN__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @Bcm.SocketCAN_bcm_frame.frames.can_frame using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+Can::CAN__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return (*this)[(int)index_value];
+}
+
+const Can::CAN__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @Bcm.SocketCAN_bcm_frame.frames.can_frame using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const Can::CAN__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return (*this)[(int)index_value];
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (Can::CAN__frame_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Can::CAN__frame_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Can::CAN__frame_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (Can::CAN__frame_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int SocketCAN__bcm__frame_frames_can__frame_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int SocketCAN__bcm__frame_frames_can__frame_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame");
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::match(const SocketCAN__bcm__frame_frames_can__frame& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+}
+return FALSE;
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame_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 @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+SocketCAN__bcm__frame_frames_can__frame ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame_template::replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+SocketCAN__bcm__frame_frames_can__frame SocketCAN__bcm__frame_frames_can__frame_template::replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new SocketCAN__bcm__frame_frames_can__frame_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+}
+set_selection(template_type);
+}
+
+SocketCAN__bcm__frame_frames_can__frame_template& SocketCAN__bcm__frame_frames_can__frame_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return value_list.list_value[list_index];
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::log_match(const SocketCAN__bcm__frame_frames_can__frame& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 SocketCAN__bcm__frame_frames_can__frame_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+}
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+single_value.value_elements = (Can::CAN__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new Can::CAN__frame_template;
+single_value.value_elements[elem_count]->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 SocketCAN__bcm__frame_frames_can__frame_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 for a template of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+}
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ SocketCAN__bcm__frame_frames_can__frame_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@Bcm.SocketCAN_bcm_frame.frames.can_frame");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void SocketCAN__bcm__frame_frames_can__frame_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame.frames.can_frame");
+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 : "@Bcm.SocketCAN_bcm_frame.frames.can_frame");
+}
+
+boolean SocketCAN__bcm__frame_frames_can__frame_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const Can::CANFD__frame SocketCAN__bcm__frame_frames_canfd__frame::UNBOUND_ELEM;
+SocketCAN__bcm__frame_frames_canfd__frame::SocketCAN__bcm__frame_frames_canfd__frame()
+{
+val_ptr = NULL;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame::SocketCAN__bcm__frame_frames_canfd__frame(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame::SocketCAN__bcm__frame_frames_canfd__frame(const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame::~SocketCAN__bcm__frame_frames_canfd__frame()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator=(const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame::operator==(const SocketCAN__bcm__frame_frames_canfd__frame& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+Can::CANFD__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (Can::CANFD__frame**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Can::CANFD__frame(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new Can::CANFD__frame;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+Can::CANFD__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return (*this)[(int)index_value];
+}
+
+const Can::CANFD__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (index_value < 0) TTCN_error("Accessing an element of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const Can::CANFD__frame& SocketCAN__bcm__frame_frames_canfd__frame::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return (*this)[(int)index_value];
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+SocketCAN__bcm__frame_frames_canfd__frame ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new Can::CANFD__frame(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::operator+(const SocketCAN__bcm__frame_frames_canfd__frame& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @Bcm.SocketCAN_bcm_frame.frames.canfd_frame concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+SocketCAN__bcm__frame_frames_canfd__frame ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CANFD__frame(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new Can::CANFD__frame(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame","element");
+SocketCAN__bcm__frame_frames_canfd__frame ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CANFD__frame(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame","element");
+SocketCAN__bcm__frame_frames_canfd__frame ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Can::CANFD__frame(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new Can::CANFD__frame(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new Can::CANFD__frame(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame::replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (Can::CANFD__frame**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Can::CANFD__frame(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (Can::CANFD__frame**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (Can::CANFD__frame**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int SocketCAN__bcm__frame_frames_canfd__frame::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return val_ptr->n_elements;
+}
+
+int SocketCAN__bcm__frame_frames_canfd__frame::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+val_ptr->value_elements = (Can::CANFD__frame**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new Can::CANFD__frame;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::copy_value(const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (Can::CANFD__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::copy_template(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (Can::CANFD__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new SocketCAN__bcm__frame_frames_canfd__frame_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const SocketCAN__bcm__frame_frames_canfd__frame_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const SocketCAN__bcm__frame_frames_canfd__frame*)value_ptr)[value_index], legacy);
+else return ((const SocketCAN__bcm__frame_frames_canfd__frame_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template()
+{
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template(const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+copy_value(other_value);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template(const OPTIONAL<SocketCAN__bcm__frame_frames_canfd__frame>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames_canfd__frame&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame from an unbound optional field.");
+}
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::SocketCAN__bcm__frame_frames_canfd__frame_template(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template::~SocketCAN__bcm__frame_frames_canfd__frame_template()
+{
+clean_up();
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator=(const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator=(const OPTIONAL<SocketCAN__bcm__frame_frames_canfd__frame>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame_frames_canfd__frame&)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 @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+}
+return *this;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator=(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+Can::CANFD__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+Can::CANFD__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return (*this)[(int)index_value];
+}
+
+const Can::CANFD__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const Can::CANFD__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return (*this)[(int)index_value];
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (Can::CANFD__frame_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (Can::CANFD__frame_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int SocketCAN__bcm__frame_frames_canfd__frame_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int SocketCAN__bcm__frame_frames_canfd__frame_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::match(const SocketCAN__bcm__frame_frames_canfd__frame& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+}
+return FALSE;
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame_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 @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+SocketCAN__bcm__frame_frames_canfd__frame ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame_template::replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame SocketCAN__bcm__frame_frames_canfd__frame_template::replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new SocketCAN__bcm__frame_frames_canfd__frame_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+}
+set_selection(template_type);
+}
+
+SocketCAN__bcm__frame_frames_canfd__frame_template& SocketCAN__bcm__frame_frames_canfd__frame_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return value_list.list_value[list_index];
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::log_match(const SocketCAN__bcm__frame_frames_canfd__frame& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 SocketCAN__bcm__frame_frames_canfd__frame_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+}
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+single_value.value_elements = (Can::CANFD__frame_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new Can::CANFD__frame_template;
+single_value.value_elements[elem_count]->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 SocketCAN__bcm__frame_frames_canfd__frame_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 for a template of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+}
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ SocketCAN__bcm__frame_frames_canfd__frame_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void SocketCAN__bcm__frame_frames_canfd__frame_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+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 : "@Bcm.SocketCAN_bcm_frame.frames.canfd_frame");
+}
+
+boolean SocketCAN__bcm__frame_frames_canfd__frame_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+SocketCAN__bcm__frame::SocketCAN__bcm__frame()
+{
+}
+
+SocketCAN__bcm__frame::SocketCAN__bcm__frame(const OCTETSTRING& par_opcode,
+ const BITSTRING& par_flags,
+ const INTEGER& par_count,
+ const Bcm__timeval& par_ival1,
+ const Bcm__timeval& par_ival2,
+ const OCTETSTRING& par_can__id,
+ const SocketCAN__bcm__frame_frames& par_frames)
+ : field_opcode(par_opcode),
+ field_flags(par_flags),
+ field_count(par_count),
+ field_ival1(par_ival1),
+ field_ival2(par_ival2),
+ field_can__id(par_can__id),
+ field_frames(par_frames)
+{
+}
+
+SocketCAN__bcm__frame::SocketCAN__bcm__frame(const SocketCAN__bcm__frame& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Bcm.SocketCAN_bcm_frame.");
+if (other_value.opcode().is_bound()) field_opcode = other_value.opcode();
+else field_opcode.clean_up();
+if (other_value.flags().is_bound()) field_flags = other_value.flags();
+else field_flags.clean_up();
+if (other_value.count().is_bound()) field_count = other_value.count();
+else field_count.clean_up();
+if (other_value.ival1().is_bound()) field_ival1 = other_value.ival1();
+else field_ival1.clean_up();
+if (other_value.ival2().is_bound()) field_ival2 = other_value.ival2();
+else field_ival2.clean_up();
+if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+else field_can__id.clean_up();
+if (other_value.frames().is_bound()) field_frames = other_value.frames();
+else field_frames.clean_up();
+}
+
+void SocketCAN__bcm__frame::clean_up()
+{
+field_opcode.clean_up();
+field_flags.clean_up();
+field_count.clean_up();
+field_ival1.clean_up();
+field_ival2.clean_up();
+field_can__id.clean_up();
+field_frames.clean_up();
+}
+
+const TTCN_Typedescriptor_t* SocketCAN__bcm__frame::get_descriptor() const { return &SocketCAN__bcm__frame_descr_; }
+SocketCAN__bcm__frame& SocketCAN__bcm__frame::operator=(const SocketCAN__bcm__frame& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Bcm.SocketCAN_bcm_frame.");
+ if (other_value.opcode().is_bound()) field_opcode = other_value.opcode();
+ else field_opcode.clean_up();
+ if (other_value.flags().is_bound()) field_flags = other_value.flags();
+ else field_flags.clean_up();
+ if (other_value.count().is_bound()) field_count = other_value.count();
+ else field_count.clean_up();
+ if (other_value.ival1().is_bound()) field_ival1 = other_value.ival1();
+ else field_ival1.clean_up();
+ if (other_value.ival2().is_bound()) field_ival2 = other_value.ival2();
+ else field_ival2.clean_up();
+ if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+ else field_can__id.clean_up();
+ if (other_value.frames().is_bound()) field_frames = other_value.frames();
+ else field_frames.clean_up();
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame::operator==(const SocketCAN__bcm__frame& other_value) const
+{
+return field_opcode==other_value.field_opcode
+ && field_flags==other_value.field_flags
+ && field_count==other_value.field_count
+ && field_ival1==other_value.field_ival1
+ && field_ival2==other_value.field_ival2
+ && field_can__id==other_value.field_can__id
+ && field_frames==other_value.field_frames;
+}
+
+boolean SocketCAN__bcm__frame::is_bound() const
+{
+return (field_opcode.is_bound())
+ || (field_flags.is_bound())
+ || (field_count.is_bound())
+ || (field_ival1.is_bound())
+ || (field_ival2.is_bound())
+ || (field_can__id.is_bound())
+ || (field_frames.is_bound());
+}
+boolean SocketCAN__bcm__frame::is_value() const
+{
+return field_opcode.is_value()
+ && field_flags.is_value()
+ && field_count.is_value()
+ && field_ival1.is_value()
+ && field_ival2.is_value()
+ && field_can__id.is_value()
+ && field_frames.is_value();
+}
+void SocketCAN__bcm__frame::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ opcode := ");
+field_opcode.log();
+TTCN_Logger::log_event_str(", flags := ");
+field_flags.log();
+TTCN_Logger::log_event_str(", count := ");
+field_count.log();
+TTCN_Logger::log_event_str(", ival1 := ");
+field_ival1.log();
+TTCN_Logger::log_event_str(", ival2 := ");
+field_ival2.log();
+TTCN_Logger::log_event_str(", can_id := ");
+field_can__id.log();
+TTCN_Logger::log_event_str(", frames := ");
+field_frames.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void SocketCAN__bcm__frame::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 (7<param.get_size()) {
+ param.error("record value of type @Bcm.SocketCAN_bcm_frame has 7 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) opcode().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) count().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ival1().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ival2().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(5));
+ if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) frames().set_param(*param.get_elem(6));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "opcode")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ opcode().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "count")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ count().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ival1")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ival1().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ival2")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ival2().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "frames")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ frames().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Bcm.SocketCAN_bcm_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Bcm.SocketCAN_bcm_frame");
+ }
+}
+
+void SocketCAN__bcm__frame::set_implicit_omit()
+{
+if (opcode().is_bound()) opcode().set_implicit_omit();
+if (flags().is_bound()) flags().set_implicit_omit();
+if (count().is_bound()) count().set_implicit_omit();
+if (ival1().is_bound()) ival1().set_implicit_omit();
+if (ival2().is_bound()) ival2().set_implicit_omit();
+if (can__id().is_bound()) can__id().set_implicit_omit();
+if (frames().is_bound()) frames().set_implicit_omit();
+}
+
+void SocketCAN__bcm__frame::encode_text(Text_Buf& text_buf) const
+{
+field_opcode.encode_text(text_buf);
+field_flags.encode_text(text_buf);
+field_count.encode_text(text_buf);
+field_ival1.encode_text(text_buf);
+field_ival2.encode_text(text_buf);
+field_can__id.encode_text(text_buf);
+field_frames.encode_text(text_buf);
+}
+
+void SocketCAN__bcm__frame::decode_text(Text_Buf& text_buf)
+{
+field_opcode.decode_text(text_buf);
+field_flags.decode_text(text_buf);
+field_count.decode_text(text_buf);
+field_ival1.decode_text(text_buf);
+field_ival2.decode_text(text_buf);
+field_can__id.decode_text(text_buf);
+field_frames.decode_text(text_buf);
+}
+
+struct SocketCAN__bcm__frame_template::single_value_struct {
+OCTETSTRING_template field_opcode;
+BITSTRING_template field_flags;
+INTEGER_template field_count;
+Bcm__timeval_template field_ival1;
+Bcm__timeval_template field_ival2;
+OCTETSTRING_template field_can__id;
+SocketCAN__bcm__frame_frames_template field_frames;
+};
+
+void SocketCAN__bcm__frame_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_opcode = ANY_VALUE;
+single_value->field_flags = ANY_VALUE;
+single_value->field_count = ANY_VALUE;
+single_value->field_ival1 = ANY_VALUE;
+single_value->field_ival2 = ANY_VALUE;
+single_value->field_can__id = ANY_VALUE;
+single_value->field_frames = ANY_VALUE;
+}
+}
+}
+
+void SocketCAN__bcm__frame_template::copy_value(const SocketCAN__bcm__frame& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.opcode().is_bound()) {
+ single_value->field_opcode = other_value.opcode();
+} else {
+ single_value->field_opcode.clean_up();
+}
+if (other_value.flags().is_bound()) {
+ single_value->field_flags = other_value.flags();
+} else {
+ single_value->field_flags.clean_up();
+}
+if (other_value.count().is_bound()) {
+ single_value->field_count = other_value.count();
+} else {
+ single_value->field_count.clean_up();
+}
+if (other_value.ival1().is_bound()) {
+ single_value->field_ival1 = other_value.ival1();
+} else {
+ single_value->field_ival1.clean_up();
+}
+if (other_value.ival2().is_bound()) {
+ single_value->field_ival2 = other_value.ival2();
+} else {
+ single_value->field_ival2.clean_up();
+}
+if (other_value.can__id().is_bound()) {
+ single_value->field_can__id = other_value.can__id();
+} else {
+ single_value->field_can__id.clean_up();
+}
+if (other_value.frames().is_bound()) {
+ single_value->field_frames = other_value.frames();
+} else {
+ single_value->field_frames.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void SocketCAN__bcm__frame_template::copy_template(const SocketCAN__bcm__frame_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.opcode().get_selection()) {
+single_value->field_opcode = other_value.opcode();
+} else {
+single_value->field_opcode.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.flags().get_selection()) {
+single_value->field_flags = other_value.flags();
+} else {
+single_value->field_flags.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.count().get_selection()) {
+single_value->field_count = other_value.count();
+} else {
+single_value->field_count.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.ival1().get_selection()) {
+single_value->field_ival1 = other_value.ival1();
+} else {
+single_value->field_ival1.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.ival2().get_selection()) {
+single_value->field_ival2 = other_value.ival2();
+} else {
+single_value->field_ival2.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__id().get_selection()) {
+single_value->field_can__id = other_value.can__id();
+} else {
+single_value->field_can__id.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.frames().get_selection()) {
+single_value->field_frames = other_value.frames();
+} else {
+single_value->field_frames.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new SocketCAN__bcm__frame_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.");
+break;
+}
+set_selection(other_value);
+}
+
+SocketCAN__bcm__frame_template::SocketCAN__bcm__frame_template()
+{
+}
+
+SocketCAN__bcm__frame_template::SocketCAN__bcm__frame_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+SocketCAN__bcm__frame_template::SocketCAN__bcm__frame_template(const SocketCAN__bcm__frame& other_value)
+{
+copy_value(other_value);
+}
+
+SocketCAN__bcm__frame_template::SocketCAN__bcm__frame_template(const OPTIONAL<SocketCAN__bcm__frame>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Bcm.SocketCAN_bcm_frame from an unbound optional field.");
+}
+}
+
+SocketCAN__bcm__frame_template::SocketCAN__bcm__frame_template(const SocketCAN__bcm__frame_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+SocketCAN__bcm__frame_template::~SocketCAN__bcm__frame_template()
+{
+clean_up();
+}
+
+SocketCAN__bcm__frame_template& SocketCAN__bcm__frame_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_template& SocketCAN__bcm__frame_template::operator=(const SocketCAN__bcm__frame& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+SocketCAN__bcm__frame_template& SocketCAN__bcm__frame_template::operator=(const OPTIONAL<SocketCAN__bcm__frame>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const SocketCAN__bcm__frame&)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 @Bcm.SocketCAN_bcm_frame.");
+}
+return *this;
+}
+
+SocketCAN__bcm__frame_template& SocketCAN__bcm__frame_template::operator=(const SocketCAN__bcm__frame_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean SocketCAN__bcm__frame_template::match(const SocketCAN__bcm__frame& 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.opcode().is_bound()) return FALSE;
+if(!single_value->field_opcode.match(other_value.opcode(), legacy))return FALSE;
+if(!other_value.flags().is_bound()) return FALSE;
+if(!single_value->field_flags.match(other_value.flags(), legacy))return FALSE;
+if(!other_value.count().is_bound()) return FALSE;
+if(!single_value->field_count.match(other_value.count(), legacy))return FALSE;
+if(!other_value.ival1().is_bound()) return FALSE;
+if(!single_value->field_ival1.match(other_value.ival1(), legacy))return FALSE;
+if(!other_value.ival2().is_bound()) return FALSE;
+if(!single_value->field_ival2.match(other_value.ival2(), legacy))return FALSE;
+if(!other_value.can__id().is_bound()) return FALSE;
+if(!single_value->field_can__id.match(other_value.can__id(), legacy))return FALSE;
+if(!other_value.frames().is_bound()) return FALSE;
+if(!single_value->field_frames.match(other_value.frames(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.");
+}
+return FALSE;
+}
+
+boolean SocketCAN__bcm__frame_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_opcode.is_bound()
+
+ ||single_value->field_flags.is_bound()
+
+ ||single_value->field_count.is_bound()
+
+ ||single_value->field_ival1.is_bound()
+
+ ||single_value->field_ival2.is_bound()
+
+ ||single_value->field_can__id.is_bound()
+
+ ||single_value->field_frames.is_bound()
+;
+}
+
+boolean SocketCAN__bcm__frame_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_opcode.is_value()
+ &&single_value->field_flags.is_value()
+ &&single_value->field_count.is_value()
+ &&single_value->field_ival1.is_value()
+ &&single_value->field_ival2.is_value()
+ &&single_value->field_can__id.is_value()
+ &&single_value->field_frames.is_value();
+}
+
+void SocketCAN__bcm__frame_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+SocketCAN__bcm__frame SocketCAN__bcm__frame_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 @Bcm.SocketCAN_bcm_frame.");
+SocketCAN__bcm__frame ret_val;
+if (single_value->field_opcode.is_bound()) {
+ret_val.opcode() = single_value->field_opcode.valueof();
+}
+if (single_value->field_flags.is_bound()) {
+ret_val.flags() = single_value->field_flags.valueof();
+}
+if (single_value->field_count.is_bound()) {
+ret_val.count() = single_value->field_count.valueof();
+}
+if (single_value->field_ival1.is_bound()) {
+ret_val.ival1() = single_value->field_ival1.valueof();
+}
+if (single_value->field_ival2.is_bound()) {
+ret_val.ival2() = single_value->field_ival2.valueof();
+}
+if (single_value->field_can__id.is_bound()) {
+ret_val.can__id() = single_value->field_can__id.valueof();
+}
+if (single_value->field_frames.is_bound()) {
+ret_val.frames() = single_value->field_frames.valueof();
+}
+return ret_val;
+}
+
+void SocketCAN__bcm__frame_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Bcm.SocketCAN_bcm_frame.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new SocketCAN__bcm__frame_template[list_length];
+}
+
+SocketCAN__bcm__frame_template& SocketCAN__bcm__frame_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Bcm.SocketCAN_bcm_frame.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Bcm.SocketCAN_bcm_frame.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& SocketCAN__bcm__frame_template::opcode()
+{
+set_specific();
+return single_value->field_opcode;
+}
+
+const OCTETSTRING_template& SocketCAN__bcm__frame_template::opcode() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field opcode of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_opcode;
+}
+
+BITSTRING_template& SocketCAN__bcm__frame_template::flags()
+{
+set_specific();
+return single_value->field_flags;
+}
+
+const BITSTRING_template& SocketCAN__bcm__frame_template::flags() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field flags of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_flags;
+}
+
+INTEGER_template& SocketCAN__bcm__frame_template::count()
+{
+set_specific();
+return single_value->field_count;
+}
+
+const INTEGER_template& SocketCAN__bcm__frame_template::count() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field count of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_count;
+}
+
+Bcm__timeval_template& SocketCAN__bcm__frame_template::ival1()
+{
+set_specific();
+return single_value->field_ival1;
+}
+
+const Bcm__timeval_template& SocketCAN__bcm__frame_template::ival1() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ival1 of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_ival1;
+}
+
+Bcm__timeval_template& SocketCAN__bcm__frame_template::ival2()
+{
+set_specific();
+return single_value->field_ival2;
+}
+
+const Bcm__timeval_template& SocketCAN__bcm__frame_template::ival2() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ival2 of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_ival2;
+}
+
+OCTETSTRING_template& SocketCAN__bcm__frame_template::can__id()
+{
+set_specific();
+return single_value->field_can__id;
+}
+
+const OCTETSTRING_template& SocketCAN__bcm__frame_template::can__id() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_id of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_can__id;
+}
+
+SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_template::frames()
+{
+set_specific();
+return single_value->field_frames;
+}
+
+const SocketCAN__bcm__frame_frames_template& SocketCAN__bcm__frame_template::frames() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field frames of a non-specific template of type @Bcm.SocketCAN_bcm_frame.");
+return single_value->field_frames;
+}
+
+int SocketCAN__bcm__frame_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Bcm.SocketCAN_bcm_frame which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 7;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Bcm.SocketCAN_bcm_frame 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 @Bcm.SocketCAN_bcm_frame containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.SocketCAN_bcm_frame containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.SocketCAN_bcm_frame containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Bcm.SocketCAN_bcm_frame containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Bcm.SocketCAN_bcm_frame.");
+ }
+ return 0;
+}
+
+void SocketCAN__bcm__frame_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ opcode := ");
+single_value->field_opcode.log();
+TTCN_Logger::log_event_str(", flags := ");
+single_value->field_flags.log();
+TTCN_Logger::log_event_str(", count := ");
+single_value->field_count.log();
+TTCN_Logger::log_event_str(", ival1 := ");
+single_value->field_ival1.log();
+TTCN_Logger::log_event_str(", ival2 := ");
+single_value->field_ival2.log();
+TTCN_Logger::log_event_str(", can_id := ");
+single_value->field_can__id.log();
+TTCN_Logger::log_event_str(", frames := ");
+single_value->field_frames.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void SocketCAN__bcm__frame_template::log_match(const SocketCAN__bcm__frame& 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_opcode.match(match_value.opcode(), legacy)){
+TTCN_Logger::log_logmatch_info(".opcode");
+single_value->field_opcode.log_match(match_value.opcode(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_flags.match(match_value.flags(), legacy)){
+TTCN_Logger::log_logmatch_info(".flags");
+single_value->field_flags.log_match(match_value.flags(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_count.match(match_value.count(), legacy)){
+TTCN_Logger::log_logmatch_info(".count");
+single_value->field_count.log_match(match_value.count(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_ival1.match(match_value.ival1(), legacy)){
+TTCN_Logger::log_logmatch_info(".ival1");
+single_value->field_ival1.log_match(match_value.ival1(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_ival2.match(match_value.ival2(), legacy)){
+TTCN_Logger::log_logmatch_info(".ival2");
+single_value->field_ival2.log_match(match_value.ival2(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__id.match(match_value.can__id(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_id");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_frames.match(match_value.frames(), legacy)){
+TTCN_Logger::log_logmatch_info(".frames");
+single_value->field_frames.log_match(match_value.frames(), legacy);
+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("{ opcode := ");
+single_value->field_opcode.log_match(match_value.opcode(), legacy);
+TTCN_Logger::log_event_str(", flags := ");
+single_value->field_flags.log_match(match_value.flags(), legacy);
+TTCN_Logger::log_event_str(", count := ");
+single_value->field_count.log_match(match_value.count(), legacy);
+TTCN_Logger::log_event_str(", ival1 := ");
+single_value->field_ival1.log_match(match_value.ival1(), legacy);
+TTCN_Logger::log_event_str(", ival2 := ");
+single_value->field_ival2.log_match(match_value.ival2(), legacy);
+TTCN_Logger::log_event_str(", can_id := ");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::log_event_str(", frames := ");
+single_value->field_frames.log_match(match_value.frames(), legacy);
+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 SocketCAN__bcm__frame_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_opcode.encode_text(text_buf);
+single_value->field_flags.encode_text(text_buf);
+single_value->field_count.encode_text(text_buf);
+single_value->field_ival1.encode_text(text_buf);
+single_value->field_ival2.encode_text(text_buf);
+single_value->field_can__id.encode_text(text_buf);
+single_value->field_frames.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 @Bcm.SocketCAN_bcm_frame.");
+}
+}
+
+void SocketCAN__bcm__frame_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_opcode.decode_text(text_buf);
+single_value->field_flags.decode_text(text_buf);
+single_value->field_count.decode_text(text_buf);
+single_value->field_ival1.decode_text(text_buf);
+single_value->field_ival2.decode_text(text_buf);
+single_value->field_can__id.decode_text(text_buf);
+single_value->field_frames.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 SocketCAN__bcm__frame_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 @Bcm.SocketCAN_bcm_frame.");
+}
+}
+
+void SocketCAN__bcm__frame_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: {
+ SocketCAN__bcm__frame_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (7<param.get_size()) {
+ param.error("record template of type @Bcm.SocketCAN_bcm_frame has 7 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) opcode().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) count().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ival1().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ival2().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(5));
+ if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) frames().set_param(*param.get_elem(6));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "opcode")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ opcode().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "count")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ count().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ival1")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ival1().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ival2")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ival2().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "frames")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ frames().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Bcm.SocketCAN_bcm_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Bcm.SocketCAN_bcm_frame");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void SocketCAN__bcm__frame_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_opcode.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_flags.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_count.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_ival1.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_ival2.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_can__id.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+single_value->field_frames.check_restriction(t_res, t_name ? t_name : "@Bcm.SocketCAN_bcm_frame");
+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 : "@Bcm.SocketCAN_bcm_frame");
+}
+
+boolean SocketCAN__bcm__frame_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean SocketCAN__bcm__frame_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+
+/* Bodies of functions, altsteps and testcases */
+
+boolean operator==(null_type, const SocketCAN__bcm__frame_frames_can__frame& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.can_frame.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const SocketCAN__bcm__frame_frames_canfd__frame& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @Bcm.SocketCAN_bcm_frame.frames.canfd_frame.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("../src/Bcm.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Bcm");
+Can::module_object.pre_init_module();
+current_location.update_lineno(19);
+#line 19 "../src/Bcm.ttcn"
+const_CAN__FRAME__MAX__NUMBER = 256;
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("../src/Bcm.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Bcm");
+Can::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/Bcm.d b/demo/Bcm.d
new file mode 100644
index 0000000..fafa54c
--- /dev/null
+++ b/demo/Bcm.d
@@ -0,0 +1,59 @@
+Bcm.o Bcm.d : Bcm.cc Bcm.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh Can.hh \
+ General_Types.hh
diff --git a/demo/Bcm.hh b/demo/Bcm.hh
new file mode 100644
index 0000000..a5a75bd
--- /dev/null
+++ b/demo/Bcm.hh
@@ -0,0 +1,945 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef Bcm_HH
+#define Bcm_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "Can.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef Bcm_HH
+#endif
+
+namespace Bcm {
+
+/* Forward declarations of classes */
+
+class BcmFlagsBitIndex__enum;
+class BcmFlagsBitIndex__enum_template;
+class BcmFlags__enum;
+class BcmFlags__enum_template;
+class BcmOpcode__enum;
+class BcmOpcode__enum_template;
+class Bcm__timeval;
+class Bcm__timeval_template;
+class SocketCAN__bcm__frame_frames;
+class SocketCAN__bcm__frame_frames_template;
+class SocketCAN__bcm__frame_frames_can__frame;
+class SocketCAN__bcm__frame_frames_can__frame_template;
+class SocketCAN__bcm__frame_frames_canfd__frame;
+class SocketCAN__bcm__frame_frames_canfd__frame_template;
+class SocketCAN__bcm__frame;
+class SocketCAN__bcm__frame_template;
+
+} /* end of namespace */
+
+#ifndef Bcm_HH
+#define Bcm_HH
+
+namespace Bcm {
+
+/* Type definitions */
+
+typedef INTEGER Bcm__long;
+typedef INTEGER_template Bcm__long_template;
+
+/* Class definitions */
+
+class BcmFlagsBitIndex__enum : public Base_Type { // enum
+friend class BcmFlagsBitIndex__enum_template;
+public:
+enum enum_type { e__CAN__BCM__SETTIMER__BITINDEX = 0, e__CAN__BCM__STARTTIMER__BITINDEX = 1, e__CAN__BCM__TX__COUNTEVT__BITINDEX = 2, e__CAN__BCM__TX__ANNOUNCE__BITINDEX = 3, e__CAN__BCM__TX__CP__CAN__ID__BITINDEX = 4, e__CAN__BCM__RX__FILTER__ID__BITINDEX = 5, e__CAN__BCM__RX__CHECK__DLC__BITINDEX = 6, e__CAN__BCM__RX__NO__AUTOTIMER__BITINDEX = 7, e__CAN__BCM__RX__ANNOUNCE__RESUME__BITINDEX = 8, e__CAN__BCM__TX__RESET__MULTI__IDX__BITINDEX = 9, e__CAN__BCM__RX__RTR__FRAME__BITINDEX = 10, UNKNOWN_VALUE = 11, UNBOUND_VALUE = 12 };
+private:
+enum_type enum_value;
+
+public:
+BcmFlagsBitIndex__enum();
+BcmFlagsBitIndex__enum(int other_value);
+BcmFlagsBitIndex__enum(enum_type other_value);
+BcmFlagsBitIndex__enum(const BcmFlagsBitIndex__enum& other_value);
+
+BcmFlagsBitIndex__enum& operator=(int other_value);
+BcmFlagsBitIndex__enum& operator=(enum_type other_value);
+BcmFlagsBitIndex__enum& operator=(const BcmFlagsBitIndex__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const BcmFlagsBitIndex__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const BcmFlagsBitIndex__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const BcmFlagsBitIndex__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const BcmFlagsBitIndex__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const BcmFlagsBitIndex__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const BcmFlagsBitIndex__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const BcmFlagsBitIndex__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class BcmFlagsBitIndex__enum_template : public Base_Template {
+union {
+BcmFlagsBitIndex__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+BcmFlagsBitIndex__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const BcmFlagsBitIndex__enum_template& other_value);
+
+public:
+BcmFlagsBitIndex__enum_template();
+BcmFlagsBitIndex__enum_template(template_sel other_value);
+BcmFlagsBitIndex__enum_template(int other_value);
+BcmFlagsBitIndex__enum_template(BcmFlagsBitIndex__enum::enum_type other_value);
+BcmFlagsBitIndex__enum_template(const BcmFlagsBitIndex__enum& other_value);
+BcmFlagsBitIndex__enum_template(const OPTIONAL<BcmFlagsBitIndex__enum>& other_value);
+BcmFlagsBitIndex__enum_template(const BcmFlagsBitIndex__enum_template& other_value);
+~BcmFlagsBitIndex__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+BcmFlagsBitIndex__enum_template& operator=(template_sel other_value);
+BcmFlagsBitIndex__enum_template& operator=(int other_value);
+BcmFlagsBitIndex__enum_template& operator=(BcmFlagsBitIndex__enum::enum_type other_value);
+BcmFlagsBitIndex__enum_template& operator=(const BcmFlagsBitIndex__enum& other_value);
+BcmFlagsBitIndex__enum_template& operator=(const OPTIONAL<BcmFlagsBitIndex__enum>& other_value);
+BcmFlagsBitIndex__enum_template& operator=(const BcmFlagsBitIndex__enum_template& other_value);
+
+boolean match(BcmFlagsBitIndex__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const BcmFlagsBitIndex__enum& other_value, boolean legacy = FALSE) const;
+BcmFlagsBitIndex__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+BcmFlagsBitIndex__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const BcmFlagsBitIndex__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class BcmFlags__enum : public Base_Type { // enum
+friend class BcmFlags__enum_template;
+public:
+enum enum_type { e__CAN__BCM__SETTIMER = 1, e__CAN__BCM__STARTTIMER = 2, e__CAN__BCM__TX__COUNTEVT = 4, e__CAN__BCM__TX__ANNOUNCE = 8, e__CAN__BCM__TX__CP__CAN__ID = 16, e__CAN__BCM__RX__FILTER__ID = 32, e__CAN__BCM__RX__CHECK__DLC = 64, e__CAN__BCM__RX__NO__AUTOTIMER = 128, e__CAN__BCM__RX__ANNOUNCE__RESUME = 256, e__CAN__BCM__TX__RESET__MULTI__IDX = 512, e__CAN__BCM__RX__RTR__FRAME = 1024, UNKNOWN_VALUE = 0, UNBOUND_VALUE = 3 };
+private:
+enum_type enum_value;
+
+public:
+BcmFlags__enum();
+BcmFlags__enum(int other_value);
+BcmFlags__enum(enum_type other_value);
+BcmFlags__enum(const BcmFlags__enum& other_value);
+
+BcmFlags__enum& operator=(int other_value);
+BcmFlags__enum& operator=(enum_type other_value);
+BcmFlags__enum& operator=(const BcmFlags__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const BcmFlags__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const BcmFlags__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const BcmFlags__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const BcmFlags__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const BcmFlags__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const BcmFlags__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const BcmFlags__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class BcmFlags__enum_template : public Base_Template {
+union {
+BcmFlags__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+BcmFlags__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const BcmFlags__enum_template& other_value);
+
+public:
+BcmFlags__enum_template();
+BcmFlags__enum_template(template_sel other_value);
+BcmFlags__enum_template(int other_value);
+BcmFlags__enum_template(BcmFlags__enum::enum_type other_value);
+BcmFlags__enum_template(const BcmFlags__enum& other_value);
+BcmFlags__enum_template(const OPTIONAL<BcmFlags__enum>& other_value);
+BcmFlags__enum_template(const BcmFlags__enum_template& other_value);
+~BcmFlags__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+BcmFlags__enum_template& operator=(template_sel other_value);
+BcmFlags__enum_template& operator=(int other_value);
+BcmFlags__enum_template& operator=(BcmFlags__enum::enum_type other_value);
+BcmFlags__enum_template& operator=(const BcmFlags__enum& other_value);
+BcmFlags__enum_template& operator=(const OPTIONAL<BcmFlags__enum>& other_value);
+BcmFlags__enum_template& operator=(const BcmFlags__enum_template& other_value);
+
+boolean match(BcmFlags__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const BcmFlags__enum& other_value, boolean legacy = FALSE) const;
+BcmFlags__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+BcmFlags__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const BcmFlags__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class BcmOpcode__enum : public Base_Type { // enum
+friend class BcmOpcode__enum_template;
+public:
+enum enum_type { e__CAN__BCM__TX__SETUP = 1, e__CAN__BCM__TX__DELETE = 2, e__CAN__BCM__TX__READ = 3, e__CAN__BCM__TX__SEND = 4, e__CAN__BCM__RX__SETUP = 5, e__CAN__BCM__RX__DELETE = 6, e__CAN__BCM__RX__READ = 7, e__CAN__BCM__TX__STATUS = 8, e__CAN__BCM__TX__EXPIRED = 9, e__CAN__BCM__RX__STATUS = 10, e__CAN__BCM__RX__TIMEOUT = 11, e__CAN__BCM__RX__CHANGED = 12, UNKNOWN_VALUE = 0, UNBOUND_VALUE = 13 };
+private:
+enum_type enum_value;
+
+public:
+BcmOpcode__enum();
+BcmOpcode__enum(int other_value);
+BcmOpcode__enum(enum_type other_value);
+BcmOpcode__enum(const BcmOpcode__enum& other_value);
+
+BcmOpcode__enum& operator=(int other_value);
+BcmOpcode__enum& operator=(enum_type other_value);
+BcmOpcode__enum& operator=(const BcmOpcode__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const BcmOpcode__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const BcmOpcode__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const BcmOpcode__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const BcmOpcode__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const BcmOpcode__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const BcmOpcode__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const BcmOpcode__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class BcmOpcode__enum_template : public Base_Template {
+union {
+BcmOpcode__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+BcmOpcode__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const BcmOpcode__enum_template& other_value);
+
+public:
+BcmOpcode__enum_template();
+BcmOpcode__enum_template(template_sel other_value);
+BcmOpcode__enum_template(int other_value);
+BcmOpcode__enum_template(BcmOpcode__enum::enum_type other_value);
+BcmOpcode__enum_template(const BcmOpcode__enum& other_value);
+BcmOpcode__enum_template(const OPTIONAL<BcmOpcode__enum>& other_value);
+BcmOpcode__enum_template(const BcmOpcode__enum_template& other_value);
+~BcmOpcode__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+BcmOpcode__enum_template& operator=(template_sel other_value);
+BcmOpcode__enum_template& operator=(int other_value);
+BcmOpcode__enum_template& operator=(BcmOpcode__enum::enum_type other_value);
+BcmOpcode__enum_template& operator=(const BcmOpcode__enum& other_value);
+BcmOpcode__enum_template& operator=(const OPTIONAL<BcmOpcode__enum>& other_value);
+BcmOpcode__enum_template& operator=(const BcmOpcode__enum_template& other_value);
+
+boolean match(BcmOpcode__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const BcmOpcode__enum& other_value, boolean legacy = FALSE) const;
+BcmOpcode__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+BcmOpcode__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const BcmOpcode__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class Bcm__timeval {
+ INTEGER field_tv__sec;
+ INTEGER field_tv__usec;
+public:
+ Bcm__timeval();
+ Bcm__timeval(const INTEGER& par_tv__sec,
+ const INTEGER& par_tv__usec);
+ Bcm__timeval(const Bcm__timeval& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ Bcm__timeval& operator=(const Bcm__timeval& other_value);
+ boolean operator==(const Bcm__timeval& other_value) const;
+ inline boolean operator!=(const Bcm__timeval& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline INTEGER& tv__sec()
+ {return field_tv__sec;}
+ inline const INTEGER& tv__sec() const
+ {return field_tv__sec;}
+ inline INTEGER& tv__usec()
+ {return field_tv__usec;}
+ inline const INTEGER& tv__usec() const
+ {return field_tv__usec;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+};
+
+class Bcm__timeval_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+Bcm__timeval_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const Bcm__timeval& other_value);
+void copy_template(const Bcm__timeval_template& other_value);
+
+public:
+Bcm__timeval_template();
+Bcm__timeval_template(template_sel other_value);
+Bcm__timeval_template(const Bcm__timeval& other_value);
+Bcm__timeval_template(const OPTIONAL<Bcm__timeval>& other_value);
+Bcm__timeval_template(const Bcm__timeval_template& other_value);
+~Bcm__timeval_template();
+Bcm__timeval_template& operator=(template_sel other_value);
+Bcm__timeval_template& operator=(const Bcm__timeval& other_value);
+Bcm__timeval_template& operator=(const OPTIONAL<Bcm__timeval>& other_value);
+Bcm__timeval_template& operator=(const Bcm__timeval_template& other_value);
+boolean match(const Bcm__timeval& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+Bcm__timeval valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+Bcm__timeval_template& list_item(unsigned int list_index) const;
+INTEGER_template& tv__sec();
+const INTEGER_template& tv__sec() const;
+INTEGER_template& tv__usec();
+const INTEGER_template& tv__usec() const;
+int size_of() const;
+void log() const;
+void log_match(const Bcm__timeval& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class SocketCAN__bcm__frame_frames : public Base_Type {
+public:
+enum union_selection_type { UNBOUND_VALUE = 0, ALT_can__frame = 1, ALT_canfd__frame = 2 };
+private:
+union_selection_type union_selection;
+union {
+SocketCAN__bcm__frame_frames_can__frame *field_can__frame;
+SocketCAN__bcm__frame_frames_canfd__frame *field_canfd__frame;
+};
+void copy_value(const SocketCAN__bcm__frame_frames& other_value);
+
+public:
+SocketCAN__bcm__frame_frames();
+SocketCAN__bcm__frame_frames(const SocketCAN__bcm__frame_frames& other_value);
+~SocketCAN__bcm__frame_frames();
+SocketCAN__bcm__frame_frames& operator=(const SocketCAN__bcm__frame_frames& other_value);
+boolean operator==(const SocketCAN__bcm__frame_frames& other_value) const;
+inline boolean operator!=(const SocketCAN__bcm__frame_frames& other_value) const { return !(*this == other_value); }
+SocketCAN__bcm__frame_frames_can__frame& can__frame();
+const SocketCAN__bcm__frame_frames_can__frame& can__frame() const;
+SocketCAN__bcm__frame_frames_canfd__frame& canfd__frame();
+const SocketCAN__bcm__frame_frames_canfd__frame& canfd__frame() const;
+inline union_selection_type get_selection() const { return union_selection; }
+boolean ischosen(union_selection_type checked_selection) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class SocketCAN__bcm__frame_frames_template : public Base_Template {
+union {
+struct {
+SocketCAN__bcm__frame_frames::union_selection_type union_selection;
+union {
+SocketCAN__bcm__frame_frames_can__frame_template *field_can__frame;
+SocketCAN__bcm__frame_frames_canfd__frame_template *field_canfd__frame;
+};
+} single_value;
+struct {
+unsigned int n_values;
+SocketCAN__bcm__frame_frames_template *list_value;
+} value_list;
+};
+void copy_value(const SocketCAN__bcm__frame_frames& other_value);
+
+void copy_template(const SocketCAN__bcm__frame_frames_template& other_value);
+
+public:
+SocketCAN__bcm__frame_frames_template();
+SocketCAN__bcm__frame_frames_template(template_sel other_value);
+SocketCAN__bcm__frame_frames_template(const SocketCAN__bcm__frame_frames& other_value);
+SocketCAN__bcm__frame_frames_template(const OPTIONAL<SocketCAN__bcm__frame_frames>& other_value);
+SocketCAN__bcm__frame_frames_template(const SocketCAN__bcm__frame_frames_template& other_value);
+~SocketCAN__bcm__frame_frames_template();
+void clean_up();
+SocketCAN__bcm__frame_frames_template& operator=(template_sel other_value);
+SocketCAN__bcm__frame_frames_template& operator=(const SocketCAN__bcm__frame_frames& other_value);
+SocketCAN__bcm__frame_frames_template& operator=(const OPTIONAL<SocketCAN__bcm__frame_frames>& other_value);
+SocketCAN__bcm__frame_frames_template& operator=(const SocketCAN__bcm__frame_frames_template& other_value);
+boolean match(const SocketCAN__bcm__frame_frames& other_value, boolean legacy = FALSE) const;
+boolean is_value() const;SocketCAN__bcm__frame_frames valueof() const;
+SocketCAN__bcm__frame_frames_template& list_item(unsigned int list_index) const;
+void set_type(template_sel template_type, unsigned int list_length);
+SocketCAN__bcm__frame_frames_can__frame_template& can__frame();
+const SocketCAN__bcm__frame_frames_can__frame_template& can__frame() const;
+SocketCAN__bcm__frame_frames_canfd__frame_template& canfd__frame();
+const SocketCAN__bcm__frame_frames_canfd__frame_template& canfd__frame() const;
+boolean ischosen(SocketCAN__bcm__frame_frames::union_selection_type checked_selection) const;
+void log() const;
+void log_match(const SocketCAN__bcm__frame_frames& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class SocketCAN__bcm__frame_frames_can__frame : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+Can::CAN__frame **value_elements;
+} *val_ptr;
+
+static const Can::CAN__frame UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const SocketCAN__bcm__frame_frames_can__frame& other_value);
+
+public:
+ typedef Can::CAN__frame of_type;
+SocketCAN__bcm__frame_frames_can__frame();
+SocketCAN__bcm__frame_frames_can__frame(null_type other_value);
+SocketCAN__bcm__frame_frames_can__frame(const SocketCAN__bcm__frame_frames_can__frame& other_value);
+~SocketCAN__bcm__frame_frames_can__frame();
+
+void clean_up();
+SocketCAN__bcm__frame_frames_can__frame& operator=(null_type other_value);
+SocketCAN__bcm__frame_frames_can__frame& operator=(const SocketCAN__bcm__frame_frames_can__frame& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const SocketCAN__bcm__frame_frames_can__frame& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const SocketCAN__bcm__frame_frames_can__frame& other_value) const { return !(*this == other_value); }
+
+Can::CAN__frame& operator[](int index_value);
+Can::CAN__frame& operator[](const INTEGER& index_value);
+const Can::CAN__frame& operator[](int index_value) const;
+const Can::CAN__frame& operator[](const INTEGER& index_value) const;
+
+SocketCAN__bcm__frame_frames_can__frame operator<<=(int rotate_count) const;
+SocketCAN__bcm__frame_frames_can__frame operator<<=(const INTEGER& rotate_count) const;
+SocketCAN__bcm__frame_frames_can__frame operator>>=(int rotate_count) const;
+SocketCAN__bcm__frame_frames_can__frame operator>>=(const INTEGER& rotate_count) const;
+
+SocketCAN__bcm__frame_frames_can__frame operator+(const SocketCAN__bcm__frame_frames_can__frame& other_value) const;
+
+SocketCAN__bcm__frame_frames_can__frame substr(int index, int returncount) const;
+
+SocketCAN__bcm__frame_frames_can__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame& repl) const;
+
+SocketCAN__bcm__frame_frames_can__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class SocketCAN__bcm__frame_frames_can__frame_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+Can::CAN__frame_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+SocketCAN__bcm__frame_frames_can__frame_template *list_value;
+} value_list;
+};
+void copy_value(const SocketCAN__bcm__frame_frames_can__frame& other_value);
+void copy_template(const SocketCAN__bcm__frame_frames_can__frame_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+SocketCAN__bcm__frame_frames_can__frame_template();
+SocketCAN__bcm__frame_frames_can__frame_template(template_sel other_value);
+SocketCAN__bcm__frame_frames_can__frame_template(null_type other_value);
+SocketCAN__bcm__frame_frames_can__frame_template(const SocketCAN__bcm__frame_frames_can__frame& other_value);
+SocketCAN__bcm__frame_frames_can__frame_template(const OPTIONAL<SocketCAN__bcm__frame_frames_can__frame>& other_value);
+SocketCAN__bcm__frame_frames_can__frame_template(const SocketCAN__bcm__frame_frames_can__frame_template& other_value);
+~SocketCAN__bcm__frame_frames_can__frame_template();
+
+void clean_up();
+SocketCAN__bcm__frame_frames_can__frame_template& operator=(template_sel other_value);
+SocketCAN__bcm__frame_frames_can__frame_template& operator=(null_type other_value);
+SocketCAN__bcm__frame_frames_can__frame_template& operator=(const SocketCAN__bcm__frame_frames_can__frame& other_value);
+SocketCAN__bcm__frame_frames_can__frame_template& operator=(const OPTIONAL<SocketCAN__bcm__frame_frames_can__frame>& other_value);
+SocketCAN__bcm__frame_frames_can__frame_template& operator=(const SocketCAN__bcm__frame_frames_can__frame_template& other_value);
+
+Can::CAN__frame_template& operator[](int index_value);
+Can::CAN__frame_template& operator[](const INTEGER& index_value);
+const Can::CAN__frame_template& operator[](int index_value) const;
+const Can::CAN__frame_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const SocketCAN__bcm__frame_frames_can__frame& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+SocketCAN__bcm__frame_frames_can__frame valueof() const;
+SocketCAN__bcm__frame_frames_can__frame substr(int index, int returncount) const;
+
+SocketCAN__bcm__frame_frames_can__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame_template& repl) const;
+
+SocketCAN__bcm__frame_frames_can__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_can__frame& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+SocketCAN__bcm__frame_frames_can__frame_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const SocketCAN__bcm__frame_frames_can__frame& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class SocketCAN__bcm__frame_frames_canfd__frame : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+Can::CANFD__frame **value_elements;
+} *val_ptr;
+
+static const Can::CANFD__frame UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+
+public:
+ typedef Can::CANFD__frame of_type;
+SocketCAN__bcm__frame_frames_canfd__frame();
+SocketCAN__bcm__frame_frames_canfd__frame(null_type other_value);
+SocketCAN__bcm__frame_frames_canfd__frame(const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+~SocketCAN__bcm__frame_frames_canfd__frame();
+
+void clean_up();
+SocketCAN__bcm__frame_frames_canfd__frame& operator=(null_type other_value);
+SocketCAN__bcm__frame_frames_canfd__frame& operator=(const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const SocketCAN__bcm__frame_frames_canfd__frame& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const SocketCAN__bcm__frame_frames_canfd__frame& other_value) const { return !(*this == other_value); }
+
+Can::CANFD__frame& operator[](int index_value);
+Can::CANFD__frame& operator[](const INTEGER& index_value);
+const Can::CANFD__frame& operator[](int index_value) const;
+const Can::CANFD__frame& operator[](const INTEGER& index_value) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame operator<<=(int rotate_count) const;
+SocketCAN__bcm__frame_frames_canfd__frame operator<<=(const INTEGER& rotate_count) const;
+SocketCAN__bcm__frame_frames_canfd__frame operator>>=(int rotate_count) const;
+SocketCAN__bcm__frame_frames_canfd__frame operator>>=(const INTEGER& rotate_count) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame operator+(const SocketCAN__bcm__frame_frames_canfd__frame& other_value) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame substr(int index, int returncount) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame& repl) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class SocketCAN__bcm__frame_frames_canfd__frame_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+Can::CANFD__frame_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+SocketCAN__bcm__frame_frames_canfd__frame_template *list_value;
+} value_list;
+};
+void copy_value(const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+void copy_template(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+SocketCAN__bcm__frame_frames_canfd__frame_template();
+SocketCAN__bcm__frame_frames_canfd__frame_template(template_sel other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template(null_type other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template(const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template(const OPTIONAL<SocketCAN__bcm__frame_frames_canfd__frame>& other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value);
+~SocketCAN__bcm__frame_frames_canfd__frame_template();
+
+void clean_up();
+SocketCAN__bcm__frame_frames_canfd__frame_template& operator=(template_sel other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template& operator=(null_type other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template& operator=(const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template& operator=(const OPTIONAL<SocketCAN__bcm__frame_frames_canfd__frame>& other_value);
+SocketCAN__bcm__frame_frames_canfd__frame_template& operator=(const SocketCAN__bcm__frame_frames_canfd__frame_template& other_value);
+
+Can::CANFD__frame_template& operator[](int index_value);
+Can::CANFD__frame_template& operator[](const INTEGER& index_value);
+const Can::CANFD__frame_template& operator[](int index_value) const;
+const Can::CANFD__frame_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const SocketCAN__bcm__frame_frames_canfd__frame& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+SocketCAN__bcm__frame_frames_canfd__frame valueof() const;
+SocketCAN__bcm__frame_frames_canfd__frame substr(int index, int returncount) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame_template& repl) const;
+
+SocketCAN__bcm__frame_frames_canfd__frame replace(int index, int len, const SocketCAN__bcm__frame_frames_canfd__frame& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+SocketCAN__bcm__frame_frames_canfd__frame_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const SocketCAN__bcm__frame_frames_canfd__frame& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class SocketCAN__bcm__frame {
+ OCTETSTRING field_opcode;
+ BITSTRING field_flags;
+ INTEGER field_count;
+ Bcm__timeval field_ival1;
+ Bcm__timeval field_ival2;
+ OCTETSTRING field_can__id;
+ SocketCAN__bcm__frame_frames field_frames;
+public:
+ SocketCAN__bcm__frame();
+ SocketCAN__bcm__frame(const OCTETSTRING& par_opcode,
+ const BITSTRING& par_flags,
+ const INTEGER& par_count,
+ const Bcm__timeval& par_ival1,
+ const Bcm__timeval& par_ival2,
+ const OCTETSTRING& par_can__id,
+ const SocketCAN__bcm__frame_frames& par_frames);
+ SocketCAN__bcm__frame(const SocketCAN__bcm__frame& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ SocketCAN__bcm__frame& operator=(const SocketCAN__bcm__frame& other_value);
+ boolean operator==(const SocketCAN__bcm__frame& other_value) const;
+ inline boolean operator!=(const SocketCAN__bcm__frame& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& opcode()
+ {return field_opcode;}
+ inline const OCTETSTRING& opcode() const
+ {return field_opcode;}
+ inline BITSTRING& flags()
+ {return field_flags;}
+ inline const BITSTRING& flags() const
+ {return field_flags;}
+ inline INTEGER& count()
+ {return field_count;}
+ inline const INTEGER& count() const
+ {return field_count;}
+ inline Bcm__timeval& ival1()
+ {return field_ival1;}
+ inline const Bcm__timeval& ival1() const
+ {return field_ival1;}
+ inline Bcm__timeval& ival2()
+ {return field_ival2;}
+ inline const Bcm__timeval& ival2() const
+ {return field_ival2;}
+ inline OCTETSTRING& can__id()
+ {return field_can__id;}
+ inline const OCTETSTRING& can__id() const
+ {return field_can__id;}
+ inline SocketCAN__bcm__frame_frames& frames()
+ {return field_frames;}
+ inline const SocketCAN__bcm__frame_frames& frames() const
+ {return field_frames;}
+ inline int size_of() const
+ {return 7;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+};
+
+class SocketCAN__bcm__frame_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+SocketCAN__bcm__frame_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const SocketCAN__bcm__frame& other_value);
+void copy_template(const SocketCAN__bcm__frame_template& other_value);
+
+public:
+SocketCAN__bcm__frame_template();
+SocketCAN__bcm__frame_template(template_sel other_value);
+SocketCAN__bcm__frame_template(const SocketCAN__bcm__frame& other_value);
+SocketCAN__bcm__frame_template(const OPTIONAL<SocketCAN__bcm__frame>& other_value);
+SocketCAN__bcm__frame_template(const SocketCAN__bcm__frame_template& other_value);
+~SocketCAN__bcm__frame_template();
+SocketCAN__bcm__frame_template& operator=(template_sel other_value);
+SocketCAN__bcm__frame_template& operator=(const SocketCAN__bcm__frame& other_value);
+SocketCAN__bcm__frame_template& operator=(const OPTIONAL<SocketCAN__bcm__frame>& other_value);
+SocketCAN__bcm__frame_template& operator=(const SocketCAN__bcm__frame_template& other_value);
+boolean match(const SocketCAN__bcm__frame& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+SocketCAN__bcm__frame valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+SocketCAN__bcm__frame_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& opcode();
+const OCTETSTRING_template& opcode() const;
+BITSTRING_template& flags();
+const BITSTRING_template& flags() const;
+INTEGER_template& count();
+const INTEGER_template& count() const;
+Bcm__timeval_template& ival1();
+const Bcm__timeval_template& ival1() const;
+Bcm__timeval_template& ival2();
+const Bcm__timeval_template& ival2() const;
+OCTETSTRING_template& can__id();
+const OCTETSTRING_template& can__id() const;
+SocketCAN__bcm__frame_frames_template& frames();
+const SocketCAN__bcm__frame_frames_template& frames() const;
+int size_of() const;
+void log() const;
+void log_match(const SocketCAN__bcm__frame& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+
+/* Function prototypes */
+
+extern boolean operator==(null_type null_value, const SocketCAN__bcm__frame_frames_can__frame& other_value);
+inline boolean operator!=(null_type null_value, const SocketCAN__bcm__frame_frames_can__frame& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const SocketCAN__bcm__frame_frames_canfd__frame& other_value);
+inline boolean operator!=(null_type null_value, const SocketCAN__bcm__frame_frames_canfd__frame& other_value) { return !(null_value == other_value); }
+
+/* Global variable declarations */
+
+extern const INTEGER& CAN__FRAME__MAX__NUMBER;
+extern const TTCN_Typedescriptor_t BcmFlagsBitIndex__enum_descr_;
+extern const TTCN_Typedescriptor_t BcmFlags__enum_descr_;
+extern const TTCN_Typedescriptor_t BcmOpcode__enum_descr_;
+extern const XERdescriptor_t Bcm__long_xer_;
+extern const TTCN_OERdescriptor_t Bcm__long_oer_;
+extern const TTCN_Typedescriptor_t Bcm__long_descr_;
+extern const XERdescriptor_t Bcm__timeval_tv__sec_xer_;
+extern const TTCN_OERdescriptor_t Bcm__timeval_tv__sec_oer_;
+extern const TTCN_Typedescriptor_t Bcm__timeval_tv__sec_descr_;
+extern const XERdescriptor_t Bcm__timeval_tv__usec_xer_;
+extern const TTCN_OERdescriptor_t Bcm__timeval_tv__usec_oer_;
+extern const TTCN_Typedescriptor_t Bcm__timeval_tv__usec_descr_;
+extern const TTCN_Typedescriptor_t Bcm__timeval_descr_;
+extern const XERdescriptor_t SocketCAN__bcm__frame_opcode_xer_;
+extern const TTCN_OERdescriptor_t SocketCAN__bcm__frame_opcode_oer_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_opcode_descr_;
+extern const TTCN_RAWdescriptor_t SocketCAN__bcm__frame_flags_raw_;
+extern const XERdescriptor_t SocketCAN__bcm__frame_flags_xer_;
+extern const TTCN_OERdescriptor_t SocketCAN__bcm__frame_flags_oer_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_flags_descr_;
+extern const XERdescriptor_t SocketCAN__bcm__frame_count_xer_;
+extern const TTCN_OERdescriptor_t SocketCAN__bcm__frame_count_oer_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_count_descr_;
+extern const XERdescriptor_t SocketCAN__bcm__frame_can__id_xer_;
+extern const TTCN_OERdescriptor_t SocketCAN__bcm__frame_can__id_oer_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_can__id_descr_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_descr_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_can__frame_descr_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_frames_canfd__frame_descr_;
+extern const TTCN_Typedescriptor_t SocketCAN__bcm__frame_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/Bcm.o b/demo/Bcm.o
new file mode 100644
index 0000000..8d03bef
--- /dev/null
+++ b/demo/Bcm.o
Binary files differ
diff --git a/demo/CANFD_matrix_messages.cc b/demo/CANFD_matrix_messages.cc
new file mode 100644
index 0000000..d82a425
--- /dev/null
+++ b/demo/CANFD_matrix_messages.cc
@@ -0,0 +1,6625 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CANFD_matrix_messages.hh"
+
+namespace CANFD__matrix__messages {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_0_octets[] = { 0, 0, 1, 34 },
+os_1_octets[] = { 0, 0, 1, 35 },
+os_2_octets[] = { 0, 0, 1, 36 },
+os_3_octets[] = { 0, 0, 1, 37 },
+os_4_octets[] = { 128, 0, 0, 1 };
+static const OCTETSTRING os_0(4, os_0_octets),
+os_1(4, os_1_octets),
+os_2(4, os_2_octets),
+os_3(4, os_3_octets),
+os_4(4, os_4_octets);
+static const unsigned char module_checksum[] = { 0x23, 0x12, 0x87, 0x6a, 0xa7, 0xe1, 0xed, 0x39, 0xe3, 0x5a, 0xcf, 0xde, 0x64, 0xd8, 0x44, 0x22 };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_xer_ = { {"test_sig_11_bit_bitstring_lsb_coded>\n", "test_sig_11_bit_bitstring_lsb_coded>\n"}, {37, 37}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.test_sig_11_bit_bitstring_lsb_coded", &BITSTRING_ber_, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_raw_, NULL, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_xer_, &BITSTRING_json_, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_xer_ = { {"test_sig_5_bit_bitstring_lsb_coded>\n", "test_sig_5_bit_bitstring_lsb_coded>\n"}, {36, 36}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.test_sig_5_bit_bitstring_lsb_coded", &BITSTRING_ber_, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_raw_, NULL, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_xer_, &BITSTRING_json_, &CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MESSAGE__TESTFRAME0__msg__type
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type", NULL, &CANFD__MESSAGE__TESTFRAME0__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_xer_ = { {"test_sig_11_bit_bitstring_msb_coded>\n", "test_sig_11_bit_bitstring_msb_coded>\n"}, {37, 37}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.test_sig_11_bit_bitstring_msb_coded", &BITSTRING_ber_, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_raw_, NULL, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_xer_, &BITSTRING_json_, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_xer_ = { {"test_sig_5_bit_bitstring_msb_coded>\n", "test_sig_5_bit_bitstring_msb_coded>\n"}, {36, 36}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.test_sig_5_bit_bitstring_msb_coded", &BITSTRING_ber_, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_raw_, NULL, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_xer_, &BITSTRING_json_, &CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MESSAGE__TESTFRAME1__msg__type
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type", NULL, &CANFD__MESSAGE__TESTFRAME1__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_xer_ = { {"test_sig_11_bit_integer_msb_coded>\n", "test_sig_11_bit_integer_msb_coded>\n"}, {35, 35}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.test_sig_11_bit_integer_msb_coded", &INTEGER_ber_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_raw_, &INTEGER_text_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_xer_, &INTEGER_json_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_xer_ = { {"test_sig_5_bit_integer_msb_coded>\n", "test_sig_5_bit_integer_msb_coded>\n"}, {34, 34}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.test_sig_5_bit_integer_msb_coded", &INTEGER_ber_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_raw_, &INTEGER_text_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_xer_, &INTEGER_json_, &CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MESSAGE__TESTFRAME2__msg__type
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type", NULL, &CANFD__MESSAGE__TESTFRAME2__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_xer_ = { {"test_sig_1_byte_octetstring_msb_coded>\n", "test_sig_1_byte_octetstring_msb_coded>\n"}, {39, 39}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_ext_arr_[0] = {};
+const int CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_ext_arr_, 0, CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_p_};
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.test_sig_1_byte_octetstring_msb_coded", &OCTETSTRING_ber_, &CAN__matrix__signals::OCT1__signal__type_raw_, &OCTETSTRING_text_, &CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_xer_, &OCTETSTRING_json_, &CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_ = { {"test_sig_2_byte_octetstring_msb_coded>\n", "test_sig_2_byte_octetstring_msb_coded>\n"}, {39, 39}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_[0] = {};
+const int CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ = { -1, TRUE, 2, FALSE, 0, 0, CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_, 0, CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_};
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.test_sig_2_byte_octetstring_msb_coded", &OCTETSTRING_ber_, &CAN__matrix__signals::OCT2__signal__type_raw_, &OCTETSTRING_text_, &CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_, &OCTETSTRING_json_, &CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MESSAGE__TESTFRAME3__msg__type
+const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type", NULL, &CANFD__MESSAGE__TESTFRAME3__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_ = { {"test_sig_2_byte_octetstring_msb_coded>\n", "test_sig_2_byte_octetstring_msb_coded>\n"}, {39, 39}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_[0] = {};
+const int CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ = { -1, TRUE, 2, FALSE, 0, 0, CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_, 0, CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_};
+const TTCN_Typedescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.test_sig_2_byte_octetstring_msb_coded", &OCTETSTRING_ber_, &CAN__matrix__signals::OCT2__signal__type_raw_, &OCTETSTRING_text_, &CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_, &OCTETSTRING_json_, &CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MESSAGE__EXTENDEDFRAME1__msg__type
+const TTCN_Typedescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_ = { "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type", NULL, &CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MatrixPayloadUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MatrixPayloadUnion
+const TTCN_Typedescriptor_t CANFD__MatrixPayloadUnion_descr_ = { "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion", NULL, &CANFD__MatrixPayloadUnion_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__MatrixUnion_can__id_xer_ = { {"can_id>\n", "can_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__MatrixUnion_can__id_oer_ext_arr_[0] = {};
+const int CANFD__MatrixUnion_can__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__MatrixUnion_can__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, CANFD__MatrixUnion_can__id_oer_ext_arr_, 0, CANFD__MatrixUnion_can__id_oer_p_};
+const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__id_descr_ = { "@CANFD_matrix_messages.CANFD_MatrixUnion.can_id", &OCTETSTRING_ber_, &Can::CAN__id_raw_, &OCTETSTRING_text_, &CANFD__MatrixUnion_can__id_xer_, &OCTETSTRING_json_, &CANFD__MatrixUnion_can__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__MatrixUnion_can__flags_xer_ = { {"can_flags>\n", "can_flags>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__MatrixUnion_can__flags_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__flags_descr_ = { "@CANFD_matrix_messages.CANFD_MatrixUnion.can_flags", &BITSTRING_ber_, &Can::CAN__flags_raw_, NULL, &CANFD__MatrixUnion_can__flags_xer_, &BITSTRING_json_, &CANFD__MatrixUnion_can__flags_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MatrixUnion_can__pdu_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MatrixUnion_can__pdu
+const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__pdu_descr_ = { "@CANFD_matrix_messages.CANFD_MatrixUnion.can_pdu", NULL, &CANFD__MatrixUnion_can__pdu_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CANFD__MatrixUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CANFD__MatrixUnion
+const TTCN_Typedescriptor_t CANFD__MatrixUnion_descr_ = { "@CANFD_matrix_messages.CANFD_MatrixUnion", NULL, &CANFD__MatrixUnion_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("CANFD_matrix_messages", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+CANFD__MESSAGE__TESTFRAME0__msg__type::CANFD__MESSAGE__TESTFRAME0__msg__type()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type::CANFD__MESSAGE__TESTFRAME0__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__lsb__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__lsb__coded)
+ : field_test__sig__11__bit__bitstring__lsb__coded(par_test__sig__11__bit__bitstring__lsb__coded),
+ field_test__sig__5__bit__bitstring__lsb__coded(par_test__sig__5__bit__bitstring__lsb__coded)
+{
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type::CANFD__MESSAGE__TESTFRAME0__msg__type(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+if (other_value.test__sig__11__bit__bitstring__lsb__coded().is_bound()) field_test__sig__11__bit__bitstring__lsb__coded = other_value.test__sig__11__bit__bitstring__lsb__coded();
+else field_test__sig__11__bit__bitstring__lsb__coded.clean_up();
+if (other_value.test__sig__5__bit__bitstring__lsb__coded().is_bound()) field_test__sig__5__bit__bitstring__lsb__coded = other_value.test__sig__5__bit__bitstring__lsb__coded();
+else field_test__sig__5__bit__bitstring__lsb__coded.clean_up();
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::clean_up()
+{
+field_test__sig__11__bit__bitstring__lsb__coded.clean_up();
+field_test__sig__5__bit__bitstring__lsb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MESSAGE__TESTFRAME0__msg__type::get_descriptor() const { return &CANFD__MESSAGE__TESTFRAME0__msg__type_descr_; }
+CANFD__MESSAGE__TESTFRAME0__msg__type& CANFD__MESSAGE__TESTFRAME0__msg__type::operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+ if (other_value.test__sig__11__bit__bitstring__lsb__coded().is_bound()) field_test__sig__11__bit__bitstring__lsb__coded = other_value.test__sig__11__bit__bitstring__lsb__coded();
+ else field_test__sig__11__bit__bitstring__lsb__coded.clean_up();
+ if (other_value.test__sig__5__bit__bitstring__lsb__coded().is_bound()) field_test__sig__5__bit__bitstring__lsb__coded = other_value.test__sig__5__bit__bitstring__lsb__coded();
+ else field_test__sig__5__bit__bitstring__lsb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type::operator==(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value) const
+{
+return field_test__sig__11__bit__bitstring__lsb__coded==other_value.field_test__sig__11__bit__bitstring__lsb__coded
+ && field_test__sig__5__bit__bitstring__lsb__coded==other_value.field_test__sig__5__bit__bitstring__lsb__coded;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__bitstring__lsb__coded.is_bound())
+ || (field_test__sig__5__bit__bitstring__lsb__coded.is_bound());
+}
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type::is_value() const
+{
+return field_test__sig__11__bit__bitstring__lsb__coded.is_value()
+ && field_test__sig__5__bit__bitstring__lsb__coded.is_value();
+}
+void CANFD__MESSAGE__TESTFRAME0__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_lsb_coded := ");
+field_test__sig__11__bit__bitstring__lsb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_lsb_coded := ");
+field_test__sig__5__bit__bitstring__lsb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__lsb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__lsb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_lsb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__lsb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_lsb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__lsb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type");
+ }
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__bitstring__lsb__coded().is_bound()) test__sig__11__bit__bitstring__lsb__coded().set_implicit_omit();
+if (test__sig__5__bit__bitstring__lsb__coded().is_bound()) test__sig__5__bit__bitstring__lsb__coded().set_implicit_omit();
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__bitstring__lsb__coded.encode_text(text_buf);
+field_test__sig__5__bit__bitstring__lsb__coded.encode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__bitstring__lsb__coded.decode_text(text_buf);
+field_test__sig__5__bit__bitstring__lsb__coded.decode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MESSAGE__TESTFRAME0__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MESSAGE__TESTFRAME0__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__bitstring__lsb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__bitstring__lsb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MESSAGE__TESTFRAME0__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__bitstring__lsb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__bitstring__lsb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MESSAGE__TESTFRAME0__msg__type_template::single_value_struct {
+BITSTRING_template field_test__sig__11__bit__bitstring__lsb__coded;
+BITSTRING_template field_test__sig__5__bit__bitstring__lsb__coded;
+};
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__lsb__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__bitstring__lsb__coded = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::copy_value(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__bitstring__lsb__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__bitstring__lsb__coded = other_value.test__sig__11__bit__bitstring__lsb__coded();
+} else {
+ single_value->field_test__sig__11__bit__bitstring__lsb__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__bitstring__lsb__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__bitstring__lsb__coded = other_value.test__sig__5__bit__bitstring__lsb__coded();
+} else {
+ single_value->field_test__sig__5__bit__bitstring__lsb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::copy_template(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__bitstring__lsb__coded().get_selection()) {
+single_value->field_test__sig__11__bit__bitstring__lsb__coded = other_value.test__sig__11__bit__bitstring__lsb__coded();
+} else {
+single_value->field_test__sig__11__bit__bitstring__lsb__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__bitstring__lsb__coded().get_selection()) {
+single_value->field_test__sig__5__bit__bitstring__lsb__coded = other_value.test__sig__5__bit__bitstring__lsb__coded();
+} else {
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME0__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::CANFD__MESSAGE__TESTFRAME0__msg__type_template()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::CANFD__MESSAGE__TESTFRAME0__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::CANFD__MESSAGE__TESTFRAME0__msg__type_template(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::CANFD__MESSAGE__TESTFRAME0__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME0__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME0__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type from an unbound optional field.");
+}
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::CANFD__MESSAGE__TESTFRAME0__msg__type_template(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template::~CANFD__MESSAGE__TESTFRAME0__msg__type_template()
+{
+clean_up();
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME0__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME0__msg__type&)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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+}
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type_template::match(const CANFD__MESSAGE__TESTFRAME0__msg__type& 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.test__sig__11__bit__bitstring__lsb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__bitstring__lsb__coded.match(other_value.test__sig__11__bit__bitstring__lsb__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__bitstring__lsb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__bitstring__lsb__coded.match(other_value.test__sig__5__bit__bitstring__lsb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+}
+return FALSE;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__bitstring__lsb__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__bitstring__lsb__coded.is_bound()
+;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__bitstring__lsb__coded.is_value()
+ &&single_value->field_test__sig__5__bit__bitstring__lsb__coded.is_value();
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type CANFD__MESSAGE__TESTFRAME0__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+CANFD__MESSAGE__TESTFRAME0__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__bitstring__lsb__coded.is_bound()) {
+ret_val.test__sig__11__bit__bitstring__lsb__coded() = single_value->field_test__sig__11__bit__bitstring__lsb__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__bitstring__lsb__coded.is_bound()) {
+ret_val.test__sig__5__bit__bitstring__lsb__coded() = single_value->field_test__sig__5__bit__bitstring__lsb__coded.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME0__msg__type_template[list_length];
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::test__sig__11__bit__bitstring__lsb__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__bitstring__lsb__coded;
+}
+
+const BITSTRING_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::test__sig__11__bit__bitstring__lsb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_bitstring_lsb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+return single_value->field_test__sig__11__bit__bitstring__lsb__coded;
+}
+
+BITSTRING_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::test__sig__5__bit__bitstring__lsb__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__bitstring__lsb__coded;
+}
+
+const BITSTRING_template& CANFD__MESSAGE__TESTFRAME0__msg__type_template::test__sig__5__bit__bitstring__lsb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_bitstring_lsb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+return single_value->field_test__sig__5__bit__bitstring__lsb__coded;
+}
+
+int CANFD__MESSAGE__TESTFRAME0__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type 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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+ }
+ return 0;
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_lsb_coded := ");
+single_value->field_test__sig__11__bit__bitstring__lsb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_lsb_coded := ");
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_template::log_match(const CANFD__MESSAGE__TESTFRAME0__msg__type& 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_test__sig__11__bit__bitstring__lsb__coded.match(match_value.test__sig__11__bit__bitstring__lsb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_bitstring_lsb_coded");
+single_value->field_test__sig__11__bit__bitstring__lsb__coded.log_match(match_value.test__sig__11__bit__bitstring__lsb__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__bitstring__lsb__coded.match(match_value.test__sig__5__bit__bitstring__lsb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_bitstring_lsb_coded");
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.log_match(match_value.test__sig__5__bit__bitstring__lsb__coded(), legacy);
+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("{ test_sig_11_bit_bitstring_lsb_coded := ");
+single_value->field_test__sig__11__bit__bitstring__lsb__coded.log_match(match_value.test__sig__11__bit__bitstring__lsb__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_lsb_coded := ");
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.log_match(match_value.test__sig__5__bit__bitstring__lsb__coded(), legacy);
+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 CANFD__MESSAGE__TESTFRAME0__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__bitstring__lsb__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__lsb__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.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 CANFD__MESSAGE__TESTFRAME0__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_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: {
+ CANFD__MESSAGE__TESTFRAME0__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__lsb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__lsb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_lsb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__lsb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_lsb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__lsb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__lsb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type");
+single_value->field_test__sig__5__bit__bitstring__lsb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type");
+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 : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME0_msg_type");
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MESSAGE__TESTFRAME0__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type::CANFD__MESSAGE__TESTFRAME1__msg__type()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type::CANFD__MESSAGE__TESTFRAME1__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__msb__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__msb__coded)
+ : field_test__sig__11__bit__bitstring__msb__coded(par_test__sig__11__bit__bitstring__msb__coded),
+ field_test__sig__5__bit__bitstring__msb__coded(par_test__sig__5__bit__bitstring__msb__coded)
+{
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type::CANFD__MESSAGE__TESTFRAME1__msg__type(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+if (other_value.test__sig__11__bit__bitstring__msb__coded().is_bound()) field_test__sig__11__bit__bitstring__msb__coded = other_value.test__sig__11__bit__bitstring__msb__coded();
+else field_test__sig__11__bit__bitstring__msb__coded.clean_up();
+if (other_value.test__sig__5__bit__bitstring__msb__coded().is_bound()) field_test__sig__5__bit__bitstring__msb__coded = other_value.test__sig__5__bit__bitstring__msb__coded();
+else field_test__sig__5__bit__bitstring__msb__coded.clean_up();
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::clean_up()
+{
+field_test__sig__11__bit__bitstring__msb__coded.clean_up();
+field_test__sig__5__bit__bitstring__msb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MESSAGE__TESTFRAME1__msg__type::get_descriptor() const { return &CANFD__MESSAGE__TESTFRAME1__msg__type_descr_; }
+CANFD__MESSAGE__TESTFRAME1__msg__type& CANFD__MESSAGE__TESTFRAME1__msg__type::operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+ if (other_value.test__sig__11__bit__bitstring__msb__coded().is_bound()) field_test__sig__11__bit__bitstring__msb__coded = other_value.test__sig__11__bit__bitstring__msb__coded();
+ else field_test__sig__11__bit__bitstring__msb__coded.clean_up();
+ if (other_value.test__sig__5__bit__bitstring__msb__coded().is_bound()) field_test__sig__5__bit__bitstring__msb__coded = other_value.test__sig__5__bit__bitstring__msb__coded();
+ else field_test__sig__5__bit__bitstring__msb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type::operator==(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value) const
+{
+return field_test__sig__11__bit__bitstring__msb__coded==other_value.field_test__sig__11__bit__bitstring__msb__coded
+ && field_test__sig__5__bit__bitstring__msb__coded==other_value.field_test__sig__5__bit__bitstring__msb__coded;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__bitstring__msb__coded.is_bound())
+ || (field_test__sig__5__bit__bitstring__msb__coded.is_bound());
+}
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type::is_value() const
+{
+return field_test__sig__11__bit__bitstring__msb__coded.is_value()
+ && field_test__sig__5__bit__bitstring__msb__coded.is_value();
+}
+void CANFD__MESSAGE__TESTFRAME1__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_msb_coded := ");
+field_test__sig__11__bit__bitstring__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_msb_coded := ");
+field_test__sig__5__bit__bitstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type");
+ }
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__bitstring__msb__coded().is_bound()) test__sig__11__bit__bitstring__msb__coded().set_implicit_omit();
+if (test__sig__5__bit__bitstring__msb__coded().is_bound()) test__sig__5__bit__bitstring__msb__coded().set_implicit_omit();
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__bitstring__msb__coded.encode_text(text_buf);
+field_test__sig__5__bit__bitstring__msb__coded.encode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__bitstring__msb__coded.decode_text(text_buf);
+field_test__sig__5__bit__bitstring__msb__coded.decode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MESSAGE__TESTFRAME1__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MESSAGE__TESTFRAME1__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__bitstring__msb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__bitstring__msb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MESSAGE__TESTFRAME1__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__bitstring__msb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__bitstring__msb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MESSAGE__TESTFRAME1__msg__type_template::single_value_struct {
+BITSTRING_template field_test__sig__11__bit__bitstring__msb__coded;
+BITSTRING_template field_test__sig__5__bit__bitstring__msb__coded;
+};
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__msb__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__bitstring__msb__coded = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::copy_value(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__bitstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__bitstring__msb__coded = other_value.test__sig__11__bit__bitstring__msb__coded();
+} else {
+ single_value->field_test__sig__11__bit__bitstring__msb__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__bitstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__bitstring__msb__coded = other_value.test__sig__5__bit__bitstring__msb__coded();
+} else {
+ single_value->field_test__sig__5__bit__bitstring__msb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::copy_template(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__bitstring__msb__coded().get_selection()) {
+single_value->field_test__sig__11__bit__bitstring__msb__coded = other_value.test__sig__11__bit__bitstring__msb__coded();
+} else {
+single_value->field_test__sig__11__bit__bitstring__msb__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__bitstring__msb__coded().get_selection()) {
+single_value->field_test__sig__5__bit__bitstring__msb__coded = other_value.test__sig__5__bit__bitstring__msb__coded();
+} else {
+single_value->field_test__sig__5__bit__bitstring__msb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME1__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::CANFD__MESSAGE__TESTFRAME1__msg__type_template()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::CANFD__MESSAGE__TESTFRAME1__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::CANFD__MESSAGE__TESTFRAME1__msg__type_template(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::CANFD__MESSAGE__TESTFRAME1__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME1__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME1__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type from an unbound optional field.");
+}
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::CANFD__MESSAGE__TESTFRAME1__msg__type_template(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template::~CANFD__MESSAGE__TESTFRAME1__msg__type_template()
+{
+clean_up();
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME1__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME1__msg__type&)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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+}
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type_template::match(const CANFD__MESSAGE__TESTFRAME1__msg__type& 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.test__sig__11__bit__bitstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__bitstring__msb__coded.match(other_value.test__sig__11__bit__bitstring__msb__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__bitstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__bitstring__msb__coded.match(other_value.test__sig__5__bit__bitstring__msb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+}
+return FALSE;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__bitstring__msb__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__bitstring__msb__coded.is_bound()
+;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__bitstring__msb__coded.is_value()
+ &&single_value->field_test__sig__5__bit__bitstring__msb__coded.is_value();
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type CANFD__MESSAGE__TESTFRAME1__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+CANFD__MESSAGE__TESTFRAME1__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__bitstring__msb__coded.is_bound()) {
+ret_val.test__sig__11__bit__bitstring__msb__coded() = single_value->field_test__sig__11__bit__bitstring__msb__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__bitstring__msb__coded.is_bound()) {
+ret_val.test__sig__5__bit__bitstring__msb__coded() = single_value->field_test__sig__5__bit__bitstring__msb__coded.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME1__msg__type_template[list_length];
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::test__sig__11__bit__bitstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__bitstring__msb__coded;
+}
+
+const BITSTRING_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::test__sig__11__bit__bitstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_bitstring_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+return single_value->field_test__sig__11__bit__bitstring__msb__coded;
+}
+
+BITSTRING_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::test__sig__5__bit__bitstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__bitstring__msb__coded;
+}
+
+const BITSTRING_template& CANFD__MESSAGE__TESTFRAME1__msg__type_template::test__sig__5__bit__bitstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_bitstring_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+return single_value->field_test__sig__5__bit__bitstring__msb__coded;
+}
+
+int CANFD__MESSAGE__TESTFRAME1__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type 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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+ }
+ return 0;
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_msb_coded := ");
+single_value->field_test__sig__11__bit__bitstring__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_msb_coded := ");
+single_value->field_test__sig__5__bit__bitstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_template::log_match(const CANFD__MESSAGE__TESTFRAME1__msg__type& 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_test__sig__11__bit__bitstring__msb__coded.match(match_value.test__sig__11__bit__bitstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_bitstring_msb_coded");
+single_value->field_test__sig__11__bit__bitstring__msb__coded.log_match(match_value.test__sig__11__bit__bitstring__msb__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__bitstring__msb__coded.match(match_value.test__sig__5__bit__bitstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_bitstring_msb_coded");
+single_value->field_test__sig__5__bit__bitstring__msb__coded.log_match(match_value.test__sig__5__bit__bitstring__msb__coded(), legacy);
+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("{ test_sig_11_bit_bitstring_msb_coded := ");
+single_value->field_test__sig__11__bit__bitstring__msb__coded.log_match(match_value.test__sig__11__bit__bitstring__msb__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_msb_coded := ");
+single_value->field_test__sig__5__bit__bitstring__msb__coded.log_match(match_value.test__sig__5__bit__bitstring__msb__coded(), legacy);
+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 CANFD__MESSAGE__TESTFRAME1__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__bitstring__msb__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__msb__coded.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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__msb__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__msb__coded.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 CANFD__MESSAGE__TESTFRAME1__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_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: {
+ CANFD__MESSAGE__TESTFRAME1__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type");
+single_value->field_test__sig__5__bit__bitstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type");
+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 : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME1_msg_type");
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MESSAGE__TESTFRAME1__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type::CANFD__MESSAGE__TESTFRAME2__msg__type()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type::CANFD__MESSAGE__TESTFRAME2__msg__type(const INTEGER& par_test__sig__11__bit__integer__msb__coded,
+ const INTEGER& par_test__sig__5__bit__integer__msb__coded)
+ : field_test__sig__11__bit__integer__msb__coded(par_test__sig__11__bit__integer__msb__coded),
+ field_test__sig__5__bit__integer__msb__coded(par_test__sig__5__bit__integer__msb__coded)
+{
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type::CANFD__MESSAGE__TESTFRAME2__msg__type(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+if (other_value.test__sig__11__bit__integer__msb__coded().is_bound()) field_test__sig__11__bit__integer__msb__coded = other_value.test__sig__11__bit__integer__msb__coded();
+else field_test__sig__11__bit__integer__msb__coded.clean_up();
+if (other_value.test__sig__5__bit__integer__msb__coded().is_bound()) field_test__sig__5__bit__integer__msb__coded = other_value.test__sig__5__bit__integer__msb__coded();
+else field_test__sig__5__bit__integer__msb__coded.clean_up();
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::clean_up()
+{
+field_test__sig__11__bit__integer__msb__coded.clean_up();
+field_test__sig__5__bit__integer__msb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MESSAGE__TESTFRAME2__msg__type::get_descriptor() const { return &CANFD__MESSAGE__TESTFRAME2__msg__type_descr_; }
+CANFD__MESSAGE__TESTFRAME2__msg__type& CANFD__MESSAGE__TESTFRAME2__msg__type::operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+ if (other_value.test__sig__11__bit__integer__msb__coded().is_bound()) field_test__sig__11__bit__integer__msb__coded = other_value.test__sig__11__bit__integer__msb__coded();
+ else field_test__sig__11__bit__integer__msb__coded.clean_up();
+ if (other_value.test__sig__5__bit__integer__msb__coded().is_bound()) field_test__sig__5__bit__integer__msb__coded = other_value.test__sig__5__bit__integer__msb__coded();
+ else field_test__sig__5__bit__integer__msb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type::operator==(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value) const
+{
+return field_test__sig__11__bit__integer__msb__coded==other_value.field_test__sig__11__bit__integer__msb__coded
+ && field_test__sig__5__bit__integer__msb__coded==other_value.field_test__sig__5__bit__integer__msb__coded;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__integer__msb__coded.is_bound())
+ || (field_test__sig__5__bit__integer__msb__coded.is_bound());
+}
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type::is_value() const
+{
+return field_test__sig__11__bit__integer__msb__coded.is_value()
+ && field_test__sig__5__bit__integer__msb__coded.is_value();
+}
+void CANFD__MESSAGE__TESTFRAME2__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_integer_msb_coded := ");
+field_test__sig__11__bit__integer__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_msb_coded := ");
+field_test__sig__5__bit__integer__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__integer__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_integer_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__integer__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type");
+ }
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__integer__msb__coded().is_bound()) test__sig__11__bit__integer__msb__coded().set_implicit_omit();
+if (test__sig__5__bit__integer__msb__coded().is_bound()) test__sig__5__bit__integer__msb__coded().set_implicit_omit();
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__integer__msb__coded.encode_text(text_buf);
+field_test__sig__5__bit__integer__msb__coded.encode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__integer__msb__coded.decode_text(text_buf);
+field_test__sig__5__bit__integer__msb__coded.decode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MESSAGE__TESTFRAME2__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MESSAGE__TESTFRAME2__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__integer__msb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__integer__msb__coded.RAW_decode(CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MESSAGE__TESTFRAME2__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__integer__msb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__integer__msb__coded.RAW_encode(CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MESSAGE__TESTFRAME2__msg__type_template::single_value_struct {
+INTEGER_template field_test__sig__11__bit__integer__msb__coded;
+INTEGER_template field_test__sig__5__bit__integer__msb__coded;
+};
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__msb__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__integer__msb__coded = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::copy_value(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__integer__msb__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__integer__msb__coded = other_value.test__sig__11__bit__integer__msb__coded();
+} else {
+ single_value->field_test__sig__11__bit__integer__msb__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__integer__msb__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__integer__msb__coded = other_value.test__sig__5__bit__integer__msb__coded();
+} else {
+ single_value->field_test__sig__5__bit__integer__msb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::copy_template(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__integer__msb__coded().get_selection()) {
+single_value->field_test__sig__11__bit__integer__msb__coded = other_value.test__sig__11__bit__integer__msb__coded();
+} else {
+single_value->field_test__sig__11__bit__integer__msb__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__integer__msb__coded().get_selection()) {
+single_value->field_test__sig__5__bit__integer__msb__coded = other_value.test__sig__5__bit__integer__msb__coded();
+} else {
+single_value->field_test__sig__5__bit__integer__msb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME2__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::CANFD__MESSAGE__TESTFRAME2__msg__type_template()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::CANFD__MESSAGE__TESTFRAME2__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::CANFD__MESSAGE__TESTFRAME2__msg__type_template(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::CANFD__MESSAGE__TESTFRAME2__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME2__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME2__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type from an unbound optional field.");
+}
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::CANFD__MESSAGE__TESTFRAME2__msg__type_template(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template::~CANFD__MESSAGE__TESTFRAME2__msg__type_template()
+{
+clean_up();
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME2__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME2__msg__type&)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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+}
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type_template::match(const CANFD__MESSAGE__TESTFRAME2__msg__type& 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.test__sig__11__bit__integer__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__integer__msb__coded.match(other_value.test__sig__11__bit__integer__msb__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__integer__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__integer__msb__coded.match(other_value.test__sig__5__bit__integer__msb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+}
+return FALSE;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__integer__msb__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__integer__msb__coded.is_bound()
+;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__integer__msb__coded.is_value()
+ &&single_value->field_test__sig__5__bit__integer__msb__coded.is_value();
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type CANFD__MESSAGE__TESTFRAME2__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+CANFD__MESSAGE__TESTFRAME2__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__integer__msb__coded.is_bound()) {
+ret_val.test__sig__11__bit__integer__msb__coded() = single_value->field_test__sig__11__bit__integer__msb__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__integer__msb__coded.is_bound()) {
+ret_val.test__sig__5__bit__integer__msb__coded() = single_value->field_test__sig__5__bit__integer__msb__coded.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME2__msg__type_template[list_length];
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+return value_list.list_value[list_index];
+}
+
+INTEGER_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::test__sig__11__bit__integer__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__integer__msb__coded;
+}
+
+const INTEGER_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::test__sig__11__bit__integer__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_integer_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+return single_value->field_test__sig__11__bit__integer__msb__coded;
+}
+
+INTEGER_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::test__sig__5__bit__integer__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__integer__msb__coded;
+}
+
+const INTEGER_template& CANFD__MESSAGE__TESTFRAME2__msg__type_template::test__sig__5__bit__integer__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_integer_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+return single_value->field_test__sig__5__bit__integer__msb__coded;
+}
+
+int CANFD__MESSAGE__TESTFRAME2__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type 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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+ }
+ return 0;
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_integer_msb_coded := ");
+single_value->field_test__sig__11__bit__integer__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_msb_coded := ");
+single_value->field_test__sig__5__bit__integer__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_template::log_match(const CANFD__MESSAGE__TESTFRAME2__msg__type& 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_test__sig__11__bit__integer__msb__coded.match(match_value.test__sig__11__bit__integer__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_integer_msb_coded");
+single_value->field_test__sig__11__bit__integer__msb__coded.log_match(match_value.test__sig__11__bit__integer__msb__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__integer__msb__coded.match(match_value.test__sig__5__bit__integer__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_integer_msb_coded");
+single_value->field_test__sig__5__bit__integer__msb__coded.log_match(match_value.test__sig__5__bit__integer__msb__coded(), legacy);
+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("{ test_sig_11_bit_integer_msb_coded := ");
+single_value->field_test__sig__11__bit__integer__msb__coded.log_match(match_value.test__sig__11__bit__integer__msb__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_msb_coded := ");
+single_value->field_test__sig__5__bit__integer__msb__coded.log_match(match_value.test__sig__5__bit__integer__msb__coded(), legacy);
+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 CANFD__MESSAGE__TESTFRAME2__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__integer__msb__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__msb__coded.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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__msb__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__msb__coded.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 CANFD__MESSAGE__TESTFRAME2__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_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: {
+ CANFD__MESSAGE__TESTFRAME2__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__integer__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_integer_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__integer__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type");
+single_value->field_test__sig__5__bit__integer__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type");
+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 : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME2_msg_type");
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MESSAGE__TESTFRAME2__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type::CANFD__MESSAGE__TESTFRAME3__msg__type()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type::CANFD__MESSAGE__TESTFRAME3__msg__type(const OCTETSTRING& par_test__sig__1__byte__octetstring__msb__coded,
+ const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded)
+ : field_test__sig__1__byte__octetstring__msb__coded(par_test__sig__1__byte__octetstring__msb__coded),
+ field_test__sig__2__byte__octetstring__msb__coded(par_test__sig__2__byte__octetstring__msb__coded)
+{
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type::CANFD__MESSAGE__TESTFRAME3__msg__type(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+if (other_value.test__sig__1__byte__octetstring__msb__coded().is_bound()) field_test__sig__1__byte__octetstring__msb__coded = other_value.test__sig__1__byte__octetstring__msb__coded();
+else field_test__sig__1__byte__octetstring__msb__coded.clean_up();
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::clean_up()
+{
+field_test__sig__1__byte__octetstring__msb__coded.clean_up();
+field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MESSAGE__TESTFRAME3__msg__type::get_descriptor() const { return &CANFD__MESSAGE__TESTFRAME3__msg__type_descr_; }
+CANFD__MESSAGE__TESTFRAME3__msg__type& CANFD__MESSAGE__TESTFRAME3__msg__type::operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+ if (other_value.test__sig__1__byte__octetstring__msb__coded().is_bound()) field_test__sig__1__byte__octetstring__msb__coded = other_value.test__sig__1__byte__octetstring__msb__coded();
+ else field_test__sig__1__byte__octetstring__msb__coded.clean_up();
+ if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+ else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type::operator==(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value) const
+{
+return field_test__sig__1__byte__octetstring__msb__coded==other_value.field_test__sig__1__byte__octetstring__msb__coded
+ && field_test__sig__2__byte__octetstring__msb__coded==other_value.field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type::is_bound() const
+{
+return (field_test__sig__1__byte__octetstring__msb__coded.is_bound())
+ || (field_test__sig__2__byte__octetstring__msb__coded.is_bound());
+}
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type::is_value() const
+{
+return field_test__sig__1__byte__octetstring__msb__coded.is_value()
+ && field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+void CANFD__MESSAGE__TESTFRAME3__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_1_byte_octetstring_msb_coded := ");
+field_test__sig__1__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_msb_coded := ");
+field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__1__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_1_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__1__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type");
+ }
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::set_implicit_omit()
+{
+if (test__sig__1__byte__octetstring__msb__coded().is_bound()) test__sig__1__byte__octetstring__msb__coded().set_implicit_omit();
+if (test__sig__2__byte__octetstring__msb__coded().is_bound()) test__sig__2__byte__octetstring__msb__coded().set_implicit_omit();
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__1__byte__octetstring__msb__coded.encode_text(text_buf);
+field_test__sig__2__byte__octetstring__msb__coded.encode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__1__byte__octetstring__msb__coded.decode_text(text_buf);
+field_test__sig__2__byte__octetstring__msb__coded.decode_text(text_buf);
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MESSAGE__TESTFRAME3__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MESSAGE__TESTFRAME3__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__matrix__signals::OCT1__signal__type_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__1__byte__octetstring__msb__coded.RAW_decode(CAN__matrix__signals::OCT1__signal__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__matrix__signals::OCT2__signal__type_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__2__byte__octetstring__msb__coded.RAW_decode(CAN__matrix__signals::OCT2__signal__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MESSAGE__TESTFRAME3__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__matrix__signals::OCT1__signal__type_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__matrix__signals::OCT2__signal__type_descr_.raw);
+ encoded_length += field_test__sig__1__byte__octetstring__msb__coded.RAW_encode(CAN__matrix__signals::OCT1__signal__type_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__2__byte__octetstring__msb__coded.RAW_encode(CAN__matrix__signals::OCT2__signal__type_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MESSAGE__TESTFRAME3__msg__type_template::single_value_struct {
+OCTETSTRING_template field_test__sig__1__byte__octetstring__msb__coded;
+OCTETSTRING_template field_test__sig__2__byte__octetstring__msb__coded;
+};
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__msb__coded = ANY_VALUE;
+single_value->field_test__sig__2__byte__octetstring__msb__coded = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::copy_value(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__1__byte__octetstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__1__byte__octetstring__msb__coded = other_value.test__sig__1__byte__octetstring__msb__coded();
+} else {
+ single_value->field_test__sig__1__byte__octetstring__msb__coded.clean_up();
+}
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::copy_template(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__1__byte__octetstring__msb__coded().get_selection()) {
+single_value->field_test__sig__1__byte__octetstring__msb__coded = other_value.test__sig__1__byte__octetstring__msb__coded();
+} else {
+single_value->field_test__sig__1__byte__octetstring__msb__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__2__byte__octetstring__msb__coded().get_selection()) {
+single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME3__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::CANFD__MESSAGE__TESTFRAME3__msg__type_template()
+{
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::CANFD__MESSAGE__TESTFRAME3__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::CANFD__MESSAGE__TESTFRAME3__msg__type_template(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::CANFD__MESSAGE__TESTFRAME3__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME3__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME3__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type from an unbound optional field.");
+}
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::CANFD__MESSAGE__TESTFRAME3__msg__type_template(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template::~CANFD__MESSAGE__TESTFRAME3__msg__type_template()
+{
+clean_up();
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME3__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__TESTFRAME3__msg__type&)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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+}
+return *this;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type_template::match(const CANFD__MESSAGE__TESTFRAME3__msg__type& 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.test__sig__1__byte__octetstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__1__byte__octetstring__msb__coded.match(other_value.test__sig__1__byte__octetstring__msb__coded(), legacy))return FALSE;
+if(!other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__2__byte__octetstring__msb__coded.match(other_value.test__sig__2__byte__octetstring__msb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+}
+return FALSE;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__1__byte__octetstring__msb__coded.is_bound()
+
+ ||single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()
+;
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__1__byte__octetstring__msb__coded.is_value()
+ &&single_value->field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type CANFD__MESSAGE__TESTFRAME3__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+CANFD__MESSAGE__TESTFRAME3__msg__type ret_val;
+if (single_value->field_test__sig__1__byte__octetstring__msb__coded.is_bound()) {
+ret_val.test__sig__1__byte__octetstring__msb__coded() = single_value->field_test__sig__1__byte__octetstring__msb__coded.valueof();
+}
+if (single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()) {
+ret_val.test__sig__2__byte__octetstring__msb__coded() = single_value->field_test__sig__2__byte__octetstring__msb__coded.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MESSAGE__TESTFRAME3__msg__type_template[list_length];
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::test__sig__1__byte__octetstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__1__byte__octetstring__msb__coded;
+}
+
+const OCTETSTRING_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::test__sig__1__byte__octetstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_1_byte_octetstring_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+return single_value->field_test__sig__1__byte__octetstring__msb__coded;
+}
+
+OCTETSTRING_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::test__sig__2__byte__octetstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+const OCTETSTRING_template& CANFD__MESSAGE__TESTFRAME3__msg__type_template::test__sig__2__byte__octetstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_2_byte_octetstring_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+int CANFD__MESSAGE__TESTFRAME3__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type 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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+ }
+ return 0;
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_1_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__1__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_template::log_match(const CANFD__MESSAGE__TESTFRAME3__msg__type& 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_test__sig__1__byte__octetstring__msb__coded.match(match_value.test__sig__1__byte__octetstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_1_byte_octetstring_msb_coded");
+single_value->field_test__sig__1__byte__octetstring__msb__coded.log_match(match_value.test__sig__1__byte__octetstring__msb__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__2__byte__octetstring__msb__coded.match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_2_byte_octetstring_msb_coded");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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("{ test_sig_1_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__1__byte__octetstring__msb__coded.log_match(match_value.test__sig__1__byte__octetstring__msb__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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 CANFD__MESSAGE__TESTFRAME3__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__1__byte__octetstring__msb__coded.encode_text(text_buf);
+single_value->field_test__sig__2__byte__octetstring__msb__coded.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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__msb__coded.decode_text(text_buf);
+single_value->field_test__sig__2__byte__octetstring__msb__coded.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 CANFD__MESSAGE__TESTFRAME3__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_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: {
+ CANFD__MESSAGE__TESTFRAME3__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__1__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_1_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__1__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type");
+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 : "@CANFD_matrix_messages.CANFD_MESSAGE_TESTFRAME3_msg_type");
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MESSAGE__TESTFRAME3__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type()
+{
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type(const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded)
+ : field_test__sig__2__byte__octetstring__msb__coded(par_test__sig__2__byte__octetstring__msb__coded)
+{
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::clean_up()
+{
+field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::get_descriptor() const { return &CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_; }
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+ if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+ else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::operator==(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const
+{
+return field_test__sig__2__byte__octetstring__msb__coded==other_value.field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::is_bound() const
+{
+return (field_test__sig__2__byte__octetstring__msb__coded.is_bound());
+}
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::is_value() const
+{
+return field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_2_byte_octetstring_msb_coded := ");
+field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::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 (1<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type has 1 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type");
+ }
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::set_implicit_omit()
+{
+if (test__sig__2__byte__octetstring__msb__coded().is_bound()) test__sig__2__byte__octetstring__msb__coded().set_implicit_omit();
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__2__byte__octetstring__msb__coded.encode_text(text_buf);
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__2__byte__octetstring__msb__coded.decode_text(text_buf);
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__matrix__signals::OCT2__signal__type_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__2__byte__octetstring__msb__coded.RAW_decode(CAN__matrix__signals::OCT2__signal__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MESSAGE__EXTENDEDFRAME1__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 1;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(1);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__matrix__signals::OCT2__signal__type_descr_.raw);
+ encoded_length += field_test__sig__2__byte__octetstring__msb__coded.RAW_encode(CAN__matrix__signals::OCT2__signal__type_descr_, *myleaf.body.node.nodes[0]);
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::single_value_struct {
+OCTETSTRING_template field_test__sig__2__byte__octetstring__msb__coded;
+};
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::copy_value(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::copy_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__2__byte__octetstring__msb__coded().get_selection()) {
+single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template()
+{
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const OPTIONAL<CANFD__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type from an unbound optional field.");
+}
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::~CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template()
+{
+clean_up();
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const OPTIONAL<CANFD__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type&)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 @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+return *this;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::match(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& 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.test__sig__2__byte__octetstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__2__byte__octetstring__msb__coded.match(other_value.test__sig__2__byte__octetstring__msb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+return FALSE;
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()
+;
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type ret_val;
+if (single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()) {
+ret_val.test__sig__2__byte__octetstring__msb__coded() = single_value->field_test__sig__2__byte__octetstring__msb__coded.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template[list_length];
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::test__sig__2__byte__octetstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+const OCTETSTRING_template& CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::test__sig__2__byte__octetstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_2_byte_octetstring_msb_coded of a non-specific template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+int CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 1;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type 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 @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+ }
+ return 0;
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::log_match(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& 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_test__sig__2__byte__octetstring__msb__coded.match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_2_byte_octetstring_msb_coded");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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("{ test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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 CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__2__byte__octetstring__msb__coded.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 @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded.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 CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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 @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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: {
+ CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (1<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type has 1 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type");
+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 : "@CANFD_matrix_messages.CANFD_MESSAGE_EXTENDEDFRAME1_msg_type");
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void CANFD__MatrixPayloadUnion::copy_value(const CANFD__MatrixPayloadUnion& other_value)
+{
+switch (other_value.union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type(*other_value.field_message__MyTestframe0);
+break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type(*other_value.field_message__MyTestframe1);
+break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type(*other_value.field_message__MyTestframe2);
+break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type(*other_value.field_message__MyTestframe3);
+break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type(*other_value.field_message__extendedFrame1);
+break;
+default:
+TTCN_error("Assignment of an unbound union value of type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+union_selection = other_value.union_selection;
+}
+
+CANFD__MatrixPayloadUnion::CANFD__MatrixPayloadUnion()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+CANFD__MatrixPayloadUnion::CANFD__MatrixPayloadUnion(const CANFD__MatrixPayloadUnion& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+CANFD__MatrixPayloadUnion::~CANFD__MatrixPayloadUnion()
+{
+clean_up();
+}
+
+CANFD__MatrixPayloadUnion& CANFD__MatrixPayloadUnion::operator=(const CANFD__MatrixPayloadUnion& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MatrixPayloadUnion::operator==(const CANFD__MatrixPayloadUnion& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+return *field_message__MyTestframe0 == *other_value.field_message__MyTestframe0;
+case ALT_message__MyTestframe1:
+return *field_message__MyTestframe1 == *other_value.field_message__MyTestframe1;
+case ALT_message__MyTestframe2:
+return *field_message__MyTestframe2 == *other_value.field_message__MyTestframe2;
+case ALT_message__MyTestframe3:
+return *field_message__MyTestframe3 == *other_value.field_message__MyTestframe3;
+case ALT_message__extendedFrame1:
+return *field_message__extendedFrame1 == *other_value.field_message__extendedFrame1;
+default:
+return FALSE;
+}
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe0()
+{
+if (union_selection != ALT_message__MyTestframe0) {
+clean_up();
+field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type;
+union_selection = ALT_message__MyTestframe0;
+}
+return *field_message__MyTestframe0;
+}
+
+const CANFD__MESSAGE__TESTFRAME0__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe0() const
+{
+if (union_selection != ALT_message__MyTestframe0) TTCN_error("Using non-selected field message_MyTestframe0 in a value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *field_message__MyTestframe0;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe1()
+{
+if (union_selection != ALT_message__MyTestframe1) {
+clean_up();
+field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type;
+union_selection = ALT_message__MyTestframe1;
+}
+return *field_message__MyTestframe1;
+}
+
+const CANFD__MESSAGE__TESTFRAME1__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe1() const
+{
+if (union_selection != ALT_message__MyTestframe1) TTCN_error("Using non-selected field message_MyTestframe1 in a value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *field_message__MyTestframe1;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe2()
+{
+if (union_selection != ALT_message__MyTestframe2) {
+clean_up();
+field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type;
+union_selection = ALT_message__MyTestframe2;
+}
+return *field_message__MyTestframe2;
+}
+
+const CANFD__MESSAGE__TESTFRAME2__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe2() const
+{
+if (union_selection != ALT_message__MyTestframe2) TTCN_error("Using non-selected field message_MyTestframe2 in a value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *field_message__MyTestframe2;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe3()
+{
+if (union_selection != ALT_message__MyTestframe3) {
+clean_up();
+field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type;
+union_selection = ALT_message__MyTestframe3;
+}
+return *field_message__MyTestframe3;
+}
+
+const CANFD__MESSAGE__TESTFRAME3__msg__type& CANFD__MatrixPayloadUnion::message__MyTestframe3() const
+{
+if (union_selection != ALT_message__MyTestframe3) TTCN_error("Using non-selected field message_MyTestframe3 in a value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *field_message__MyTestframe3;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& CANFD__MatrixPayloadUnion::message__extendedFrame1()
+{
+if (union_selection != ALT_message__extendedFrame1) {
+clean_up();
+field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type;
+union_selection = ALT_message__extendedFrame1;
+}
+return *field_message__extendedFrame1;
+}
+
+const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& CANFD__MatrixPayloadUnion::message__extendedFrame1() const
+{
+if (union_selection != ALT_message__extendedFrame1) TTCN_error("Using non-selected field message_extendedFrame1 in a value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *field_message__extendedFrame1;
+}
+
+boolean CANFD__MatrixPayloadUnion::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return union_selection == checked_selection;
+}
+
+boolean CANFD__MatrixPayloadUnion::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean CANFD__MatrixPayloadUnion::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+case ALT_message__MyTestframe0: return field_message__MyTestframe0->is_value();
+case ALT_message__MyTestframe1: return field_message__MyTestframe1->is_value();
+case ALT_message__MyTestframe2: return field_message__MyTestframe2->is_value();
+case ALT_message__MyTestframe3: return field_message__MyTestframe3->is_value();
+case ALT_message__extendedFrame1: return field_message__extendedFrame1->is_value();
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void CANFD__MatrixPayloadUnion::clean_up()
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+ delete field_message__MyTestframe0;
+ break;
+case ALT_message__MyTestframe1:
+ delete field_message__MyTestframe1;
+ break;
+case ALT_message__MyTestframe2:
+ delete field_message__MyTestframe2;
+ break;
+case ALT_message__MyTestframe3:
+ delete field_message__MyTestframe3;
+ break;
+case ALT_message__extendedFrame1:
+ delete field_message__extendedFrame1;
+ break;
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void CANFD__MatrixPayloadUnion::log() const
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+field_message__MyTestframe0->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe1:
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+field_message__MyTestframe1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe2:
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+field_message__MyTestframe2->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe3:
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+field_message__MyTestframe3->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__extendedFrame1:
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+field_message__extendedFrame1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void CANFD__MatrixPayloadUnion::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, "message_MyTestframe0")) {
+ message__MyTestframe0().set_param(*mp_last);
+ if (!message__MyTestframe0().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe1")) {
+ message__MyTestframe1().set_param(*mp_last);
+ if (!message__MyTestframe1().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe2")) {
+ message__MyTestframe2().set_param(*mp_last);
+ if (!message__MyTestframe2().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe3")) {
+ message__MyTestframe3().set_param(*mp_last);
+ if (!message__MyTestframe3().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_extendedFrame1")) {
+ message__extendedFrame1().set_param(*mp_last);
+ if (!message__extendedFrame1().is_bound()) clean_up();
+ return;
+ }
+ mp_last->error("Field %s does not exist in type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.", last_name);
+}
+
+void CANFD__MatrixPayloadUnion::set_implicit_omit()
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0->set_implicit_omit(); break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1->set_implicit_omit(); break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2->set_implicit_omit(); break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3->set_implicit_omit(); break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1->set_implicit_omit(); break;
+default: break;
+}
+}
+
+void CANFD__MatrixPayloadUnion::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3->encode_text(text_buf);
+break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1->encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+
+void CANFD__MatrixPayloadUnion::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+case ALT_message__MyTestframe0:
+message__MyTestframe0().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe1:
+message__MyTestframe1().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe2:
+message__MyTestframe2().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe3:
+message__MyTestframe3().decode_text(text_buf);
+break;
+case ALT_message__extendedFrame1:
+message__extendedFrame1().decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+
+void CANFD__MatrixPayloadUnion::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MatrixPayloadUnion::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MatrixPayloadUnion::RAW_decode(
+const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit,
+raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
+{
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int starting_pos=p_buf.get_pos_bit();
+ if(sel_field!=-1){
+ switch(sel_field){
+ case 0: {
+ RAW_Force_Omit field_force_omit(0, force_omit, CANFD__MESSAGE__TESTFRAME0__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe0().RAW_decode(CANFD__MESSAGE__TESTFRAME0__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 1: {
+ RAW_Force_Omit field_force_omit(1, force_omit, CANFD__MESSAGE__TESTFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe1().RAW_decode(CANFD__MESSAGE__TESTFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 2: {
+ RAW_Force_Omit field_force_omit(2, force_omit, CANFD__MESSAGE__TESTFRAME2__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe2().RAW_decode(CANFD__MESSAGE__TESTFRAME2__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 3: {
+ RAW_Force_Omit field_force_omit(3, force_omit, CANFD__MESSAGE__TESTFRAME3__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe3().RAW_decode(CANFD__MESSAGE__TESTFRAME3__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 4: {
+ RAW_Force_Omit field_force_omit(4, force_omit, CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__extendedFrame1().RAW_decode(CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ default: break;
+ }
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ } else {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CANFD__MESSAGE__TESTFRAME0__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe0().RAW_decode(CANFD__MESSAGE__TESTFRAME0__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CANFD__MESSAGE__TESTFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe1().RAW_decode(CANFD__MESSAGE__TESTFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_2_force_omit(2, force_omit, CANFD__MESSAGE__TESTFRAME2__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe2().RAW_decode(CANFD__MESSAGE__TESTFRAME2__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_3_force_omit(3, force_omit, CANFD__MESSAGE__TESTFRAME3__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe3().RAW_decode(CANFD__MESSAGE__TESTFRAME3__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_4_force_omit(4, force_omit, CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__extendedFrame1().RAW_decode(CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ }
+ clean_up();
+ return -1;
+}
+
+int CANFD__MatrixPayloadUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
+{
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 5; myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
+ memset(myleaf.body.node.nodes, 0, 5 * sizeof(RAW_enc_tree *));
+ switch (union_selection) {
+ case ALT_message__MyTestframe0:
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, CANFD__MESSAGE__TESTFRAME0__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe0->RAW_encode(CANFD__MESSAGE__TESTFRAME0__msg__type_descr_, *myleaf.body.node.nodes[0]);
+ myleaf.body.node.nodes[0]->coding_descr = &CANFD__MESSAGE__TESTFRAME0__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe1:
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, CANFD__MESSAGE__TESTFRAME1__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe1->RAW_encode(CANFD__MESSAGE__TESTFRAME1__msg__type_descr_, *myleaf.body.node.nodes[1]);
+ myleaf.body.node.nodes[1]->coding_descr = &CANFD__MESSAGE__TESTFRAME1__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe2:
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, CANFD__MESSAGE__TESTFRAME2__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe2->RAW_encode(CANFD__MESSAGE__TESTFRAME2__msg__type_descr_, *myleaf.body.node.nodes[2]);
+ myleaf.body.node.nodes[2]->coding_descr = &CANFD__MESSAGE__TESTFRAME2__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe3:
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, CANFD__MESSAGE__TESTFRAME3__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe3->RAW_encode(CANFD__MESSAGE__TESTFRAME3__msg__type_descr_, *myleaf.body.node.nodes[3]);
+ myleaf.body.node.nodes[3]->coding_descr = &CANFD__MESSAGE__TESTFRAME3__msg__type_descr_;
+ break;
+ case ALT_message__extendedFrame1:
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw);
+ encoded_length = field_message__extendedFrame1->RAW_encode(CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, *myleaf.body.node.nodes[4]);
+ myleaf.body.node.nodes[4]->coding_descr = &CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_;
+ break;
+ default:
+ TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ }
+ return encoded_length;
+}
+
+void CANFD__MatrixPayloadUnion_template::copy_value(const CANFD__MatrixPayloadUnion& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type_template(other_value.message__MyTestframe0());
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type_template(other_value.message__MyTestframe1());
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type_template(other_value.message__MyTestframe2());
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type_template(other_value.message__MyTestframe3());
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(other_value.message__extendedFrame1());
+break;
+default:
+TTCN_error("Initializing a template with an unbound value of type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MatrixPayloadUnion_template::copy_template(const CANFD__MatrixPayloadUnion_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 CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type_template(*other_value.single_value.field_message__MyTestframe0);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type_template(*other_value.single_value.field_message__MyTestframe1);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type_template(*other_value.single_value.field_message__MyTestframe2);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type_template(*other_value.single_value.field_message__MyTestframe3);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(*other_value.single_value.field_message__extendedFrame1);
+break;
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MatrixPayloadUnion_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+set_selection(other_value);
+}
+
+CANFD__MatrixPayloadUnion_template::CANFD__MatrixPayloadUnion_template()
+{
+}
+
+CANFD__MatrixPayloadUnion_template::CANFD__MatrixPayloadUnion_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MatrixPayloadUnion_template::CANFD__MatrixPayloadUnion_template(const CANFD__MatrixPayloadUnion& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MatrixPayloadUnion_template::CANFD__MatrixPayloadUnion_template(const OPTIONAL<CANFD__MatrixPayloadUnion>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MatrixPayloadUnion&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion from an unbound optional field.");
+}
+}
+
+CANFD__MatrixPayloadUnion_template::CANFD__MatrixPayloadUnion_template(const CANFD__MatrixPayloadUnion_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+CANFD__MatrixPayloadUnion_template::~CANFD__MatrixPayloadUnion_template()
+{
+clean_up();
+}
+
+void CANFD__MatrixPayloadUnion_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+delete single_value.field_message__MyTestframe0;
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+delete single_value.field_message__MyTestframe1;
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+delete single_value.field_message__MyTestframe2;
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+delete single_value.field_message__MyTestframe3;
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+delete single_value.field_message__extendedFrame1;
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixPayloadUnion_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixPayloadUnion_template::operator=(const CANFD__MatrixPayloadUnion& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixPayloadUnion_template::operator=(const OPTIONAL<CANFD__MatrixPayloadUnion>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MatrixPayloadUnion&)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 @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+return *this;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixPayloadUnion_template::operator=(const CANFD__MatrixPayloadUnion_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MatrixPayloadUnion_template::match(const CANFD__MatrixPayloadUnion& 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:
+{
+CANFD__MatrixPayloadUnion::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == CANFD__MatrixPayloadUnion::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+return single_value.field_message__MyTestframe0->match(other_value.message__MyTestframe0(), legacy);
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+return single_value.field_message__MyTestframe1->match(other_value.message__MyTestframe1(), legacy);
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+return single_value.field_message__MyTestframe2->match(other_value.message__MyTestframe2(), legacy);
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+return single_value.field_message__MyTestframe3->match(other_value.message__MyTestframe3(), legacy);
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+return single_value.field_message__extendedFrame1->match(other_value.message__extendedFrame1(), legacy);
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+return FALSE;
+}
+
+boolean CANFD__MatrixPayloadUnion_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+return single_value.field_message__MyTestframe0->is_value();
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+return single_value.field_message__MyTestframe1->is_value();
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+return single_value.field_message__MyTestframe2->is_value();
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+return single_value.field_message__MyTestframe3->is_value();
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+return single_value.field_message__extendedFrame1->is_value();
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+
+CANFD__MatrixPayloadUnion CANFD__MatrixPayloadUnion_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 @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+CANFD__MatrixPayloadUnion ret_val;
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+ret_val.message__MyTestframe0() = single_value.field_message__MyTestframe0->valueof();
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+ret_val.message__MyTestframe1() = single_value.field_message__MyTestframe1->valueof();
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+ret_val.message__MyTestframe2() = single_value.field_message__MyTestframe2->valueof();
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+ret_val.message__MyTestframe3() = single_value.field_message__MyTestframe3->valueof();
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+ret_val.message__extendedFrame1() = single_value.field_message__extendedFrame1->valueof();
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+return ret_val;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixPayloadUnion_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return value_list.list_value[list_index];
+}
+void CANFD__MatrixPayloadUnion_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MatrixPayloadUnion_template[list_length];
+}
+
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe0()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type_template;
+single_value.union_selection = CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe0;
+}
+
+const CANFD__MESSAGE__TESTFRAME0__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe0() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe0 in a non-specific template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0) TTCN_error("Accessing non-selected field message_MyTestframe0 in a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe0;
+}
+
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe1()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type_template;
+single_value.union_selection = CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe1;
+}
+
+const CANFD__MESSAGE__TESTFRAME1__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe1() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe1 in a non-specific template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1) TTCN_error("Accessing non-selected field message_MyTestframe1 in a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe1;
+}
+
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe2()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type_template;
+single_value.union_selection = CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe2;
+}
+
+const CANFD__MESSAGE__TESTFRAME2__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe2() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe2 in a non-specific template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2) TTCN_error("Accessing non-selected field message_MyTestframe2 in a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe2;
+}
+
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe3()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type_template;
+single_value.union_selection = CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe3;
+}
+
+const CANFD__MESSAGE__TESTFRAME3__msg__type_template& CANFD__MatrixPayloadUnion_template::message__MyTestframe3() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe3 in a non-specific template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3) TTCN_error("Accessing non-selected field message_MyTestframe3 in a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe3;
+}
+
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MatrixPayloadUnion_template::message__extendedFrame1()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(ANY_VALUE);
+else single_value.field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+single_value.union_selection = CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__extendedFrame1;
+}
+
+const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& CANFD__MatrixPayloadUnion_template::message__extendedFrame1() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_extendedFrame1 in a non-specific template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+if (single_value.union_selection != CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1) TTCN_error("Accessing non-selected field message_extendedFrame1 in a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+return *single_value.field_message__extendedFrame1;
+}
+
+boolean CANFD__MatrixPayloadUnion_template::ischosen(CANFD__MatrixPayloadUnion::union_selection_type checked_selection) const
+{
+if (checked_selection == CANFD__MatrixPayloadUnion::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == CANFD__MatrixPayloadUnion::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+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 @CANFD_matrix_messages.CANFD_MatrixPayloadUnion 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 CANFD__MatrixPayloadUnion_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+single_value.field_message__MyTestframe0->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+single_value.field_message__MyTestframe1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+single_value.field_message__MyTestframe2->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+single_value.field_message__MyTestframe3->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+single_value.field_message__extendedFrame1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MatrixPayloadUnion_template::log_match(const CANFD__MatrixPayloadUnion& 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()) {
+switch (single_value.union_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe0");
+single_value.field_message__MyTestframe0->log_match(match_value.message__MyTestframe0(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+single_value.field_message__MyTestframe0->log_match(match_value.message__MyTestframe0(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe1");
+single_value.field_message__MyTestframe1->log_match(match_value.message__MyTestframe1(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+single_value.field_message__MyTestframe1->log_match(match_value.message__MyTestframe1(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe2");
+single_value.field_message__MyTestframe2->log_match(match_value.message__MyTestframe2(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+single_value.field_message__MyTestframe2->log_match(match_value.message__MyTestframe2(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe3");
+single_value.field_message__MyTestframe3->log_match(match_value.message__MyTestframe3(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+single_value.field_message__MyTestframe3->log_match(match_value.message__MyTestframe3(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_extendedFrame1");
+single_value.field_message__extendedFrame1->log_match(match_value.message__extendedFrame1(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+single_value.field_message__extendedFrame1->log_match(match_value.message__extendedFrame1(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 CANFD__MatrixPayloadUnion_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 CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0->encode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1->encode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2->encode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3->encode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1->encode_text(text_buf);
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+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 @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+
+void CANFD__MatrixPayloadUnion_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+{
+single_value.union_selection = CANFD__MatrixPayloadUnion::UNBOUND_VALUE;
+CANFD__MatrixPayloadUnion::union_selection_type new_selection = (CANFD__MatrixPayloadUnion::union_selection_type)text_buf.pull_int().get_val();
+switch (new_selection) {
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CANFD__MESSAGE__TESTFRAME0__msg__type_template;
+single_value.field_message__MyTestframe0->decode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CANFD__MESSAGE__TESTFRAME1__msg__type_template;
+single_value.field_message__MyTestframe1->decode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CANFD__MESSAGE__TESTFRAME2__msg__type_template;
+single_value.field_message__MyTestframe2->decode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CANFD__MESSAGE__TESTFRAME3__msg__type_template;
+single_value.field_message__MyTestframe3->decode_text(text_buf);
+break;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+single_value.field_message__extendedFrame1->decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+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 CANFD__MatrixPayloadUnion_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 @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+}
+
+boolean CANFD__MatrixPayloadUnion_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MatrixPayloadUnion_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
+if (value_list.list_value[v_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void CANFD__MatrixPayloadUnion_template::set_param(Module_Param& param)
+{
+ if (dynamic_cast<Module_Param_Name*>(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 `@CANFD_matrix_messages.CANFD_MatrixPayloadUnion'");
+ }
+ if (strcmp("message_MyTestframe0", param_field) == 0) {
+ message__MyTestframe0().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe1", param_field) == 0) {
+ message__MyTestframe1().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe2", param_field) == 0) {
+ message__MyTestframe2().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe3", param_field) == 0) {
+ message__MyTestframe3().set_param(param);
+ return;
+ } else if (strcmp("message_extendedFrame1", param_field) == 0) {
+ message__extendedFrame1().set_param(param);
+ return;
+ } else param.error("Field `%s' not found in union template type `@CANFD_matrix_messages.CANFD_MatrixPayloadUnion'", 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: {
+ CANFD__MatrixPayloadUnion_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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", "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+ 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, "message_MyTestframe0")) {
+ message__MyTestframe0().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe1")) {
+ message__MyTestframe1().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe2")) {
+ message__MyTestframe2().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe3")) {
+ message__MyTestframe3().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_extendedFrame1")) {
+ message__extendedFrame1().set_param(*mp_last);
+ break;
+ }
+ mp_last->error("Field %s does not exist in type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.", last_name);
+ } break;
+ default:
+ param.type_error("union template", "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MatrixPayloadUnion_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 CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0->check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+return;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1->check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+return;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2->check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+return;
+case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3->check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+return;
+case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1->check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+return;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @CANFD_matrix_messages.CANFD_MatrixPayloadUnion.");
+}
+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 : "@CANFD_matrix_messages.CANFD_MatrixPayloadUnion");
+}
+
+CANFD__MatrixUnion::CANFD__MatrixUnion()
+{
+}
+
+CANFD__MatrixUnion::CANFD__MatrixUnion(const OCTETSTRING& par_can__id,
+ const BITSTRING& par_can__flags,
+ const CANFD__MatrixPayloadUnion& par_can__pdu)
+ : field_can__id(par_can__id),
+ field_can__flags(par_can__flags),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CANFD__MatrixUnion::CANFD__MatrixUnion(const CANFD__MatrixUnion& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+else field_can__id.clean_up();
+if (other_value.can__flags().is_bound()) field_can__flags = other_value.can__flags();
+else field_can__flags.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CANFD__MatrixUnion::clean_up()
+{
+field_can__id.clean_up();
+field_can__flags.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__MatrixUnion::get_descriptor() const { return &CANFD__MatrixUnion_descr_; }
+CANFD__MatrixUnion& CANFD__MatrixUnion::operator=(const CANFD__MatrixUnion& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+ if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+ else field_can__id.clean_up();
+ if (other_value.can__flags().is_bound()) field_can__flags = other_value.can__flags();
+ else field_can__flags.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__MatrixUnion::operator==(const CANFD__MatrixUnion& other_value) const
+{
+return field_can__id==other_value.field_can__id
+ && field_can__flags==other_value.field_can__flags
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CANFD__MatrixUnion::is_bound() const
+{
+return (field_can__id.is_bound())
+ || (field_can__flags.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CANFD__MatrixUnion::is_value() const
+{
+return field_can__id.is_value()
+ && field_can__flags.is_value()
+ && field_can__pdu.is_value();
+}
+void CANFD__MatrixUnion::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_id := ");
+field_can__id.log();
+TTCN_Logger::log_event_str(", can_flags := ");
+field_can__flags.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__MatrixUnion::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 (3<param.get_size()) {
+ param.error("record value of type @CANFD_matrix_messages.CANFD_MatrixUnion has 3 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(2));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MatrixUnion: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CANFD_matrix_messages.CANFD_MatrixUnion");
+ }
+}
+
+void CANFD__MatrixUnion::set_implicit_omit()
+{
+if (can__id().is_bound()) can__id().set_implicit_omit();
+if (can__flags().is_bound()) can__flags().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CANFD__MatrixUnion::encode_text(Text_Buf& text_buf) const
+{
+field_can__id.encode_text(text_buf);
+field_can__flags.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CANFD__MatrixUnion::decode_text(Text_Buf& text_buf)
+{
+field_can__id.decode_text(text_buf);
+field_can__flags.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+void CANFD__MatrixUnion::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CANFD__MatrixUnion::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CANFD__MatrixUnion::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ int selected_field = -1;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, Can::CAN__id_descr_.raw->forceomit);
+ decoded_field_length = field_can__id.RAW_decode(Can::CAN__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, Can::CAN__flags_descr_.raw->forceomit);
+ decoded_field_length = field_can__flags.RAW_decode(Can::CAN__flags_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ if (field_can__id == os_0) selected_field = 0;
+ else if (field_can__id == os_1) selected_field = 1;
+ else if (field_can__id == os_2) selected_field = 2;
+ else if (field_can__id == os_3) selected_field = 3;
+ else if (field_can__id == os_4) selected_field = 4;
+ else selected_field = -1;
+ RAW_Force_Omit field_2_force_omit(2, force_omit, CANFD__MatrixUnion_can__pdu_descr_.raw->forceomit);
+ decoded_field_length = field_can__pdu.RAW_decode(CANFD__MatrixUnion_can__pdu_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CANFD__MatrixUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 3;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, Can::CAN__id_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, Can::CAN__flags_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, CANFD__MatrixUnion_can__pdu_descr_.raw);
+ encoded_length += field_can__id.RAW_encode(Can::CAN__id_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_can__flags.RAW_encode(Can::CAN__flags_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_can__pdu.RAW_encode(CANFD__MatrixUnion_can__pdu_descr_, *myleaf.body.node.nodes[2]);
+ switch (field_can__pdu.get_selection()) {
+ case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe0:
+ if (field_can__id != os_0) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_0.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe1:
+ if (field_can__id != os_1) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_1.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe2:
+ if (field_can__id != os_2) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_2.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CANFD__MatrixPayloadUnion::ALT_message__MyTestframe3:
+ if (field_can__id != os_3) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_3.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CANFD__MatrixPayloadUnion::ALT_message__extendedFrame1:
+ if (field_can__id != os_4) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_4.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ default:;
+ }
+ return myleaf.length = encoded_length;
+}
+
+struct CANFD__MatrixUnion_template::single_value_struct {
+OCTETSTRING_template field_can__id;
+BITSTRING_template field_can__flags;
+CANFD__MatrixPayloadUnion_template field_can__pdu;
+};
+
+void CANFD__MatrixUnion_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_can__id = ANY_VALUE;
+single_value->field_can__flags = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CANFD__MatrixUnion_template::copy_value(const CANFD__MatrixUnion& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__id().is_bound()) {
+ single_value->field_can__id = other_value.can__id();
+} else {
+ single_value->field_can__id.clean_up();
+}
+if (other_value.can__flags().is_bound()) {
+ single_value->field_can__flags = other_value.can__flags();
+} else {
+ single_value->field_can__flags.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__MatrixUnion_template::copy_template(const CANFD__MatrixUnion_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__id().get_selection()) {
+single_value->field_can__id = other_value.can__id();
+} else {
+single_value->field_can__id.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__flags().get_selection()) {
+single_value->field_can__flags = other_value.can__flags();
+} else {
+single_value->field_can__flags.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__MatrixUnion_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__MatrixUnion_template::CANFD__MatrixUnion_template()
+{
+}
+
+CANFD__MatrixUnion_template::CANFD__MatrixUnion_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__MatrixUnion_template::CANFD__MatrixUnion_template(const CANFD__MatrixUnion& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__MatrixUnion_template::CANFD__MatrixUnion_template(const OPTIONAL<CANFD__MatrixUnion>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MatrixUnion&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CANFD_matrix_messages.CANFD_MatrixUnion from an unbound optional field.");
+}
+}
+
+CANFD__MatrixUnion_template::CANFD__MatrixUnion_template(const CANFD__MatrixUnion_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__MatrixUnion_template::~CANFD__MatrixUnion_template()
+{
+clean_up();
+}
+
+CANFD__MatrixUnion_template& CANFD__MatrixUnion_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__MatrixUnion_template& CANFD__MatrixUnion_template::operator=(const CANFD__MatrixUnion& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__MatrixUnion_template& CANFD__MatrixUnion_template::operator=(const OPTIONAL<CANFD__MatrixUnion>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__MatrixUnion&)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 @CANFD_matrix_messages.CANFD_MatrixUnion.");
+}
+return *this;
+}
+
+CANFD__MatrixUnion_template& CANFD__MatrixUnion_template::operator=(const CANFD__MatrixUnion_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__MatrixUnion_template::match(const CANFD__MatrixUnion& 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.can__id().is_bound()) return FALSE;
+if(!single_value->field_can__id.match(other_value.can__id(), legacy))return FALSE;
+if(!other_value.can__flags().is_bound()) return FALSE;
+if(!single_value->field_can__flags.match(other_value.can__flags(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+}
+return FALSE;
+}
+
+boolean CANFD__MatrixUnion_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__id.is_bound()
+
+ ||single_value->field_can__flags.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CANFD__MatrixUnion_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__id.is_value()
+ &&single_value->field_can__flags.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CANFD__MatrixUnion_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__MatrixUnion CANFD__MatrixUnion_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 @CANFD_matrix_messages.CANFD_MatrixUnion.");
+CANFD__MatrixUnion ret_val;
+if (single_value->field_can__id.is_bound()) {
+ret_val.can__id() = single_value->field_can__id.valueof();
+}
+if (single_value->field_can__flags.is_bound()) {
+ret_val.can__flags() = single_value->field_can__flags.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CANFD__MatrixUnion_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__MatrixUnion_template[list_length];
+}
+
+CANFD__MatrixUnion_template& CANFD__MatrixUnion_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CANFD__MatrixUnion_template::can__id()
+{
+set_specific();
+return single_value->field_can__id;
+}
+
+const OCTETSTRING_template& CANFD__MatrixUnion_template::can__id() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_id of a non-specific template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+return single_value->field_can__id;
+}
+
+BITSTRING_template& CANFD__MatrixUnion_template::can__flags()
+{
+set_specific();
+return single_value->field_can__flags;
+}
+
+const BITSTRING_template& CANFD__MatrixUnion_template::can__flags() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_flags of a non-specific template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+return single_value->field_can__flags;
+}
+
+CANFD__MatrixPayloadUnion_template& CANFD__MatrixUnion_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const CANFD__MatrixPayloadUnion_template& CANFD__MatrixUnion_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+return single_value->field_can__pdu;
+}
+
+int CANFD__MatrixUnion_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MatrixUnion which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 3;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MatrixUnion 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 @CANFD_matrix_messages.CANFD_MatrixUnion containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MatrixUnion containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MatrixUnion containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CANFD_matrix_messages.CANFD_MatrixUnion containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CANFD_matrix_messages.CANFD_MatrixUnion.");
+ }
+ return 0;
+}
+
+void CANFD__MatrixUnion_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_id := ");
+single_value->field_can__id.log();
+TTCN_Logger::log_event_str(", can_flags := ");
+single_value->field_can__flags.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__MatrixUnion_template::log_match(const CANFD__MatrixUnion& 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_can__id.match(match_value.can__id(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_id");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__flags.match(match_value.can__flags(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_flags");
+single_value->field_can__flags.log_match(match_value.can__flags(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_id := ");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::log_event_str(", can_flags := ");
+single_value->field_can__flags.log_match(match_value.can__flags(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CANFD__MatrixUnion_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__id.encode_text(text_buf);
+single_value->field_can__flags.encode_text(text_buf);
+single_value->field_can__pdu.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 @CANFD_matrix_messages.CANFD_MatrixUnion.");
+}
+}
+
+void CANFD__MatrixUnion_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_can__id.decode_text(text_buf);
+single_value->field_can__flags.decode_text(text_buf);
+single_value->field_can__pdu.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 CANFD__MatrixUnion_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 @CANFD_matrix_messages.CANFD_MatrixUnion.");
+}
+}
+
+void CANFD__MatrixUnion_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: {
+ CANFD__MatrixUnion_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (3<param.get_size()) {
+ param.error("record template of type @CANFD_matrix_messages.CANFD_MatrixUnion has 3 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(2));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CANFD_matrix_messages.CANFD_MatrixUnion: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CANFD_matrix_messages.CANFD_MatrixUnion");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__MatrixUnion_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_can__id.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixUnion");
+single_value->field_can__flags.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixUnion");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@CANFD_matrix_messages.CANFD_MatrixUnion");
+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 : "@CANFD_matrix_messages.CANFD_MatrixUnion");
+}
+
+boolean CANFD__MatrixUnion_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__MatrixUnion_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CANFD_matrix_messages.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CANFD_matrix_messages");
+Can::module_object.pre_init_module();
+CAN__matrix__signals::module_object.pre_init_module();
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CANFD_matrix_messages.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CANFD_matrix_messages");
+Can::module_object.post_init_module();
+CAN__matrix__signals::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/CANFD_matrix_messages.d b/demo/CANFD_matrix_messages.d
new file mode 100644
index 0000000..6ca7d30
--- /dev/null
+++ b/demo/CANFD_matrix_messages.d
@@ -0,0 +1,60 @@
+CANFD_matrix_messages.o CANFD_matrix_messages.d : CANFD_matrix_messages.cc \
+ CANFD_matrix_messages.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh Can.hh \
+ General_Types.hh CAN_matrix_signals.hh CAN_matrix_general_types.hh
diff --git a/demo/CANFD_matrix_messages.hh b/demo/CANFD_matrix_messages.hh
new file mode 100644
index 0000000..524e89c
--- /dev/null
+++ b/demo/CANFD_matrix_messages.hh
@@ -0,0 +1,766 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CANFD__matrix__messages_HH
+#define CANFD__matrix__messages_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "Can.hh"
+#include "CAN_matrix_signals.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef CANFD__matrix__messages_HH
+#endif
+
+namespace CANFD__matrix__messages {
+
+/* Forward declarations of classes */
+
+class CANFD__MESSAGE__TESTFRAME0__msg__type;
+class CANFD__MESSAGE__TESTFRAME0__msg__type_template;
+class CANFD__MESSAGE__TESTFRAME1__msg__type;
+class CANFD__MESSAGE__TESTFRAME1__msg__type_template;
+class CANFD__MESSAGE__TESTFRAME2__msg__type;
+class CANFD__MESSAGE__TESTFRAME2__msg__type_template;
+class CANFD__MESSAGE__TESTFRAME3__msg__type;
+class CANFD__MESSAGE__TESTFRAME3__msg__type_template;
+class CANFD__MESSAGE__EXTENDEDFRAME1__msg__type;
+class CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+class CANFD__MatrixPayloadUnion;
+class CANFD__MatrixPayloadUnion_template;
+class CANFD__MatrixUnion;
+class CANFD__MatrixUnion_template;
+
+} /* end of namespace */
+
+#ifndef CANFD__matrix__messages_HH
+#define CANFD__matrix__messages_HH
+
+namespace CANFD__matrix__messages {
+
+/* Class definitions */
+
+class CANFD__MESSAGE__TESTFRAME0__msg__type : public Base_Type {
+ BITSTRING field_test__sig__11__bit__bitstring__lsb__coded;
+ BITSTRING field_test__sig__5__bit__bitstring__lsb__coded;
+public:
+ CANFD__MESSAGE__TESTFRAME0__msg__type();
+ CANFD__MESSAGE__TESTFRAME0__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__lsb__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__lsb__coded);
+ CANFD__MESSAGE__TESTFRAME0__msg__type(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MESSAGE__TESTFRAME0__msg__type& operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value);
+ boolean operator==(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value) const;
+ inline boolean operator!=(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& test__sig__11__bit__bitstring__lsb__coded()
+ {return field_test__sig__11__bit__bitstring__lsb__coded;}
+ inline const BITSTRING& test__sig__11__bit__bitstring__lsb__coded() const
+ {return field_test__sig__11__bit__bitstring__lsb__coded;}
+ inline BITSTRING& test__sig__5__bit__bitstring__lsb__coded()
+ {return field_test__sig__5__bit__bitstring__lsb__coded;}
+ inline const BITSTRING& test__sig__5__bit__bitstring__lsb__coded() const
+ {return field_test__sig__5__bit__bitstring__lsb__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MESSAGE__TESTFRAME0__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MESSAGE__TESTFRAME0__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value);
+void copy_template(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+
+public:
+CANFD__MESSAGE__TESTFRAME0__msg__type_template();
+CANFD__MESSAGE__TESTFRAME0__msg__type_template(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME0__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+~CANFD__MESSAGE__TESTFRAME0__msg__type_template();
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& operator=(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME0__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+boolean match(const CANFD__MESSAGE__TESTFRAME0__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MESSAGE__TESTFRAME0__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& list_item(unsigned int list_index) const;
+BITSTRING_template& test__sig__11__bit__bitstring__lsb__coded();
+const BITSTRING_template& test__sig__11__bit__bitstring__lsb__coded() const;
+BITSTRING_template& test__sig__5__bit__bitstring__lsb__coded();
+const BITSTRING_template& test__sig__5__bit__bitstring__lsb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MESSAGE__TESTFRAME0__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__MESSAGE__TESTFRAME1__msg__type : public Base_Type {
+ BITSTRING field_test__sig__11__bit__bitstring__msb__coded;
+ BITSTRING field_test__sig__5__bit__bitstring__msb__coded;
+public:
+ CANFD__MESSAGE__TESTFRAME1__msg__type();
+ CANFD__MESSAGE__TESTFRAME1__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__msb__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__msb__coded);
+ CANFD__MESSAGE__TESTFRAME1__msg__type(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MESSAGE__TESTFRAME1__msg__type& operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value);
+ boolean operator==(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value) const;
+ inline boolean operator!=(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& test__sig__11__bit__bitstring__msb__coded()
+ {return field_test__sig__11__bit__bitstring__msb__coded;}
+ inline const BITSTRING& test__sig__11__bit__bitstring__msb__coded() const
+ {return field_test__sig__11__bit__bitstring__msb__coded;}
+ inline BITSTRING& test__sig__5__bit__bitstring__msb__coded()
+ {return field_test__sig__5__bit__bitstring__msb__coded;}
+ inline const BITSTRING& test__sig__5__bit__bitstring__msb__coded() const
+ {return field_test__sig__5__bit__bitstring__msb__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MESSAGE__TESTFRAME1__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MESSAGE__TESTFRAME1__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value);
+void copy_template(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+
+public:
+CANFD__MESSAGE__TESTFRAME1__msg__type_template();
+CANFD__MESSAGE__TESTFRAME1__msg__type_template(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME1__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+~CANFD__MESSAGE__TESTFRAME1__msg__type_template();
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& operator=(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME1__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+boolean match(const CANFD__MESSAGE__TESTFRAME1__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MESSAGE__TESTFRAME1__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& list_item(unsigned int list_index) const;
+BITSTRING_template& test__sig__11__bit__bitstring__msb__coded();
+const BITSTRING_template& test__sig__11__bit__bitstring__msb__coded() const;
+BITSTRING_template& test__sig__5__bit__bitstring__msb__coded();
+const BITSTRING_template& test__sig__5__bit__bitstring__msb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MESSAGE__TESTFRAME1__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__MESSAGE__TESTFRAME2__msg__type : public Base_Type {
+ INTEGER field_test__sig__11__bit__integer__msb__coded;
+ INTEGER field_test__sig__5__bit__integer__msb__coded;
+public:
+ CANFD__MESSAGE__TESTFRAME2__msg__type();
+ CANFD__MESSAGE__TESTFRAME2__msg__type(const INTEGER& par_test__sig__11__bit__integer__msb__coded,
+ const INTEGER& par_test__sig__5__bit__integer__msb__coded);
+ CANFD__MESSAGE__TESTFRAME2__msg__type(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MESSAGE__TESTFRAME2__msg__type& operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value);
+ boolean operator==(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value) const;
+ inline boolean operator!=(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline INTEGER& test__sig__11__bit__integer__msb__coded()
+ {return field_test__sig__11__bit__integer__msb__coded;}
+ inline const INTEGER& test__sig__11__bit__integer__msb__coded() const
+ {return field_test__sig__11__bit__integer__msb__coded;}
+ inline INTEGER& test__sig__5__bit__integer__msb__coded()
+ {return field_test__sig__5__bit__integer__msb__coded;}
+ inline const INTEGER& test__sig__5__bit__integer__msb__coded() const
+ {return field_test__sig__5__bit__integer__msb__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MESSAGE__TESTFRAME2__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MESSAGE__TESTFRAME2__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value);
+void copy_template(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+
+public:
+CANFD__MESSAGE__TESTFRAME2__msg__type_template();
+CANFD__MESSAGE__TESTFRAME2__msg__type_template(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME2__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+~CANFD__MESSAGE__TESTFRAME2__msg__type_template();
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& operator=(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME2__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+boolean match(const CANFD__MESSAGE__TESTFRAME2__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MESSAGE__TESTFRAME2__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& list_item(unsigned int list_index) const;
+INTEGER_template& test__sig__11__bit__integer__msb__coded();
+const INTEGER_template& test__sig__11__bit__integer__msb__coded() const;
+INTEGER_template& test__sig__5__bit__integer__msb__coded();
+const INTEGER_template& test__sig__5__bit__integer__msb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MESSAGE__TESTFRAME2__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__MESSAGE__TESTFRAME3__msg__type : public Base_Type {
+ OCTETSTRING field_test__sig__1__byte__octetstring__msb__coded;
+ OCTETSTRING field_test__sig__2__byte__octetstring__msb__coded;
+public:
+ CANFD__MESSAGE__TESTFRAME3__msg__type();
+ CANFD__MESSAGE__TESTFRAME3__msg__type(const OCTETSTRING& par_test__sig__1__byte__octetstring__msb__coded,
+ const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded);
+ CANFD__MESSAGE__TESTFRAME3__msg__type(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MESSAGE__TESTFRAME3__msg__type& operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value);
+ boolean operator==(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value) const;
+ inline boolean operator!=(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& test__sig__1__byte__octetstring__msb__coded()
+ {return field_test__sig__1__byte__octetstring__msb__coded;}
+ inline const OCTETSTRING& test__sig__1__byte__octetstring__msb__coded() const
+ {return field_test__sig__1__byte__octetstring__msb__coded;}
+ inline OCTETSTRING& test__sig__2__byte__octetstring__msb__coded()
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline const OCTETSTRING& test__sig__2__byte__octetstring__msb__coded() const
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MESSAGE__TESTFRAME3__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MESSAGE__TESTFRAME3__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value);
+void copy_template(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+
+public:
+CANFD__MESSAGE__TESTFRAME3__msg__type_template();
+CANFD__MESSAGE__TESTFRAME3__msg__type_template(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template(const OPTIONAL<CANFD__MESSAGE__TESTFRAME3__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+~CANFD__MESSAGE__TESTFRAME3__msg__type_template();
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& operator=(template_sel other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& operator=(const OPTIONAL<CANFD__MESSAGE__TESTFRAME3__msg__type>& other_value);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& operator=(const CANFD__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+boolean match(const CANFD__MESSAGE__TESTFRAME3__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MESSAGE__TESTFRAME3__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& test__sig__1__byte__octetstring__msb__coded();
+const OCTETSTRING_template& test__sig__1__byte__octetstring__msb__coded() const;
+OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded();
+const OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MESSAGE__TESTFRAME3__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__MESSAGE__EXTENDEDFRAME1__msg__type : public Base_Type {
+ OCTETSTRING field_test__sig__2__byte__octetstring__msb__coded;
+public:
+ CANFD__MESSAGE__EXTENDEDFRAME1__msg__type();
+ CANFD__MESSAGE__EXTENDEDFRAME1__msg__type(const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded);
+ CANFD__MESSAGE__EXTENDEDFRAME1__msg__type(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+ boolean operator==(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const;
+ inline boolean operator!=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& test__sig__2__byte__octetstring__msb__coded()
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline const OCTETSTRING& test__sig__2__byte__octetstring__msb__coded() const
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline int size_of() const
+ {return 1;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+void copy_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+
+public:
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template();
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(template_sel other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const OPTIONAL<CANFD__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+~CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template();
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(template_sel other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const OPTIONAL<CANFD__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+boolean match(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded();
+const OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__MatrixPayloadUnion : public Base_Type {
+public:
+enum union_selection_type { UNBOUND_VALUE = 0, ALT_message__MyTestframe0 = 1, ALT_message__MyTestframe1 = 2, ALT_message__MyTestframe2 = 3, ALT_message__MyTestframe3 = 4, ALT_message__extendedFrame1 = 5 };
+private:
+union_selection_type union_selection;
+union {
+CANFD__MESSAGE__TESTFRAME0__msg__type *field_message__MyTestframe0;
+CANFD__MESSAGE__TESTFRAME1__msg__type *field_message__MyTestframe1;
+CANFD__MESSAGE__TESTFRAME2__msg__type *field_message__MyTestframe2;
+CANFD__MESSAGE__TESTFRAME3__msg__type *field_message__MyTestframe3;
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type *field_message__extendedFrame1;
+};
+void copy_value(const CANFD__MatrixPayloadUnion& other_value);
+
+public:
+CANFD__MatrixPayloadUnion();
+CANFD__MatrixPayloadUnion(const CANFD__MatrixPayloadUnion& other_value);
+~CANFD__MatrixPayloadUnion();
+CANFD__MatrixPayloadUnion& operator=(const CANFD__MatrixPayloadUnion& other_value);
+boolean operator==(const CANFD__MatrixPayloadUnion& other_value) const;
+inline boolean operator!=(const CANFD__MatrixPayloadUnion& other_value) const { return !(*this == other_value); }
+CANFD__MESSAGE__TESTFRAME0__msg__type& message__MyTestframe0();
+const CANFD__MESSAGE__TESTFRAME0__msg__type& message__MyTestframe0() const;
+CANFD__MESSAGE__TESTFRAME1__msg__type& message__MyTestframe1();
+const CANFD__MESSAGE__TESTFRAME1__msg__type& message__MyTestframe1() const;
+CANFD__MESSAGE__TESTFRAME2__msg__type& message__MyTestframe2();
+const CANFD__MESSAGE__TESTFRAME2__msg__type& message__MyTestframe2() const;
+CANFD__MESSAGE__TESTFRAME3__msg__type& message__MyTestframe3();
+const CANFD__MESSAGE__TESTFRAME3__msg__type& message__MyTestframe3() const;
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& message__extendedFrame1();
+const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type& message__extendedFrame1() const;
+inline union_selection_type get_selection() const { return union_selection; }
+boolean ischosen(union_selection_type checked_selection) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MatrixPayloadUnion_template : public Base_Template {
+union {
+struct {
+CANFD__MatrixPayloadUnion::union_selection_type union_selection;
+union {
+CANFD__MESSAGE__TESTFRAME0__msg__type_template *field_message__MyTestframe0;
+CANFD__MESSAGE__TESTFRAME1__msg__type_template *field_message__MyTestframe1;
+CANFD__MESSAGE__TESTFRAME2__msg__type_template *field_message__MyTestframe2;
+CANFD__MESSAGE__TESTFRAME3__msg__type_template *field_message__MyTestframe3;
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template *field_message__extendedFrame1;
+};
+} single_value;
+struct {
+unsigned int n_values;
+CANFD__MatrixPayloadUnion_template *list_value;
+} value_list;
+};
+void copy_value(const CANFD__MatrixPayloadUnion& other_value);
+
+void copy_template(const CANFD__MatrixPayloadUnion_template& other_value);
+
+public:
+CANFD__MatrixPayloadUnion_template();
+CANFD__MatrixPayloadUnion_template(template_sel other_value);
+CANFD__MatrixPayloadUnion_template(const CANFD__MatrixPayloadUnion& other_value);
+CANFD__MatrixPayloadUnion_template(const OPTIONAL<CANFD__MatrixPayloadUnion>& other_value);
+CANFD__MatrixPayloadUnion_template(const CANFD__MatrixPayloadUnion_template& other_value);
+~CANFD__MatrixPayloadUnion_template();
+void clean_up();
+CANFD__MatrixPayloadUnion_template& operator=(template_sel other_value);
+CANFD__MatrixPayloadUnion_template& operator=(const CANFD__MatrixPayloadUnion& other_value);
+CANFD__MatrixPayloadUnion_template& operator=(const OPTIONAL<CANFD__MatrixPayloadUnion>& other_value);
+CANFD__MatrixPayloadUnion_template& operator=(const CANFD__MatrixPayloadUnion_template& other_value);
+boolean match(const CANFD__MatrixPayloadUnion& other_value, boolean legacy = FALSE) const;
+boolean is_value() const;CANFD__MatrixPayloadUnion valueof() const;
+CANFD__MatrixPayloadUnion_template& list_item(unsigned int list_index) const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MESSAGE__TESTFRAME0__msg__type_template& message__MyTestframe0();
+const CANFD__MESSAGE__TESTFRAME0__msg__type_template& message__MyTestframe0() const;
+CANFD__MESSAGE__TESTFRAME1__msg__type_template& message__MyTestframe1();
+const CANFD__MESSAGE__TESTFRAME1__msg__type_template& message__MyTestframe1() const;
+CANFD__MESSAGE__TESTFRAME2__msg__type_template& message__MyTestframe2();
+const CANFD__MESSAGE__TESTFRAME2__msg__type_template& message__MyTestframe2() const;
+CANFD__MESSAGE__TESTFRAME3__msg__type_template& message__MyTestframe3();
+const CANFD__MESSAGE__TESTFRAME3__msg__type_template& message__MyTestframe3() const;
+CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& message__extendedFrame1();
+const CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_template& message__extendedFrame1() const;
+boolean ischosen(CANFD__MatrixPayloadUnion::union_selection_type checked_selection) const;
+void log() const;
+void log_match(const CANFD__MatrixPayloadUnion& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class CANFD__MatrixUnion : public Base_Type {
+ OCTETSTRING field_can__id;
+ BITSTRING field_can__flags;
+ CANFD__MatrixPayloadUnion field_can__pdu;
+public:
+ CANFD__MatrixUnion();
+ CANFD__MatrixUnion(const OCTETSTRING& par_can__id,
+ const BITSTRING& par_can__flags,
+ const CANFD__MatrixPayloadUnion& par_can__pdu);
+ CANFD__MatrixUnion(const CANFD__MatrixUnion& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__MatrixUnion& operator=(const CANFD__MatrixUnion& other_value);
+ boolean operator==(const CANFD__MatrixUnion& other_value) const;
+ inline boolean operator!=(const CANFD__MatrixUnion& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& can__id()
+ {return field_can__id;}
+ inline const OCTETSTRING& can__id() const
+ {return field_can__id;}
+ inline BITSTRING& can__flags()
+ {return field_can__flags;}
+ inline const BITSTRING& can__flags() const
+ {return field_can__flags;}
+ inline CANFD__MatrixPayloadUnion& can__pdu()
+ {return field_can__pdu;}
+ inline const CANFD__MatrixPayloadUnion& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 3;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CANFD__MatrixUnion_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__MatrixUnion_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__MatrixUnion& other_value);
+void copy_template(const CANFD__MatrixUnion_template& other_value);
+
+public:
+CANFD__MatrixUnion_template();
+CANFD__MatrixUnion_template(template_sel other_value);
+CANFD__MatrixUnion_template(const CANFD__MatrixUnion& other_value);
+CANFD__MatrixUnion_template(const OPTIONAL<CANFD__MatrixUnion>& other_value);
+CANFD__MatrixUnion_template(const CANFD__MatrixUnion_template& other_value);
+~CANFD__MatrixUnion_template();
+CANFD__MatrixUnion_template& operator=(template_sel other_value);
+CANFD__MatrixUnion_template& operator=(const CANFD__MatrixUnion& other_value);
+CANFD__MatrixUnion_template& operator=(const OPTIONAL<CANFD__MatrixUnion>& other_value);
+CANFD__MatrixUnion_template& operator=(const CANFD__MatrixUnion_template& other_value);
+boolean match(const CANFD__MatrixUnion& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__MatrixUnion valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__MatrixUnion_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& can__id();
+const OCTETSTRING_template& can__id() const;
+BITSTRING_template& can__flags();
+const BITSTRING_template& can__flags() const;
+CANFD__MatrixPayloadUnion_template& can__pdu();
+const CANFD__MatrixPayloadUnion_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__MatrixUnion& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+
+/* Global variable declarations */
+
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__lsb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__lsb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME0__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME1__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_raw_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME2__msg__type_descr_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__msb__coded_descr_;
+extern const XERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__TESTFRAME3__msg__type_descr_;
+extern const XERdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MESSAGE__EXTENDEDFRAME1__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MatrixPayloadUnion_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MatrixPayloadUnion_descr_;
+extern const XERdescriptor_t CANFD__MatrixUnion_can__id_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MatrixUnion_can__id_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__id_descr_;
+extern const XERdescriptor_t CANFD__MatrixUnion_can__flags_xer_;
+extern const TTCN_OERdescriptor_t CANFD__MatrixUnion_can__flags_oer_;
+extern const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__flags_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MatrixUnion_can__pdu_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MatrixUnion_can__pdu_descr_;
+extern const TTCN_RAWdescriptor_t CANFD__MatrixUnion_raw_;
+extern const TTCN_Typedescriptor_t CANFD__MatrixUnion_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CANFD_matrix_messages.o b/demo/CANFD_matrix_messages.o
new file mode 100644
index 0000000..6ec3ea3
--- /dev/null
+++ b/demo/CANFD_matrix_messages.o
Binary files differ
diff --git a/demo/CAN_matrix.cc b/demo/CAN_matrix.cc
new file mode 100644
index 0000000..57d2275
--- /dev/null
+++ b/demo/CAN_matrix.cc
@@ -0,0 +1,249 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix.hh"
+
+namespace CAN__matrix {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char module_checksum[] = { 0x8e, 0x22, 0x0d, 0xe7, 0xf7, 0x4f, 0x31, 0xaa, 0xcd, 0x58, 0xc4, 0xbe, 0x36, 0x30, 0xe3, 0x71 };
+
+/* Global variable definitions */
+
+TTCN_Module module_object("CAN_matrix", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Bodies of functions, altsteps and testcases */
+
+OCTETSTRING f__encode__can__matrix(const CAN__matrix__messages::CAN__MatrixUnion& pdu)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_encode_can_matrix(): Encoding @CAN_matrix_messages.CAN_MatrixUnion: ");
+pdu.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_Buffer ttcn_buffer;
+pdu.encode(CAN__matrix__messages::CAN__MatrixUnion_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW, 0);
+OCTETSTRING ret_val;
+ttcn_buffer.get_string(ret_val);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_encode_can_matrix(): Stream after encoding: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+return ret_val;
+}
+
+CAN__matrix__messages::CAN__MatrixUnion f__decode__can__matrix(const OCTETSTRING& data)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_decode_can_matrix(): Stream before decoding: ");
+data.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_EncDec::clear_error();
+TTCN_Buffer ttcn_buffer(data);
+CAN__matrix__messages::CAN__MatrixUnion ret_val;
+ret_val.decode(CAN__matrix__messages::CAN__MatrixUnion_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_decode_can_matrix(): Decoded @CAN_matrix_messages.CAN_MatrixUnion: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
+if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()) {
+ttcn_buffer.cut();
+OCTETSTRING tmp_os;
+ttcn_buffer.get_string(tmp_os);
+TTCN_Logger::begin_event_log2str();
+tmp_os.log();
+CHARSTRING remaining_stream = TTCN_Logger::end_event_log2str();
+TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_EXTRA_DATA, "f_decode_can_matrix(): Data remained at the end of the stream after successful decoding: %s", (const char*) remaining_stream);
+}
+}
+return ret_val;
+}
+
+OCTETSTRING f__encode__canfd__matrix(const CANFD__matrix__messages::CANFD__MatrixUnion& pdu)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_encode_canfd_matrix(): Encoding @CANFD_matrix_messages.CANFD_MatrixUnion: ");
+pdu.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_Buffer ttcn_buffer;
+pdu.encode(CANFD__matrix__messages::CANFD__MatrixUnion_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW, 0);
+OCTETSTRING ret_val;
+ttcn_buffer.get_string(ret_val);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_encode_canfd_matrix(): Stream after encoding: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+return ret_val;
+}
+
+CANFD__matrix__messages::CANFD__MatrixUnion f__decode__canfd__matrix(const OCTETSTRING& data)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_decode_canfd_matrix(): Stream before decoding: ");
+data.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_EncDec::clear_error();
+TTCN_Buffer ttcn_buffer(data);
+CANFD__matrix__messages::CANFD__MatrixUnion ret_val;
+ret_val.decode(CANFD__matrix__messages::CANFD__MatrixUnion_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("f_decode_canfd_matrix(): Decoded @CANFD_matrix_messages.CANFD_MatrixUnion: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
+if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()) {
+ttcn_buffer.cut();
+OCTETSTRING tmp_os;
+ttcn_buffer.get_string(tmp_os);
+TTCN_Logger::begin_event_log2str();
+tmp_os.log();
+CHARSTRING remaining_stream = TTCN_Logger::end_event_log2str();
+TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_EXTRA_DATA, "f_decode_canfd_matrix(): Data remained at the end of the stream after successful decoding: %s", (const char*) remaining_stream);
+}
+}
+return ret_val;
+}
+
+CAN__matrix__messages::CAN__MatrixUnion canframe2canmatrixframe(const Can::CAN__frame& p__can__frame)
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 21, TTCN_Location::LOCATION_FUNCTION, "canframe2canmatrixframe");
+current_location.update_lineno(23);
+#line 23 "CAN_matrix.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion v__can__frame__can__matrix;
+current_location.update_lineno(28);
+#line 28 "CAN_matrix.ttcn"
+v__can__frame__can__matrix = f__decode__can__matrix((const_cast< const Can::CAN__frame&>(p__can__frame).can__id() + const_cast< const Can::CAN__frame&>(p__can__frame).can__pdu()));
+current_location.update_lineno(31);
+#line 31 "CAN_matrix.ttcn"
+return v__can__frame__can__matrix;
+}
+
+Can::CAN__frame canmatrixframe2can(const CAN__matrix__messages::CAN__MatrixUnion& p__can__matrix__frame)
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 35, TTCN_Location::LOCATION_FUNCTION, "canmatrixframe2can");
+current_location.update_lineno(37);
+#line 37 "CAN_matrix.ttcn"
+Can::CAN__frame v__can__frame;
+current_location.update_lineno(39);
+#line 39 "CAN_matrix.ttcn"
+v__can__frame.can__id() = const_cast< const CAN__matrix__messages::CAN__MatrixUnion&>(p__can__matrix__frame).can__id();
+current_location.update_lineno(40);
+#line 40 "CAN_matrix.ttcn"
+OCTETSTRING v__encoded;
+current_location.update_lineno(41);
+#line 41 "CAN_matrix.ttcn"
+v__encoded = f__encode__can__matrix(p__can__matrix__frame);
+current_location.update_lineno(42);
+#line 42 "CAN_matrix.ttcn"
+v__can__frame.can__pdu() = substr(v__encoded, 4, (v__encoded.lengthof() - 4));
+current_location.update_lineno(43);
+#line 43 "CAN_matrix.ttcn"
+return v__can__frame;
+}
+
+CANFD__matrix__messages::CANFD__MatrixUnion canfdframe2canfdmatrixframe(const Can::CANFD__frame& p__canfd__frame)
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 47, TTCN_Location::LOCATION_FUNCTION, "canfdframe2canfdmatrixframe");
+current_location.update_lineno(49);
+#line 49 "CAN_matrix.ttcn"
+CANFD__matrix__messages::CANFD__MatrixUnion v__canfd__frame__canfd__matrix;
+current_location.update_lineno(54);
+#line 54 "CAN_matrix.ttcn"
+v__canfd__frame__canfd__matrix = f__decode__canfd__matrix(((const_cast< const Can::CANFD__frame&>(p__canfd__frame).can__id() + bit2oct(const_cast< const Can::CANFD__frame&>(p__canfd__frame).can__flags())) + const_cast< const Can::CANFD__frame&>(p__canfd__frame).can__pdu()));
+current_location.update_lineno(57);
+#line 57 "CAN_matrix.ttcn"
+return v__canfd__frame__canfd__matrix;
+}
+
+Can::CANFD__frame canfdmatrixframe2canfd(const CANFD__matrix__messages::CANFD__MatrixUnion& p__canfd__matrix__frame)
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 61, TTCN_Location::LOCATION_FUNCTION, "canfdmatrixframe2canfd");
+current_location.update_lineno(63);
+#line 63 "CAN_matrix.ttcn"
+Can::CANFD__frame v__canfd__frame;
+current_location.update_lineno(65);
+#line 65 "CAN_matrix.ttcn"
+v__canfd__frame.can__id() = const_cast< const CANFD__matrix__messages::CANFD__MatrixUnion&>(p__canfd__matrix__frame).can__id();
+current_location.update_lineno(66);
+#line 66 "CAN_matrix.ttcn"
+OCTETSTRING v__encoded;
+current_location.update_lineno(67);
+#line 67 "CAN_matrix.ttcn"
+v__encoded = f__encode__canfd__matrix(p__canfd__matrix__frame);
+current_location.update_lineno(68);
+#line 68 "CAN_matrix.ttcn"
+v__canfd__frame.can__pdu() = substr(v__encoded, 4, 1);
+current_location.update_lineno(69);
+#line 69 "CAN_matrix.ttcn"
+v__canfd__frame.can__pdu() = substr(v__encoded, 5, (v__encoded.lengthof() - 5));
+current_location.update_lineno(70);
+#line 70 "CAN_matrix.ttcn"
+return v__canfd__frame;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix");
+SocketCAN__Types::module_object.pre_init_module();
+CAN__matrix__messages::module_object.pre_init_module();
+CANFD__matrix__messages::module_object.pre_init_module();
+module_object.add_function("f_encode_can_matrix", (genericfunc_t)&f__encode__can__matrix, NULL);
+module_object.add_function("f_decode_can_matrix", (genericfunc_t)&f__decode__can__matrix, NULL);
+module_object.add_function("f_encode_canfd_matrix", (genericfunc_t)&f__encode__canfd__matrix, NULL);
+module_object.add_function("f_decode_canfd_matrix", (genericfunc_t)&f__decode__canfd__matrix, NULL);
+module_object.add_function("canframe2canmatrixframe", (genericfunc_t)&canframe2canmatrixframe, NULL);
+module_object.add_function("canmatrixframe2can", (genericfunc_t)&canmatrixframe2can, NULL);
+module_object.add_function("canfdframe2canfdmatrixframe", (genericfunc_t)&canfdframe2canfdmatrixframe, NULL);
+module_object.add_function("canfdmatrixframe2canfd", (genericfunc_t)&canfdmatrixframe2canfd, NULL);
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CAN_matrix.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix");
+SocketCAN__Types::module_object.post_init_module();
+CAN__matrix__messages::module_object.post_init_module();
+CANFD__matrix__messages::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix.d b/demo/CAN_matrix.d
new file mode 100644
index 0000000..23db9ad
--- /dev/null
+++ b/demo/CAN_matrix.d
@@ -0,0 +1,61 @@
+CAN_matrix.o CAN_matrix.d : CAN_matrix.cc CAN_matrix.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh \
+ SocketCAN_Types.hh Bcm.hh Can.hh General_Types.hh Raw.hh \
+ CAN_matrix_messages.hh CAN_matrix_signals.hh CAN_matrix_general_types.hh \
+ CANFD_matrix_messages.hh
diff --git a/demo/CAN_matrix.hh b/demo/CAN_matrix.hh
new file mode 100644
index 0000000..d8d74a3
--- /dev/null
+++ b/demo/CAN_matrix.hh
@@ -0,0 +1,53 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix_HH
+#define CAN__matrix_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "SocketCAN_Types.hh"
+#include "CAN_matrix_messages.hh"
+#include "CANFD_matrix_messages.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CAN__matrix {
+
+/* Function prototypes */
+
+extern OCTETSTRING f__encode__can__matrix(const CAN__matrix__messages::CAN__MatrixUnion& pdu);
+extern CAN__matrix__messages::CAN__MatrixUnion f__decode__can__matrix(const OCTETSTRING& data);
+extern OCTETSTRING f__encode__canfd__matrix(const CANFD__matrix__messages::CANFD__MatrixUnion& pdu);
+extern CANFD__matrix__messages::CANFD__MatrixUnion f__decode__canfd__matrix(const OCTETSTRING& data);
+extern CAN__matrix__messages::CAN__MatrixUnion canframe2canmatrixframe(const Can::CAN__frame& p__can__frame);
+extern Can::CAN__frame canmatrixframe2can(const CAN__matrix__messages::CAN__MatrixUnion& p__can__matrix__frame);
+extern CANFD__matrix__messages::CANFD__MatrixUnion canfdframe2canfdmatrixframe(const Can::CANFD__frame& p__canfd__frame);
+extern Can::CANFD__frame canfdmatrixframe2canfd(const CANFD__matrix__messages::CANFD__MatrixUnion& p__canfd__matrix__frame);
+
+/* Global variable declarations */
+
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix.o b/demo/CAN_matrix.o
new file mode 100644
index 0000000..90d093c
--- /dev/null
+++ b/demo/CAN_matrix.o
Binary files differ
diff --git a/demo/CAN_matrix_general_types.cc b/demo/CAN_matrix_general_types.cc
new file mode 100644
index 0000000..6967b73
--- /dev/null
+++ b/demo/CAN_matrix_general_types.cc
@@ -0,0 +1,595 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix_general_types.hh"
+
+namespace CAN__matrix__general__types {
+
+/* Literal string constants */
+
+static const unsigned char module_checksum[] = { 0x62, 0x28, 0x4b, 0x2b, 0xf8, 0x3b, 0x33, 0xae, 0x48, 0x23, 0x0e, 0xdf, 0x90, 0x75, 0xec, 0x9e };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t INT1_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT1_xer_ = { {"INT1>\n", "INT1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT1_descr_ = { "@CAN_matrix_general_types.INT1", &INTEGER_ber_, &INT1_raw_, &INTEGER_text_, &INT1_xer_, &INTEGER_json_, &INT1_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT2_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT2_xer_ = { {"INT2>\n", "INT2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT2_descr_ = { "@CAN_matrix_general_types.INT2", &INTEGER_ber_, &INT2_raw_, &INTEGER_text_, &INT2_xer_, &INTEGER_json_, &INT2_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT3_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT3_xer_ = { {"INT3>\n", "INT3>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT3_descr_ = { "@CAN_matrix_general_types.INT3", &INTEGER_ber_, &INT3_raw_, &INTEGER_text_, &INT3_xer_, &INTEGER_json_, &INT3_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT4_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT4_xer_ = { {"INT4>\n", "INT4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT4_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT4_descr_ = { "@CAN_matrix_general_types.INT4", &INTEGER_ber_, &INT4_raw_, &INTEGER_text_, &INT4_xer_, &INTEGER_json_, &INT4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT1__MSB_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT1__MSB_xer_ = { {"INT_BIT1_MSB>\n", "INT_BIT1_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT1__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT1__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT1_MSB", &INTEGER_ber_, &INT__BIT1__MSB_raw_, &INTEGER_text_, &INT__BIT1__MSB_xer_, &INTEGER_json_, &INT__BIT1__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT2__MSB_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT2__MSB_xer_ = { {"INT_BIT2_MSB>\n", "INT_BIT2_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT2__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT2__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT2_MSB", &INTEGER_ber_, &INT__BIT2__MSB_raw_, &INTEGER_text_, &INT__BIT2__MSB_xer_, &INTEGER_json_, &INT__BIT2__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT3__MSB_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT3__MSB_xer_ = { {"INT_BIT3_MSB>\n", "INT_BIT3_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT3__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT3__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT3_MSB", &INTEGER_ber_, &INT__BIT3__MSB_raw_, &INTEGER_text_, &INT__BIT3__MSB_xer_, &INTEGER_json_, &INT__BIT3__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT4__MSB_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT4__MSB_xer_ = { {"INT_BIT4_MSB>\n", "INT_BIT4_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT4__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT4__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT4_MSB", &INTEGER_ber_, &INT__BIT4__MSB_raw_, &INTEGER_text_, &INT__BIT4__MSB_xer_, &INTEGER_json_, &INT__BIT4__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT5__MSB_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT5__MSB_xer_ = { {"INT_BIT5_MSB>\n", "INT_BIT5_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT5__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT5__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT5_MSB", &INTEGER_ber_, &INT__BIT5__MSB_raw_, &INTEGER_text_, &INT__BIT5__MSB_xer_, &INTEGER_json_, &INT__BIT5__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT6__MSB_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT6__MSB_xer_ = { {"INT_BIT6_MSB>\n", "INT_BIT6_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT6__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT6__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT6_MSB", &INTEGER_ber_, &INT__BIT6__MSB_raw_, &INTEGER_text_, &INT__BIT6__MSB_xer_, &INTEGER_json_, &INT__BIT6__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT7__MSB_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT7__MSB_xer_ = { {"INT_BIT7_MSB>\n", "INT_BIT7_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT7__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT7__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT7_MSB", &INTEGER_ber_, &INT__BIT7__MSB_raw_, &INTEGER_text_, &INT__BIT7__MSB_xer_, &INTEGER_json_, &INT__BIT7__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT8__MSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT8__MSB_xer_ = { {"INT_BIT8_MSB>\n", "INT_BIT8_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT8__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT8__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT8_MSB", &INTEGER_ber_, &INT__BIT8__MSB_raw_, &INTEGER_text_, &INT__BIT8__MSB_xer_, &INTEGER_json_, &INT__BIT8__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT9__MSB_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT9__MSB_xer_ = { {"INT_BIT9_MSB>\n", "INT_BIT9_MSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT9__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT9__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT9_MSB", &INTEGER_ber_, &INT__BIT9__MSB_raw_, &INTEGER_text_, &INT__BIT9__MSB_xer_, &INTEGER_json_, &INT__BIT9__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT10__MSB_raw_ = {10,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT10__MSB_xer_ = { {"INT_BIT10_MSB>\n", "INT_BIT10_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT10__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT10__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT10_MSB", &INTEGER_ber_, &INT__BIT10__MSB_raw_, &INTEGER_text_, &INT__BIT10__MSB_xer_, &INTEGER_json_, &INT__BIT10__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT11__MSB_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT11__MSB_xer_ = { {"INT_BIT11_MSB>\n", "INT_BIT11_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT11__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT11__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT11_MSB", &INTEGER_ber_, &INT__BIT11__MSB_raw_, &INTEGER_text_, &INT__BIT11__MSB_xer_, &INTEGER_json_, &INT__BIT11__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT12__MSB_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT12__MSB_xer_ = { {"INT_BIT12_MSB>\n", "INT_BIT12_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT12__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT12__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT12_MSB", &INTEGER_ber_, &INT__BIT12__MSB_raw_, &INTEGER_text_, &INT__BIT12__MSB_xer_, &INTEGER_json_, &INT__BIT12__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT13__MSB_raw_ = {13,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT13__MSB_xer_ = { {"INT_BIT13_MSB>\n", "INT_BIT13_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT13__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT13__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT13_MSB", &INTEGER_ber_, &INT__BIT13__MSB_raw_, &INTEGER_text_, &INT__BIT13__MSB_xer_, &INTEGER_json_, &INT__BIT13__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT14__MSB_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT14__MSB_xer_ = { {"INT_BIT14_MSB>\n", "INT_BIT14_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT14__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT14__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT14_MSB", &INTEGER_ber_, &INT__BIT14__MSB_raw_, &INTEGER_text_, &INT__BIT14__MSB_xer_, &INTEGER_json_, &INT__BIT14__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT15__MSB_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT15__MSB_xer_ = { {"INT_BIT15_MSB>\n", "INT_BIT15_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT15__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT15__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT15_MSB", &INTEGER_ber_, &INT__BIT15__MSB_raw_, &INTEGER_text_, &INT__BIT15__MSB_xer_, &INTEGER_json_, &INT__BIT15__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT16__MSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT16__MSB_xer_ = { {"INT_BIT16_MSB>\n", "INT_BIT16_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT16__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT16__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT16_MSB", &INTEGER_ber_, &INT__BIT16__MSB_raw_, &INTEGER_text_, &INT__BIT16__MSB_xer_, &INTEGER_json_, &INT__BIT16__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT17__MSB_raw_ = {17,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT17__MSB_xer_ = { {"INT_BIT17_MSB>\n", "INT_BIT17_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT17__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT17__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT17_MSB", &INTEGER_ber_, &INT__BIT17__MSB_raw_, &INTEGER_text_, &INT__BIT17__MSB_xer_, &INTEGER_json_, &INT__BIT17__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT18__MSB_raw_ = {18,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT18__MSB_xer_ = { {"INT_BIT18_MSB>\n", "INT_BIT18_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT18__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT18__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT18_MSB", &INTEGER_ber_, &INT__BIT18__MSB_raw_, &INTEGER_text_, &INT__BIT18__MSB_xer_, &INTEGER_json_, &INT__BIT18__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT19__MSB_raw_ = {19,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT19__MSB_xer_ = { {"INT_BIT19_MSB>\n", "INT_BIT19_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT19__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT19__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT19_MSB", &INTEGER_ber_, &INT__BIT19__MSB_raw_, &INTEGER_text_, &INT__BIT19__MSB_xer_, &INTEGER_json_, &INT__BIT19__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT20__MSB_raw_ = {20,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT20__MSB_xer_ = { {"INT_BIT20_MSB>\n", "INT_BIT20_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT20__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT20__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT20_MSB", &INTEGER_ber_, &INT__BIT20__MSB_raw_, &INTEGER_text_, &INT__BIT20__MSB_xer_, &INTEGER_json_, &INT__BIT20__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT21__MSB_raw_ = {21,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT21__MSB_xer_ = { {"INT_BIT21_MSB>\n", "INT_BIT21_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT21__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT21__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT21_MSB", &INTEGER_ber_, &INT__BIT21__MSB_raw_, &INTEGER_text_, &INT__BIT21__MSB_xer_, &INTEGER_json_, &INT__BIT21__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT22__MSB_raw_ = {22,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT22__MSB_xer_ = { {"INT_BIT22_MSB>\n", "INT_BIT22_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT22__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT22__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT22_MSB", &INTEGER_ber_, &INT__BIT22__MSB_raw_, &INTEGER_text_, &INT__BIT22__MSB_xer_, &INTEGER_json_, &INT__BIT22__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT23__MSB_raw_ = {23,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT23__MSB_xer_ = { {"INT_BIT23_MSB>\n", "INT_BIT23_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT23__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT23__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT23_MSB", &INTEGER_ber_, &INT__BIT23__MSB_raw_, &INTEGER_text_, &INT__BIT23__MSB_xer_, &INTEGER_json_, &INT__BIT23__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT24__MSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT24__MSB_xer_ = { {"INT_BIT24_MSB>\n", "INT_BIT24_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT24__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT24__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT24_MSB", &INTEGER_ber_, &INT__BIT24__MSB_raw_, &INTEGER_text_, &INT__BIT24__MSB_xer_, &INTEGER_json_, &INT__BIT24__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT25__MSB_raw_ = {25,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT25__MSB_xer_ = { {"INT_BIT25_MSB>\n", "INT_BIT25_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT25__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT25__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT25_MSB", &INTEGER_ber_, &INT__BIT25__MSB_raw_, &INTEGER_text_, &INT__BIT25__MSB_xer_, &INTEGER_json_, &INT__BIT25__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT26__MSB_raw_ = {26,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT26__MSB_xer_ = { {"INT_BIT26_MSB>\n", "INT_BIT26_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT26__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT26__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT26_MSB", &INTEGER_ber_, &INT__BIT26__MSB_raw_, &INTEGER_text_, &INT__BIT26__MSB_xer_, &INTEGER_json_, &INT__BIT26__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT27__MSB_raw_ = {27,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT27__MSB_xer_ = { {"INT_BIT27_MSB>\n", "INT_BIT27_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT27__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT27__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT27_MSB", &INTEGER_ber_, &INT__BIT27__MSB_raw_, &INTEGER_text_, &INT__BIT27__MSB_xer_, &INTEGER_json_, &INT__BIT27__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT28__MSB_raw_ = {28,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT28__MSB_xer_ = { {"INT_BIT28_MSB>\n", "INT_BIT28_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT28__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT28__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT28_MSB", &INTEGER_ber_, &INT__BIT28__MSB_raw_, &INTEGER_text_, &INT__BIT28__MSB_xer_, &INTEGER_json_, &INT__BIT28__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT39__MSB_raw_ = {29,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT39__MSB_xer_ = { {"INT_BIT39_MSB>\n", "INT_BIT39_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT39__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT39__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT39_MSB", &INTEGER_ber_, &INT__BIT39__MSB_raw_, &INTEGER_text_, &INT__BIT39__MSB_xer_, &INTEGER_json_, &INT__BIT39__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT30__MSB_raw_ = {30,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT30__MSB_xer_ = { {"INT_BIT30_MSB>\n", "INT_BIT30_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT30__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT30__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT30_MSB", &INTEGER_ber_, &INT__BIT30__MSB_raw_, &INTEGER_text_, &INT__BIT30__MSB_xer_, &INTEGER_json_, &INT__BIT30__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT31__MSB_raw_ = {31,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT31__MSB_xer_ = { {"INT_BIT31_MSB>\n", "INT_BIT31_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT31__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT31__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT31_MSB", &INTEGER_ber_, &INT__BIT31__MSB_raw_, &INTEGER_text_, &INT__BIT31__MSB_xer_, &INTEGER_json_, &INT__BIT31__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT32__MSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT32__MSB_xer_ = { {"INT_BIT32_MSB>\n", "INT_BIT32_MSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT32__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT32__MSB_descr_ = { "@CAN_matrix_general_types.INT_BIT32_MSB", &INTEGER_ber_, &INT__BIT32__MSB_raw_, &INTEGER_text_, &INT__BIT32__MSB_xer_, &INTEGER_json_, &INT__BIT32__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT1__LSB_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT1__LSB_xer_ = { {"INT_BIT1_LSB>\n", "INT_BIT1_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT1__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT1__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT1_LSB", &INTEGER_ber_, &INT__BIT1__LSB_raw_, &INTEGER_text_, &INT__BIT1__LSB_xer_, &INTEGER_json_, &INT__BIT1__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT2__LSB_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT2__LSB_xer_ = { {"INT_BIT2_LSB>\n", "INT_BIT2_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT2__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT2__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT2_LSB", &INTEGER_ber_, &INT__BIT2__LSB_raw_, &INTEGER_text_, &INT__BIT2__LSB_xer_, &INTEGER_json_, &INT__BIT2__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT3__LSB_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT3__LSB_xer_ = { {"INT_BIT3_LSB>\n", "INT_BIT3_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT3__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT3__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT3_LSB", &INTEGER_ber_, &INT__BIT3__LSB_raw_, &INTEGER_text_, &INT__BIT3__LSB_xer_, &INTEGER_json_, &INT__BIT3__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT4__LSB_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT4__LSB_xer_ = { {"INT_BIT4_LSB>\n", "INT_BIT4_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT4__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT4__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT4_LSB", &INTEGER_ber_, &INT__BIT4__LSB_raw_, &INTEGER_text_, &INT__BIT4__LSB_xer_, &INTEGER_json_, &INT__BIT4__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT5__LSB_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT5__LSB_xer_ = { {"INT_BIT5_LSB>\n", "INT_BIT5_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT5__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT5__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT5_LSB", &INTEGER_ber_, &INT__BIT5__LSB_raw_, &INTEGER_text_, &INT__BIT5__LSB_xer_, &INTEGER_json_, &INT__BIT5__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT6__LSB_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT6__LSB_xer_ = { {"INT_BIT6_LSB>\n", "INT_BIT6_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT6__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT6__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT6_LSB", &INTEGER_ber_, &INT__BIT6__LSB_raw_, &INTEGER_text_, &INT__BIT6__LSB_xer_, &INTEGER_json_, &INT__BIT6__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT7__LSB_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT7__LSB_xer_ = { {"INT_BIT7_LSB>\n", "INT_BIT7_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT7__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT7__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT7_LSB", &INTEGER_ber_, &INT__BIT7__LSB_raw_, &INTEGER_text_, &INT__BIT7__LSB_xer_, &INTEGER_json_, &INT__BIT7__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT8__LSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT8__LSB_xer_ = { {"INT_BIT8_LSB>\n", "INT_BIT8_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT8__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT8__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT8_LSB", &INTEGER_ber_, &INT__BIT8__LSB_raw_, &INTEGER_text_, &INT__BIT8__LSB_xer_, &INTEGER_json_, &INT__BIT8__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT9__LSB_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT9__LSB_xer_ = { {"INT_BIT9_LSB>\n", "INT_BIT9_LSB>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT9__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT9__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT9_LSB", &INTEGER_ber_, &INT__BIT9__LSB_raw_, &INTEGER_text_, &INT__BIT9__LSB_xer_, &INTEGER_json_, &INT__BIT9__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT10__LSB_raw_ = {10,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT10__LSB_xer_ = { {"INT_BIT10_LSB>\n", "INT_BIT10_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT10__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT10__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT10_LSB", &INTEGER_ber_, &INT__BIT10__LSB_raw_, &INTEGER_text_, &INT__BIT10__LSB_xer_, &INTEGER_json_, &INT__BIT10__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT11__LSB_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT11__LSB_xer_ = { {"INT_BIT11_LSB>\n", "INT_BIT11_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT11__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT11__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT11_LSB", &INTEGER_ber_, &INT__BIT11__LSB_raw_, &INTEGER_text_, &INT__BIT11__LSB_xer_, &INTEGER_json_, &INT__BIT11__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT12__LSB_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT12__LSB_xer_ = { {"INT_BIT12_LSB>\n", "INT_BIT12_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT12__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT12__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT12_LSB", &INTEGER_ber_, &INT__BIT12__LSB_raw_, &INTEGER_text_, &INT__BIT12__LSB_xer_, &INTEGER_json_, &INT__BIT12__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT13__LSB_raw_ = {13,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT13__LSB_xer_ = { {"INT_BIT13_LSB>\n", "INT_BIT13_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT13__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT13__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT13_LSB", &INTEGER_ber_, &INT__BIT13__LSB_raw_, &INTEGER_text_, &INT__BIT13__LSB_xer_, &INTEGER_json_, &INT__BIT13__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT14__LSB_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT14__LSB_xer_ = { {"INT_BIT14_LSB>\n", "INT_BIT14_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT14__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT14__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT14_LSB", &INTEGER_ber_, &INT__BIT14__LSB_raw_, &INTEGER_text_, &INT__BIT14__LSB_xer_, &INTEGER_json_, &INT__BIT14__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT15__LSB_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT15__LSB_xer_ = { {"INT_BIT15_LSB>\n", "INT_BIT15_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT15__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT15__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT15_LSB", &INTEGER_ber_, &INT__BIT15__LSB_raw_, &INTEGER_text_, &INT__BIT15__LSB_xer_, &INTEGER_json_, &INT__BIT15__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT16__LSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT16__LSB_xer_ = { {"INT_BIT16_LSB>\n", "INT_BIT16_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT16__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT16__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT16_LSB", &INTEGER_ber_, &INT__BIT16__LSB_raw_, &INTEGER_text_, &INT__BIT16__LSB_xer_, &INTEGER_json_, &INT__BIT16__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT17__LSB_raw_ = {17,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT17__LSB_xer_ = { {"INT_BIT17_LSB>\n", "INT_BIT17_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT17__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT17__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT17_LSB", &INTEGER_ber_, &INT__BIT17__LSB_raw_, &INTEGER_text_, &INT__BIT17__LSB_xer_, &INTEGER_json_, &INT__BIT17__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT18__LSB_raw_ = {18,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT18__LSB_xer_ = { {"INT_BIT18_LSB>\n", "INT_BIT18_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT18__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT18__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT18_LSB", &INTEGER_ber_, &INT__BIT18__LSB_raw_, &INTEGER_text_, &INT__BIT18__LSB_xer_, &INTEGER_json_, &INT__BIT18__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT19__LSB_raw_ = {19,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT19__LSB_xer_ = { {"INT_BIT19_LSB>\n", "INT_BIT19_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT19__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT19__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT19_LSB", &INTEGER_ber_, &INT__BIT19__LSB_raw_, &INTEGER_text_, &INT__BIT19__LSB_xer_, &INTEGER_json_, &INT__BIT19__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT20__LSB_raw_ = {20,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT20__LSB_xer_ = { {"INT_BIT20_LSB>\n", "INT_BIT20_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT20__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT20__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT20_LSB", &INTEGER_ber_, &INT__BIT20__LSB_raw_, &INTEGER_text_, &INT__BIT20__LSB_xer_, &INTEGER_json_, &INT__BIT20__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT21__LSB_raw_ = {21,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT21__LSB_xer_ = { {"INT_BIT21_LSB>\n", "INT_BIT21_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT21__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT21__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT21_LSB", &INTEGER_ber_, &INT__BIT21__LSB_raw_, &INTEGER_text_, &INT__BIT21__LSB_xer_, &INTEGER_json_, &INT__BIT21__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT22__LSB_raw_ = {22,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT22__LSB_xer_ = { {"INT_BIT22_LSB>\n", "INT_BIT22_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT22__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT22__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT22_LSB", &INTEGER_ber_, &INT__BIT22__LSB_raw_, &INTEGER_text_, &INT__BIT22__LSB_xer_, &INTEGER_json_, &INT__BIT22__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT23__LSB_raw_ = {23,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT23__LSB_xer_ = { {"INT_BIT23_LSB>\n", "INT_BIT23_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT23__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT23__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT23_LSB", &INTEGER_ber_, &INT__BIT23__LSB_raw_, &INTEGER_text_, &INT__BIT23__LSB_xer_, &INTEGER_json_, &INT__BIT23__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT24__LSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT24__LSB_xer_ = { {"INT_BIT24_LSB>\n", "INT_BIT24_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT24__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT24__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT24_LSB", &INTEGER_ber_, &INT__BIT24__LSB_raw_, &INTEGER_text_, &INT__BIT24__LSB_xer_, &INTEGER_json_, &INT__BIT24__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT25__LSB_raw_ = {25,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT25__LSB_xer_ = { {"INT_BIT25_LSB>\n", "INT_BIT25_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT25__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT25__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT25_LSB", &INTEGER_ber_, &INT__BIT25__LSB_raw_, &INTEGER_text_, &INT__BIT25__LSB_xer_, &INTEGER_json_, &INT__BIT25__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT26__LSB_raw_ = {26,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT26__LSB_xer_ = { {"INT_BIT26_LSB>\n", "INT_BIT26_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT26__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT26__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT26_LSB", &INTEGER_ber_, &INT__BIT26__LSB_raw_, &INTEGER_text_, &INT__BIT26__LSB_xer_, &INTEGER_json_, &INT__BIT26__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT27__LSB_raw_ = {27,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT27__LSB_xer_ = { {"INT_BIT27_LSB>\n", "INT_BIT27_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT27__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT27__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT27_LSB", &INTEGER_ber_, &INT__BIT27__LSB_raw_, &INTEGER_text_, &INT__BIT27__LSB_xer_, &INTEGER_json_, &INT__BIT27__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT28__LSB_raw_ = {28,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT28__LSB_xer_ = { {"INT_BIT28_LSB>\n", "INT_BIT28_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT28__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT28__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT28_LSB", &INTEGER_ber_, &INT__BIT28__LSB_raw_, &INTEGER_text_, &INT__BIT28__LSB_xer_, &INTEGER_json_, &INT__BIT28__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT39__LSB_raw_ = {29,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT39__LSB_xer_ = { {"INT_BIT39_LSB>\n", "INT_BIT39_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT39__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT39__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT39_LSB", &INTEGER_ber_, &INT__BIT39__LSB_raw_, &INTEGER_text_, &INT__BIT39__LSB_xer_, &INTEGER_json_, &INT__BIT39__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT30__LSB_raw_ = {30,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT30__LSB_xer_ = { {"INT_BIT30_LSB>\n", "INT_BIT30_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT30__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT30__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT30_LSB", &INTEGER_ber_, &INT__BIT30__LSB_raw_, &INTEGER_text_, &INT__BIT30__LSB_xer_, &INTEGER_json_, &INT__BIT30__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT31__LSB_raw_ = {31,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT31__LSB_xer_ = { {"INT_BIT31_LSB>\n", "INT_BIT31_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT31__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT31__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT31_LSB", &INTEGER_ber_, &INT__BIT31__LSB_raw_, &INTEGER_text_, &INT__BIT31__LSB_xer_, &INTEGER_json_, &INT__BIT31__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT32__LSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT32__LSB_xer_ = { {"INT_BIT32_LSB>\n", "INT_BIT32_LSB>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT32__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT32__LSB_descr_ = { "@CAN_matrix_general_types.INT_BIT32_LSB", &INTEGER_ber_, &INT__BIT32__LSB_raw_, &INTEGER_text_, &INT__BIT32__LSB_xer_, &INTEGER_json_, &INT__BIT32__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT1__MSB_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT1__MSB_xer_ = { {"BIT1_MSB>\n", "BIT1_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT1__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT1__MSB_descr_ = { "@CAN_matrix_general_types.BIT1_MSB", &BITSTRING_ber_, &BIT1__MSB_raw_, NULL, &BIT1__MSB_xer_, &BITSTRING_json_, &BIT1__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT2__MSB_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT2__MSB_xer_ = { {"BIT2_MSB>\n", "BIT2_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT2__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT2__MSB_descr_ = { "@CAN_matrix_general_types.BIT2_MSB", &BITSTRING_ber_, &BIT2__MSB_raw_, NULL, &BIT2__MSB_xer_, &BITSTRING_json_, &BIT2__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT3__MSB_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT3__MSB_xer_ = { {"BIT3_MSB>\n", "BIT3_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT3__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT3__MSB_descr_ = { "@CAN_matrix_general_types.BIT3_MSB", &BITSTRING_ber_, &BIT3__MSB_raw_, NULL, &BIT3__MSB_xer_, &BITSTRING_json_, &BIT3__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT4__MSB_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT4__MSB_xer_ = { {"BIT4_MSB>\n", "BIT4_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT4__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT4__MSB_descr_ = { "@CAN_matrix_general_types.BIT4_MSB", &BITSTRING_ber_, &BIT4__MSB_raw_, NULL, &BIT4__MSB_xer_, &BITSTRING_json_, &BIT4__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5__MSB_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5__MSB_xer_ = { {"BIT5_MSB>\n", "BIT5_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5__MSB_descr_ = { "@CAN_matrix_general_types.BIT5_MSB", &BITSTRING_ber_, &BIT5__MSB_raw_, NULL, &BIT5__MSB_xer_, &BITSTRING_json_, &BIT5__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6__MSB_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6__MSB_xer_ = { {"BIT6_MSB>\n", "BIT6_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6__MSB_descr_ = { "@CAN_matrix_general_types.BIT6_MSB", &BITSTRING_ber_, &BIT6__MSB_raw_, NULL, &BIT6__MSB_xer_, &BITSTRING_json_, &BIT6__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT7__MSB_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,7,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT7__MSB_xer_ = { {"BIT7_MSB>\n", "BIT7_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT7__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT7__MSB_descr_ = { "@CAN_matrix_general_types.BIT7_MSB", &BITSTRING_ber_, &BIT7__MSB_raw_, NULL, &BIT7__MSB_xer_, &BITSTRING_json_, &BIT7__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT8__MSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT8__MSB_xer_ = { {"BIT8_MSB>\n", "BIT8_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT8__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT8__MSB_descr_ = { "@CAN_matrix_general_types.BIT8_MSB", &BITSTRING_ber_, &BIT8__MSB_raw_, NULL, &BIT8__MSB_xer_, &BITSTRING_json_, &BIT8__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT9__MSB_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,9,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT9__MSB_xer_ = { {"BIT9_MSB>\n", "BIT9_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT9__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT9__MSB_descr_ = { "@CAN_matrix_general_types.BIT9_MSB", &BITSTRING_ber_, &BIT9__MSB_raw_, NULL, &BIT9__MSB_xer_, &BITSTRING_json_, &BIT9__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT10__MSB_raw_ = {10,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,10,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT10__MSB_xer_ = { {"BIT10_MSB>\n", "BIT10_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT10__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT10__MSB_descr_ = { "@CAN_matrix_general_types.BIT10_MSB", &BITSTRING_ber_, &BIT10__MSB_raw_, NULL, &BIT10__MSB_xer_, &BITSTRING_json_, &BIT10__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT11__MSB_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT11__MSB_xer_ = { {"BIT11_MSB>\n", "BIT11_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT11__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT11__MSB_descr_ = { "@CAN_matrix_general_types.BIT11_MSB", &BITSTRING_ber_, &BIT11__MSB_raw_, NULL, &BIT11__MSB_xer_, &BITSTRING_json_, &BIT11__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT12__MSB_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,12,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT12__MSB_xer_ = { {"BIT12_MSB>\n", "BIT12_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT12__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT12__MSB_descr_ = { "@CAN_matrix_general_types.BIT12_MSB", &BITSTRING_ber_, &BIT12__MSB_raw_, NULL, &BIT12__MSB_xer_, &BITSTRING_json_, &BIT12__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT13__MSB_raw_ = {13,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,13,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT13__MSB_xer_ = { {"BIT13_MSB>\n", "BIT13_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT13__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT13__MSB_descr_ = { "@CAN_matrix_general_types.BIT13_MSB", &BITSTRING_ber_, &BIT13__MSB_raw_, NULL, &BIT13__MSB_xer_, &BITSTRING_json_, &BIT13__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT14__MSB_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,14,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT14__MSB_xer_ = { {"BIT14_MSB>\n", "BIT14_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT14__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT14__MSB_descr_ = { "@CAN_matrix_general_types.BIT14_MSB", &BITSTRING_ber_, &BIT14__MSB_raw_, NULL, &BIT14__MSB_xer_, &BITSTRING_json_, &BIT14__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT15__MSB_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,15,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT15__MSB_xer_ = { {"BIT15_MSB>\n", "BIT15_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT15__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT15__MSB_descr_ = { "@CAN_matrix_general_types.BIT15_MSB", &BITSTRING_ber_, &BIT15__MSB_raw_, NULL, &BIT15__MSB_xer_, &BITSTRING_json_, &BIT15__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT16__MSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,16,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT16__MSB_xer_ = { {"BIT16_MSB>\n", "BIT16_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT16__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT16__MSB_descr_ = { "@CAN_matrix_general_types.BIT16_MSB", &BITSTRING_ber_, &BIT16__MSB_raw_, NULL, &BIT16__MSB_xer_, &BITSTRING_json_, &BIT16__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT17__MSB_raw_ = {17,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,17,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT17__MSB_xer_ = { {"BIT17_MSB>\n", "BIT17_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT17__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT17__MSB_descr_ = { "@CAN_matrix_general_types.BIT17_MSB", &BITSTRING_ber_, &BIT17__MSB_raw_, NULL, &BIT17__MSB_xer_, &BITSTRING_json_, &BIT17__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT18__MSB_raw_ = {18,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,18,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT18__MSB_xer_ = { {"BIT18_MSB>\n", "BIT18_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT18__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT18__MSB_descr_ = { "@CAN_matrix_general_types.BIT18_MSB", &BITSTRING_ber_, &BIT18__MSB_raw_, NULL, &BIT18__MSB_xer_, &BITSTRING_json_, &BIT18__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT19__MSB_raw_ = {19,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,19,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT19__MSB_xer_ = { {"BIT19_MSB>\n", "BIT19_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT19__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT19__MSB_descr_ = { "@CAN_matrix_general_types.BIT19_MSB", &BITSTRING_ber_, &BIT19__MSB_raw_, NULL, &BIT19__MSB_xer_, &BITSTRING_json_, &BIT19__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT20__MSB_raw_ = {20,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,20,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT20__MSB_xer_ = { {"BIT20_MSB>\n", "BIT20_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT20__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT20__MSB_descr_ = { "@CAN_matrix_general_types.BIT20_MSB", &BITSTRING_ber_, &BIT20__MSB_raw_, NULL, &BIT20__MSB_xer_, &BITSTRING_json_, &BIT20__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT21__MSB_raw_ = {21,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,21,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT21__MSB_xer_ = { {"BIT21_MSB>\n", "BIT21_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT21__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT21__MSB_descr_ = { "@CAN_matrix_general_types.BIT21_MSB", &BITSTRING_ber_, &BIT21__MSB_raw_, NULL, &BIT21__MSB_xer_, &BITSTRING_json_, &BIT21__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT22__MSB_raw_ = {22,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,22,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT22__MSB_xer_ = { {"BIT22_MSB>\n", "BIT22_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT22__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT22__MSB_descr_ = { "@CAN_matrix_general_types.BIT22_MSB", &BITSTRING_ber_, &BIT22__MSB_raw_, NULL, &BIT22__MSB_xer_, &BITSTRING_json_, &BIT22__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT24__MSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,24,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT24__MSB_xer_ = { {"BIT24_MSB>\n", "BIT24_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT24__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT24__MSB_descr_ = { "@CAN_matrix_general_types.BIT24_MSB", &BITSTRING_ber_, &BIT24__MSB_raw_, NULL, &BIT24__MSB_xer_, &BITSTRING_json_, &BIT24__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT25__MSB_raw_ = {25,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,25,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT25__MSB_xer_ = { {"BIT25_MSB>\n", "BIT25_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT25__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT25__MSB_descr_ = { "@CAN_matrix_general_types.BIT25_MSB", &BITSTRING_ber_, &BIT25__MSB_raw_, NULL, &BIT25__MSB_xer_, &BITSTRING_json_, &BIT25__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT26__MSB_raw_ = {26,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,26,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT26__MSB_xer_ = { {"BIT26_MSB>\n", "BIT26_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT26__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT26__MSB_descr_ = { "@CAN_matrix_general_types.BIT26_MSB", &BITSTRING_ber_, &BIT26__MSB_raw_, NULL, &BIT26__MSB_xer_, &BITSTRING_json_, &BIT26__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT27__MSB_raw_ = {27,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,27,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT27__MSB_xer_ = { {"BIT27_MSB>\n", "BIT27_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT27__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT27__MSB_descr_ = { "@CAN_matrix_general_types.BIT27_MSB", &BITSTRING_ber_, &BIT27__MSB_raw_, NULL, &BIT27__MSB_xer_, &BITSTRING_json_, &BIT27__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT28__MSB_raw_ = {28,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,28,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT28__MSB_xer_ = { {"BIT28_MSB>\n", "BIT28_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT28__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT28__MSB_descr_ = { "@CAN_matrix_general_types.BIT28_MSB", &BITSTRING_ber_, &BIT28__MSB_raw_, NULL, &BIT28__MSB_xer_, &BITSTRING_json_, &BIT28__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT29__MSB_raw_ = {29,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,29,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT29__MSB_xer_ = { {"BIT29_MSB>\n", "BIT29_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT29__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT29__MSB_descr_ = { "@CAN_matrix_general_types.BIT29_MSB", &BITSTRING_ber_, &BIT29__MSB_raw_, NULL, &BIT29__MSB_xer_, &BITSTRING_json_, &BIT29__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT30__MSB_raw_ = {30,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,30,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT30__MSB_xer_ = { {"BIT30_MSB>\n", "BIT30_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT30__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT30__MSB_descr_ = { "@CAN_matrix_general_types.BIT30_MSB", &BITSTRING_ber_, &BIT30__MSB_raw_, NULL, &BIT30__MSB_xer_, &BITSTRING_json_, &BIT30__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT31__MSB_raw_ = {31,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,31,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT31__MSB_xer_ = { {"BIT31_MSB>\n", "BIT31_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT31__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT31__MSB_descr_ = { "@CAN_matrix_general_types.BIT31_MSB", &BITSTRING_ber_, &BIT31__MSB_raw_, NULL, &BIT31__MSB_xer_, &BITSTRING_json_, &BIT31__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT32__MSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,32,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT32__MSB_xer_ = { {"BIT32_MSB>\n", "BIT32_MSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT32__MSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT32__MSB_descr_ = { "@CAN_matrix_general_types.BIT32_MSB", &BITSTRING_ber_, &BIT32__MSB_raw_, NULL, &BIT32__MSB_xer_, &BITSTRING_json_, &BIT32__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT1__LSB_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT1__LSB_xer_ = { {"BIT1_LSB>\n", "BIT1_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT1__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT1__LSB_descr_ = { "@CAN_matrix_general_types.BIT1_LSB", &BITSTRING_ber_, &BIT1__LSB_raw_, NULL, &BIT1__LSB_xer_, &BITSTRING_json_, &BIT1__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT2__LSB_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT2__LSB_xer_ = { {"BIT2_LSB>\n", "BIT2_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT2__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT2__LSB_descr_ = { "@CAN_matrix_general_types.BIT2_LSB", &BITSTRING_ber_, &BIT2__LSB_raw_, NULL, &BIT2__LSB_xer_, &BITSTRING_json_, &BIT2__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT3__LSB_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT3__LSB_xer_ = { {"BIT3_LSB>\n", "BIT3_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT3__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT3__LSB_descr_ = { "@CAN_matrix_general_types.BIT3_LSB", &BITSTRING_ber_, &BIT3__LSB_raw_, NULL, &BIT3__LSB_xer_, &BITSTRING_json_, &BIT3__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT4__LSB_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT4__LSB_xer_ = { {"BIT4_LSB>\n", "BIT4_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT4__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT4__LSB_descr_ = { "@CAN_matrix_general_types.BIT4_LSB", &BITSTRING_ber_, &BIT4__LSB_raw_, NULL, &BIT4__LSB_xer_, &BITSTRING_json_, &BIT4__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5__LSB_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5__LSB_xer_ = { {"BIT5_LSB>\n", "BIT5_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5__LSB_descr_ = { "@CAN_matrix_general_types.BIT5_LSB", &BITSTRING_ber_, &BIT5__LSB_raw_, NULL, &BIT5__LSB_xer_, &BITSTRING_json_, &BIT5__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6__LSB_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6__LSB_xer_ = { {"BIT6_LSB>\n", "BIT6_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6__LSB_descr_ = { "@CAN_matrix_general_types.BIT6_LSB", &BITSTRING_ber_, &BIT6__LSB_raw_, NULL, &BIT6__LSB_xer_, &BITSTRING_json_, &BIT6__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT7__LSB_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,7,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT7__LSB_xer_ = { {"BIT7_LSB>\n", "BIT7_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT7__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT7__LSB_descr_ = { "@CAN_matrix_general_types.BIT7_LSB", &BITSTRING_ber_, &BIT7__LSB_raw_, NULL, &BIT7__LSB_xer_, &BITSTRING_json_, &BIT7__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT8__LSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT8__LSB_xer_ = { {"BIT8_LSB>\n", "BIT8_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT8__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT8__LSB_descr_ = { "@CAN_matrix_general_types.BIT8_LSB", &BITSTRING_ber_, &BIT8__LSB_raw_, NULL, &BIT8__LSB_xer_, &BITSTRING_json_, &BIT8__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT9__LSB_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,9,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT9__LSB_xer_ = { {"BIT9_LSB>\n", "BIT9_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT9__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT9__LSB_descr_ = { "@CAN_matrix_general_types.BIT9_LSB", &BITSTRING_ber_, &BIT9__LSB_raw_, NULL, &BIT9__LSB_xer_, &BITSTRING_json_, &BIT9__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT10__LSB_raw_ = {10,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,10,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT10__LSB_xer_ = { {"BIT10_LSB>\n", "BIT10_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT10__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT10__LSB_descr_ = { "@CAN_matrix_general_types.BIT10_LSB", &BITSTRING_ber_, &BIT10__LSB_raw_, NULL, &BIT10__LSB_xer_, &BITSTRING_json_, &BIT10__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT11__LSB_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT11__LSB_xer_ = { {"BIT11_LSB>\n", "BIT11_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT11__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT11__LSB_descr_ = { "@CAN_matrix_general_types.BIT11_LSB", &BITSTRING_ber_, &BIT11__LSB_raw_, NULL, &BIT11__LSB_xer_, &BITSTRING_json_, &BIT11__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT12__LSB_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,12,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT12__LSB_xer_ = { {"BIT12_LSB>\n", "BIT12_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT12__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT12__LSB_descr_ = { "@CAN_matrix_general_types.BIT12_LSB", &BITSTRING_ber_, &BIT12__LSB_raw_, NULL, &BIT12__LSB_xer_, &BITSTRING_json_, &BIT12__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT13__LSB_raw_ = {13,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,13,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT13__LSB_xer_ = { {"BIT13_LSB>\n", "BIT13_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT13__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT13__LSB_descr_ = { "@CAN_matrix_general_types.BIT13_LSB", &BITSTRING_ber_, &BIT13__LSB_raw_, NULL, &BIT13__LSB_xer_, &BITSTRING_json_, &BIT13__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT14__LSB_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,14,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT14__LSB_xer_ = { {"BIT14_LSB>\n", "BIT14_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT14__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT14__LSB_descr_ = { "@CAN_matrix_general_types.BIT14_LSB", &BITSTRING_ber_, &BIT14__LSB_raw_, NULL, &BIT14__LSB_xer_, &BITSTRING_json_, &BIT14__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT15__LSB_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,15,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT15__LSB_xer_ = { {"BIT15_LSB>\n", "BIT15_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT15__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT15__LSB_descr_ = { "@CAN_matrix_general_types.BIT15_LSB", &BITSTRING_ber_, &BIT15__LSB_raw_, NULL, &BIT15__LSB_xer_, &BITSTRING_json_, &BIT15__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT16__LSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,16,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT16__LSB_xer_ = { {"BIT16_LSB>\n", "BIT16_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT16__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT16__LSB_descr_ = { "@CAN_matrix_general_types.BIT16_LSB", &BITSTRING_ber_, &BIT16__LSB_raw_, NULL, &BIT16__LSB_xer_, &BITSTRING_json_, &BIT16__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT17__LSB_raw_ = {17,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,17,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT17__LSB_xer_ = { {"BIT17_LSB>\n", "BIT17_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT17__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT17__LSB_descr_ = { "@CAN_matrix_general_types.BIT17_LSB", &BITSTRING_ber_, &BIT17__LSB_raw_, NULL, &BIT17__LSB_xer_, &BITSTRING_json_, &BIT17__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT18__LSB_raw_ = {18,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,18,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT18__LSB_xer_ = { {"BIT18_LSB>\n", "BIT18_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT18__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT18__LSB_descr_ = { "@CAN_matrix_general_types.BIT18_LSB", &BITSTRING_ber_, &BIT18__LSB_raw_, NULL, &BIT18__LSB_xer_, &BITSTRING_json_, &BIT18__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT19__LSB_raw_ = {19,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,19,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT19__LSB_xer_ = { {"BIT19_LSB>\n", "BIT19_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT19__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT19__LSB_descr_ = { "@CAN_matrix_general_types.BIT19_LSB", &BITSTRING_ber_, &BIT19__LSB_raw_, NULL, &BIT19__LSB_xer_, &BITSTRING_json_, &BIT19__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT20__LSB_raw_ = {20,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,20,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT20__LSB_xer_ = { {"BIT20_LSB>\n", "BIT20_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT20__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT20__LSB_descr_ = { "@CAN_matrix_general_types.BIT20_LSB", &BITSTRING_ber_, &BIT20__LSB_raw_, NULL, &BIT20__LSB_xer_, &BITSTRING_json_, &BIT20__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT21__LSB_raw_ = {21,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,21,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT21__LSB_xer_ = { {"BIT21_LSB>\n", "BIT21_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT21__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT21__LSB_descr_ = { "@CAN_matrix_general_types.BIT21_LSB", &BITSTRING_ber_, &BIT21__LSB_raw_, NULL, &BIT21__LSB_xer_, &BITSTRING_json_, &BIT21__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT22__LSB_raw_ = {22,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,22,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT22__LSB_xer_ = { {"BIT22_LSB>\n", "BIT22_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT22__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT22__LSB_descr_ = { "@CAN_matrix_general_types.BIT22_LSB", &BITSTRING_ber_, &BIT22__LSB_raw_, NULL, &BIT22__LSB_xer_, &BITSTRING_json_, &BIT22__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT24__LSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,24,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT24__LSB_xer_ = { {"BIT24_LSB>\n", "BIT24_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT24__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT24__LSB_descr_ = { "@CAN_matrix_general_types.BIT24_LSB", &BITSTRING_ber_, &BIT24__LSB_raw_, NULL, &BIT24__LSB_xer_, &BITSTRING_json_, &BIT24__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT25__LSB_raw_ = {25,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,25,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT25__LSB_xer_ = { {"BIT25_LSB>\n", "BIT25_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT25__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT25__LSB_descr_ = { "@CAN_matrix_general_types.BIT25_LSB", &BITSTRING_ber_, &BIT25__LSB_raw_, NULL, &BIT25__LSB_xer_, &BITSTRING_json_, &BIT25__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT26__LSB_raw_ = {26,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,26,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT26__LSB_xer_ = { {"BIT26_LSB>\n", "BIT26_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT26__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT26__LSB_descr_ = { "@CAN_matrix_general_types.BIT26_LSB", &BITSTRING_ber_, &BIT26__LSB_raw_, NULL, &BIT26__LSB_xer_, &BITSTRING_json_, &BIT26__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT27__LSB_raw_ = {27,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,27,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT27__LSB_xer_ = { {"BIT27_LSB>\n", "BIT27_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT27__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT27__LSB_descr_ = { "@CAN_matrix_general_types.BIT27_LSB", &BITSTRING_ber_, &BIT27__LSB_raw_, NULL, &BIT27__LSB_xer_, &BITSTRING_json_, &BIT27__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT28__LSB_raw_ = {28,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,28,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT28__LSB_xer_ = { {"BIT28_LSB>\n", "BIT28_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT28__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT28__LSB_descr_ = { "@CAN_matrix_general_types.BIT28_LSB", &BITSTRING_ber_, &BIT28__LSB_raw_, NULL, &BIT28__LSB_xer_, &BITSTRING_json_, &BIT28__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT29__LSB_raw_ = {29,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,29,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT29__LSB_xer_ = { {"BIT29_LSB>\n", "BIT29_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT29__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT29__LSB_descr_ = { "@CAN_matrix_general_types.BIT29_LSB", &BITSTRING_ber_, &BIT29__LSB_raw_, NULL, &BIT29__LSB_xer_, &BITSTRING_json_, &BIT29__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT30__LSB_raw_ = {30,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,30,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT30__LSB_xer_ = { {"BIT30_LSB>\n", "BIT30_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT30__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT30__LSB_descr_ = { "@CAN_matrix_general_types.BIT30_LSB", &BITSTRING_ber_, &BIT30__LSB_raw_, NULL, &BIT30__LSB_xer_, &BITSTRING_json_, &BIT30__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT31__LSB_raw_ = {31,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,31,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT31__LSB_xer_ = { {"BIT31_LSB>\n", "BIT31_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT31__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT31__LSB_descr_ = { "@CAN_matrix_general_types.BIT31_LSB", &BITSTRING_ber_, &BIT31__LSB_raw_, NULL, &BIT31__LSB_xer_, &BITSTRING_json_, &BIT31__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT32__LSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,32,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT32__LSB_xer_ = { {"BIT32_LSB>\n", "BIT32_LSB>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT32__LSB_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT32__LSB_descr_ = { "@CAN_matrix_general_types.BIT32_LSB", &BITSTRING_ber_, &BIT32__LSB_raw_, NULL, &BIT32__LSB_xer_, &BITSTRING_json_, &BIT32__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__MSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__MSB_xer_ = { {"OCT1_MSB>\n", "OCT1_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__MSB_oer_ext_arr_[0] = {};
+const int OCT1__MSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__MSB_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1__MSB_oer_ext_arr_, 0, OCT1__MSB_oer_p_};
+const TTCN_Typedescriptor_t OCT1__MSB_descr_ = { "@CAN_matrix_general_types.OCT1_MSB", &OCTETSTRING_ber_, &OCT1__MSB_raw_, &OCTETSTRING_text_, &OCT1__MSB_xer_, &OCTETSTRING_json_, &OCT1__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2__MSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT2__MSB_xer_ = { {"OCT2_MSB>\n", "OCT2_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2__MSB_oer_ext_arr_[0] = {};
+const int OCT2__MSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2__MSB_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2__MSB_oer_ext_arr_, 0, OCT2__MSB_oer_p_};
+const TTCN_Typedescriptor_t OCT2__MSB_descr_ = { "@CAN_matrix_general_types.OCT2_MSB", &OCTETSTRING_ber_, &OCT2__MSB_raw_, &OCTETSTRING_text_, &OCT2__MSB_xer_, &OCTETSTRING_json_, &OCT2__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__MSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__MSB_xer_ = { {"OCT3_MSB>\n", "OCT3_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__MSB_oer_ext_arr_[0] = {};
+const int OCT3__MSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__MSB_oer_ = { -1, TRUE, 3, FALSE, 0, 0, OCT3__MSB_oer_ext_arr_, 0, OCT3__MSB_oer_p_};
+const TTCN_Typedescriptor_t OCT3__MSB_descr_ = { "@CAN_matrix_general_types.OCT3_MSB", &OCTETSTRING_ber_, &OCT3__MSB_raw_, &OCTETSTRING_text_, &OCT3__MSB_xer_, &OCTETSTRING_json_, &OCT3__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4__MSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT4__MSB_xer_ = { {"OCT4_MSB>\n", "OCT4_MSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4__MSB_oer_ext_arr_[0] = {};
+const int OCT4__MSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4__MSB_oer_ = { -1, TRUE, 4, FALSE, 0, 0, OCT4__MSB_oer_ext_arr_, 0, OCT4__MSB_oer_p_};
+const TTCN_Typedescriptor_t OCT4__MSB_descr_ = { "@CAN_matrix_general_types.OCT4_MSB", &OCTETSTRING_ber_, &OCT4__MSB_raw_, &OCTETSTRING_text_, &OCT4__MSB_xer_, &OCTETSTRING_json_, &OCT4__MSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__LSB_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__LSB_xer_ = { {"OCT1_LSB>\n", "OCT1_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__LSB_oer_ext_arr_[0] = {};
+const int OCT1__LSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__LSB_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1__LSB_oer_ext_arr_, 0, OCT1__LSB_oer_p_};
+const TTCN_Typedescriptor_t OCT1__LSB_descr_ = { "@CAN_matrix_general_types.OCT1_LSB", &OCTETSTRING_ber_, &OCT1__LSB_raw_, &OCTETSTRING_text_, &OCT1__LSB_xer_, &OCTETSTRING_json_, &OCT1__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2__LSB_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT2__LSB_xer_ = { {"OCT2_LSB>\n", "OCT2_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2__LSB_oer_ext_arr_[0] = {};
+const int OCT2__LSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2__LSB_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2__LSB_oer_ext_arr_, 0, OCT2__LSB_oer_p_};
+const TTCN_Typedescriptor_t OCT2__LSB_descr_ = { "@CAN_matrix_general_types.OCT2_LSB", &OCTETSTRING_ber_, &OCT2__LSB_raw_, &OCTETSTRING_text_, &OCT2__LSB_xer_, &OCTETSTRING_json_, &OCT2__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__LSB_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__LSB_xer_ = { {"OCT3_LSB>\n", "OCT3_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__LSB_oer_ext_arr_[0] = {};
+const int OCT3__LSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__LSB_oer_ = { -1, TRUE, 3, FALSE, 0, 0, OCT3__LSB_oer_ext_arr_, 0, OCT3__LSB_oer_p_};
+const TTCN_Typedescriptor_t OCT3__LSB_descr_ = { "@CAN_matrix_general_types.OCT3_LSB", &OCTETSTRING_ber_, &OCT3__LSB_raw_, &OCTETSTRING_text_, &OCT3__LSB_xer_, &OCTETSTRING_json_, &OCT3__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4__LSB_raw_ = {32,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT4__LSB_xer_ = { {"OCT4_LSB>\n", "OCT4_LSB>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4__LSB_oer_ext_arr_[0] = {};
+const int OCT4__LSB_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4__LSB_oer_ = { -1, TRUE, 4, FALSE, 0, 0, OCT4__LSB_oer_ext_arr_, 0, OCT4__LSB_oer_p_};
+const TTCN_Typedescriptor_t OCT4__LSB_descr_ = { "@CAN_matrix_general_types.OCT4_LSB", &OCTETSTRING_ber_, &OCT4__LSB_raw_, &OCTETSTRING_text_, &OCT4__LSB_xer_, &OCTETSTRING_json_, &OCT4__LSB_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("CAN_matrix_general_types", __DATE__, __TIME__, module_checksum, NULL, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix_general_types.d b/demo/CAN_matrix_general_types.d
new file mode 100644
index 0000000..db1ff0f
--- /dev/null
+++ b/demo/CAN_matrix_general_types.d
@@ -0,0 +1,59 @@
+CAN_matrix_general_types.o CAN_matrix_general_types.d : CAN_matrix_general_types.cc \
+ CAN_matrix_general_types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh
diff --git a/demo/CAN_matrix_general_types.hh b/demo/CAN_matrix_general_types.hh
new file mode 100644
index 0000000..c718cea
--- /dev/null
+++ b/demo/CAN_matrix_general_types.hh
@@ -0,0 +1,870 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix__general__types_HH
+#define CAN__matrix__general__types_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CAN__matrix__general__types {
+
+/* Type definitions */
+
+typedef INTEGER INT1;
+typedef INTEGER_template INT1_template;
+typedef INTEGER INT2;
+typedef INTEGER_template INT2_template;
+typedef INTEGER INT3;
+typedef INTEGER_template INT3_template;
+typedef INTEGER INT4;
+typedef INTEGER_template INT4_template;
+typedef INTEGER INT__BIT1__MSB;
+typedef INTEGER_template INT__BIT1__MSB_template;
+typedef INTEGER INT__BIT2__MSB;
+typedef INTEGER_template INT__BIT2__MSB_template;
+typedef INTEGER INT__BIT3__MSB;
+typedef INTEGER_template INT__BIT3__MSB_template;
+typedef INTEGER INT__BIT4__MSB;
+typedef INTEGER_template INT__BIT4__MSB_template;
+typedef INTEGER INT__BIT5__MSB;
+typedef INTEGER_template INT__BIT5__MSB_template;
+typedef INTEGER INT__BIT6__MSB;
+typedef INTEGER_template INT__BIT6__MSB_template;
+typedef INTEGER INT__BIT7__MSB;
+typedef INTEGER_template INT__BIT7__MSB_template;
+typedef INTEGER INT__BIT8__MSB;
+typedef INTEGER_template INT__BIT8__MSB_template;
+typedef INTEGER INT__BIT9__MSB;
+typedef INTEGER_template INT__BIT9__MSB_template;
+typedef INTEGER INT__BIT10__MSB;
+typedef INTEGER_template INT__BIT10__MSB_template;
+typedef INTEGER INT__BIT11__MSB;
+typedef INTEGER_template INT__BIT11__MSB_template;
+typedef INTEGER INT__BIT12__MSB;
+typedef INTEGER_template INT__BIT12__MSB_template;
+typedef INTEGER INT__BIT13__MSB;
+typedef INTEGER_template INT__BIT13__MSB_template;
+typedef INTEGER INT__BIT14__MSB;
+typedef INTEGER_template INT__BIT14__MSB_template;
+typedef INTEGER INT__BIT15__MSB;
+typedef INTEGER_template INT__BIT15__MSB_template;
+typedef INTEGER INT__BIT16__MSB;
+typedef INTEGER_template INT__BIT16__MSB_template;
+typedef INTEGER INT__BIT17__MSB;
+typedef INTEGER_template INT__BIT17__MSB_template;
+typedef INTEGER INT__BIT18__MSB;
+typedef INTEGER_template INT__BIT18__MSB_template;
+typedef INTEGER INT__BIT19__MSB;
+typedef INTEGER_template INT__BIT19__MSB_template;
+typedef INTEGER INT__BIT20__MSB;
+typedef INTEGER_template INT__BIT20__MSB_template;
+typedef INTEGER INT__BIT21__MSB;
+typedef INTEGER_template INT__BIT21__MSB_template;
+typedef INTEGER INT__BIT22__MSB;
+typedef INTEGER_template INT__BIT22__MSB_template;
+typedef INTEGER INT__BIT23__MSB;
+typedef INTEGER_template INT__BIT23__MSB_template;
+typedef INTEGER INT__BIT24__MSB;
+typedef INTEGER_template INT__BIT24__MSB_template;
+typedef INTEGER INT__BIT25__MSB;
+typedef INTEGER_template INT__BIT25__MSB_template;
+typedef INTEGER INT__BIT26__MSB;
+typedef INTEGER_template INT__BIT26__MSB_template;
+typedef INTEGER INT__BIT27__MSB;
+typedef INTEGER_template INT__BIT27__MSB_template;
+typedef INTEGER INT__BIT28__MSB;
+typedef INTEGER_template INT__BIT28__MSB_template;
+typedef INTEGER INT__BIT39__MSB;
+typedef INTEGER_template INT__BIT39__MSB_template;
+typedef INTEGER INT__BIT30__MSB;
+typedef INTEGER_template INT__BIT30__MSB_template;
+typedef INTEGER INT__BIT31__MSB;
+typedef INTEGER_template INT__BIT31__MSB_template;
+typedef INTEGER INT__BIT32__MSB;
+typedef INTEGER_template INT__BIT32__MSB_template;
+typedef INTEGER INT__BIT1__LSB;
+typedef INTEGER_template INT__BIT1__LSB_template;
+typedef INTEGER INT__BIT2__LSB;
+typedef INTEGER_template INT__BIT2__LSB_template;
+typedef INTEGER INT__BIT3__LSB;
+typedef INTEGER_template INT__BIT3__LSB_template;
+typedef INTEGER INT__BIT4__LSB;
+typedef INTEGER_template INT__BIT4__LSB_template;
+typedef INTEGER INT__BIT5__LSB;
+typedef INTEGER_template INT__BIT5__LSB_template;
+typedef INTEGER INT__BIT6__LSB;
+typedef INTEGER_template INT__BIT6__LSB_template;
+typedef INTEGER INT__BIT7__LSB;
+typedef INTEGER_template INT__BIT7__LSB_template;
+typedef INTEGER INT__BIT8__LSB;
+typedef INTEGER_template INT__BIT8__LSB_template;
+typedef INTEGER INT__BIT9__LSB;
+typedef INTEGER_template INT__BIT9__LSB_template;
+typedef INTEGER INT__BIT10__LSB;
+typedef INTEGER_template INT__BIT10__LSB_template;
+typedef INTEGER INT__BIT11__LSB;
+typedef INTEGER_template INT__BIT11__LSB_template;
+typedef INTEGER INT__BIT12__LSB;
+typedef INTEGER_template INT__BIT12__LSB_template;
+typedef INTEGER INT__BIT13__LSB;
+typedef INTEGER_template INT__BIT13__LSB_template;
+typedef INTEGER INT__BIT14__LSB;
+typedef INTEGER_template INT__BIT14__LSB_template;
+typedef INTEGER INT__BIT15__LSB;
+typedef INTEGER_template INT__BIT15__LSB_template;
+typedef INTEGER INT__BIT16__LSB;
+typedef INTEGER_template INT__BIT16__LSB_template;
+typedef INTEGER INT__BIT17__LSB;
+typedef INTEGER_template INT__BIT17__LSB_template;
+typedef INTEGER INT__BIT18__LSB;
+typedef INTEGER_template INT__BIT18__LSB_template;
+typedef INTEGER INT__BIT19__LSB;
+typedef INTEGER_template INT__BIT19__LSB_template;
+typedef INTEGER INT__BIT20__LSB;
+typedef INTEGER_template INT__BIT20__LSB_template;
+typedef INTEGER INT__BIT21__LSB;
+typedef INTEGER_template INT__BIT21__LSB_template;
+typedef INTEGER INT__BIT22__LSB;
+typedef INTEGER_template INT__BIT22__LSB_template;
+typedef INTEGER INT__BIT23__LSB;
+typedef INTEGER_template INT__BIT23__LSB_template;
+typedef INTEGER INT__BIT24__LSB;
+typedef INTEGER_template INT__BIT24__LSB_template;
+typedef INTEGER INT__BIT25__LSB;
+typedef INTEGER_template INT__BIT25__LSB_template;
+typedef INTEGER INT__BIT26__LSB;
+typedef INTEGER_template INT__BIT26__LSB_template;
+typedef INTEGER INT__BIT27__LSB;
+typedef INTEGER_template INT__BIT27__LSB_template;
+typedef INTEGER INT__BIT28__LSB;
+typedef INTEGER_template INT__BIT28__LSB_template;
+typedef INTEGER INT__BIT39__LSB;
+typedef INTEGER_template INT__BIT39__LSB_template;
+typedef INTEGER INT__BIT30__LSB;
+typedef INTEGER_template INT__BIT30__LSB_template;
+typedef INTEGER INT__BIT31__LSB;
+typedef INTEGER_template INT__BIT31__LSB_template;
+typedef INTEGER INT__BIT32__LSB;
+typedef INTEGER_template INT__BIT32__LSB_template;
+typedef BITSTRING BIT1__MSB;
+typedef BITSTRING_template BIT1__MSB_template;
+typedef BITSTRING BIT2__MSB;
+typedef BITSTRING_template BIT2__MSB_template;
+typedef BITSTRING BIT3__MSB;
+typedef BITSTRING_template BIT3__MSB_template;
+typedef BITSTRING BIT4__MSB;
+typedef BITSTRING_template BIT4__MSB_template;
+typedef BITSTRING BIT5__MSB;
+typedef BITSTRING_template BIT5__MSB_template;
+typedef BITSTRING BIT6__MSB;
+typedef BITSTRING_template BIT6__MSB_template;
+typedef BITSTRING BIT7__MSB;
+typedef BITSTRING_template BIT7__MSB_template;
+typedef BITSTRING BIT8__MSB;
+typedef BITSTRING_template BIT8__MSB_template;
+typedef BITSTRING BIT9__MSB;
+typedef BITSTRING_template BIT9__MSB_template;
+typedef BITSTRING BIT10__MSB;
+typedef BITSTRING_template BIT10__MSB_template;
+typedef BITSTRING BIT11__MSB;
+typedef BITSTRING_template BIT11__MSB_template;
+typedef BITSTRING BIT12__MSB;
+typedef BITSTRING_template BIT12__MSB_template;
+typedef BITSTRING BIT13__MSB;
+typedef BITSTRING_template BIT13__MSB_template;
+typedef BITSTRING BIT14__MSB;
+typedef BITSTRING_template BIT14__MSB_template;
+typedef BITSTRING BIT15__MSB;
+typedef BITSTRING_template BIT15__MSB_template;
+typedef BITSTRING BIT16__MSB;
+typedef BITSTRING_template BIT16__MSB_template;
+typedef BITSTRING BIT17__MSB;
+typedef BITSTRING_template BIT17__MSB_template;
+typedef BITSTRING BIT18__MSB;
+typedef BITSTRING_template BIT18__MSB_template;
+typedef BITSTRING BIT19__MSB;
+typedef BITSTRING_template BIT19__MSB_template;
+typedef BITSTRING BIT20__MSB;
+typedef BITSTRING_template BIT20__MSB_template;
+typedef BITSTRING BIT21__MSB;
+typedef BITSTRING_template BIT21__MSB_template;
+typedef BITSTRING BIT22__MSB;
+typedef BITSTRING_template BIT22__MSB_template;
+typedef BITSTRING BIT24__MSB;
+typedef BITSTRING_template BIT24__MSB_template;
+typedef BITSTRING BIT25__MSB;
+typedef BITSTRING_template BIT25__MSB_template;
+typedef BITSTRING BIT26__MSB;
+typedef BITSTRING_template BIT26__MSB_template;
+typedef BITSTRING BIT27__MSB;
+typedef BITSTRING_template BIT27__MSB_template;
+typedef BITSTRING BIT28__MSB;
+typedef BITSTRING_template BIT28__MSB_template;
+typedef BITSTRING BIT29__MSB;
+typedef BITSTRING_template BIT29__MSB_template;
+typedef BITSTRING BIT30__MSB;
+typedef BITSTRING_template BIT30__MSB_template;
+typedef BITSTRING BIT31__MSB;
+typedef BITSTRING_template BIT31__MSB_template;
+typedef BITSTRING BIT32__MSB;
+typedef BITSTRING_template BIT32__MSB_template;
+typedef BITSTRING BIT1__LSB;
+typedef BITSTRING_template BIT1__LSB_template;
+typedef BITSTRING BIT2__LSB;
+typedef BITSTRING_template BIT2__LSB_template;
+typedef BITSTRING BIT3__LSB;
+typedef BITSTRING_template BIT3__LSB_template;
+typedef BITSTRING BIT4__LSB;
+typedef BITSTRING_template BIT4__LSB_template;
+typedef BITSTRING BIT5__LSB;
+typedef BITSTRING_template BIT5__LSB_template;
+typedef BITSTRING BIT6__LSB;
+typedef BITSTRING_template BIT6__LSB_template;
+typedef BITSTRING BIT7__LSB;
+typedef BITSTRING_template BIT7__LSB_template;
+typedef BITSTRING BIT8__LSB;
+typedef BITSTRING_template BIT8__LSB_template;
+typedef BITSTRING BIT9__LSB;
+typedef BITSTRING_template BIT9__LSB_template;
+typedef BITSTRING BIT10__LSB;
+typedef BITSTRING_template BIT10__LSB_template;
+typedef BITSTRING BIT11__LSB;
+typedef BITSTRING_template BIT11__LSB_template;
+typedef BITSTRING BIT12__LSB;
+typedef BITSTRING_template BIT12__LSB_template;
+typedef BITSTRING BIT13__LSB;
+typedef BITSTRING_template BIT13__LSB_template;
+typedef BITSTRING BIT14__LSB;
+typedef BITSTRING_template BIT14__LSB_template;
+typedef BITSTRING BIT15__LSB;
+typedef BITSTRING_template BIT15__LSB_template;
+typedef BITSTRING BIT16__LSB;
+typedef BITSTRING_template BIT16__LSB_template;
+typedef BITSTRING BIT17__LSB;
+typedef BITSTRING_template BIT17__LSB_template;
+typedef BITSTRING BIT18__LSB;
+typedef BITSTRING_template BIT18__LSB_template;
+typedef BITSTRING BIT19__LSB;
+typedef BITSTRING_template BIT19__LSB_template;
+typedef BITSTRING BIT20__LSB;
+typedef BITSTRING_template BIT20__LSB_template;
+typedef BITSTRING BIT21__LSB;
+typedef BITSTRING_template BIT21__LSB_template;
+typedef BITSTRING BIT22__LSB;
+typedef BITSTRING_template BIT22__LSB_template;
+typedef BITSTRING BIT24__LSB;
+typedef BITSTRING_template BIT24__LSB_template;
+typedef BITSTRING BIT25__LSB;
+typedef BITSTRING_template BIT25__LSB_template;
+typedef BITSTRING BIT26__LSB;
+typedef BITSTRING_template BIT26__LSB_template;
+typedef BITSTRING BIT27__LSB;
+typedef BITSTRING_template BIT27__LSB_template;
+typedef BITSTRING BIT28__LSB;
+typedef BITSTRING_template BIT28__LSB_template;
+typedef BITSTRING BIT29__LSB;
+typedef BITSTRING_template BIT29__LSB_template;
+typedef BITSTRING BIT30__LSB;
+typedef BITSTRING_template BIT30__LSB_template;
+typedef BITSTRING BIT31__LSB;
+typedef BITSTRING_template BIT31__LSB_template;
+typedef BITSTRING BIT32__LSB;
+typedef BITSTRING_template BIT32__LSB_template;
+typedef OCTETSTRING OCT1__MSB;
+typedef OCTETSTRING_template OCT1__MSB_template;
+typedef OCTETSTRING OCT2__MSB;
+typedef OCTETSTRING_template OCT2__MSB_template;
+typedef OCTETSTRING OCT3__MSB;
+typedef OCTETSTRING_template OCT3__MSB_template;
+typedef OCTETSTRING OCT4__MSB;
+typedef OCTETSTRING_template OCT4__MSB_template;
+typedef OCTETSTRING OCT1__LSB;
+typedef OCTETSTRING_template OCT1__LSB_template;
+typedef OCTETSTRING OCT2__LSB;
+typedef OCTETSTRING_template OCT2__LSB_template;
+typedef OCTETSTRING OCT3__LSB;
+typedef OCTETSTRING_template OCT3__LSB_template;
+typedef OCTETSTRING OCT4__LSB;
+typedef OCTETSTRING_template OCT4__LSB_template;
+
+/* Global variable declarations */
+
+extern const TTCN_RAWdescriptor_t INT1_raw_;
+extern const XERdescriptor_t INT1_xer_;
+extern const TTCN_OERdescriptor_t INT1_oer_;
+extern const TTCN_Typedescriptor_t INT1_descr_;
+extern const TTCN_RAWdescriptor_t INT2_raw_;
+extern const XERdescriptor_t INT2_xer_;
+extern const TTCN_OERdescriptor_t INT2_oer_;
+extern const TTCN_Typedescriptor_t INT2_descr_;
+extern const TTCN_RAWdescriptor_t INT3_raw_;
+extern const XERdescriptor_t INT3_xer_;
+extern const TTCN_OERdescriptor_t INT3_oer_;
+extern const TTCN_Typedescriptor_t INT3_descr_;
+extern const TTCN_RAWdescriptor_t INT4_raw_;
+extern const XERdescriptor_t INT4_xer_;
+extern const TTCN_OERdescriptor_t INT4_oer_;
+extern const TTCN_Typedescriptor_t INT4_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT1__MSB_raw_;
+extern const XERdescriptor_t INT__BIT1__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT1__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT1__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT2__MSB_raw_;
+extern const XERdescriptor_t INT__BIT2__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT2__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT2__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT3__MSB_raw_;
+extern const XERdescriptor_t INT__BIT3__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT3__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT3__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT4__MSB_raw_;
+extern const XERdescriptor_t INT__BIT4__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT4__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT4__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT5__MSB_raw_;
+extern const XERdescriptor_t INT__BIT5__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT5__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT5__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT6__MSB_raw_;
+extern const XERdescriptor_t INT__BIT6__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT6__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT6__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT7__MSB_raw_;
+extern const XERdescriptor_t INT__BIT7__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT7__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT7__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT8__MSB_raw_;
+extern const XERdescriptor_t INT__BIT8__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT8__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT8__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT9__MSB_raw_;
+extern const XERdescriptor_t INT__BIT9__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT9__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT9__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT10__MSB_raw_;
+extern const XERdescriptor_t INT__BIT10__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT10__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT10__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT11__MSB_raw_;
+extern const XERdescriptor_t INT__BIT11__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT11__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT11__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT12__MSB_raw_;
+extern const XERdescriptor_t INT__BIT12__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT12__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT12__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT13__MSB_raw_;
+extern const XERdescriptor_t INT__BIT13__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT13__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT13__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT14__MSB_raw_;
+extern const XERdescriptor_t INT__BIT14__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT14__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT14__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT15__MSB_raw_;
+extern const XERdescriptor_t INT__BIT15__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT15__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT15__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT16__MSB_raw_;
+extern const XERdescriptor_t INT__BIT16__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT16__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT16__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT17__MSB_raw_;
+extern const XERdescriptor_t INT__BIT17__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT17__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT17__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT18__MSB_raw_;
+extern const XERdescriptor_t INT__BIT18__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT18__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT18__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT19__MSB_raw_;
+extern const XERdescriptor_t INT__BIT19__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT19__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT19__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT20__MSB_raw_;
+extern const XERdescriptor_t INT__BIT20__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT20__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT20__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT21__MSB_raw_;
+extern const XERdescriptor_t INT__BIT21__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT21__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT21__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT22__MSB_raw_;
+extern const XERdescriptor_t INT__BIT22__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT22__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT22__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT23__MSB_raw_;
+extern const XERdescriptor_t INT__BIT23__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT23__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT23__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT24__MSB_raw_;
+extern const XERdescriptor_t INT__BIT24__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT24__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT24__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT25__MSB_raw_;
+extern const XERdescriptor_t INT__BIT25__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT25__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT25__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT26__MSB_raw_;
+extern const XERdescriptor_t INT__BIT26__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT26__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT26__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT27__MSB_raw_;
+extern const XERdescriptor_t INT__BIT27__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT27__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT27__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT28__MSB_raw_;
+extern const XERdescriptor_t INT__BIT28__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT28__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT28__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT39__MSB_raw_;
+extern const XERdescriptor_t INT__BIT39__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT39__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT39__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT30__MSB_raw_;
+extern const XERdescriptor_t INT__BIT30__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT30__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT30__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT31__MSB_raw_;
+extern const XERdescriptor_t INT__BIT31__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT31__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT31__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT32__MSB_raw_;
+extern const XERdescriptor_t INT__BIT32__MSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT32__MSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT32__MSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT1__LSB_raw_;
+extern const XERdescriptor_t INT__BIT1__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT1__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT1__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT2__LSB_raw_;
+extern const XERdescriptor_t INT__BIT2__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT2__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT2__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT3__LSB_raw_;
+extern const XERdescriptor_t INT__BIT3__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT3__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT3__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT4__LSB_raw_;
+extern const XERdescriptor_t INT__BIT4__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT4__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT4__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT5__LSB_raw_;
+extern const XERdescriptor_t INT__BIT5__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT5__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT5__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT6__LSB_raw_;
+extern const XERdescriptor_t INT__BIT6__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT6__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT6__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT7__LSB_raw_;
+extern const XERdescriptor_t INT__BIT7__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT7__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT7__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT8__LSB_raw_;
+extern const XERdescriptor_t INT__BIT8__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT8__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT8__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT9__LSB_raw_;
+extern const XERdescriptor_t INT__BIT9__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT9__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT9__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT10__LSB_raw_;
+extern const XERdescriptor_t INT__BIT10__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT10__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT10__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT11__LSB_raw_;
+extern const XERdescriptor_t INT__BIT11__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT11__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT11__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT12__LSB_raw_;
+extern const XERdescriptor_t INT__BIT12__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT12__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT12__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT13__LSB_raw_;
+extern const XERdescriptor_t INT__BIT13__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT13__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT13__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT14__LSB_raw_;
+extern const XERdescriptor_t INT__BIT14__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT14__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT14__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT15__LSB_raw_;
+extern const XERdescriptor_t INT__BIT15__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT15__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT15__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT16__LSB_raw_;
+extern const XERdescriptor_t INT__BIT16__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT16__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT16__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT17__LSB_raw_;
+extern const XERdescriptor_t INT__BIT17__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT17__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT17__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT18__LSB_raw_;
+extern const XERdescriptor_t INT__BIT18__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT18__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT18__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT19__LSB_raw_;
+extern const XERdescriptor_t INT__BIT19__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT19__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT19__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT20__LSB_raw_;
+extern const XERdescriptor_t INT__BIT20__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT20__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT20__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT21__LSB_raw_;
+extern const XERdescriptor_t INT__BIT21__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT21__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT21__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT22__LSB_raw_;
+extern const XERdescriptor_t INT__BIT22__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT22__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT22__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT23__LSB_raw_;
+extern const XERdescriptor_t INT__BIT23__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT23__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT23__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT24__LSB_raw_;
+extern const XERdescriptor_t INT__BIT24__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT24__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT24__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT25__LSB_raw_;
+extern const XERdescriptor_t INT__BIT25__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT25__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT25__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT26__LSB_raw_;
+extern const XERdescriptor_t INT__BIT26__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT26__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT26__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT27__LSB_raw_;
+extern const XERdescriptor_t INT__BIT27__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT27__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT27__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT28__LSB_raw_;
+extern const XERdescriptor_t INT__BIT28__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT28__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT28__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT39__LSB_raw_;
+extern const XERdescriptor_t INT__BIT39__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT39__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT39__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT30__LSB_raw_;
+extern const XERdescriptor_t INT__BIT30__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT30__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT30__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT31__LSB_raw_;
+extern const XERdescriptor_t INT__BIT31__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT31__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT31__LSB_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT32__LSB_raw_;
+extern const XERdescriptor_t INT__BIT32__LSB_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT32__LSB_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT32__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT1__MSB_raw_;
+extern const XERdescriptor_t BIT1__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT1__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT1__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT2__MSB_raw_;
+extern const XERdescriptor_t BIT2__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT2__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT2__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT3__MSB_raw_;
+extern const XERdescriptor_t BIT3__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT3__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT3__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT4__MSB_raw_;
+extern const XERdescriptor_t BIT4__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT4__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT4__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT5__MSB_raw_;
+extern const XERdescriptor_t BIT5__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT5__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT5__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT6__MSB_raw_;
+extern const XERdescriptor_t BIT6__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT6__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT6__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT7__MSB_raw_;
+extern const XERdescriptor_t BIT7__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT7__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT7__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT8__MSB_raw_;
+extern const XERdescriptor_t BIT8__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT8__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT8__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT9__MSB_raw_;
+extern const XERdescriptor_t BIT9__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT9__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT9__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT10__MSB_raw_;
+extern const XERdescriptor_t BIT10__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT10__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT10__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT11__MSB_raw_;
+extern const XERdescriptor_t BIT11__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT11__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT11__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT12__MSB_raw_;
+extern const XERdescriptor_t BIT12__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT12__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT12__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT13__MSB_raw_;
+extern const XERdescriptor_t BIT13__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT13__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT13__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT14__MSB_raw_;
+extern const XERdescriptor_t BIT14__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT14__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT14__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT15__MSB_raw_;
+extern const XERdescriptor_t BIT15__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT15__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT15__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT16__MSB_raw_;
+extern const XERdescriptor_t BIT16__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT16__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT16__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT17__MSB_raw_;
+extern const XERdescriptor_t BIT17__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT17__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT17__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT18__MSB_raw_;
+extern const XERdescriptor_t BIT18__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT18__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT18__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT19__MSB_raw_;
+extern const XERdescriptor_t BIT19__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT19__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT19__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT20__MSB_raw_;
+extern const XERdescriptor_t BIT20__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT20__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT20__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT21__MSB_raw_;
+extern const XERdescriptor_t BIT21__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT21__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT21__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT22__MSB_raw_;
+extern const XERdescriptor_t BIT22__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT22__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT22__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT24__MSB_raw_;
+extern const XERdescriptor_t BIT24__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT24__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT24__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT25__MSB_raw_;
+extern const XERdescriptor_t BIT25__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT25__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT25__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT26__MSB_raw_;
+extern const XERdescriptor_t BIT26__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT26__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT26__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT27__MSB_raw_;
+extern const XERdescriptor_t BIT27__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT27__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT27__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT28__MSB_raw_;
+extern const XERdescriptor_t BIT28__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT28__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT28__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT29__MSB_raw_;
+extern const XERdescriptor_t BIT29__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT29__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT29__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT30__MSB_raw_;
+extern const XERdescriptor_t BIT30__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT30__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT30__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT31__MSB_raw_;
+extern const XERdescriptor_t BIT31__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT31__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT31__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT32__MSB_raw_;
+extern const XERdescriptor_t BIT32__MSB_xer_;
+extern const TTCN_OERdescriptor_t BIT32__MSB_oer_;
+extern const TTCN_Typedescriptor_t BIT32__MSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT1__LSB_raw_;
+extern const XERdescriptor_t BIT1__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT1__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT1__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT2__LSB_raw_;
+extern const XERdescriptor_t BIT2__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT2__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT2__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT3__LSB_raw_;
+extern const XERdescriptor_t BIT3__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT3__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT3__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT4__LSB_raw_;
+extern const XERdescriptor_t BIT4__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT4__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT4__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT5__LSB_raw_;
+extern const XERdescriptor_t BIT5__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT5__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT5__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT6__LSB_raw_;
+extern const XERdescriptor_t BIT6__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT6__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT6__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT7__LSB_raw_;
+extern const XERdescriptor_t BIT7__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT7__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT7__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT8__LSB_raw_;
+extern const XERdescriptor_t BIT8__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT8__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT8__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT9__LSB_raw_;
+extern const XERdescriptor_t BIT9__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT9__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT9__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT10__LSB_raw_;
+extern const XERdescriptor_t BIT10__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT10__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT10__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT11__LSB_raw_;
+extern const XERdescriptor_t BIT11__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT11__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT11__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT12__LSB_raw_;
+extern const XERdescriptor_t BIT12__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT12__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT12__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT13__LSB_raw_;
+extern const XERdescriptor_t BIT13__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT13__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT13__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT14__LSB_raw_;
+extern const XERdescriptor_t BIT14__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT14__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT14__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT15__LSB_raw_;
+extern const XERdescriptor_t BIT15__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT15__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT15__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT16__LSB_raw_;
+extern const XERdescriptor_t BIT16__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT16__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT16__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT17__LSB_raw_;
+extern const XERdescriptor_t BIT17__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT17__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT17__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT18__LSB_raw_;
+extern const XERdescriptor_t BIT18__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT18__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT18__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT19__LSB_raw_;
+extern const XERdescriptor_t BIT19__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT19__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT19__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT20__LSB_raw_;
+extern const XERdescriptor_t BIT20__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT20__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT20__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT21__LSB_raw_;
+extern const XERdescriptor_t BIT21__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT21__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT21__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT22__LSB_raw_;
+extern const XERdescriptor_t BIT22__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT22__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT22__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT24__LSB_raw_;
+extern const XERdescriptor_t BIT24__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT24__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT24__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT25__LSB_raw_;
+extern const XERdescriptor_t BIT25__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT25__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT25__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT26__LSB_raw_;
+extern const XERdescriptor_t BIT26__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT26__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT26__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT27__LSB_raw_;
+extern const XERdescriptor_t BIT27__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT27__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT27__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT28__LSB_raw_;
+extern const XERdescriptor_t BIT28__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT28__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT28__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT29__LSB_raw_;
+extern const XERdescriptor_t BIT29__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT29__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT29__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT30__LSB_raw_;
+extern const XERdescriptor_t BIT30__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT30__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT30__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT31__LSB_raw_;
+extern const XERdescriptor_t BIT31__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT31__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT31__LSB_descr_;
+extern const TTCN_RAWdescriptor_t BIT32__LSB_raw_;
+extern const XERdescriptor_t BIT32__LSB_xer_;
+extern const TTCN_OERdescriptor_t BIT32__LSB_oer_;
+extern const TTCN_Typedescriptor_t BIT32__LSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__MSB_raw_;
+extern const XERdescriptor_t OCT1__MSB_xer_;
+extern const TTCN_OERdescriptor_t OCT1__MSB_oer_;
+extern const TTCN_Typedescriptor_t OCT1__MSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT2__MSB_raw_;
+extern const XERdescriptor_t OCT2__MSB_xer_;
+extern const TTCN_OERdescriptor_t OCT2__MSB_oer_;
+extern const TTCN_Typedescriptor_t OCT2__MSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__MSB_raw_;
+extern const XERdescriptor_t OCT3__MSB_xer_;
+extern const TTCN_OERdescriptor_t OCT3__MSB_oer_;
+extern const TTCN_Typedescriptor_t OCT3__MSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT4__MSB_raw_;
+extern const XERdescriptor_t OCT4__MSB_xer_;
+extern const TTCN_OERdescriptor_t OCT4__MSB_oer_;
+extern const TTCN_Typedescriptor_t OCT4__MSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__LSB_raw_;
+extern const XERdescriptor_t OCT1__LSB_xer_;
+extern const TTCN_OERdescriptor_t OCT1__LSB_oer_;
+extern const TTCN_Typedescriptor_t OCT1__LSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT2__LSB_raw_;
+extern const XERdescriptor_t OCT2__LSB_xer_;
+extern const TTCN_OERdescriptor_t OCT2__LSB_oer_;
+extern const TTCN_Typedescriptor_t OCT2__LSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__LSB_raw_;
+extern const XERdescriptor_t OCT3__LSB_xer_;
+extern const TTCN_OERdescriptor_t OCT3__LSB_oer_;
+extern const TTCN_Typedescriptor_t OCT3__LSB_descr_;
+extern const TTCN_RAWdescriptor_t OCT4__LSB_raw_;
+extern const XERdescriptor_t OCT4__LSB_xer_;
+extern const TTCN_OERdescriptor_t OCT4__LSB_oer_;
+extern const TTCN_Typedescriptor_t OCT4__LSB_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix_general_types.o b/demo/CAN_matrix_general_types.o
new file mode 100644
index 0000000..2ec5d3a
--- /dev/null
+++ b/demo/CAN_matrix_general_types.o
Binary files differ
diff --git a/demo/CAN_matrix_messages.cc b/demo/CAN_matrix_messages.cc
new file mode 100644
index 0000000..59d12c6
--- /dev/null
+++ b/demo/CAN_matrix_messages.cc
@@ -0,0 +1,8533 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix_messages.hh"
+
+namespace CAN__matrix__messages {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_0_octets[] = { 0, 0, 1, 34 },
+os_1_octets[] = { 0, 0, 1, 35 },
+os_2_octets[] = { 0, 0, 1, 36 },
+os_3_octets[] = { 0, 0, 1, 37 },
+os_4_octets[] = { 0, 0, 1, 38 },
+os_5_octets[] = { 0, 0, 1, 39 },
+os_6_octets[] = { 128, 0, 0, 1 };
+static const OCTETSTRING os_0(4, os_0_octets),
+os_1(4, os_1_octets),
+os_2(4, os_2_octets),
+os_3(4, os_3_octets),
+os_4(4, os_4_octets),
+os_5(4, os_5_octets),
+os_6(4, os_6_octets);
+static const unsigned char module_checksum[] = { 0x8d, 0x75, 0x4a, 0x7d, 0x73, 0xfb, 0x93, 0xd7, 0x5b, 0xbe, 0x7e, 0xb1, 0x6e, 0xe5, 0xfa, 0x1a };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_xer_ = { {"test_sig_11_bit_bitstring_little_endian_coded>\n", "test_sig_11_bit_bitstring_little_endian_coded>\n"}, {47, 47}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.test_sig_11_bit_bitstring_little_endian_coded", &BITSTRING_ber_, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_raw_, NULL, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_xer_, &BITSTRING_json_, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_xer_ = { {"test_sig_5_bit_bitstring_little_endian_coded>\n", "test_sig_5_bit_bitstring_little_endian_coded>\n"}, {46, 46}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.test_sig_5_bit_bitstring_little_endian_coded", &BITSTRING_ber_, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_raw_, NULL, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_xer_, &BITSTRING_json_, &CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME0__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type", NULL, &CAN__MESSAGE__TESTFRAME0__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_xer_ = { {"test_sig_11_bit_bitstring_big_endian_coded>\n", "test_sig_11_bit_bitstring_big_endian_coded>\n"}, {44, 44}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.test_sig_11_bit_bitstring_big_endian_coded", &BITSTRING_ber_, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_raw_, NULL, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_xer_, &BITSTRING_json_, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_xer_ = { {"test_sig_5_bit_bitstring_big_endian_coded>\n", "test_sig_5_bit_bitstring_big_endian_coded>\n"}, {43, 43}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.test_sig_5_bit_bitstring_big_endian_coded", &BITSTRING_ber_, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_raw_, NULL, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_xer_, &BITSTRING_json_, &CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME1__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type", NULL, &CAN__MESSAGE__TESTFRAME1__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_xer_ = { {"test_sig_11_bit_integer_big_endian_coded>\n", "test_sig_11_bit_integer_big_endian_coded>\n"}, {42, 42}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.test_sig_11_bit_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_ = { {"test_sig_5_bit_integer_big_endian_coded>\n", "test_sig_5_bit_integer_big_endian_coded>\n"}, {41, 41}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.test_sig_5_bit_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME2__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type", NULL, &CAN__MESSAGE__TESTFRAME2__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_xer_ = { {"test_sig_1_byte_octetstring_big_endian_coded>\n", "test_sig_1_byte_octetstring_big_endian_coded>\n"}, {46, 46}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_ext_arr_[0] = {};
+const int CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_ext_arr_, 0, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_p_};
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.test_sig_1_byte_octetstring_big_endian_coded", &OCTETSTRING_ber_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_raw_, &OCTETSTRING_text_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_xer_, &OCTETSTRING_json_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_xer_ = { {"test_sig_2_byte_octetstring_big_endian_coded>\n", "test_sig_2_byte_octetstring_big_endian_coded>\n"}, {46, 46}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_ext_arr_[0] = {};
+const int CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_ = { -1, TRUE, 2, FALSE, 0, 0, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_ext_arr_, 0, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_p_};
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.test_sig_2_byte_octetstring_big_endian_coded", &OCTETSTRING_ber_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_raw_, &OCTETSTRING_text_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_xer_, &OCTETSTRING_json_, &CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME3__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type", NULL, &CAN__MESSAGE__TESTFRAME3__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_ = { {"test_unsig_9_bit_2_padded_integer_big_endian_coded>\n", "test_unsig_9_bit_2_padded_integer_big_endian_coded>\n"}, {52, 52}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.test_unsig_9_bit_2_padded_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_MSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_ = { {"test_sig_5_bit_integer_big_endian_coded>\n", "test_sig_5_bit_integer_big_endian_coded>\n"}, {41, 41}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.test_sig_5_bit_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME4__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type", NULL, &CAN__MESSAGE__TESTFRAME4__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_ = { {"test_unsig_9_bit_2_padded_integer_big_endian_coded>\n", "test_unsig_9_bit_2_padded_integer_big_endian_coded>\n"}, {52, 52}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.test_unsig_9_bit_2_padded_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_ = { {"test_sig_5_bit_integer_big_endian_coded>\n", "test_sig_5_bit_integer_big_endian_coded>\n"}, {41, 41}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.test_sig_5_bit_integer_big_endian_coded", &INTEGER_ber_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_, &INTEGER_text_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_, &INTEGER_json_, &CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__TESTFRAME5__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type", NULL, &CAN__MESSAGE__TESTFRAME5__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_ = { {"test_sig_2_byte_octetstring_msb_coded>\n", "test_sig_2_byte_octetstring_msb_coded>\n"}, {39, 39}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_[0] = {};
+const int CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ = { -1, TRUE, 2, FALSE, 0, 0, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_ext_arr_, 0, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_p_};
+const TTCN_Typedescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.test_sig_2_byte_octetstring_msb_coded", &OCTETSTRING_ber_, &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_raw_, &OCTETSTRING_text_, &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_, &OCTETSTRING_json_, &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MESSAGE__EXTENDEDFRAME1__msg__type
+const TTCN_Typedescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_ = { "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type", NULL, &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MatrixPayloadUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MatrixPayloadUnion
+const TTCN_Typedescriptor_t CAN__MatrixPayloadUnion_descr_ = { "@CAN_matrix_messages.CAN_MatrixPayloadUnion", NULL, &CAN__MatrixPayloadUnion_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CAN__MatrixUnion_can__id_xer_ = { {"can_id>\n", "can_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__MatrixUnion_can__id_oer_ext_arr_[0] = {};
+const int CAN__MatrixUnion_can__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__MatrixUnion_can__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, CAN__MatrixUnion_can__id_oer_ext_arr_, 0, CAN__MatrixUnion_can__id_oer_p_};
+const TTCN_Typedescriptor_t CAN__MatrixUnion_can__id_descr_ = { "@CAN_matrix_messages.CAN_MatrixUnion.can_id", &OCTETSTRING_ber_, &Can::CAN__id_raw_, &OCTETSTRING_text_, &CAN__MatrixUnion_can__id_xer_, &OCTETSTRING_json_, &CAN__MatrixUnion_can__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MatrixUnion_can__pdu_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MatrixUnion_can__pdu
+const TTCN_Typedescriptor_t CAN__MatrixUnion_can__pdu_descr_ = { "@CAN_matrix_messages.CAN_MatrixUnion.can_pdu", NULL, &CAN__MatrixUnion_can__pdu_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__MatrixUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__MatrixUnion
+const TTCN_Typedescriptor_t CAN__MatrixUnion_descr_ = { "@CAN_matrix_messages.CAN_MatrixUnion", NULL, &CAN__MatrixUnion_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("CAN_matrix_messages", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+CAN__MESSAGE__TESTFRAME0__msg__type::CAN__MESSAGE__TESTFRAME0__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type::CAN__MESSAGE__TESTFRAME0__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__little__endian__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__little__endian__coded)
+ : field_test__sig__11__bit__bitstring__little__endian__coded(par_test__sig__11__bit__bitstring__little__endian__coded),
+ field_test__sig__5__bit__bitstring__little__endian__coded(par_test__sig__5__bit__bitstring__little__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type::CAN__MESSAGE__TESTFRAME0__msg__type(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+if (other_value.test__sig__11__bit__bitstring__little__endian__coded().is_bound()) field_test__sig__11__bit__bitstring__little__endian__coded = other_value.test__sig__11__bit__bitstring__little__endian__coded();
+else field_test__sig__11__bit__bitstring__little__endian__coded.clean_up();
+if (other_value.test__sig__5__bit__bitstring__little__endian__coded().is_bound()) field_test__sig__5__bit__bitstring__little__endian__coded = other_value.test__sig__5__bit__bitstring__little__endian__coded();
+else field_test__sig__5__bit__bitstring__little__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::clean_up()
+{
+field_test__sig__11__bit__bitstring__little__endian__coded.clean_up();
+field_test__sig__5__bit__bitstring__little__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME0__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME0__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME0__msg__type& CAN__MESSAGE__TESTFRAME0__msg__type::operator=(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+ if (other_value.test__sig__11__bit__bitstring__little__endian__coded().is_bound()) field_test__sig__11__bit__bitstring__little__endian__coded = other_value.test__sig__11__bit__bitstring__little__endian__coded();
+ else field_test__sig__11__bit__bitstring__little__endian__coded.clean_up();
+ if (other_value.test__sig__5__bit__bitstring__little__endian__coded().is_bound()) field_test__sig__5__bit__bitstring__little__endian__coded = other_value.test__sig__5__bit__bitstring__little__endian__coded();
+ else field_test__sig__5__bit__bitstring__little__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type::operator==(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value) const
+{
+return field_test__sig__11__bit__bitstring__little__endian__coded==other_value.field_test__sig__11__bit__bitstring__little__endian__coded
+ && field_test__sig__5__bit__bitstring__little__endian__coded==other_value.field_test__sig__5__bit__bitstring__little__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__bitstring__little__endian__coded.is_bound())
+ || (field_test__sig__5__bit__bitstring__little__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME0__msg__type::is_value() const
+{
+return field_test__sig__11__bit__bitstring__little__endian__coded.is_value()
+ && field_test__sig__5__bit__bitstring__little__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME0__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_little_endian_coded := ");
+field_test__sig__11__bit__bitstring__little__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_little_endian_coded := ");
+field_test__sig__5__bit__bitstring__little__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__little__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__little__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_little_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__little__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_little_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__little__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__bitstring__little__endian__coded().is_bound()) test__sig__11__bit__bitstring__little__endian__coded().set_implicit_omit();
+if (test__sig__5__bit__bitstring__little__endian__coded().is_bound()) test__sig__5__bit__bitstring__little__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__bitstring__little__endian__coded.encode_text(text_buf);
+field_test__sig__5__bit__bitstring__little__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__bitstring__little__endian__coded.decode_text(text_buf);
+field_test__sig__5__bit__bitstring__little__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME0__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME0__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__bitstring__little__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__bitstring__little__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME0__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__bitstring__little__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__bitstring__little__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME0__msg__type_template::single_value_struct {
+BITSTRING_template field_test__sig__11__bit__bitstring__little__endian__coded;
+BITSTRING_template field_test__sig__5__bit__bitstring__little__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__little__endian__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__bitstring__little__endian__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__bitstring__little__endian__coded = other_value.test__sig__11__bit__bitstring__little__endian__coded();
+} else {
+ single_value->field_test__sig__11__bit__bitstring__little__endian__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__bitstring__little__endian__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__bitstring__little__endian__coded = other_value.test__sig__5__bit__bitstring__little__endian__coded();
+} else {
+ single_value->field_test__sig__5__bit__bitstring__little__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__bitstring__little__endian__coded().get_selection()) {
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded = other_value.test__sig__11__bit__bitstring__little__endian__coded();
+} else {
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__bitstring__little__endian__coded().get_selection()) {
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded = other_value.test__sig__5__bit__bitstring__little__endian__coded();
+} else {
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME0__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::CAN__MESSAGE__TESTFRAME0__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::CAN__MESSAGE__TESTFRAME0__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::CAN__MESSAGE__TESTFRAME0__msg__type_template(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::CAN__MESSAGE__TESTFRAME0__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME0__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME0__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::CAN__MESSAGE__TESTFRAME0__msg__type_template(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template::~CAN__MESSAGE__TESTFRAME0__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME0__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME0__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type_template::match(const CAN__MESSAGE__TESTFRAME0__msg__type& 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.test__sig__11__bit__bitstring__little__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__bitstring__little__endian__coded.match(other_value.test__sig__11__bit__bitstring__little__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__bitstring__little__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__bitstring__little__endian__coded.match(other_value.test__sig__5__bit__bitstring__little__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__bitstring__little__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__bitstring__little__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__bitstring__little__endian__coded.is_value()
+ &&single_value->field_test__sig__5__bit__bitstring__little__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type CAN__MESSAGE__TESTFRAME0__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+CAN__MESSAGE__TESTFRAME0__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__bitstring__little__endian__coded.is_bound()) {
+ret_val.test__sig__11__bit__bitstring__little__endian__coded() = single_value->field_test__sig__11__bit__bitstring__little__endian__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__bitstring__little__endian__coded.is_bound()) {
+ret_val.test__sig__5__bit__bitstring__little__endian__coded() = single_value->field_test__sig__5__bit__bitstring__little__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME0__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::test__sig__11__bit__bitstring__little__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__bitstring__little__endian__coded;
+}
+
+const BITSTRING_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::test__sig__11__bit__bitstring__little__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_bitstring_little_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+return single_value->field_test__sig__11__bit__bitstring__little__endian__coded;
+}
+
+BITSTRING_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::test__sig__5__bit__bitstring__little__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__bitstring__little__endian__coded;
+}
+
+const BITSTRING_template& CAN__MESSAGE__TESTFRAME0__msg__type_template::test__sig__5__bit__bitstring__little__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_bitstring_little_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+return single_value->field_test__sig__5__bit__bitstring__little__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME0__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_little_endian_coded := ");
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_little_endian_coded := ");
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME0__msg__type& 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_test__sig__11__bit__bitstring__little__endian__coded.match(match_value.test__sig__11__bit__bitstring__little__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_bitstring_little_endian_coded");
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded.log_match(match_value.test__sig__11__bit__bitstring__little__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__bitstring__little__endian__coded.match(match_value.test__sig__5__bit__bitstring__little__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_bitstring_little_endian_coded");
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.log_match(match_value.test__sig__5__bit__bitstring__little__endian__coded(), legacy);
+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("{ test_sig_11_bit_bitstring_little_endian_coded := ");
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded.log_match(match_value.test__sig__11__bit__bitstring__little__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_little_endian_coded := ");
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.log_match(match_value.test__sig__5__bit__bitstring__little__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME0__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__bitstring__little__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__little__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.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 CAN__MESSAGE__TESTFRAME0__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME0__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__little__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__little__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_little_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__little__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_little_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__little__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME0__msg__type_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_test__sig__11__bit__bitstring__little__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type");
+single_value->field_test__sig__5__bit__bitstring__little__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME0_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME0__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type::CAN__MESSAGE__TESTFRAME1__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type::CAN__MESSAGE__TESTFRAME1__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__big__endian__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__big__endian__coded)
+ : field_test__sig__11__bit__bitstring__big__endian__coded(par_test__sig__11__bit__bitstring__big__endian__coded),
+ field_test__sig__5__bit__bitstring__big__endian__coded(par_test__sig__5__bit__bitstring__big__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type::CAN__MESSAGE__TESTFRAME1__msg__type(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+if (other_value.test__sig__11__bit__bitstring__big__endian__coded().is_bound()) field_test__sig__11__bit__bitstring__big__endian__coded = other_value.test__sig__11__bit__bitstring__big__endian__coded();
+else field_test__sig__11__bit__bitstring__big__endian__coded.clean_up();
+if (other_value.test__sig__5__bit__bitstring__big__endian__coded().is_bound()) field_test__sig__5__bit__bitstring__big__endian__coded = other_value.test__sig__5__bit__bitstring__big__endian__coded();
+else field_test__sig__5__bit__bitstring__big__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::clean_up()
+{
+field_test__sig__11__bit__bitstring__big__endian__coded.clean_up();
+field_test__sig__5__bit__bitstring__big__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME1__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME1__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME1__msg__type& CAN__MESSAGE__TESTFRAME1__msg__type::operator=(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+ if (other_value.test__sig__11__bit__bitstring__big__endian__coded().is_bound()) field_test__sig__11__bit__bitstring__big__endian__coded = other_value.test__sig__11__bit__bitstring__big__endian__coded();
+ else field_test__sig__11__bit__bitstring__big__endian__coded.clean_up();
+ if (other_value.test__sig__5__bit__bitstring__big__endian__coded().is_bound()) field_test__sig__5__bit__bitstring__big__endian__coded = other_value.test__sig__5__bit__bitstring__big__endian__coded();
+ else field_test__sig__5__bit__bitstring__big__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type::operator==(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value) const
+{
+return field_test__sig__11__bit__bitstring__big__endian__coded==other_value.field_test__sig__11__bit__bitstring__big__endian__coded
+ && field_test__sig__5__bit__bitstring__big__endian__coded==other_value.field_test__sig__5__bit__bitstring__big__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__bitstring__big__endian__coded.is_bound())
+ || (field_test__sig__5__bit__bitstring__big__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME1__msg__type::is_value() const
+{
+return field_test__sig__11__bit__bitstring__big__endian__coded.is_value()
+ && field_test__sig__5__bit__bitstring__big__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME1__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_big_endian_coded := ");
+field_test__sig__11__bit__bitstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_big_endian_coded := ");
+field_test__sig__5__bit__bitstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__bitstring__big__endian__coded().is_bound()) test__sig__11__bit__bitstring__big__endian__coded().set_implicit_omit();
+if (test__sig__5__bit__bitstring__big__endian__coded().is_bound()) test__sig__5__bit__bitstring__big__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__bitstring__big__endian__coded.encode_text(text_buf);
+field_test__sig__5__bit__bitstring__big__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__bitstring__big__endian__coded.decode_text(text_buf);
+field_test__sig__5__bit__bitstring__big__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME1__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME1__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__bitstring__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__bitstring__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME1__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__bitstring__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__bitstring__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME1__msg__type_template::single_value_struct {
+BITSTRING_template field_test__sig__11__bit__bitstring__big__endian__coded;
+BITSTRING_template field_test__sig__5__bit__bitstring__big__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__big__endian__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__bitstring__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__bitstring__big__endian__coded = other_value.test__sig__11__bit__bitstring__big__endian__coded();
+} else {
+ single_value->field_test__sig__11__bit__bitstring__big__endian__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__bitstring__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__bitstring__big__endian__coded = other_value.test__sig__5__bit__bitstring__big__endian__coded();
+} else {
+ single_value->field_test__sig__5__bit__bitstring__big__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__bitstring__big__endian__coded().get_selection()) {
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded = other_value.test__sig__11__bit__bitstring__big__endian__coded();
+} else {
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__bitstring__big__endian__coded().get_selection()) {
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded = other_value.test__sig__5__bit__bitstring__big__endian__coded();
+} else {
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME1__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::CAN__MESSAGE__TESTFRAME1__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::CAN__MESSAGE__TESTFRAME1__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::CAN__MESSAGE__TESTFRAME1__msg__type_template(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::CAN__MESSAGE__TESTFRAME1__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME1__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME1__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::CAN__MESSAGE__TESTFRAME1__msg__type_template(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template::~CAN__MESSAGE__TESTFRAME1__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME1__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME1__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type_template::match(const CAN__MESSAGE__TESTFRAME1__msg__type& 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.test__sig__11__bit__bitstring__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__bitstring__big__endian__coded.match(other_value.test__sig__11__bit__bitstring__big__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__bitstring__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__bitstring__big__endian__coded.match(other_value.test__sig__5__bit__bitstring__big__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__bitstring__big__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__bitstring__big__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__bitstring__big__endian__coded.is_value()
+ &&single_value->field_test__sig__5__bit__bitstring__big__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type CAN__MESSAGE__TESTFRAME1__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+CAN__MESSAGE__TESTFRAME1__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__bitstring__big__endian__coded.is_bound()) {
+ret_val.test__sig__11__bit__bitstring__big__endian__coded() = single_value->field_test__sig__11__bit__bitstring__big__endian__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__bitstring__big__endian__coded.is_bound()) {
+ret_val.test__sig__5__bit__bitstring__big__endian__coded() = single_value->field_test__sig__5__bit__bitstring__big__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME1__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::test__sig__11__bit__bitstring__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__bitstring__big__endian__coded;
+}
+
+const BITSTRING_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::test__sig__11__bit__bitstring__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_bitstring_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+return single_value->field_test__sig__11__bit__bitstring__big__endian__coded;
+}
+
+BITSTRING_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::test__sig__5__bit__bitstring__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__bitstring__big__endian__coded;
+}
+
+const BITSTRING_template& CAN__MESSAGE__TESTFRAME1__msg__type_template::test__sig__5__bit__bitstring__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_bitstring_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+return single_value->field_test__sig__5__bit__bitstring__big__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME1__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_bitstring_big_endian_coded := ");
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_big_endian_coded := ");
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME1__msg__type& 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_test__sig__11__bit__bitstring__big__endian__coded.match(match_value.test__sig__11__bit__bitstring__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_bitstring_big_endian_coded");
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded.log_match(match_value.test__sig__11__bit__bitstring__big__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__bitstring__big__endian__coded.match(match_value.test__sig__5__bit__bitstring__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_bitstring_big_endian_coded");
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.log_match(match_value.test__sig__5__bit__bitstring__big__endian__coded(), legacy);
+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("{ test_sig_11_bit_bitstring_big_endian_coded := ");
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded.log_match(match_value.test__sig__11__bit__bitstring__big__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_bitstring_big_endian_coded := ");
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.log_match(match_value.test__sig__5__bit__bitstring__big__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME1__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__bitstring__big__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__big__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.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 CAN__MESSAGE__TESTFRAME1__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME1__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__bitstring__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__bitstring__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_bitstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__bitstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_bitstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__bitstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME1__msg__type_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_test__sig__11__bit__bitstring__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type");
+single_value->field_test__sig__5__bit__bitstring__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME1_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME1__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type::CAN__MESSAGE__TESTFRAME2__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type::CAN__MESSAGE__TESTFRAME2__msg__type(const INTEGER& par_test__sig__11__bit__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded)
+ : field_test__sig__11__bit__integer__big__endian__coded(par_test__sig__11__bit__integer__big__endian__coded),
+ field_test__sig__5__bit__integer__big__endian__coded(par_test__sig__5__bit__integer__big__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type::CAN__MESSAGE__TESTFRAME2__msg__type(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+if (other_value.test__sig__11__bit__integer__big__endian__coded().is_bound()) field_test__sig__11__bit__integer__big__endian__coded = other_value.test__sig__11__bit__integer__big__endian__coded();
+else field_test__sig__11__bit__integer__big__endian__coded.clean_up();
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::clean_up()
+{
+field_test__sig__11__bit__integer__big__endian__coded.clean_up();
+field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME2__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME2__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME2__msg__type& CAN__MESSAGE__TESTFRAME2__msg__type::operator=(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+ if (other_value.test__sig__11__bit__integer__big__endian__coded().is_bound()) field_test__sig__11__bit__integer__big__endian__coded = other_value.test__sig__11__bit__integer__big__endian__coded();
+ else field_test__sig__11__bit__integer__big__endian__coded.clean_up();
+ if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+ else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type::operator==(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value) const
+{
+return field_test__sig__11__bit__integer__big__endian__coded==other_value.field_test__sig__11__bit__integer__big__endian__coded
+ && field_test__sig__5__bit__integer__big__endian__coded==other_value.field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type::is_bound() const
+{
+return (field_test__sig__11__bit__integer__big__endian__coded.is_bound())
+ || (field_test__sig__5__bit__integer__big__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME2__msg__type::is_value() const
+{
+return field_test__sig__11__bit__integer__big__endian__coded.is_value()
+ && field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME2__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_11_bit_integer_big_endian_coded := ");
+field_test__sig__11__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::set_implicit_omit()
+{
+if (test__sig__11__bit__integer__big__endian__coded().is_bound()) test__sig__11__bit__integer__big__endian__coded().set_implicit_omit();
+if (test__sig__5__bit__integer__big__endian__coded().is_bound()) test__sig__5__bit__integer__big__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__11__bit__integer__big__endian__coded.encode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__11__bit__integer__big__endian__coded.decode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME2__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME2__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__11__bit__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME2__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw);
+ encoded_length += field_test__sig__11__bit__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME2__msg__type_template::single_value_struct {
+INTEGER_template field_test__sig__11__bit__integer__big__endian__coded;
+INTEGER_template field_test__sig__5__bit__integer__big__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__big__endian__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__integer__big__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__11__bit__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__11__bit__integer__big__endian__coded = other_value.test__sig__11__bit__integer__big__endian__coded();
+} else {
+ single_value->field_test__sig__11__bit__integer__big__endian__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__11__bit__integer__big__endian__coded().get_selection()) {
+single_value->field_test__sig__11__bit__integer__big__endian__coded = other_value.test__sig__11__bit__integer__big__endian__coded();
+} else {
+single_value->field_test__sig__11__bit__integer__big__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__integer__big__endian__coded().get_selection()) {
+single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME2__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::CAN__MESSAGE__TESTFRAME2__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::CAN__MESSAGE__TESTFRAME2__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::CAN__MESSAGE__TESTFRAME2__msg__type_template(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::CAN__MESSAGE__TESTFRAME2__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME2__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME2__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::CAN__MESSAGE__TESTFRAME2__msg__type_template(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template::~CAN__MESSAGE__TESTFRAME2__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME2__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME2__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type_template::match(const CAN__MESSAGE__TESTFRAME2__msg__type& 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.test__sig__11__bit__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__11__bit__integer__big__endian__coded.match(other_value.test__sig__11__bit__integer__big__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(other_value.test__sig__5__bit__integer__big__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__11__bit__integer__big__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__11__bit__integer__big__endian__coded.is_value()
+ &&single_value->field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type CAN__MESSAGE__TESTFRAME2__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+CAN__MESSAGE__TESTFRAME2__msg__type ret_val;
+if (single_value->field_test__sig__11__bit__integer__big__endian__coded.is_bound()) {
+ret_val.test__sig__11__bit__integer__big__endian__coded() = single_value->field_test__sig__11__bit__integer__big__endian__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()) {
+ret_val.test__sig__5__bit__integer__big__endian__coded() = single_value->field_test__sig__5__bit__integer__big__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME2__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+return value_list.list_value[list_index];
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::test__sig__11__bit__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__11__bit__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::test__sig__11__bit__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_11_bit_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+return single_value->field_test__sig__11__bit__integer__big__endian__coded;
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::test__sig__5__bit__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME2__msg__type_template::test__sig__5__bit__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME2__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_11_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__11__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME2__msg__type& 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_test__sig__11__bit__integer__big__endian__coded.match(match_value.test__sig__11__bit__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_11_bit_integer_big_endian_coded");
+single_value->field_test__sig__11__bit__integer__big__endian__coded.log_match(match_value.test__sig__11__bit__integer__big__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_integer_big_endian_coded");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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("{ test_sig_11_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__11__bit__integer__big__endian__coded.log_match(match_value.test__sig__11__bit__integer__big__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME2__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__11__bit__integer__big__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__big__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 CAN__MESSAGE__TESTFRAME2__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME2__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__11__bit__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_11_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__11__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME2__msg__type_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_test__sig__11__bit__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME2_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME2__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type::CAN__MESSAGE__TESTFRAME3__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type::CAN__MESSAGE__TESTFRAME3__msg__type(const OCTETSTRING& par_test__sig__1__byte__octetstring__big__endian__coded,
+ const OCTETSTRING& par_test__sig__2__byte__octetstring__big__endian__coded)
+ : field_test__sig__1__byte__octetstring__big__endian__coded(par_test__sig__1__byte__octetstring__big__endian__coded),
+ field_test__sig__2__byte__octetstring__big__endian__coded(par_test__sig__2__byte__octetstring__big__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type::CAN__MESSAGE__TESTFRAME3__msg__type(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+if (other_value.test__sig__1__byte__octetstring__big__endian__coded().is_bound()) field_test__sig__1__byte__octetstring__big__endian__coded = other_value.test__sig__1__byte__octetstring__big__endian__coded();
+else field_test__sig__1__byte__octetstring__big__endian__coded.clean_up();
+if (other_value.test__sig__2__byte__octetstring__big__endian__coded().is_bound()) field_test__sig__2__byte__octetstring__big__endian__coded = other_value.test__sig__2__byte__octetstring__big__endian__coded();
+else field_test__sig__2__byte__octetstring__big__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::clean_up()
+{
+field_test__sig__1__byte__octetstring__big__endian__coded.clean_up();
+field_test__sig__2__byte__octetstring__big__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME3__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME3__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME3__msg__type& CAN__MESSAGE__TESTFRAME3__msg__type::operator=(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+ if (other_value.test__sig__1__byte__octetstring__big__endian__coded().is_bound()) field_test__sig__1__byte__octetstring__big__endian__coded = other_value.test__sig__1__byte__octetstring__big__endian__coded();
+ else field_test__sig__1__byte__octetstring__big__endian__coded.clean_up();
+ if (other_value.test__sig__2__byte__octetstring__big__endian__coded().is_bound()) field_test__sig__2__byte__octetstring__big__endian__coded = other_value.test__sig__2__byte__octetstring__big__endian__coded();
+ else field_test__sig__2__byte__octetstring__big__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type::operator==(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value) const
+{
+return field_test__sig__1__byte__octetstring__big__endian__coded==other_value.field_test__sig__1__byte__octetstring__big__endian__coded
+ && field_test__sig__2__byte__octetstring__big__endian__coded==other_value.field_test__sig__2__byte__octetstring__big__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type::is_bound() const
+{
+return (field_test__sig__1__byte__octetstring__big__endian__coded.is_bound())
+ || (field_test__sig__2__byte__octetstring__big__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME3__msg__type::is_value() const
+{
+return field_test__sig__1__byte__octetstring__big__endian__coded.is_value()
+ && field_test__sig__2__byte__octetstring__big__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME3__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_1_byte_octetstring_big_endian_coded := ");
+field_test__sig__1__byte__octetstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_big_endian_coded := ");
+field_test__sig__2__byte__octetstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__1__byte__octetstring__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_1_byte_octetstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__1__byte__octetstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::set_implicit_omit()
+{
+if (test__sig__1__byte__octetstring__big__endian__coded().is_bound()) test__sig__1__byte__octetstring__big__endian__coded().set_implicit_omit();
+if (test__sig__2__byte__octetstring__big__endian__coded().is_bound()) test__sig__2__byte__octetstring__big__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__1__byte__octetstring__big__endian__coded.encode_text(text_buf);
+field_test__sig__2__byte__octetstring__big__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__1__byte__octetstring__big__endian__coded.decode_text(text_buf);
+field_test__sig__2__byte__octetstring__big__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME3__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME3__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__1__byte__octetstring__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__2__byte__octetstring__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME3__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_.raw);
+ encoded_length += field_test__sig__1__byte__octetstring__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__2__byte__octetstring__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME3__msg__type_template::single_value_struct {
+OCTETSTRING_template field_test__sig__1__byte__octetstring__big__endian__coded;
+OCTETSTRING_template field_test__sig__2__byte__octetstring__big__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__big__endian__coded = ANY_VALUE;
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__1__byte__octetstring__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__1__byte__octetstring__big__endian__coded = other_value.test__sig__1__byte__octetstring__big__endian__coded();
+} else {
+ single_value->field_test__sig__1__byte__octetstring__big__endian__coded.clean_up();
+}
+if (other_value.test__sig__2__byte__octetstring__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__2__byte__octetstring__big__endian__coded = other_value.test__sig__2__byte__octetstring__big__endian__coded();
+} else {
+ single_value->field_test__sig__2__byte__octetstring__big__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__1__byte__octetstring__big__endian__coded().get_selection()) {
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded = other_value.test__sig__1__byte__octetstring__big__endian__coded();
+} else {
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__2__byte__octetstring__big__endian__coded().get_selection()) {
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded = other_value.test__sig__2__byte__octetstring__big__endian__coded();
+} else {
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME3__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::CAN__MESSAGE__TESTFRAME3__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::CAN__MESSAGE__TESTFRAME3__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::CAN__MESSAGE__TESTFRAME3__msg__type_template(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::CAN__MESSAGE__TESTFRAME3__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME3__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME3__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::CAN__MESSAGE__TESTFRAME3__msg__type_template(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template::~CAN__MESSAGE__TESTFRAME3__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME3__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME3__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type_template::match(const CAN__MESSAGE__TESTFRAME3__msg__type& 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.test__sig__1__byte__octetstring__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__1__byte__octetstring__big__endian__coded.match(other_value.test__sig__1__byte__octetstring__big__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__2__byte__octetstring__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__2__byte__octetstring__big__endian__coded.match(other_value.test__sig__2__byte__octetstring__big__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__1__byte__octetstring__big__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__2__byte__octetstring__big__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__1__byte__octetstring__big__endian__coded.is_value()
+ &&single_value->field_test__sig__2__byte__octetstring__big__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type CAN__MESSAGE__TESTFRAME3__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+CAN__MESSAGE__TESTFRAME3__msg__type ret_val;
+if (single_value->field_test__sig__1__byte__octetstring__big__endian__coded.is_bound()) {
+ret_val.test__sig__1__byte__octetstring__big__endian__coded() = single_value->field_test__sig__1__byte__octetstring__big__endian__coded.valueof();
+}
+if (single_value->field_test__sig__2__byte__octetstring__big__endian__coded.is_bound()) {
+ret_val.test__sig__2__byte__octetstring__big__endian__coded() = single_value->field_test__sig__2__byte__octetstring__big__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME3__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::test__sig__1__byte__octetstring__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__1__byte__octetstring__big__endian__coded;
+}
+
+const OCTETSTRING_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::test__sig__1__byte__octetstring__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_1_byte_octetstring_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+return single_value->field_test__sig__1__byte__octetstring__big__endian__coded;
+}
+
+OCTETSTRING_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::test__sig__2__byte__octetstring__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__2__byte__octetstring__big__endian__coded;
+}
+
+const OCTETSTRING_template& CAN__MESSAGE__TESTFRAME3__msg__type_template::test__sig__2__byte__octetstring__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_2_byte_octetstring_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+return single_value->field_test__sig__2__byte__octetstring__big__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME3__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_1_byte_octetstring_big_endian_coded := ");
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_big_endian_coded := ");
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME3__msg__type& 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_test__sig__1__byte__octetstring__big__endian__coded.match(match_value.test__sig__1__byte__octetstring__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_1_byte_octetstring_big_endian_coded");
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded.log_match(match_value.test__sig__1__byte__octetstring__big__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__2__byte__octetstring__big__endian__coded.match(match_value.test__sig__2__byte__octetstring__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_2_byte_octetstring_big_endian_coded");
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.log_match(match_value.test__sig__2__byte__octetstring__big__endian__coded(), legacy);
+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("{ test_sig_1_byte_octetstring_big_endian_coded := ");
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded.log_match(match_value.test__sig__1__byte__octetstring__big__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_2_byte_octetstring_big_endian_coded := ");
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.log_match(match_value.test__sig__2__byte__octetstring__big__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME3__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__1__byte__octetstring__big__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__big__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.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 CAN__MESSAGE__TESTFRAME3__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME3__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__1__byte__octetstring__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_1_byte_octetstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__1__byte__octetstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME3__msg__type_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_test__sig__1__byte__octetstring__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type");
+single_value->field_test__sig__2__byte__octetstring__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME3_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME3__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type::CAN__MESSAGE__TESTFRAME4__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type::CAN__MESSAGE__TESTFRAME4__msg__type(const INTEGER& par_test__unsig__9__bit__2__padded__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded)
+ : field_test__unsig__9__bit__2__padded__integer__big__endian__coded(par_test__unsig__9__bit__2__padded__integer__big__endian__coded),
+ field_test__sig__5__bit__integer__big__endian__coded(par_test__sig__5__bit__integer__big__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type::CAN__MESSAGE__TESTFRAME4__msg__type(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+else field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::clean_up()
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME4__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME4__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME4__msg__type& CAN__MESSAGE__TESTFRAME4__msg__type::operator=(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+ if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+ else field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+ if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+ else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type::operator==(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value) const
+{
+return field_test__unsig__9__bit__2__padded__integer__big__endian__coded==other_value.field_test__unsig__9__bit__2__padded__integer__big__endian__coded
+ && field_test__sig__5__bit__integer__big__endian__coded==other_value.field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type::is_bound() const
+{
+return (field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound())
+ || (field_test__sig__5__bit__integer__big__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME4__msg__type::is_value() const
+{
+return field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_value()
+ && field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME4__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_unsig_9_bit_2_padded_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::set_implicit_omit()
+{
+if (test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_implicit_omit();
+if (test__sig__5__bit__integer__big__endian__coded().is_bound()) test__sig__5__bit__integer__big__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.encode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.decode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME4__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME4__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__unsig__9__bit__2__padded__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME4__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw);
+ encoded_length += field_test__unsig__9__bit__2__padded__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME4__msg__type_template::single_value_struct {
+INTEGER_template field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+INTEGER_template field_test__sig__5__bit__integer__big__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__integer__big__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+} else {
+ single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().get_selection()) {
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+} else {
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__integer__big__endian__coded().get_selection()) {
+single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME4__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::CAN__MESSAGE__TESTFRAME4__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::CAN__MESSAGE__TESTFRAME4__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::CAN__MESSAGE__TESTFRAME4__msg__type_template(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::CAN__MESSAGE__TESTFRAME4__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME4__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME4__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::CAN__MESSAGE__TESTFRAME4__msg__type_template(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template::~CAN__MESSAGE__TESTFRAME4__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME4__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME4__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type_template::match(const CAN__MESSAGE__TESTFRAME4__msg__type& 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.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.match(other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(other_value.test__sig__5__bit__integer__big__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_value()
+ &&single_value->field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type CAN__MESSAGE__TESTFRAME4__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+CAN__MESSAGE__TESTFRAME4__msg__type ret_val;
+if (single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound()) {
+ret_val.test__unsig__9__bit__2__padded__integer__big__endian__coded() = single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()) {
+ret_val.test__sig__5__bit__integer__big__endian__coded() = single_value->field_test__sig__5__bit__integer__big__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME4__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+return value_list.list_value[list_index];
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::test__unsig__9__bit__2__padded__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::test__unsig__9__bit__2__padded__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_unsig_9_bit_2_padded_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::test__sig__5__bit__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME4__msg__type_template::test__sig__5__bit__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME4__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME4__msg__type& 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_test__unsig__9__bit__2__padded__integer__big__endian__coded.match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_unsig_9_bit_2_padded_integer_big_endian_coded");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log_match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_integer_big_endian_coded");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log_match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME4__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 CAN__MESSAGE__TESTFRAME4__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME4__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_unsig_9_bit_2_padded_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME4__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME4_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME4__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type::CAN__MESSAGE__TESTFRAME5__msg__type()
+{
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type::CAN__MESSAGE__TESTFRAME5__msg__type(const INTEGER& par_test__unsig__9__bit__2__padded__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded)
+ : field_test__unsig__9__bit__2__padded__integer__big__endian__coded(par_test__unsig__9__bit__2__padded__integer__big__endian__coded),
+ field_test__sig__5__bit__integer__big__endian__coded(par_test__sig__5__bit__integer__big__endian__coded)
+{
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type::CAN__MESSAGE__TESTFRAME5__msg__type(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+else field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::clean_up()
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__TESTFRAME5__msg__type::get_descriptor() const { return &CAN__MESSAGE__TESTFRAME5__msg__type_descr_; }
+CAN__MESSAGE__TESTFRAME5__msg__type& CAN__MESSAGE__TESTFRAME5__msg__type::operator=(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+ if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+ else field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+ if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+ else field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type::operator==(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value) const
+{
+return field_test__unsig__9__bit__2__padded__integer__big__endian__coded==other_value.field_test__unsig__9__bit__2__padded__integer__big__endian__coded
+ && field_test__sig__5__bit__integer__big__endian__coded==other_value.field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type::is_bound() const
+{
+return (field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound())
+ || (field_test__sig__5__bit__integer__big__endian__coded.is_bound());
+}
+boolean CAN__MESSAGE__TESTFRAME5__msg__type::is_value() const
+{
+return field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_value()
+ && field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+void CAN__MESSAGE__TESTFRAME5__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_unsig_9_bit_2_padded_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type");
+ }
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::set_implicit_omit()
+{
+if (test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_implicit_omit();
+if (test__sig__5__bit__integer__big__endian__coded().is_bound()) test__sig__5__bit__integer__big__endian__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.encode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__unsig__9__bit__2__padded__integer__big__endian__coded.decode_text(text_buf);
+field_test__sig__5__bit__integer__big__endian__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__TESTFRAME5__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__TESTFRAME5__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__unsig__9__bit__2__padded__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__5__bit__integer__big__endian__coded.RAW_decode(CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__TESTFRAME5__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_.raw);
+ encoded_length += field_test__unsig__9__bit__2__padded__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_test__sig__5__bit__integer__big__endian__coded.RAW_encode(CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__TESTFRAME5__msg__type_template::single_value_struct {
+INTEGER_template field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+INTEGER_template field_test__sig__5__bit__integer__big__endian__coded;
+};
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded = ANY_VALUE;
+single_value->field_test__sig__5__bit__integer__big__endian__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::copy_value(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+} else {
+ single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+}
+if (other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+ single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::copy_template(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded().get_selection()) {
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded = other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded();
+} else {
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__5__bit__integer__big__endian__coded().get_selection()) {
+single_value->field_test__sig__5__bit__integer__big__endian__coded = other_value.test__sig__5__bit__integer__big__endian__coded();
+} else {
+single_value->field_test__sig__5__bit__integer__big__endian__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME5__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::CAN__MESSAGE__TESTFRAME5__msg__type_template()
+{
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::CAN__MESSAGE__TESTFRAME5__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::CAN__MESSAGE__TESTFRAME5__msg__type_template(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::CAN__MESSAGE__TESTFRAME5__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME5__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME5__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::CAN__MESSAGE__TESTFRAME5__msg__type_template(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template::~CAN__MESSAGE__TESTFRAME5__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME5__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__TESTFRAME5__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::operator=(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type_template::match(const CAN__MESSAGE__TESTFRAME5__msg__type& 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.test__unsig__9__bit__2__padded__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.match(other_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy))return FALSE;
+if(!other_value.test__sig__5__bit__integer__big__endian__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(other_value.test__sig__5__bit__integer__big__endian__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound()
+
+ ||single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_value()
+ &&single_value->field_test__sig__5__bit__integer__big__endian__coded.is_value();
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type CAN__MESSAGE__TESTFRAME5__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+CAN__MESSAGE__TESTFRAME5__msg__type ret_val;
+if (single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.is_bound()) {
+ret_val.test__unsig__9__bit__2__padded__integer__big__endian__coded() = single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.valueof();
+}
+if (single_value->field_test__sig__5__bit__integer__big__endian__coded.is_bound()) {
+ret_val.test__sig__5__bit__integer__big__endian__coded() = single_value->field_test__sig__5__bit__integer__big__endian__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__TESTFRAME5__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+return value_list.list_value[list_index];
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::test__unsig__9__bit__2__padded__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::test__unsig__9__bit__2__padded__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_unsig_9_bit_2_padded_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+return single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+}
+
+INTEGER_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::test__sig__5__bit__integer__big__endian__coded()
+{
+set_specific();
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+const INTEGER_template& CAN__MESSAGE__TESTFRAME5__msg__type_template::test__sig__5__bit__integer__big__endian__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_5_bit_integer_big_endian_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+return single_value->field_test__sig__5__bit__integer__big__endian__coded;
+}
+
+int CAN__MESSAGE__TESTFRAME5__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_template::log_match(const CAN__MESSAGE__TESTFRAME5__msg__type& 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_test__unsig__9__bit__2__padded__integer__big__endian__coded.match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_unsig_9_bit_2_padded_integer_big_endian_coded");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log_match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_test__sig__5__bit__integer__big__endian__coded.match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_5_bit_integer_big_endian_coded");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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("{ test_unsig_9_bit_2_padded_integer_big_endian_coded := ");
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.log_match(match_value.test__unsig__9__bit__2__padded__integer__big__endian__coded(), legacy);
+TTCN_Logger::log_event_str(", test_sig_5_bit_integer_big_endian_coded := ");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.log_match(match_value.test__sig__5__bit__integer__big__endian__coded(), legacy);
+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 CAN__MESSAGE__TESTFRAME5__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__unsig__9__bit__2__padded__integer__big__endian__coded.encode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded.decode_text(text_buf);
+single_value->field_test__sig__5__bit__integer__big__endian__coded.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 CAN__MESSAGE__TESTFRAME5__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type.");
+}
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_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: {
+ CAN__MESSAGE__TESTFRAME5__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) test__sig__5__bit__integer__big__endian__coded().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_unsig_9_bit_2_padded_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__unsig__9__bit__2__padded__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_5_bit_integer_big_endian_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__5__bit__integer__big__endian__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__TESTFRAME5__msg__type_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_test__unsig__9__bit__2__padded__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type");
+single_value->field_test__sig__5__bit__integer__big__endian__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_TESTFRAME5_msg_type");
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__TESTFRAME5__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type::CAN__MESSAGE__EXTENDEDFRAME1__msg__type()
+{
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type::CAN__MESSAGE__EXTENDEDFRAME1__msg__type(const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded)
+ : field_test__sig__2__byte__octetstring__msb__coded(par_test__sig__2__byte__octetstring__msb__coded)
+{
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type::CAN__MESSAGE__EXTENDEDFRAME1__msg__type(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::clean_up()
+{
+field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MESSAGE__EXTENDEDFRAME1__msg__type::get_descriptor() const { return &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_; }
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type& CAN__MESSAGE__EXTENDEDFRAME1__msg__type::operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+ if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+ else field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type::operator==(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const
+{
+return field_test__sig__2__byte__octetstring__msb__coded==other_value.field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type::is_bound() const
+{
+return (field_test__sig__2__byte__octetstring__msb__coded.is_bound());
+}
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type::is_value() const
+{
+return field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ test_sig_2_byte_octetstring_msb_coded := ");
+field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::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 (1<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type has 1 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type");
+ }
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::set_implicit_omit()
+{
+if (test__sig__2__byte__octetstring__msb__coded().is_bound()) test__sig__2__byte__octetstring__msb__coded().set_implicit_omit();
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::encode_text(Text_Buf& text_buf) const
+{
+field_test__sig__2__byte__octetstring__msb__coded.encode_text(text_buf);
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::decode_text(Text_Buf& text_buf)
+{
+field_test__sig__2__byte__octetstring__msb__coded.decode_text(text_buf);
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MESSAGE__EXTENDEDFRAME1__msg__type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MESSAGE__EXTENDEDFRAME1__msg__type::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_.raw->forceomit);
+ decoded_field_length = field_test__sig__2__byte__octetstring__msb__coded.RAW_decode(CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MESSAGE__EXTENDEDFRAME1__msg__type::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 1;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(1);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_.raw);
+ encoded_length += field_test__sig__2__byte__octetstring__msb__coded.RAW_encode(CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_, *myleaf.body.node.nodes[0]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::single_value_struct {
+OCTETSTRING_template field_test__sig__2__byte__octetstring__msb__coded;
+};
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded = ANY_VALUE;
+}
+}
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::copy_value(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.test__sig__2__byte__octetstring__msb__coded().is_bound()) {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+ single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::copy_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.test__sig__2__byte__octetstring__msb__coded().get_selection()) {
+single_value->field_test__sig__2__byte__octetstring__msb__coded = other_value.test__sig__2__byte__octetstring__msb__coded();
+} else {
+single_value->field_test__sig__2__byte__octetstring__msb__coded.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template()
+{
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const OPTIONAL<CAN__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__EXTENDEDFRAME1__msg__type&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type from an unbound optional field.");
+}
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::~CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template()
+{
+clean_up();
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const OPTIONAL<CAN__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MESSAGE__EXTENDEDFRAME1__msg__type&)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 @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+return *this;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::match(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& 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.test__sig__2__byte__octetstring__msb__coded().is_bound()) return FALSE;
+if(!single_value->field_test__sig__2__byte__octetstring__msb__coded.match(other_value.test__sig__2__byte__octetstring__msb__coded(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+return FALSE;
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()
+;
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_test__sig__2__byte__octetstring__msb__coded.is_value();
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type ret_val;
+if (single_value->field_test__sig__2__byte__octetstring__msb__coded.is_bound()) {
+ret_val.test__sig__2__byte__octetstring__msb__coded() = single_value->field_test__sig__2__byte__octetstring__msb__coded.valueof();
+}
+return ret_val;
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template[list_length];
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::test__sig__2__byte__octetstring__msb__coded()
+{
+set_specific();
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+const OCTETSTRING_template& CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::test__sig__2__byte__octetstring__msb__coded() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field test_sig_2_byte_octetstring_msb_coded of a non-specific template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+return single_value->field_test__sig__2__byte__octetstring__msb__coded;
+}
+
+int CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 1;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type 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 @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+ }
+ return 0;
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::log_match(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& 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_test__sig__2__byte__octetstring__msb__coded.match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy)){
+TTCN_Logger::log_logmatch_info(".test_sig_2_byte_octetstring_msb_coded");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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("{ test_sig_2_byte_octetstring_msb_coded := ");
+single_value->field_test__sig__2__byte__octetstring__msb__coded.log_match(match_value.test__sig__2__byte__octetstring__msb__coded(), legacy);
+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 CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_test__sig__2__byte__octetstring__msb__coded.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 @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded.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 CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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 @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type.");
+}
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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: {
+ CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (1<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type has 1 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) test__sig__2__byte__octetstring__msb__coded().set_param(*param.get_elem(0));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "test_sig_2_byte_octetstring_msb_coded")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ test__sig__2__byte__octetstring__msb__coded().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MESSAGE__EXTENDEDFRAME1__msg__type_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_test__sig__2__byte__octetstring__msb__coded.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type");
+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 : "@CAN_matrix_messages.CAN_MESSAGE_EXTENDEDFRAME1_msg_type");
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void CAN__MatrixPayloadUnion::copy_value(const CAN__MatrixPayloadUnion& other_value)
+{
+switch (other_value.union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type(*other_value.field_message__MyTestframe0);
+break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type(*other_value.field_message__MyTestframe1);
+break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type(*other_value.field_message__MyTestframe2);
+break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type(*other_value.field_message__MyTestframe3);
+break;
+case ALT_message__MyTestframe4:
+field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type(*other_value.field_message__MyTestframe4);
+break;
+case ALT_message__MyTestframe5:
+field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type(*other_value.field_message__MyTestframe5);
+break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type(*other_value.field_message__extendedFrame1);
+break;
+default:
+TTCN_error("Assignment of an unbound union value of type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+union_selection = other_value.union_selection;
+}
+
+CAN__MatrixPayloadUnion::CAN__MatrixPayloadUnion()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+CAN__MatrixPayloadUnion::CAN__MatrixPayloadUnion(const CAN__MatrixPayloadUnion& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+CAN__MatrixPayloadUnion::~CAN__MatrixPayloadUnion()
+{
+clean_up();
+}
+
+CAN__MatrixPayloadUnion& CAN__MatrixPayloadUnion::operator=(const CAN__MatrixPayloadUnion& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean CAN__MatrixPayloadUnion::operator==(const CAN__MatrixPayloadUnion& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+return *field_message__MyTestframe0 == *other_value.field_message__MyTestframe0;
+case ALT_message__MyTestframe1:
+return *field_message__MyTestframe1 == *other_value.field_message__MyTestframe1;
+case ALT_message__MyTestframe2:
+return *field_message__MyTestframe2 == *other_value.field_message__MyTestframe2;
+case ALT_message__MyTestframe3:
+return *field_message__MyTestframe3 == *other_value.field_message__MyTestframe3;
+case ALT_message__MyTestframe4:
+return *field_message__MyTestframe4 == *other_value.field_message__MyTestframe4;
+case ALT_message__MyTestframe5:
+return *field_message__MyTestframe5 == *other_value.field_message__MyTestframe5;
+case ALT_message__extendedFrame1:
+return *field_message__extendedFrame1 == *other_value.field_message__extendedFrame1;
+default:
+return FALSE;
+}
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe0()
+{
+if (union_selection != ALT_message__MyTestframe0) {
+clean_up();
+field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type;
+union_selection = ALT_message__MyTestframe0;
+}
+return *field_message__MyTestframe0;
+}
+
+const CAN__MESSAGE__TESTFRAME0__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe0() const
+{
+if (union_selection != ALT_message__MyTestframe0) TTCN_error("Using non-selected field message_MyTestframe0 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe0;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe1()
+{
+if (union_selection != ALT_message__MyTestframe1) {
+clean_up();
+field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type;
+union_selection = ALT_message__MyTestframe1;
+}
+return *field_message__MyTestframe1;
+}
+
+const CAN__MESSAGE__TESTFRAME1__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe1() const
+{
+if (union_selection != ALT_message__MyTestframe1) TTCN_error("Using non-selected field message_MyTestframe1 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe1;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe2()
+{
+if (union_selection != ALT_message__MyTestframe2) {
+clean_up();
+field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type;
+union_selection = ALT_message__MyTestframe2;
+}
+return *field_message__MyTestframe2;
+}
+
+const CAN__MESSAGE__TESTFRAME2__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe2() const
+{
+if (union_selection != ALT_message__MyTestframe2) TTCN_error("Using non-selected field message_MyTestframe2 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe2;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe3()
+{
+if (union_selection != ALT_message__MyTestframe3) {
+clean_up();
+field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type;
+union_selection = ALT_message__MyTestframe3;
+}
+return *field_message__MyTestframe3;
+}
+
+const CAN__MESSAGE__TESTFRAME3__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe3() const
+{
+if (union_selection != ALT_message__MyTestframe3) TTCN_error("Using non-selected field message_MyTestframe3 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe3;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe4()
+{
+if (union_selection != ALT_message__MyTestframe4) {
+clean_up();
+field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type;
+union_selection = ALT_message__MyTestframe4;
+}
+return *field_message__MyTestframe4;
+}
+
+const CAN__MESSAGE__TESTFRAME4__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe4() const
+{
+if (union_selection != ALT_message__MyTestframe4) TTCN_error("Using non-selected field message_MyTestframe4 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe4;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe5()
+{
+if (union_selection != ALT_message__MyTestframe5) {
+clean_up();
+field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type;
+union_selection = ALT_message__MyTestframe5;
+}
+return *field_message__MyTestframe5;
+}
+
+const CAN__MESSAGE__TESTFRAME5__msg__type& CAN__MatrixPayloadUnion::message__MyTestframe5() const
+{
+if (union_selection != ALT_message__MyTestframe5) TTCN_error("Using non-selected field message_MyTestframe5 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__MyTestframe5;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type& CAN__MatrixPayloadUnion::message__extendedFrame1()
+{
+if (union_selection != ALT_message__extendedFrame1) {
+clean_up();
+field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type;
+union_selection = ALT_message__extendedFrame1;
+}
+return *field_message__extendedFrame1;
+}
+
+const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& CAN__MatrixPayloadUnion::message__extendedFrame1() const
+{
+if (union_selection != ALT_message__extendedFrame1) TTCN_error("Using non-selected field message_extendedFrame1 in a value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *field_message__extendedFrame1;
+}
+
+boolean CAN__MatrixPayloadUnion::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return union_selection == checked_selection;
+}
+
+boolean CAN__MatrixPayloadUnion::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean CAN__MatrixPayloadUnion::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+case ALT_message__MyTestframe0: return field_message__MyTestframe0->is_value();
+case ALT_message__MyTestframe1: return field_message__MyTestframe1->is_value();
+case ALT_message__MyTestframe2: return field_message__MyTestframe2->is_value();
+case ALT_message__MyTestframe3: return field_message__MyTestframe3->is_value();
+case ALT_message__MyTestframe4: return field_message__MyTestframe4->is_value();
+case ALT_message__MyTestframe5: return field_message__MyTestframe5->is_value();
+case ALT_message__extendedFrame1: return field_message__extendedFrame1->is_value();
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void CAN__MatrixPayloadUnion::clean_up()
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+ delete field_message__MyTestframe0;
+ break;
+case ALT_message__MyTestframe1:
+ delete field_message__MyTestframe1;
+ break;
+case ALT_message__MyTestframe2:
+ delete field_message__MyTestframe2;
+ break;
+case ALT_message__MyTestframe3:
+ delete field_message__MyTestframe3;
+ break;
+case ALT_message__MyTestframe4:
+ delete field_message__MyTestframe4;
+ break;
+case ALT_message__MyTestframe5:
+ delete field_message__MyTestframe5;
+ break;
+case ALT_message__extendedFrame1:
+ delete field_message__extendedFrame1;
+ break;
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void CAN__MatrixPayloadUnion::log() const
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+field_message__MyTestframe0->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe1:
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+field_message__MyTestframe1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe2:
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+field_message__MyTestframe2->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe3:
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+field_message__MyTestframe3->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe4:
+TTCN_Logger::log_event_str("{ message_MyTestframe4 := ");
+field_message__MyTestframe4->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__MyTestframe5:
+TTCN_Logger::log_event_str("{ message_MyTestframe5 := ");
+field_message__MyTestframe5->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_message__extendedFrame1:
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+field_message__extendedFrame1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void CAN__MatrixPayloadUnion::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, "message_MyTestframe0")) {
+ message__MyTestframe0().set_param(*mp_last);
+ if (!message__MyTestframe0().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe1")) {
+ message__MyTestframe1().set_param(*mp_last);
+ if (!message__MyTestframe1().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe2")) {
+ message__MyTestframe2().set_param(*mp_last);
+ if (!message__MyTestframe2().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe3")) {
+ message__MyTestframe3().set_param(*mp_last);
+ if (!message__MyTestframe3().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe4")) {
+ message__MyTestframe4().set_param(*mp_last);
+ if (!message__MyTestframe4().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_MyTestframe5")) {
+ message__MyTestframe5().set_param(*mp_last);
+ if (!message__MyTestframe5().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "message_extendedFrame1")) {
+ message__extendedFrame1().set_param(*mp_last);
+ if (!message__extendedFrame1().is_bound()) clean_up();
+ return;
+ }
+ mp_last->error("Field %s does not exist in type @CAN_matrix_messages.CAN_MatrixPayloadUnion.", last_name);
+}
+
+void CAN__MatrixPayloadUnion::set_implicit_omit()
+{
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0->set_implicit_omit(); break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1->set_implicit_omit(); break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2->set_implicit_omit(); break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3->set_implicit_omit(); break;
+case ALT_message__MyTestframe4:
+field_message__MyTestframe4->set_implicit_omit(); break;
+case ALT_message__MyTestframe5:
+field_message__MyTestframe5->set_implicit_omit(); break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1->set_implicit_omit(); break;
+default: break;
+}
+}
+
+void CAN__MatrixPayloadUnion::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+case ALT_message__MyTestframe0:
+field_message__MyTestframe0->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe1:
+field_message__MyTestframe1->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe2:
+field_message__MyTestframe2->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe3:
+field_message__MyTestframe3->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe4:
+field_message__MyTestframe4->encode_text(text_buf);
+break;
+case ALT_message__MyTestframe5:
+field_message__MyTestframe5->encode_text(text_buf);
+break;
+case ALT_message__extendedFrame1:
+field_message__extendedFrame1->encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+
+void CAN__MatrixPayloadUnion::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+case ALT_message__MyTestframe0:
+message__MyTestframe0().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe1:
+message__MyTestframe1().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe2:
+message__MyTestframe2().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe3:
+message__MyTestframe3().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe4:
+message__MyTestframe4().decode_text(text_buf);
+break;
+case ALT_message__MyTestframe5:
+message__MyTestframe5().decode_text(text_buf);
+break;
+case ALT_message__extendedFrame1:
+message__extendedFrame1().decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+
+void CAN__MatrixPayloadUnion::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MatrixPayloadUnion::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MatrixPayloadUnion::RAW_decode(
+const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit,
+raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
+{
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int starting_pos=p_buf.get_pos_bit();
+ if(sel_field!=-1){
+ switch(sel_field){
+ case 0: {
+ RAW_Force_Omit field_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME0__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe0().RAW_decode(CAN__MESSAGE__TESTFRAME0__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 1: {
+ RAW_Force_Omit field_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe1().RAW_decode(CAN__MESSAGE__TESTFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 2: {
+ RAW_Force_Omit field_force_omit(2, force_omit, CAN__MESSAGE__TESTFRAME2__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe2().RAW_decode(CAN__MESSAGE__TESTFRAME2__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 3: {
+ RAW_Force_Omit field_force_omit(3, force_omit, CAN__MESSAGE__TESTFRAME3__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe3().RAW_decode(CAN__MESSAGE__TESTFRAME3__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 4: {
+ RAW_Force_Omit field_force_omit(4, force_omit, CAN__MESSAGE__TESTFRAME4__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe4().RAW_decode(CAN__MESSAGE__TESTFRAME4__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 5: {
+ RAW_Force_Omit field_force_omit(5, force_omit, CAN__MESSAGE__TESTFRAME5__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe5().RAW_decode(CAN__MESSAGE__TESTFRAME5__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 6: {
+ RAW_Force_Omit field_force_omit(6, force_omit, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__extendedFrame1().RAW_decode(CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ default: break;
+ }
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ } else {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_0_force_omit(0, force_omit, CAN__MESSAGE__TESTFRAME0__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe0().RAW_decode(CAN__MESSAGE__TESTFRAME0__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MESSAGE__TESTFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe1().RAW_decode(CAN__MESSAGE__TESTFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_2_force_omit(2, force_omit, CAN__MESSAGE__TESTFRAME2__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe2().RAW_decode(CAN__MESSAGE__TESTFRAME2__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_3_force_omit(3, force_omit, CAN__MESSAGE__TESTFRAME3__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe3().RAW_decode(CAN__MESSAGE__TESTFRAME3__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_4_force_omit(4, force_omit, CAN__MESSAGE__TESTFRAME4__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe4().RAW_decode(CAN__MESSAGE__TESTFRAME4__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_5_force_omit(5, force_omit, CAN__MESSAGE__TESTFRAME5__msg__type_descr_.raw->forceomit);
+ decoded_length = message__MyTestframe5().RAW_decode(CAN__MESSAGE__TESTFRAME5__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_6_force_omit(6, force_omit, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw->forceomit);
+ decoded_length = message__extendedFrame1().RAW_decode(CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ }
+ clean_up();
+ return -1;
+}
+
+int CAN__MatrixPayloadUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
+{
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 7; myleaf.body.node.nodes = init_nodes_of_enc_tree(7);
+ memset(myleaf.body.node.nodes, 0, 7 * sizeof(RAW_enc_tree *));
+ switch (union_selection) {
+ case ALT_message__MyTestframe0:
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, CAN__MESSAGE__TESTFRAME0__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe0->RAW_encode(CAN__MESSAGE__TESTFRAME0__msg__type_descr_, *myleaf.body.node.nodes[0]);
+ myleaf.body.node.nodes[0]->coding_descr = &CAN__MESSAGE__TESTFRAME0__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe1:
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, CAN__MESSAGE__TESTFRAME1__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe1->RAW_encode(CAN__MESSAGE__TESTFRAME1__msg__type_descr_, *myleaf.body.node.nodes[1]);
+ myleaf.body.node.nodes[1]->coding_descr = &CAN__MESSAGE__TESTFRAME1__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe2:
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, CAN__MESSAGE__TESTFRAME2__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe2->RAW_encode(CAN__MESSAGE__TESTFRAME2__msg__type_descr_, *myleaf.body.node.nodes[2]);
+ myleaf.body.node.nodes[2]->coding_descr = &CAN__MESSAGE__TESTFRAME2__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe3:
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, CAN__MESSAGE__TESTFRAME3__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe3->RAW_encode(CAN__MESSAGE__TESTFRAME3__msg__type_descr_, *myleaf.body.node.nodes[3]);
+ myleaf.body.node.nodes[3]->coding_descr = &CAN__MESSAGE__TESTFRAME3__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe4:
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, CAN__MESSAGE__TESTFRAME4__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe4->RAW_encode(CAN__MESSAGE__TESTFRAME4__msg__type_descr_, *myleaf.body.node.nodes[4]);
+ myleaf.body.node.nodes[4]->coding_descr = &CAN__MESSAGE__TESTFRAME4__msg__type_descr_;
+ break;
+ case ALT_message__MyTestframe5:
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, CAN__MESSAGE__TESTFRAME5__msg__type_descr_.raw);
+ encoded_length = field_message__MyTestframe5->RAW_encode(CAN__MESSAGE__TESTFRAME5__msg__type_descr_, *myleaf.body.node.nodes[5]);
+ myleaf.body.node.nodes[5]->coding_descr = &CAN__MESSAGE__TESTFRAME5__msg__type_descr_;
+ break;
+ case ALT_message__extendedFrame1:
+ myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_.raw);
+ encoded_length = field_message__extendedFrame1->RAW_encode(CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_, *myleaf.body.node.nodes[6]);
+ myleaf.body.node.nodes[6]->coding_descr = &CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_;
+ break;
+ default:
+ TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ }
+ return encoded_length;
+}
+
+void CAN__MatrixPayloadUnion_template::copy_value(const CAN__MatrixPayloadUnion& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type_template(other_value.message__MyTestframe0());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type_template(other_value.message__MyTestframe1());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type_template(other_value.message__MyTestframe2());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type_template(other_value.message__MyTestframe3());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+single_value.field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type_template(other_value.message__MyTestframe4());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+single_value.field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type_template(other_value.message__MyTestframe5());
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(other_value.message__extendedFrame1());
+break;
+default:
+TTCN_error("Initializing a template with an unbound value of type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MatrixPayloadUnion_template::copy_template(const CAN__MatrixPayloadUnion_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 CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type_template(*other_value.single_value.field_message__MyTestframe0);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type_template(*other_value.single_value.field_message__MyTestframe1);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type_template(*other_value.single_value.field_message__MyTestframe2);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type_template(*other_value.single_value.field_message__MyTestframe3);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+single_value.field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type_template(*other_value.single_value.field_message__MyTestframe4);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+single_value.field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type_template(*other_value.single_value.field_message__MyTestframe5);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(*other_value.single_value.field_message__extendedFrame1);
+break;
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MatrixPayloadUnion_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+set_selection(other_value);
+}
+
+CAN__MatrixPayloadUnion_template::CAN__MatrixPayloadUnion_template()
+{
+}
+
+CAN__MatrixPayloadUnion_template::CAN__MatrixPayloadUnion_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MatrixPayloadUnion_template::CAN__MatrixPayloadUnion_template(const CAN__MatrixPayloadUnion& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MatrixPayloadUnion_template::CAN__MatrixPayloadUnion_template(const OPTIONAL<CAN__MatrixPayloadUnion>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MatrixPayloadUnion&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion from an unbound optional field.");
+}
+}
+
+CAN__MatrixPayloadUnion_template::CAN__MatrixPayloadUnion_template(const CAN__MatrixPayloadUnion_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+CAN__MatrixPayloadUnion_template::~CAN__MatrixPayloadUnion_template()
+{
+clean_up();
+}
+
+void CAN__MatrixPayloadUnion_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+delete single_value.field_message__MyTestframe0;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+delete single_value.field_message__MyTestframe1;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+delete single_value.field_message__MyTestframe2;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+delete single_value.field_message__MyTestframe3;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+delete single_value.field_message__MyTestframe4;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+delete single_value.field_message__MyTestframe5;
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+delete single_value.field_message__extendedFrame1;
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixPayloadUnion_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixPayloadUnion_template::operator=(const CAN__MatrixPayloadUnion& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixPayloadUnion_template::operator=(const OPTIONAL<CAN__MatrixPayloadUnion>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MatrixPayloadUnion&)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 @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+return *this;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixPayloadUnion_template::operator=(const CAN__MatrixPayloadUnion_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MatrixPayloadUnion_template::match(const CAN__MatrixPayloadUnion& 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:
+{
+CAN__MatrixPayloadUnion::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == CAN__MatrixPayloadUnion::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+return single_value.field_message__MyTestframe0->match(other_value.message__MyTestframe0(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+return single_value.field_message__MyTestframe1->match(other_value.message__MyTestframe1(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+return single_value.field_message__MyTestframe2->match(other_value.message__MyTestframe2(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+return single_value.field_message__MyTestframe3->match(other_value.message__MyTestframe3(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+return single_value.field_message__MyTestframe4->match(other_value.message__MyTestframe4(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+return single_value.field_message__MyTestframe5->match(other_value.message__MyTestframe5(), legacy);
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+return single_value.field_message__extendedFrame1->match(other_value.message__extendedFrame1(), legacy);
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+return FALSE;
+}
+
+boolean CAN__MatrixPayloadUnion_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+return single_value.field_message__MyTestframe0->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+return single_value.field_message__MyTestframe1->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+return single_value.field_message__MyTestframe2->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+return single_value.field_message__MyTestframe3->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+return single_value.field_message__MyTestframe4->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+return single_value.field_message__MyTestframe5->is_value();
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+return single_value.field_message__extendedFrame1->is_value();
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+
+CAN__MatrixPayloadUnion CAN__MatrixPayloadUnion_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 @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+CAN__MatrixPayloadUnion ret_val;
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+ret_val.message__MyTestframe0() = single_value.field_message__MyTestframe0->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+ret_val.message__MyTestframe1() = single_value.field_message__MyTestframe1->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+ret_val.message__MyTestframe2() = single_value.field_message__MyTestframe2->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+ret_val.message__MyTestframe3() = single_value.field_message__MyTestframe3->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+ret_val.message__MyTestframe4() = single_value.field_message__MyTestframe4->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+ret_val.message__MyTestframe5() = single_value.field_message__MyTestframe5->valueof();
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+ret_val.message__extendedFrame1() = single_value.field_message__extendedFrame1->valueof();
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+return ret_val;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixPayloadUnion_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return value_list.list_value[list_index];
+}
+void CAN__MatrixPayloadUnion_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MatrixPayloadUnion_template[list_length];
+}
+
+CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe0()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe0) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe0;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe0;
+}
+
+const CAN__MESSAGE__TESTFRAME0__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe0() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe0 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe0) TTCN_error("Accessing non-selected field message_MyTestframe0 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe0;
+}
+
+CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe1()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe1) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe1;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe1;
+}
+
+const CAN__MESSAGE__TESTFRAME1__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe1() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe1 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe1) TTCN_error("Accessing non-selected field message_MyTestframe1 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe1;
+}
+
+CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe2()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe2) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe2;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe2;
+}
+
+const CAN__MESSAGE__TESTFRAME2__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe2() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe2 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe2) TTCN_error("Accessing non-selected field message_MyTestframe2 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe2;
+}
+
+CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe3()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe3) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe3;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe3;
+}
+
+const CAN__MESSAGE__TESTFRAME3__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe3() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe3 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe3) TTCN_error("Accessing non-selected field message_MyTestframe3 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe3;
+}
+
+CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe4()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe4) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe4;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe4;
+}
+
+const CAN__MESSAGE__TESTFRAME4__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe4() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe4 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe4) TTCN_error("Accessing non-selected field message_MyTestframe4 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe4;
+}
+
+CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe5()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe5) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type_template(ANY_VALUE);
+else single_value.field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__MyTestframe5;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__MyTestframe5;
+}
+
+const CAN__MESSAGE__TESTFRAME5__msg__type_template& CAN__MatrixPayloadUnion_template::message__MyTestframe5() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_MyTestframe5 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__MyTestframe5) TTCN_error("Accessing non-selected field message_MyTestframe5 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__MyTestframe5;
+}
+
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MatrixPayloadUnion_template::message__extendedFrame1()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__extendedFrame1) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(ANY_VALUE);
+else single_value.field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+single_value.union_selection = CAN__MatrixPayloadUnion::ALT_message__extendedFrame1;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_message__extendedFrame1;
+}
+
+const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& CAN__MatrixPayloadUnion_template::message__extendedFrame1() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field message_extendedFrame1 in a non-specific template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+if (single_value.union_selection != CAN__MatrixPayloadUnion::ALT_message__extendedFrame1) TTCN_error("Accessing non-selected field message_extendedFrame1 in a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+return *single_value.field_message__extendedFrame1;
+}
+
+boolean CAN__MatrixPayloadUnion_template::ischosen(CAN__MatrixPayloadUnion::union_selection_type checked_selection) const
+{
+if (checked_selection == CAN__MatrixPayloadUnion::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == CAN__MatrixPayloadUnion::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+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 @CAN_matrix_messages.CAN_MatrixPayloadUnion 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 CAN__MatrixPayloadUnion_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+single_value.field_message__MyTestframe0->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+single_value.field_message__MyTestframe1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+single_value.field_message__MyTestframe2->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+single_value.field_message__MyTestframe3->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+TTCN_Logger::log_event_str("{ message_MyTestframe4 := ");
+single_value.field_message__MyTestframe4->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+TTCN_Logger::log_event_str("{ message_MyTestframe5 := ");
+single_value.field_message__MyTestframe5->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+single_value.field_message__extendedFrame1->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MatrixPayloadUnion_template::log_match(const CAN__MatrixPayloadUnion& 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()) {
+switch (single_value.union_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe0");
+single_value.field_message__MyTestframe0->log_match(match_value.message__MyTestframe0(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe0 := ");
+single_value.field_message__MyTestframe0->log_match(match_value.message__MyTestframe0(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe1");
+single_value.field_message__MyTestframe1->log_match(match_value.message__MyTestframe1(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe1 := ");
+single_value.field_message__MyTestframe1->log_match(match_value.message__MyTestframe1(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe2");
+single_value.field_message__MyTestframe2->log_match(match_value.message__MyTestframe2(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe2 := ");
+single_value.field_message__MyTestframe2->log_match(match_value.message__MyTestframe2(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe3");
+single_value.field_message__MyTestframe3->log_match(match_value.message__MyTestframe3(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe3 := ");
+single_value.field_message__MyTestframe3->log_match(match_value.message__MyTestframe3(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe4");
+single_value.field_message__MyTestframe4->log_match(match_value.message__MyTestframe4(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe4 := ");
+single_value.field_message__MyTestframe4->log_match(match_value.message__MyTestframe4(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_MyTestframe5");
+single_value.field_message__MyTestframe5->log_match(match_value.message__MyTestframe5(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_MyTestframe5 := ");
+single_value.field_message__MyTestframe5->log_match(match_value.message__MyTestframe5(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".message_extendedFrame1");
+single_value.field_message__extendedFrame1->log_match(match_value.message__extendedFrame1(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ message_extendedFrame1 := ");
+single_value.field_message__extendedFrame1->log_match(match_value.message__extendedFrame1(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 CAN__MatrixPayloadUnion_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 CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+single_value.field_message__MyTestframe4->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+single_value.field_message__MyTestframe5->encode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1->encode_text(text_buf);
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+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 @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+
+void CAN__MatrixPayloadUnion_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+{
+single_value.union_selection = CAN__MatrixPayloadUnion::UNBOUND_VALUE;
+CAN__MatrixPayloadUnion::union_selection_type new_selection = (CAN__MatrixPayloadUnion::union_selection_type)text_buf.pull_int().get_val();
+switch (new_selection) {
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0 = new CAN__MESSAGE__TESTFRAME0__msg__type_template;
+single_value.field_message__MyTestframe0->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1 = new CAN__MESSAGE__TESTFRAME1__msg__type_template;
+single_value.field_message__MyTestframe1->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2 = new CAN__MESSAGE__TESTFRAME2__msg__type_template;
+single_value.field_message__MyTestframe2->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3 = new CAN__MESSAGE__TESTFRAME3__msg__type_template;
+single_value.field_message__MyTestframe3->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+single_value.field_message__MyTestframe4 = new CAN__MESSAGE__TESTFRAME4__msg__type_template;
+single_value.field_message__MyTestframe4->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+single_value.field_message__MyTestframe5 = new CAN__MESSAGE__TESTFRAME5__msg__type_template;
+single_value.field_message__MyTestframe5->decode_text(text_buf);
+break;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1 = new CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+single_value.field_message__extendedFrame1->decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+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 CAN__MatrixPayloadUnion_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 @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+}
+
+boolean CAN__MatrixPayloadUnion_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MatrixPayloadUnion_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
+if (value_list.list_value[v_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void CAN__MatrixPayloadUnion_template::set_param(Module_Param& param)
+{
+ if (dynamic_cast<Module_Param_Name*>(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 `@CAN_matrix_messages.CAN_MatrixPayloadUnion'");
+ }
+ if (strcmp("message_MyTestframe0", param_field) == 0) {
+ message__MyTestframe0().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe1", param_field) == 0) {
+ message__MyTestframe1().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe2", param_field) == 0) {
+ message__MyTestframe2().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe3", param_field) == 0) {
+ message__MyTestframe3().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe4", param_field) == 0) {
+ message__MyTestframe4().set_param(param);
+ return;
+ } else if (strcmp("message_MyTestframe5", param_field) == 0) {
+ message__MyTestframe5().set_param(param);
+ return;
+ } else if (strcmp("message_extendedFrame1", param_field) == 0) {
+ message__extendedFrame1().set_param(param);
+ return;
+ } else param.error("Field `%s' not found in union template type `@CAN_matrix_messages.CAN_MatrixPayloadUnion'", 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: {
+ CAN__MatrixPayloadUnion_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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", "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+ 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, "message_MyTestframe0")) {
+ message__MyTestframe0().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe1")) {
+ message__MyTestframe1().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe2")) {
+ message__MyTestframe2().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe3")) {
+ message__MyTestframe3().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe4")) {
+ message__MyTestframe4().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_MyTestframe5")) {
+ message__MyTestframe5().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "message_extendedFrame1")) {
+ message__extendedFrame1().set_param(*mp_last);
+ break;
+ }
+ mp_last->error("Field %s does not exist in type @CAN_matrix_messages.CAN_MatrixPayloadUnion.", last_name);
+ } break;
+ default:
+ param.type_error("union template", "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MatrixPayloadUnion_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 CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+single_value.field_message__MyTestframe0->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+single_value.field_message__MyTestframe1->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+single_value.field_message__MyTestframe2->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+single_value.field_message__MyTestframe3->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+single_value.field_message__MyTestframe4->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+single_value.field_message__MyTestframe5->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+single_value.field_message__extendedFrame1->check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+return;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @CAN_matrix_messages.CAN_MatrixPayloadUnion.");
+}
+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 : "@CAN_matrix_messages.CAN_MatrixPayloadUnion");
+}
+
+CAN__MatrixUnion::CAN__MatrixUnion()
+{
+}
+
+CAN__MatrixUnion::CAN__MatrixUnion(const OCTETSTRING& par_can__id,
+ const CAN__MatrixPayloadUnion& par_can__pdu)
+ : field_can__id(par_can__id),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CAN__MatrixUnion::CAN__MatrixUnion(const CAN__MatrixUnion& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @CAN_matrix_messages.CAN_MatrixUnion.");
+if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+else field_can__id.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CAN__MatrixUnion::clean_up()
+{
+field_can__id.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__MatrixUnion::get_descriptor() const { return &CAN__MatrixUnion_descr_; }
+CAN__MatrixUnion& CAN__MatrixUnion::operator=(const CAN__MatrixUnion& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @CAN_matrix_messages.CAN_MatrixUnion.");
+ if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+ else field_can__id.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CAN__MatrixUnion::operator==(const CAN__MatrixUnion& other_value) const
+{
+return field_can__id==other_value.field_can__id
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CAN__MatrixUnion::is_bound() const
+{
+return (field_can__id.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CAN__MatrixUnion::is_value() const
+{
+return field_can__id.is_value()
+ && field_can__pdu.is_value();
+}
+void CAN__MatrixUnion::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_id := ");
+field_can__id.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__MatrixUnion::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 (2<param.get_size()) {
+ param.error("record value of type @CAN_matrix_messages.CAN_MatrixUnion has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MatrixUnion: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@CAN_matrix_messages.CAN_MatrixUnion");
+ }
+}
+
+void CAN__MatrixUnion::set_implicit_omit()
+{
+if (can__id().is_bound()) can__id().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CAN__MatrixUnion::encode_text(Text_Buf& text_buf) const
+{
+field_can__id.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CAN__MatrixUnion::decode_text(Text_Buf& text_buf)
+{
+field_can__id.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+void CAN__MatrixUnion::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__MatrixUnion::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__MatrixUnion::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ int selected_field = -1;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, Can::CAN__id_descr_.raw->forceomit);
+ decoded_field_length = field_can__id.RAW_decode(Can::CAN__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ if (field_can__id == os_0) selected_field = 0;
+ else if (field_can__id == os_1) selected_field = 1;
+ else if (field_can__id == os_2) selected_field = 2;
+ else if (field_can__id == os_3) selected_field = 3;
+ else if (field_can__id == os_4) selected_field = 4;
+ else if (field_can__id == os_5) selected_field = 5;
+ else if (field_can__id == os_6) selected_field = 6;
+ else selected_field = -1;
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__MatrixUnion_can__pdu_descr_.raw->forceomit);
+ decoded_field_length = field_can__pdu.RAW_decode(CAN__MatrixUnion_can__pdu_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__MatrixUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, Can::CAN__id_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__MatrixUnion_can__pdu_descr_.raw);
+ encoded_length += field_can__id.RAW_encode(Can::CAN__id_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_can__pdu.RAW_encode(CAN__MatrixUnion_can__pdu_descr_, *myleaf.body.node.nodes[1]);
+ switch (field_can__pdu.get_selection()) {
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe0:
+ if (field_can__id != os_0) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_0.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe1:
+ if (field_can__id != os_1) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_1.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe2:
+ if (field_can__id != os_2) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_2.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe3:
+ if (field_can__id != os_3) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_3.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe4:
+ if (field_can__id != os_4) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_4.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__MyTestframe5:
+ if (field_can__id != os_5) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_5.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case CAN__MatrixPayloadUnion::ALT_message__extendedFrame1:
+ if (field_can__id != os_6) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 1;
+ int new_pos[] = { 0 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_6.RAW_encode(Can::CAN__id_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ default:;
+ }
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__MatrixUnion_template::single_value_struct {
+OCTETSTRING_template field_can__id;
+CAN__MatrixPayloadUnion_template field_can__pdu;
+};
+
+void CAN__MatrixUnion_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_can__id = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CAN__MatrixUnion_template::copy_value(const CAN__MatrixUnion& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__id().is_bound()) {
+ single_value->field_can__id = other_value.can__id();
+} else {
+ single_value->field_can__id.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__MatrixUnion_template::copy_template(const CAN__MatrixUnion_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__id().get_selection()) {
+single_value->field_can__id = other_value.can__id();
+} else {
+single_value->field_can__id.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__MatrixUnion_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__MatrixUnion_template::CAN__MatrixUnion_template()
+{
+}
+
+CAN__MatrixUnion_template::CAN__MatrixUnion_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__MatrixUnion_template::CAN__MatrixUnion_template(const CAN__MatrixUnion& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__MatrixUnion_template::CAN__MatrixUnion_template(const OPTIONAL<CAN__MatrixUnion>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MatrixUnion&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @CAN_matrix_messages.CAN_MatrixUnion from an unbound optional field.");
+}
+}
+
+CAN__MatrixUnion_template::CAN__MatrixUnion_template(const CAN__MatrixUnion_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__MatrixUnion_template::~CAN__MatrixUnion_template()
+{
+clean_up();
+}
+
+CAN__MatrixUnion_template& CAN__MatrixUnion_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__MatrixUnion_template& CAN__MatrixUnion_template::operator=(const CAN__MatrixUnion& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__MatrixUnion_template& CAN__MatrixUnion_template::operator=(const OPTIONAL<CAN__MatrixUnion>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__MatrixUnion&)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 @CAN_matrix_messages.CAN_MatrixUnion.");
+}
+return *this;
+}
+
+CAN__MatrixUnion_template& CAN__MatrixUnion_template::operator=(const CAN__MatrixUnion_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__MatrixUnion_template::match(const CAN__MatrixUnion& 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.can__id().is_bound()) return FALSE;
+if(!single_value->field_can__id.match(other_value.can__id(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+}
+return FALSE;
+}
+
+boolean CAN__MatrixUnion_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__id.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CAN__MatrixUnion_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__id.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CAN__MatrixUnion_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__MatrixUnion CAN__MatrixUnion_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 @CAN_matrix_messages.CAN_MatrixUnion.");
+CAN__MatrixUnion ret_val;
+if (single_value->field_can__id.is_bound()) {
+ret_val.can__id() = single_value->field_can__id.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CAN__MatrixUnion_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__MatrixUnion_template[list_length];
+}
+
+CAN__MatrixUnion_template& CAN__MatrixUnion_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CAN__MatrixUnion_template::can__id()
+{
+set_specific();
+return single_value->field_can__id;
+}
+
+const OCTETSTRING_template& CAN__MatrixUnion_template::can__id() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_id of a non-specific template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+return single_value->field_can__id;
+}
+
+CAN__MatrixPayloadUnion_template& CAN__MatrixUnion_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const CAN__MatrixPayloadUnion_template& CAN__MatrixUnion_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+return single_value->field_can__pdu;
+}
+
+int CAN__MatrixUnion_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MatrixUnion which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MatrixUnion 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 @CAN_matrix_messages.CAN_MatrixUnion containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MatrixUnion containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MatrixUnion containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @CAN_matrix_messages.CAN_MatrixUnion containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @CAN_matrix_messages.CAN_MatrixUnion.");
+ }
+ return 0;
+}
+
+void CAN__MatrixUnion_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_id := ");
+single_value->field_can__id.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__MatrixUnion_template::log_match(const CAN__MatrixUnion& 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_can__id.match(match_value.can__id(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_id");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_id := ");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CAN__MatrixUnion_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__id.encode_text(text_buf);
+single_value->field_can__pdu.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 @CAN_matrix_messages.CAN_MatrixUnion.");
+}
+}
+
+void CAN__MatrixUnion_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_can__id.decode_text(text_buf);
+single_value->field_can__pdu.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 CAN__MatrixUnion_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 @CAN_matrix_messages.CAN_MatrixUnion.");
+}
+}
+
+void CAN__MatrixUnion_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: {
+ CAN__MatrixUnion_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @CAN_matrix_messages.CAN_MatrixUnion has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @CAN_matrix_messages.CAN_MatrixUnion: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@CAN_matrix_messages.CAN_MatrixUnion");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__MatrixUnion_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_can__id.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixUnion");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@CAN_matrix_messages.CAN_MatrixUnion");
+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 : "@CAN_matrix_messages.CAN_MatrixUnion");
+}
+
+boolean CAN__MatrixUnion_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__MatrixUnion_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CAN_matrix_messages.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_messages");
+Can::module_object.pre_init_module();
+CAN__matrix__signals::module_object.pre_init_module();
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CAN_matrix_messages.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_messages");
+Can::module_object.post_init_module();
+CAN__matrix__signals::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix_messages.d b/demo/CAN_matrix_messages.d
new file mode 100644
index 0000000..d8901e9
--- /dev/null
+++ b/demo/CAN_matrix_messages.d
@@ -0,0 +1,59 @@
+CAN_matrix_messages.o CAN_matrix_messages.d : CAN_matrix_messages.cc CAN_matrix_messages.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh Can.hh \
+ General_Types.hh CAN_matrix_signals.hh CAN_matrix_general_types.hh
diff --git a/demo/CAN_matrix_messages.hh b/demo/CAN_matrix_messages.hh
new file mode 100644
index 0000000..f10355f
--- /dev/null
+++ b/demo/CAN_matrix_messages.hh
@@ -0,0 +1,972 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix__messages_HH
+#define CAN__matrix__messages_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "Can.hh"
+#include "CAN_matrix_signals.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef CAN__matrix__messages_HH
+#endif
+
+namespace CAN__matrix__messages {
+
+/* Forward declarations of classes */
+
+class CAN__MESSAGE__TESTFRAME0__msg__type;
+class CAN__MESSAGE__TESTFRAME0__msg__type_template;
+class CAN__MESSAGE__TESTFRAME1__msg__type;
+class CAN__MESSAGE__TESTFRAME1__msg__type_template;
+class CAN__MESSAGE__TESTFRAME2__msg__type;
+class CAN__MESSAGE__TESTFRAME2__msg__type_template;
+class CAN__MESSAGE__TESTFRAME3__msg__type;
+class CAN__MESSAGE__TESTFRAME3__msg__type_template;
+class CAN__MESSAGE__TESTFRAME4__msg__type;
+class CAN__MESSAGE__TESTFRAME4__msg__type_template;
+class CAN__MESSAGE__TESTFRAME5__msg__type;
+class CAN__MESSAGE__TESTFRAME5__msg__type_template;
+class CAN__MESSAGE__EXTENDEDFRAME1__msg__type;
+class CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template;
+class CAN__MatrixPayloadUnion;
+class CAN__MatrixPayloadUnion_template;
+class CAN__MatrixUnion;
+class CAN__MatrixUnion_template;
+
+} /* end of namespace */
+
+#ifndef CAN__matrix__messages_HH
+#define CAN__matrix__messages_HH
+
+namespace CAN__matrix__messages {
+
+/* Class definitions */
+
+class CAN__MESSAGE__TESTFRAME0__msg__type : public Base_Type {
+ BITSTRING field_test__sig__11__bit__bitstring__little__endian__coded;
+ BITSTRING field_test__sig__5__bit__bitstring__little__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME0__msg__type();
+ CAN__MESSAGE__TESTFRAME0__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__little__endian__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__little__endian__coded);
+ CAN__MESSAGE__TESTFRAME0__msg__type(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME0__msg__type& operator=(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& test__sig__11__bit__bitstring__little__endian__coded()
+ {return field_test__sig__11__bit__bitstring__little__endian__coded;}
+ inline const BITSTRING& test__sig__11__bit__bitstring__little__endian__coded() const
+ {return field_test__sig__11__bit__bitstring__little__endian__coded;}
+ inline BITSTRING& test__sig__5__bit__bitstring__little__endian__coded()
+ {return field_test__sig__5__bit__bitstring__little__endian__coded;}
+ inline const BITSTRING& test__sig__5__bit__bitstring__little__endian__coded() const
+ {return field_test__sig__5__bit__bitstring__little__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME0__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME0__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME0__msg__type_template();
+CAN__MESSAGE__TESTFRAME0__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME0__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME0__msg__type_template();
+CAN__MESSAGE__TESTFRAME0__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME0__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME0__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME0__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME0__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME0__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME0__msg__type_template& list_item(unsigned int list_index) const;
+BITSTRING_template& test__sig__11__bit__bitstring__little__endian__coded();
+const BITSTRING_template& test__sig__11__bit__bitstring__little__endian__coded() const;
+BITSTRING_template& test__sig__5__bit__bitstring__little__endian__coded();
+const BITSTRING_template& test__sig__5__bit__bitstring__little__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME0__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__TESTFRAME1__msg__type : public Base_Type {
+ BITSTRING field_test__sig__11__bit__bitstring__big__endian__coded;
+ BITSTRING field_test__sig__5__bit__bitstring__big__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME1__msg__type();
+ CAN__MESSAGE__TESTFRAME1__msg__type(const BITSTRING& par_test__sig__11__bit__bitstring__big__endian__coded,
+ const BITSTRING& par_test__sig__5__bit__bitstring__big__endian__coded);
+ CAN__MESSAGE__TESTFRAME1__msg__type(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME1__msg__type& operator=(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& test__sig__11__bit__bitstring__big__endian__coded()
+ {return field_test__sig__11__bit__bitstring__big__endian__coded;}
+ inline const BITSTRING& test__sig__11__bit__bitstring__big__endian__coded() const
+ {return field_test__sig__11__bit__bitstring__big__endian__coded;}
+ inline BITSTRING& test__sig__5__bit__bitstring__big__endian__coded()
+ {return field_test__sig__5__bit__bitstring__big__endian__coded;}
+ inline const BITSTRING& test__sig__5__bit__bitstring__big__endian__coded() const
+ {return field_test__sig__5__bit__bitstring__big__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME1__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME1__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME1__msg__type_template();
+CAN__MESSAGE__TESTFRAME1__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME1__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME1__msg__type_template();
+CAN__MESSAGE__TESTFRAME1__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME1__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME1__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME1__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME1__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME1__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME1__msg__type_template& list_item(unsigned int list_index) const;
+BITSTRING_template& test__sig__11__bit__bitstring__big__endian__coded();
+const BITSTRING_template& test__sig__11__bit__bitstring__big__endian__coded() const;
+BITSTRING_template& test__sig__5__bit__bitstring__big__endian__coded();
+const BITSTRING_template& test__sig__5__bit__bitstring__big__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME1__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__TESTFRAME2__msg__type : public Base_Type {
+ INTEGER field_test__sig__11__bit__integer__big__endian__coded;
+ INTEGER field_test__sig__5__bit__integer__big__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME2__msg__type();
+ CAN__MESSAGE__TESTFRAME2__msg__type(const INTEGER& par_test__sig__11__bit__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded);
+ CAN__MESSAGE__TESTFRAME2__msg__type(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME2__msg__type& operator=(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline INTEGER& test__sig__11__bit__integer__big__endian__coded()
+ {return field_test__sig__11__bit__integer__big__endian__coded;}
+ inline const INTEGER& test__sig__11__bit__integer__big__endian__coded() const
+ {return field_test__sig__11__bit__integer__big__endian__coded;}
+ inline INTEGER& test__sig__5__bit__integer__big__endian__coded()
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline const INTEGER& test__sig__5__bit__integer__big__endian__coded() const
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME2__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME2__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME2__msg__type_template();
+CAN__MESSAGE__TESTFRAME2__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME2__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME2__msg__type_template();
+CAN__MESSAGE__TESTFRAME2__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME2__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME2__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME2__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME2__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME2__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME2__msg__type_template& list_item(unsigned int list_index) const;
+INTEGER_template& test__sig__11__bit__integer__big__endian__coded();
+const INTEGER_template& test__sig__11__bit__integer__big__endian__coded() const;
+INTEGER_template& test__sig__5__bit__integer__big__endian__coded();
+const INTEGER_template& test__sig__5__bit__integer__big__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME2__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__TESTFRAME3__msg__type : public Base_Type {
+ OCTETSTRING field_test__sig__1__byte__octetstring__big__endian__coded;
+ OCTETSTRING field_test__sig__2__byte__octetstring__big__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME3__msg__type();
+ CAN__MESSAGE__TESTFRAME3__msg__type(const OCTETSTRING& par_test__sig__1__byte__octetstring__big__endian__coded,
+ const OCTETSTRING& par_test__sig__2__byte__octetstring__big__endian__coded);
+ CAN__MESSAGE__TESTFRAME3__msg__type(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME3__msg__type& operator=(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& test__sig__1__byte__octetstring__big__endian__coded()
+ {return field_test__sig__1__byte__octetstring__big__endian__coded;}
+ inline const OCTETSTRING& test__sig__1__byte__octetstring__big__endian__coded() const
+ {return field_test__sig__1__byte__octetstring__big__endian__coded;}
+ inline OCTETSTRING& test__sig__2__byte__octetstring__big__endian__coded()
+ {return field_test__sig__2__byte__octetstring__big__endian__coded;}
+ inline const OCTETSTRING& test__sig__2__byte__octetstring__big__endian__coded() const
+ {return field_test__sig__2__byte__octetstring__big__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME3__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME3__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME3__msg__type_template();
+CAN__MESSAGE__TESTFRAME3__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME3__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME3__msg__type_template();
+CAN__MESSAGE__TESTFRAME3__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME3__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME3__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME3__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME3__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME3__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME3__msg__type_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& test__sig__1__byte__octetstring__big__endian__coded();
+const OCTETSTRING_template& test__sig__1__byte__octetstring__big__endian__coded() const;
+OCTETSTRING_template& test__sig__2__byte__octetstring__big__endian__coded();
+const OCTETSTRING_template& test__sig__2__byte__octetstring__big__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME3__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__TESTFRAME4__msg__type : public Base_Type {
+ INTEGER field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+ INTEGER field_test__sig__5__bit__integer__big__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME4__msg__type();
+ CAN__MESSAGE__TESTFRAME4__msg__type(const INTEGER& par_test__unsig__9__bit__2__padded__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded);
+ CAN__MESSAGE__TESTFRAME4__msg__type(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME4__msg__type& operator=(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline INTEGER& test__unsig__9__bit__2__padded__integer__big__endian__coded()
+ {return field_test__unsig__9__bit__2__padded__integer__big__endian__coded;}
+ inline const INTEGER& test__unsig__9__bit__2__padded__integer__big__endian__coded() const
+ {return field_test__unsig__9__bit__2__padded__integer__big__endian__coded;}
+ inline INTEGER& test__sig__5__bit__integer__big__endian__coded()
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline const INTEGER& test__sig__5__bit__integer__big__endian__coded() const
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME4__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME4__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME4__msg__type_template();
+CAN__MESSAGE__TESTFRAME4__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME4__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME4__msg__type_template();
+CAN__MESSAGE__TESTFRAME4__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME4__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME4__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME4__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME4__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME4__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME4__msg__type_template& list_item(unsigned int list_index) const;
+INTEGER_template& test__unsig__9__bit__2__padded__integer__big__endian__coded();
+const INTEGER_template& test__unsig__9__bit__2__padded__integer__big__endian__coded() const;
+INTEGER_template& test__sig__5__bit__integer__big__endian__coded();
+const INTEGER_template& test__sig__5__bit__integer__big__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME4__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__TESTFRAME5__msg__type : public Base_Type {
+ INTEGER field_test__unsig__9__bit__2__padded__integer__big__endian__coded;
+ INTEGER field_test__sig__5__bit__integer__big__endian__coded;
+public:
+ CAN__MESSAGE__TESTFRAME5__msg__type();
+ CAN__MESSAGE__TESTFRAME5__msg__type(const INTEGER& par_test__unsig__9__bit__2__padded__integer__big__endian__coded,
+ const INTEGER& par_test__sig__5__bit__integer__big__endian__coded);
+ CAN__MESSAGE__TESTFRAME5__msg__type(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__TESTFRAME5__msg__type& operator=(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline INTEGER& test__unsig__9__bit__2__padded__integer__big__endian__coded()
+ {return field_test__unsig__9__bit__2__padded__integer__big__endian__coded;}
+ inline const INTEGER& test__unsig__9__bit__2__padded__integer__big__endian__coded() const
+ {return field_test__unsig__9__bit__2__padded__integer__big__endian__coded;}
+ inline INTEGER& test__sig__5__bit__integer__big__endian__coded()
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline const INTEGER& test__sig__5__bit__integer__big__endian__coded() const
+ {return field_test__sig__5__bit__integer__big__endian__coded;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__TESTFRAME5__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__TESTFRAME5__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__TESTFRAME5__msg__type_template();
+CAN__MESSAGE__TESTFRAME5__msg__type_template(template_sel other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template(const OPTIONAL<CAN__MESSAGE__TESTFRAME5__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value);
+~CAN__MESSAGE__TESTFRAME5__msg__type_template();
+CAN__MESSAGE__TESTFRAME5__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__TESTFRAME5__msg__type>& other_value);
+CAN__MESSAGE__TESTFRAME5__msg__type_template& operator=(const CAN__MESSAGE__TESTFRAME5__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__TESTFRAME5__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__TESTFRAME5__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME5__msg__type_template& list_item(unsigned int list_index) const;
+INTEGER_template& test__unsig__9__bit__2__padded__integer__big__endian__coded();
+const INTEGER_template& test__unsig__9__bit__2__padded__integer__big__endian__coded() const;
+INTEGER_template& test__sig__5__bit__integer__big__endian__coded();
+const INTEGER_template& test__sig__5__bit__integer__big__endian__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__TESTFRAME5__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MESSAGE__EXTENDEDFRAME1__msg__type : public Base_Type {
+ OCTETSTRING field_test__sig__2__byte__octetstring__msb__coded;
+public:
+ CAN__MESSAGE__EXTENDEDFRAME1__msg__type();
+ CAN__MESSAGE__EXTENDEDFRAME1__msg__type(const OCTETSTRING& par_test__sig__2__byte__octetstring__msb__coded);
+ CAN__MESSAGE__EXTENDEDFRAME1__msg__type(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MESSAGE__EXTENDEDFRAME1__msg__type& operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+ boolean operator==(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const;
+ inline boolean operator!=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& test__sig__2__byte__octetstring__msb__coded()
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline const OCTETSTRING& test__sig__2__byte__octetstring__msb__coded() const
+ {return field_test__sig__2__byte__octetstring__msb__coded;}
+ inline int size_of() const
+ {return 1;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+void copy_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+
+public:
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template();
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(template_sel other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const OPTIONAL<CAN__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+~CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template();
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(template_sel other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const OPTIONAL<CAN__MESSAGE__EXTENDEDFRAME1__msg__type>& other_value);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& operator=(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& other_value);
+boolean match(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded();
+const OCTETSTRING_template& test__sig__2__byte__octetstring__msb__coded() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__MatrixPayloadUnion : public Base_Type {
+public:
+enum union_selection_type { UNBOUND_VALUE = 0, ALT_message__MyTestframe0 = 1, ALT_message__MyTestframe1 = 2, ALT_message__MyTestframe2 = 3, ALT_message__MyTestframe3 = 4, ALT_message__MyTestframe4 = 5, ALT_message__MyTestframe5 = 6, ALT_message__extendedFrame1 = 7 };
+private:
+union_selection_type union_selection;
+union {
+CAN__MESSAGE__TESTFRAME0__msg__type *field_message__MyTestframe0;
+CAN__MESSAGE__TESTFRAME1__msg__type *field_message__MyTestframe1;
+CAN__MESSAGE__TESTFRAME2__msg__type *field_message__MyTestframe2;
+CAN__MESSAGE__TESTFRAME3__msg__type *field_message__MyTestframe3;
+CAN__MESSAGE__TESTFRAME4__msg__type *field_message__MyTestframe4;
+CAN__MESSAGE__TESTFRAME5__msg__type *field_message__MyTestframe5;
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type *field_message__extendedFrame1;
+};
+void copy_value(const CAN__MatrixPayloadUnion& other_value);
+
+public:
+CAN__MatrixPayloadUnion();
+CAN__MatrixPayloadUnion(const CAN__MatrixPayloadUnion& other_value);
+~CAN__MatrixPayloadUnion();
+CAN__MatrixPayloadUnion& operator=(const CAN__MatrixPayloadUnion& other_value);
+boolean operator==(const CAN__MatrixPayloadUnion& other_value) const;
+inline boolean operator!=(const CAN__MatrixPayloadUnion& other_value) const { return !(*this == other_value); }
+CAN__MESSAGE__TESTFRAME0__msg__type& message__MyTestframe0();
+const CAN__MESSAGE__TESTFRAME0__msg__type& message__MyTestframe0() const;
+CAN__MESSAGE__TESTFRAME1__msg__type& message__MyTestframe1();
+const CAN__MESSAGE__TESTFRAME1__msg__type& message__MyTestframe1() const;
+CAN__MESSAGE__TESTFRAME2__msg__type& message__MyTestframe2();
+const CAN__MESSAGE__TESTFRAME2__msg__type& message__MyTestframe2() const;
+CAN__MESSAGE__TESTFRAME3__msg__type& message__MyTestframe3();
+const CAN__MESSAGE__TESTFRAME3__msg__type& message__MyTestframe3() const;
+CAN__MESSAGE__TESTFRAME4__msg__type& message__MyTestframe4();
+const CAN__MESSAGE__TESTFRAME4__msg__type& message__MyTestframe4() const;
+CAN__MESSAGE__TESTFRAME5__msg__type& message__MyTestframe5();
+const CAN__MESSAGE__TESTFRAME5__msg__type& message__MyTestframe5() const;
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type& message__extendedFrame1();
+const CAN__MESSAGE__EXTENDEDFRAME1__msg__type& message__extendedFrame1() const;
+inline union_selection_type get_selection() const { return union_selection; }
+boolean ischosen(union_selection_type checked_selection) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MatrixPayloadUnion_template : public Base_Template {
+union {
+struct {
+CAN__MatrixPayloadUnion::union_selection_type union_selection;
+union {
+CAN__MESSAGE__TESTFRAME0__msg__type_template *field_message__MyTestframe0;
+CAN__MESSAGE__TESTFRAME1__msg__type_template *field_message__MyTestframe1;
+CAN__MESSAGE__TESTFRAME2__msg__type_template *field_message__MyTestframe2;
+CAN__MESSAGE__TESTFRAME3__msg__type_template *field_message__MyTestframe3;
+CAN__MESSAGE__TESTFRAME4__msg__type_template *field_message__MyTestframe4;
+CAN__MESSAGE__TESTFRAME5__msg__type_template *field_message__MyTestframe5;
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template *field_message__extendedFrame1;
+};
+} single_value;
+struct {
+unsigned int n_values;
+CAN__MatrixPayloadUnion_template *list_value;
+} value_list;
+};
+void copy_value(const CAN__MatrixPayloadUnion& other_value);
+
+void copy_template(const CAN__MatrixPayloadUnion_template& other_value);
+
+public:
+CAN__MatrixPayloadUnion_template();
+CAN__MatrixPayloadUnion_template(template_sel other_value);
+CAN__MatrixPayloadUnion_template(const CAN__MatrixPayloadUnion& other_value);
+CAN__MatrixPayloadUnion_template(const OPTIONAL<CAN__MatrixPayloadUnion>& other_value);
+CAN__MatrixPayloadUnion_template(const CAN__MatrixPayloadUnion_template& other_value);
+~CAN__MatrixPayloadUnion_template();
+void clean_up();
+CAN__MatrixPayloadUnion_template& operator=(template_sel other_value);
+CAN__MatrixPayloadUnion_template& operator=(const CAN__MatrixPayloadUnion& other_value);
+CAN__MatrixPayloadUnion_template& operator=(const OPTIONAL<CAN__MatrixPayloadUnion>& other_value);
+CAN__MatrixPayloadUnion_template& operator=(const CAN__MatrixPayloadUnion_template& other_value);
+boolean match(const CAN__MatrixPayloadUnion& other_value, boolean legacy = FALSE) const;
+boolean is_value() const;CAN__MatrixPayloadUnion valueof() const;
+CAN__MatrixPayloadUnion_template& list_item(unsigned int list_index) const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MESSAGE__TESTFRAME0__msg__type_template& message__MyTestframe0();
+const CAN__MESSAGE__TESTFRAME0__msg__type_template& message__MyTestframe0() const;
+CAN__MESSAGE__TESTFRAME1__msg__type_template& message__MyTestframe1();
+const CAN__MESSAGE__TESTFRAME1__msg__type_template& message__MyTestframe1() const;
+CAN__MESSAGE__TESTFRAME2__msg__type_template& message__MyTestframe2();
+const CAN__MESSAGE__TESTFRAME2__msg__type_template& message__MyTestframe2() const;
+CAN__MESSAGE__TESTFRAME3__msg__type_template& message__MyTestframe3();
+const CAN__MESSAGE__TESTFRAME3__msg__type_template& message__MyTestframe3() const;
+CAN__MESSAGE__TESTFRAME4__msg__type_template& message__MyTestframe4();
+const CAN__MESSAGE__TESTFRAME4__msg__type_template& message__MyTestframe4() const;
+CAN__MESSAGE__TESTFRAME5__msg__type_template& message__MyTestframe5();
+const CAN__MESSAGE__TESTFRAME5__msg__type_template& message__MyTestframe5() const;
+CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& message__extendedFrame1();
+const CAN__MESSAGE__EXTENDEDFRAME1__msg__type_template& message__extendedFrame1() const;
+boolean ischosen(CAN__MatrixPayloadUnion::union_selection_type checked_selection) const;
+void log() const;
+void log_match(const CAN__MatrixPayloadUnion& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class CAN__MatrixUnion : public Base_Type {
+ OCTETSTRING field_can__id;
+ CAN__MatrixPayloadUnion field_can__pdu;
+public:
+ CAN__MatrixUnion();
+ CAN__MatrixUnion(const OCTETSTRING& par_can__id,
+ const CAN__MatrixPayloadUnion& par_can__pdu);
+ CAN__MatrixUnion(const CAN__MatrixUnion& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__MatrixUnion& operator=(const CAN__MatrixUnion& other_value);
+ boolean operator==(const CAN__MatrixUnion& other_value) const;
+ inline boolean operator!=(const CAN__MatrixUnion& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& can__id()
+ {return field_can__id;}
+ inline const OCTETSTRING& can__id() const
+ {return field_can__id;}
+ inline CAN__MatrixPayloadUnion& can__pdu()
+ {return field_can__pdu;}
+ inline const CAN__MatrixPayloadUnion& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__MatrixUnion_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__MatrixUnion_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__MatrixUnion& other_value);
+void copy_template(const CAN__MatrixUnion_template& other_value);
+
+public:
+CAN__MatrixUnion_template();
+CAN__MatrixUnion_template(template_sel other_value);
+CAN__MatrixUnion_template(const CAN__MatrixUnion& other_value);
+CAN__MatrixUnion_template(const OPTIONAL<CAN__MatrixUnion>& other_value);
+CAN__MatrixUnion_template(const CAN__MatrixUnion_template& other_value);
+~CAN__MatrixUnion_template();
+CAN__MatrixUnion_template& operator=(template_sel other_value);
+CAN__MatrixUnion_template& operator=(const CAN__MatrixUnion& other_value);
+CAN__MatrixUnion_template& operator=(const OPTIONAL<CAN__MatrixUnion>& other_value);
+CAN__MatrixUnion_template& operator=(const CAN__MatrixUnion_template& other_value);
+boolean match(const CAN__MatrixUnion& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__MatrixUnion valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__MatrixUnion_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& can__id();
+const OCTETSTRING_template& can__id() const;
+CAN__MatrixPayloadUnion_template& can__pdu();
+const CAN__MatrixPayloadUnion_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__MatrixUnion& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+
+/* Global variable declarations */
+
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__11__bit__bitstring__little__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_test__sig__5__bit__bitstring__little__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME0__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__11__bit__bitstring__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_test__sig__5__bit__bitstring__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME1__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__11__bit__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME2__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__1__byte__octetstring__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_test__sig__2__byte__octetstring__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME3__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME4__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__unsig__9__bit__2__padded__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_test__sig__5__bit__integer__big__endian__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__TESTFRAME5__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_raw_;
+extern const XERdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_xer_;
+extern const TTCN_OERdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_oer_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_test__sig__2__byte__octetstring__msb__coded_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_raw_;
+extern const TTCN_Typedescriptor_t CAN__MESSAGE__EXTENDEDFRAME1__msg__type_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MatrixPayloadUnion_raw_;
+extern const TTCN_Typedescriptor_t CAN__MatrixPayloadUnion_descr_;
+extern const XERdescriptor_t CAN__MatrixUnion_can__id_xer_;
+extern const TTCN_OERdescriptor_t CAN__MatrixUnion_can__id_oer_;
+extern const TTCN_Typedescriptor_t CAN__MatrixUnion_can__id_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MatrixUnion_can__pdu_raw_;
+extern const TTCN_Typedescriptor_t CAN__MatrixUnion_can__pdu_descr_;
+extern const TTCN_RAWdescriptor_t CAN__MatrixUnion_raw_;
+extern const TTCN_Typedescriptor_t CAN__MatrixUnion_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix_messages.o b/demo/CAN_matrix_messages.o
new file mode 100644
index 0000000..18104e6
--- /dev/null
+++ b/demo/CAN_matrix_messages.o
Binary files differ
diff --git a/demo/CAN_matrix_signals.cc b/demo/CAN_matrix_signals.cc
new file mode 100644
index 0000000..8119e93
--- /dev/null
+++ b/demo/CAN_matrix_signals.cc
@@ -0,0 +1,85 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix_signals.hh"
+
+namespace CAN__matrix__signals {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char module_checksum[] = { 0x49, 0x44, 0x36, 0xb9, 0x67, 0xf1, 0x37, 0x59, 0x8b, 0x49, 0x2f, 0xf6, 0xff, 0x0b, 0x69, 0xd8 };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t BIT11__signal__type_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT11__signal__type_xer_ = { {"BIT11_signal_type>\n", "BIT11_signal_type>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT11__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT11__signal__type_descr_ = { "@CAN_matrix_signals.BIT11_signal_type", &BITSTRING_ber_, &BIT11__signal__type_raw_, NULL, &BIT11__signal__type_xer_, &BITSTRING_json_, &BIT11__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5__signal__type_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5__signal__type_xer_ = { {"BIT5_signal_type>\n", "BIT5_signal_type>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5__signal__type_descr_ = { "@CAN_matrix_signals.BIT5_signal_type", &BITSTRING_ber_, &BIT5__signal__type_raw_, NULL, &BIT5__signal__type_xer_, &BITSTRING_json_, &BIT5__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT__BIT9__PADDED__2__signal__type_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT__BIT9__PADDED__2__signal__type_xer_ = { {"BIT_BIT9_PADDED_2_signal_type>\n", "BIT_BIT9_PADDED_2_signal_type>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT__BIT9__PADDED__2__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT__BIT9__PADDED__2__signal__type_descr_ = { "@CAN_matrix_signals.BIT_BIT9_PADDED_2_signal_type", &INTEGER_ber_, &BIT__BIT9__PADDED__2__signal__type_raw_, &INTEGER_text_, &BIT__BIT9__PADDED__2__signal__type_xer_, &INTEGER_json_, &BIT__BIT9__PADDED__2__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT11__signal__type_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT11__signal__type_xer_ = { {"INT_BIT11_signal_type>\n", "INT_BIT11_signal_type>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT11__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT11__signal__type_descr_ = { "@CAN_matrix_signals.INT_BIT11_signal_type", &INTEGER_ber_, &INT__BIT11__signal__type_raw_, &INTEGER_text_, &INT__BIT11__signal__type_xer_, &INTEGER_json_, &INT__BIT11__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT5__signal__type_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT5__signal__type_xer_ = { {"INT_BIT5_signal_type>\n", "INT_BIT5_signal_type>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT5__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT5__signal__type_descr_ = { "@CAN_matrix_signals.INT_BIT5_signal_type", &INTEGER_ber_, &INT__BIT5__signal__type_raw_, &INTEGER_text_, &INT__BIT5__signal__type_xer_, &INTEGER_json_, &INT__BIT5__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT__BIT9__PADDED__2__signal__type_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT__BIT9__PADDED__2__signal__type_xer_ = { {"INT_BIT9_PADDED_2_signal_type>\n", "INT_BIT9_PADDED_2_signal_type>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT__BIT9__PADDED__2__signal__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT__BIT9__PADDED__2__signal__type_descr_ = { "@CAN_matrix_signals.INT_BIT9_PADDED_2_signal_type", &INTEGER_ber_, &INT__BIT9__PADDED__2__signal__type_raw_, &INTEGER_text_, &INT__BIT9__PADDED__2__signal__type_xer_, &INTEGER_json_, &INT__BIT9__PADDED__2__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__signal__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__signal__type_xer_ = { {"OCT1_signal_type>\n", "OCT1_signal_type>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__signal__type_oer_ext_arr_[0] = {};
+const int OCT1__signal__type_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__signal__type_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1__signal__type_oer_ext_arr_, 0, OCT1__signal__type_oer_p_};
+const TTCN_Typedescriptor_t OCT1__signal__type_descr_ = { "@CAN_matrix_signals.OCT1_signal_type", &OCTETSTRING_ber_, &OCT1__signal__type_raw_, &OCTETSTRING_text_, &OCT1__signal__type_xer_, &OCTETSTRING_json_, &OCT1__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2__signal__type_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT2__signal__type_xer_ = { {"OCT2_signal_type>\n", "OCT2_signal_type>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2__signal__type_oer_ext_arr_[0] = {};
+const int OCT2__signal__type_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2__signal__type_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2__signal__type_oer_ext_arr_, 0, OCT2__signal__type_oer_p_};
+const TTCN_Typedescriptor_t OCT2__signal__type_descr_ = { "@CAN_matrix_signals.OCT2_signal_type", &OCTETSTRING_ber_, &OCT2__signal__type_raw_, &OCTETSTRING_text_, &OCT2__signal__type_xer_, &OCTETSTRING_json_, &OCT2__signal__type_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("CAN_matrix_signals", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CAN_matrix_signals.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_signals");
+General__Types::module_object.pre_init_module();
+CAN__matrix__general__types::module_object.pre_init_module();
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CAN_matrix_signals.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_signals");
+General__Types::module_object.post_init_module();
+CAN__matrix__general__types::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix_signals.d b/demo/CAN_matrix_signals.d
new file mode 100644
index 0000000..67b64d7
--- /dev/null
+++ b/demo/CAN_matrix_signals.d
@@ -0,0 +1,59 @@
+CAN_matrix_signals.o CAN_matrix_signals.d : CAN_matrix_signals.cc CAN_matrix_signals.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh \
+ General_Types.hh CAN_matrix_general_types.hh
diff --git a/demo/CAN_matrix_signals.hh b/demo/CAN_matrix_signals.hh
new file mode 100644
index 0000000..ef53662
--- /dev/null
+++ b/demo/CAN_matrix_signals.hh
@@ -0,0 +1,92 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix__signals_HH
+#define CAN__matrix__signals_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "General_Types.hh"
+#include "CAN_matrix_general_types.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CAN__matrix__signals {
+
+/* Type definitions */
+
+typedef BITSTRING BIT11__signal__type;
+typedef BITSTRING_template BIT11__signal__type_template;
+typedef BITSTRING BIT5__signal__type;
+typedef BITSTRING_template BIT5__signal__type_template;
+typedef INTEGER BIT__BIT9__PADDED__2__signal__type;
+typedef INTEGER_template BIT__BIT9__PADDED__2__signal__type_template;
+typedef INTEGER INT__BIT11__signal__type;
+typedef INTEGER_template INT__BIT11__signal__type_template;
+typedef INTEGER INT__BIT5__signal__type;
+typedef INTEGER_template INT__BIT5__signal__type_template;
+typedef INTEGER INT__BIT9__PADDED__2__signal__type;
+typedef INTEGER_template INT__BIT9__PADDED__2__signal__type_template;
+typedef OCTETSTRING OCT1__signal__type;
+typedef OCTETSTRING_template OCT1__signal__type_template;
+typedef OCTETSTRING OCT2__signal__type;
+typedef OCTETSTRING_template OCT2__signal__type_template;
+
+/* Global variable declarations */
+
+extern const TTCN_RAWdescriptor_t BIT11__signal__type_raw_;
+extern const XERdescriptor_t BIT11__signal__type_xer_;
+extern const TTCN_OERdescriptor_t BIT11__signal__type_oer_;
+extern const TTCN_Typedescriptor_t BIT11__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t BIT5__signal__type_raw_;
+extern const XERdescriptor_t BIT5__signal__type_xer_;
+extern const TTCN_OERdescriptor_t BIT5__signal__type_oer_;
+extern const TTCN_Typedescriptor_t BIT5__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t BIT__BIT9__PADDED__2__signal__type_raw_;
+extern const XERdescriptor_t BIT__BIT9__PADDED__2__signal__type_xer_;
+extern const TTCN_OERdescriptor_t BIT__BIT9__PADDED__2__signal__type_oer_;
+extern const TTCN_Typedescriptor_t BIT__BIT9__PADDED__2__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT11__signal__type_raw_;
+extern const XERdescriptor_t INT__BIT11__signal__type_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT11__signal__type_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT11__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT5__signal__type_raw_;
+extern const XERdescriptor_t INT__BIT5__signal__type_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT5__signal__type_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT5__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t INT__BIT9__PADDED__2__signal__type_raw_;
+extern const XERdescriptor_t INT__BIT9__PADDED__2__signal__type_xer_;
+extern const TTCN_OERdescriptor_t INT__BIT9__PADDED__2__signal__type_oer_;
+extern const TTCN_Typedescriptor_t INT__BIT9__PADDED__2__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__signal__type_raw_;
+extern const XERdescriptor_t OCT1__signal__type_xer_;
+extern const TTCN_OERdescriptor_t OCT1__signal__type_oer_;
+extern const TTCN_Typedescriptor_t OCT1__signal__type_descr_;
+extern const TTCN_RAWdescriptor_t OCT2__signal__type_raw_;
+extern const XERdescriptor_t OCT2__signal__type_xer_;
+extern const TTCN_OERdescriptor_t OCT2__signal__type_oer_;
+extern const TTCN_Typedescriptor_t OCT2__signal__type_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix_signals.o b/demo/CAN_matrix_signals.o
new file mode 100644
index 0000000..7fd6e47
--- /dev/null
+++ b/demo/CAN_matrix_signals.o
Binary files differ
diff --git a/demo/CAN_matrix_templates.cc b/demo/CAN_matrix_templates.cc
new file mode 100644
index 0000000..2ef537b
--- /dev/null
+++ b/demo/CAN_matrix_templates.cc
@@ -0,0 +1,65 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix_templates.hh"
+
+namespace CAN__matrix__templates {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_0_octets[] = { 0, 0, 1, 39 };
+static const OCTETSTRING os_0(4, os_0_octets);
+static const unsigned char module_checksum[] = { 0x73, 0xda, 0x2e, 0xbd, 0x00, 0xb7, 0xfa, 0x8a, 0x3b, 0x04, 0x1a, 0xfc, 0x10, 0x66, 0x1b, 0xdf };
+
+/* Global variable definitions */
+
+TTCN_Module module_object("CAN_matrix_templates", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Bodies of functions, altsteps and testcases */
+
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame5__2__parm(const INTEGER& parameter1, const INTEGER& parameter2)
+{
+TTCN_Location current_location("CAN_matrix_templates.ttcn", 23, TTCN_Location::LOCATION_TEMPLATE, "t_message_Frame5_2_parm");
+CAN__matrix__messages::CAN__MatrixUnion_template ret_val;
+ret_val.can__id() = os_0;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME5__msg__type_template& tmp_0 = ret_val.can__pdu().message__MyTestframe5();
+tmp_0.test__unsig__9__bit__2__padded__integer__big__endian__coded() = parameter1;
+tmp_0.test__sig__5__bit__integer__big__endian__coded() = parameter2;
+}
+return ret_val;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CAN_matrix_templates.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_templates");
+CAN__matrix::module_object.pre_init_module();
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CAN_matrix_templates.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_templates");
+CAN__matrix::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix_templates.d b/demo/CAN_matrix_templates.d
new file mode 100644
index 0000000..67592d2
--- /dev/null
+++ b/demo/CAN_matrix_templates.d
@@ -0,0 +1,61 @@
+CAN_matrix_templates.o CAN_matrix_templates.d : CAN_matrix_templates.cc CAN_matrix_templates.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh \
+ CAN_matrix.hh SocketCAN_Types.hh Bcm.hh Can.hh General_Types.hh Raw.hh \
+ CAN_matrix_messages.hh CAN_matrix_signals.hh CAN_matrix_general_types.hh \
+ CANFD_matrix_messages.hh
diff --git a/demo/CAN_matrix_templates.hh b/demo/CAN_matrix_templates.hh
new file mode 100644
index 0000000..ba6ed27
--- /dev/null
+++ b/demo/CAN_matrix_templates.hh
@@ -0,0 +1,44 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix__templates_HH
+#define CAN__matrix__templates_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "CAN_matrix.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CAN__matrix__templates {
+
+/* Function prototypes */
+
+extern CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame5__2__parm(const INTEGER& parameter1, const INTEGER& parameter2);
+
+/* Global variable declarations */
+
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix_templates.o b/demo/CAN_matrix_templates.o
new file mode 100644
index 0000000..b627319
--- /dev/null
+++ b/demo/CAN_matrix_templates.o
Binary files differ
diff --git a/demo/CAN_matrix_test.cc b/demo/CAN_matrix_test.cc
new file mode 100644
index 0000000..f5bc2ea
--- /dev/null
+++ b/demo/CAN_matrix_test.cc
@@ -0,0 +1,903 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CAN_matrix_test.hh"
+
+namespace CAN__matrix__test {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+static boolean init_comp_type(const char *component_type, boolean init_base_comps);
+
+/* Literal string constants */
+
+static const unsigned char bs_2_bits[] = { 170 },
+bs_0_bits[] = { 170, 6 },
+bs_3_bits[] = { 85 },
+bs_1_bits[] = { 31 };
+static const BITSTRING bs_2(8, bs_2_bits),
+bs_0(11, bs_0_bits),
+bs_3(8, bs_3_bits),
+bs_1(5, bs_1_bits);
+static const unsigned char os_12_octets[] = { 0, 0, 0, 21 },
+os_0_octets[] = { 0, 0, 1, 34 },
+os_3_octets[] = { 0, 0, 1, 35 },
+os_2_octets[] = { 0, 0, 1, 36 },
+os_4_octets[] = { 0, 0, 1, 37 },
+os_9_octets[] = { 0, 0, 1, 38 },
+os_10_octets[] = { 0, 0, 1, 39 },
+os_11_octets[] = { 1, 35, 69, 103, 137, 171, 205, 239 },
+os_13_octets[] = { 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239, 1, 35, 69, 103, 137, 171, 205, 239 },
+os_1_octets[] = { 18, 52 },
+os_6_octets[] = { 18, 63 },
+os_7_octets[] = { 128, 0, 0, 1 },
+os_5_octets[] = { 255 },
+os_8_octets[] = { 255, 255 };
+static const OCTETSTRING os_12(4, os_12_octets),
+os_0(4, os_0_octets),
+os_3(4, os_3_octets),
+os_2(4, os_2_octets),
+os_4(4, os_4_octets),
+os_9(4, os_9_octets),
+os_10(4, os_10_octets),
+os_11(8, os_11_octets),
+os_13(64, os_13_octets),
+os_1(2, os_1_octets),
+os_6(2, os_6_octets),
+os_7(4, os_7_octets),
+os_5(1, os_5_octets),
+os_8(2, os_8_octets);
+static const unsigned char module_checksum[] = { 0xc0, 0x4b, 0x3b, 0x6e, 0x4a, 0xdb, 0x3f, 0xaa, 0xa8, 0xe7, 0x99, 0x2a, 0x7e, 0x3f, 0xdf, 0x82 };
+
+/* Global variable definitions */
+
+const TTCN_Typedescriptor_t& MTC__CT_descr_ = COMPONENT_descr_;
+TTCN_Module module_object("CAN_matrix_test", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, init_comp_type, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Bodies of functions, altsteps and testcases */
+
+verdicttype testcase_tc__encdec(boolean has_timer, double timer_value)
+{
+TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
+TTCN_Location current_location("CAN_matrix_test.ttcn", 22, TTCN_Location::LOCATION_TESTCASE, "tc_encdec");
+try {
+TTCN_Runtime::begin_testcase("CAN_matrix_test", "tc_encdec", "CAN_matrix_test", "MTC_CT", "CAN_matrix_test", "MTC_CT", has_timer, timer_value);
+current_location.update_lineno(25);
+#line 25 "CAN_matrix_test.ttcn"
+Can::CAN__frame my__can__id;
+current_location.update_lineno(26);
+#line 26 "CAN_matrix_test.ttcn"
+my__can__id.can__id() = os_0;
+my__can__id.can__pdu() = os_1;
+current_location.update_lineno(27);
+#line 27 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+my__can__id.log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(28);
+#line 28 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+{
+Can::CAN__frame tmp_1;
+tmp_1.can__id() = os_0;
+tmp_1.can__pdu() = os_1;
+CAN__matrix::canframe2canmatrixframe(tmp_1).log();
+}
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(29);
+#line 29 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(31);
+#line 31 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion my__can__message;
+current_location.update_lineno(33);
+#line 33 "CAN_matrix_test.ttcn"
+my__can__message.can__id() = os_2;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME2__msg__type& tmp_3 = my__can__message.can__pdu().message__MyTestframe2();
+tmp_3.test__sig__11__bit__integer__big__endian__coded() = 2047;
+tmp_3.test__sig__5__bit__integer__big__endian__coded() = 2;
+}
+current_location.update_lineno(39);
+#line 39 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+my__can__message.log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(40);
+#line 40 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::canmatrixframe2can(my__can__message).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(41);
+#line 41 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(44);
+#line 44 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__testFrame0__1;
+t__message__testFrame0__1.can__id() = os_0;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME0__msg__type_template& tmp_4 = t__message__testFrame0__1.can__pdu().message__MyTestframe0();
+tmp_4.test__sig__11__bit__bitstring__little__endian__coded() = bs_0;
+tmp_4.test__sig__5__bit__bitstring__little__endian__coded() = bs_1;
+}
+current_location.update_lineno(55);
+#line 55 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__testFrame0__1.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(56);
+#line 56 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(57);
+#line 57 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__testFrame0__1.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(58);
+#line 58 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(60);
+#line 60 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__testFrame1__1;
+t__message__testFrame1__1.can__id() = os_3;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME1__msg__type_template& tmp_5 = t__message__testFrame1__1.can__pdu().message__MyTestframe1();
+tmp_5.test__sig__11__bit__bitstring__big__endian__coded() = bs_0;
+tmp_5.test__sig__5__bit__bitstring__big__endian__coded() = bs_1;
+}
+current_location.update_lineno(71);
+#line 71 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__testFrame1__1.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(72);
+#line 72 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(73);
+#line 73 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__testFrame1__1.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(74);
+#line 74 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(76);
+#line 76 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__testFrame2__1;
+t__message__testFrame2__1.can__id() = os_2;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME2__msg__type_template& tmp_6 = t__message__testFrame2__1.can__pdu().message__MyTestframe2();
+tmp_6.test__sig__11__bit__integer__big__endian__coded() = 2047;
+tmp_6.test__sig__5__bit__integer__big__endian__coded() = 2;
+}
+current_location.update_lineno(88);
+#line 88 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__testFrame2__1.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(89);
+#line 89 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(90);
+#line 90 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__testFrame2__1.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(91);
+#line 91 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(94);
+#line 94 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__testFrame3__1;
+t__message__testFrame3__1.can__id() = os_4;
+{
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME3__msg__type_template& tmp_7 = t__message__testFrame3__1.can__pdu().message__MyTestframe3();
+tmp_7.test__sig__1__byte__octetstring__big__endian__coded() = os_5;
+tmp_7.test__sig__2__byte__octetstring__big__endian__coded() = os_6;
+}
+current_location.update_lineno(105);
+#line 105 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__testFrame3__1.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(106);
+#line 106 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(107);
+#line 107 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__testFrame3__1.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(108);
+#line 108 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(112);
+#line 112 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__extendedFrame1__1;
+t__message__extendedFrame1__1.can__id() = os_7;
+t__message__extendedFrame1__1.can__pdu().message__extendedFrame1().test__sig__2__byte__octetstring__msb__coded() = os_8;
+current_location.update_lineno(122);
+#line 122 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__extendedFrame1__1.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(123);
+#line 123 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(124);
+#line 124 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__extendedFrame1__1.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(125);
+#line 125 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(127);
+#line 127 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME1__msg__type v__message__Frame1__2;
+current_location.update_lineno(128);
+#line 128 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME2__msg__type v__message__Frame2__2;
+current_location.update_lineno(129);
+#line 129 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME3__msg__type v__message__Frame3__2;
+current_location.update_lineno(130);
+#line 130 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME4__msg__type v__message__Frame4__2;
+current_location.update_lineno(131);
+#line 131 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME5__msg__type v__message__Frame5__2;
+current_location.update_lineno(132);
+#line 132 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__EXTENDEDFRAME1__msg__type v__message__extendedFrame1__2;
+current_location.update_lineno(134);
+#line 134 "CAN_matrix_test.ttcn"
+v__message__Frame1__2.test__sig__11__bit__bitstring__big__endian__coded() = bs_0;
+v__message__Frame1__2.test__sig__5__bit__bitstring__big__endian__coded() = bs_1;
+current_location.update_lineno(141);
+#line 141 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame1__2;
+t__message__Frame1__2.can__id() = os_3;
+t__message__Frame1__2.can__pdu().message__MyTestframe1() = v__message__Frame1__2;
+current_location.update_lineno(147);
+#line 147 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__Frame1__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(148);
+#line 148 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(149);
+#line 149 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__Frame1__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(150);
+#line 150 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(152);
+#line 152 "CAN_matrix_test.ttcn"
+v__message__Frame2__2.test__sig__11__bit__integer__big__endian__coded() = 2047;
+v__message__Frame2__2.test__sig__5__bit__integer__big__endian__coded() = 2;
+current_location.update_lineno(159);
+#line 159 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame2__2;
+t__message__Frame2__2.can__id() = os_2;
+t__message__Frame2__2.can__pdu().message__MyTestframe2() = v__message__Frame2__2;
+current_location.update_lineno(165);
+#line 165 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__Frame2__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(166);
+#line 166 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(167);
+#line 167 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__Frame2__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(168);
+#line 168 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(171);
+#line 171 "CAN_matrix_test.ttcn"
+v__message__Frame3__2.test__sig__1__byte__octetstring__big__endian__coded() = os_5;
+v__message__Frame3__2.test__sig__2__byte__octetstring__big__endian__coded() = os_6;
+current_location.update_lineno(178);
+#line 178 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame3__2;
+t__message__Frame3__2.can__id() = os_4;
+t__message__Frame3__2.can__pdu().message__MyTestframe3() = v__message__Frame3__2;
+current_location.update_lineno(184);
+#line 184 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__Frame3__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(185);
+#line 185 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(186);
+#line 186 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__Frame3__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(187);
+#line 187 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(189);
+#line 189 "CAN_matrix_test.ttcn"
+v__message__Frame4__2.test__unsig__9__bit__2__padded__integer__big__endian__coded() = 511;
+v__message__Frame4__2.test__sig__5__bit__integer__big__endian__coded() = 8;
+current_location.update_lineno(195);
+#line 195 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame4__2;
+t__message__Frame4__2.can__id() = os_9;
+t__message__Frame4__2.can__pdu().message__MyTestframe4() = v__message__Frame4__2;
+current_location.update_lineno(201);
+#line 201 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__Frame4__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(202);
+#line 202 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(203);
+#line 203 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__Frame4__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(204);
+#line 204 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(206);
+#line 206 "CAN_matrix_test.ttcn"
+v__message__Frame5__2.test__unsig__9__bit__2__padded__integer__big__endian__coded() = 127;
+v__message__Frame5__2.test__sig__5__bit__integer__big__endian__coded() = 16;
+current_location.update_lineno(212);
+#line 212 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame5__2;
+t__message__Frame5__2.can__id() = os_10;
+t__message__Frame5__2.can__pdu().message__MyTestframe5() = v__message__Frame5__2;
+current_location.update_lineno(218);
+#line 218 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__Frame5__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(219);
+#line 219 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(220);
+#line 220 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__Frame5__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(221);
+#line 221 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(223);
+#line 223 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "********************************************");
+current_location.update_lineno(225);
+#line 225 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(CAN__matrix__templates::t__message__Frame5__2__parm(7, 1).valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(226);
+#line 226 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(227);
+#line 227 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(CAN__matrix__templates::t__message__Frame5__2__parm(7, 1).valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(228);
+#line 228 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(230);
+#line 230 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "********************************************");
+current_location.update_lineno(232);
+#line 232 "CAN_matrix_test.ttcn"
+v__message__extendedFrame1__2.test__sig__2__byte__octetstring__msb__coded() = os_8;
+current_location.update_lineno(238);
+#line 238 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__extendedFrame1__2;
+t__message__extendedFrame1__2.can__id() = os_7;
+t__message__extendedFrame1__2.can__pdu().message__extendedFrame1() = v__message__extendedFrame1__2;
+current_location.update_lineno(244);
+#line 244 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__encode__can__matrix(t__message__extendedFrame1__2.valueof()).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(245);
+#line 245 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(246);
+#line 246 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+CAN__matrix::f__decode__can__matrix(CAN__matrix::f__encode__can__matrix(t__message__extendedFrame1__2.valueof())).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(247);
+#line 247 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "--------------------------------------------");
+current_location.update_lineno(249);
+#line 249 "CAN_matrix_test.ttcn"
+SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__frame__to__send1;
+current_location.update_lineno(249);
+#line 249 "CAN_matrix_test.ttcn"
+SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__frame__to__send2;
+current_location.update_lineno(253);
+#line 253 "CAN_matrix_test.ttcn"
+{
+Can::CAN__frame& tmp_15 = v__frame__to__send1.can__frame();
+tmp_15.can__id() = os_0;
+tmp_15.can__pdu() = os_11;
+}
+current_location.update_lineno(260);
+#line 260 "CAN_matrix_test.ttcn"
+Can::CAN__frame can__frame;
+current_location.update_lineno(262);
+#line 262 "CAN_matrix_test.ttcn"
+can__frame = const_cast< const SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame&>(v__frame__to__send1).can__frame();
+current_location.update_lineno(266);
+#line 266 "CAN_matrix_test.ttcn"
+{
+Can::CANFD__frame& tmp_18 = v__frame__to__send2.canfd__frame();
+tmp_18.can__id() = os_12;
+tmp_18.can__flags() = bs_2;
+tmp_18.can__pdu() = os_13;
+}
+current_location.update_lineno(272);
+#line 272 "CAN_matrix_test.ttcn"
+TTCN_Runtime::setverdict(PASS);
+} catch (const TC_Error& tc_error) {
+} catch (const TC_End& tc_end) {
+TTCN_Logger::log_str(TTCN_FUNCTION, "Test case tc_encdec was stopped.");
+}
+return TTCN_Runtime::end_testcase();
+}
+
+verdicttype testcase_tc__can__raw__send__and__receive__can__frame(boolean has_timer, double timer_value)
+{
+TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
+TTCN_Location current_location("CAN_matrix_test.ttcn", 275, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_send_and_receive_can_frame");
+try {
+TTCN_Runtime::begin_testcase("CAN_matrix_test", "tc_can_raw_send_and_receive_can_frame", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
+current_location.update_lineno(276);
+#line 276 "CAN_matrix_test.ttcn"
+COMPONENT v__ptc__rawSendInitiator(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawSendInitiator", NULL, TRUE));
+current_location.update_lineno(277);
+#line 277 "CAN_matrix_test.ttcn"
+COMPONENT v__ptc__rawFrameReceiver(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC2_ptc_rawFrameReceiver", NULL, TRUE));
+current_location.update_lineno(279);
+#line 279 "CAN_matrix_test.ttcn"
+SocketCANtest::f__addSyncSlaveSet(v__ptc__rawSendInitiator, SocketCANtest::MTC_component_v__PTCSet);
+current_location.update_lineno(280);
+#line 280 "CAN_matrix_test.ttcn"
+SocketCANtest::f__addSyncSlaveSet(v__ptc__rawFrameReceiver, SocketCANtest::MTC_component_v__PTCSet);
+current_location.update_lineno(281);
+#line 281 "CAN_matrix_test.ttcn"
+TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSendInitiator, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(282);
+#line 282 "CAN_matrix_test.ttcn"
+TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawFrameReceiver, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(285);
+#line 285 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MESSAGE__TESTFRAME1__msg__type v__message__Frame1__3;
+current_location.update_lineno(287);
+#line 287 "CAN_matrix_test.ttcn"
+v__message__Frame1__3.test__sig__11__bit__bitstring__big__endian__coded() = bs_0;
+v__message__Frame1__3.test__sig__5__bit__bitstring__big__endian__coded() = bs_1;
+current_location.update_lineno(294);
+#line 294 "CAN_matrix_test.ttcn"
+CAN__matrix__messages::CAN__MatrixUnion_template t__message__Frame1__3;
+t__message__Frame1__3.can__id() = os_3;
+t__message__Frame1__3.can__pdu().message__MyTestframe1() = v__message__Frame1__3;
+current_location.update_lineno(300);
+#line 300 "CAN_matrix_test.ttcn"
+SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__frame__to__send;
+current_location.update_lineno(301);
+#line 301 "CAN_matrix_test.ttcn"
+v__frame__to__send.can__frame() = CAN__matrix::canmatrixframe2can(t__message__Frame1__3.valueof());
+current_location.update_lineno(303);
+#line 303 "CAN_matrix_test.ttcn"
+SocketCANtest::start_f__ptc__RawSendInitiator(v__ptc__rawSendInitiator, SocketCANtest::e__Phase::e__testbody1, v__frame__to__send);
+current_location.update_lineno(304);
+#line 304 "CAN_matrix_test.ttcn"
+SocketCANtest::start_f__ptc__RawFrameReceiver(v__ptc__rawFrameReceiver, SocketCANtest::e__Phase::e__testbody3, SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame_template(v__frame__to__send));
+current_location.update_lineno(306);
+#line 306 "CAN_matrix_test.ttcn"
+SocketCANtest::e__Phase v__phase;
+current_location.update_lineno(308);
+#line 308 "CAN_matrix_test.ttcn"
+v__phase = SocketCANtest::c__firstPhase;
+current_location.update_lineno(308);
+#line 308 "CAN_matrix_test.ttcn"
+for ( ; ; ) {
+current_location.update_lineno(308);
+#line 308 "CAN_matrix_test.ttcn"
+if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
+current_location.update_lineno(309);
+#line 309 "CAN_matrix_test.ttcn"
+SocketCANtest::f__startPhase(v__phase);
+current_location.update_lineno(310);
+#line 310 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+TTCN_Logger::log_event_str("MTC: ");
+v__phase.log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(311);
+#line 311 "CAN_matrix_test.ttcn"
+SocketCANtest::f__awaitEndPhase(v__phase);
+current_location.update_lineno(308);
+#line 308 "CAN_matrix_test.ttcn"
+v__phase = SocketCANtest::f__incMTCPhase(v__phase);
+}
+current_location.update_lineno(314);
+#line 314 "CAN_matrix_test.ttcn"
+{
+tmp_23:
+alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
+TTCN_Snapshot::take_new(FALSE);
+for ( ; ; ) {
+if (alt_flag != ALT_NO) {
+alt_flag = TTCN_Runtime::component_done(ALL_COMPREF);
+if (alt_flag == ALT_YES) break;
+else if (alt_flag == ALT_REPEAT) goto tmp_23;
+}
+if (default_flag != ALT_NO) {
+default_flag = TTCN_Default::try_altsteps();
+if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
+else if (default_flag == ALT_REPEAT) goto tmp_23;
+}
+current_location.update_lineno(314);
+#line 314 "CAN_matrix_test.ttcn"
+if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file CAN_matrix_test.ttcn, line 314.");
+TTCN_Snapshot::take_new(TRUE);
+}
+}
+current_location.update_lineno(315);
+#line 315 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "MTC done");
+current_location.update_lineno(317);
+#line 317 "CAN_matrix_test.ttcn"
+TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSendInitiator, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(318);
+#line 318 "CAN_matrix_test.ttcn"
+TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawFrameReceiver, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(320);
+#line 320 "CAN_matrix_test.ttcn"
+TTCN_Runtime::kill_component(ALL_COMPREF);
+} catch (const TC_Error& tc_error) {
+} catch (const TC_End& tc_end) {
+TTCN_Logger::log_str(TTCN_FUNCTION, "Test case tc_can_raw_send_and_receive_can_frame was stopped.");
+}
+return TTCN_Runtime::end_testcase();
+}
+
+verdicttype testcase_tc__can__raw__send__and__receive__canfd__frame(boolean has_timer, double timer_value)
+{
+TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
+TTCN_Location current_location("CAN_matrix_test.ttcn", 323, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_send_and_receive_canfd_frame");
+try {
+TTCN_Runtime::begin_testcase("CAN_matrix_test", "tc_can_raw_send_and_receive_canfd_frame", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
+current_location.update_lineno(324);
+#line 324 "CAN_matrix_test.ttcn"
+COMPONENT v__ptc__rawSendInitiator(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawSendInitiator", NULL, TRUE));
+current_location.update_lineno(325);
+#line 325 "CAN_matrix_test.ttcn"
+COMPONENT v__ptc__rawFrameReceiver(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC2_ptc_rawFrameReceiver", NULL, TRUE));
+current_location.update_lineno(328);
+#line 328 "CAN_matrix_test.ttcn"
+SocketCANtest::f__addSyncSlaveSet(v__ptc__rawSendInitiator, SocketCANtest::MTC_component_v__PTCSet);
+current_location.update_lineno(329);
+#line 329 "CAN_matrix_test.ttcn"
+SocketCANtest::f__addSyncSlaveSet(v__ptc__rawFrameReceiver, SocketCANtest::MTC_component_v__PTCSet);
+current_location.update_lineno(331);
+#line 331 "CAN_matrix_test.ttcn"
+TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSendInitiator, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(332);
+#line 332 "CAN_matrix_test.ttcn"
+TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawFrameReceiver, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(334);
+#line 334 "CAN_matrix_test.ttcn"
+SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__canfd__frame__to__send;
+current_location.update_lineno(335);
+#line 335 "CAN_matrix_test.ttcn"
+{
+Can::CANFD__frame& tmp_25 = v__canfd__frame__to__send.canfd__frame();
+tmp_25.can__id() = os_12;
+tmp_25.can__flags() = bs_3;
+tmp_25.can__pdu() = os_13;
+}
+current_location.update_lineno(341);
+#line 341 "CAN_matrix_test.ttcn"
+CANFD__matrix__messages::CANFD__MESSAGE__TESTFRAME1__msg__type v__message__Frame1__4;
+current_location.update_lineno(343);
+#line 343 "CAN_matrix_test.ttcn"
+v__message__Frame1__4.test__sig__11__bit__bitstring__msb__coded() = bs_0;
+v__message__Frame1__4.test__sig__5__bit__bitstring__msb__coded() = bs_1;
+current_location.update_lineno(350);
+#line 350 "CAN_matrix_test.ttcn"
+CANFD__matrix__messages::CANFD__MatrixUnion_template t__message__Frame1__4;
+t__message__Frame1__4.can__id() = os_3;
+t__message__Frame1__4.can__flags() = bs_3;
+t__message__Frame1__4.can__pdu().message__MyTestframe1() = v__message__Frame1__4;
+current_location.update_lineno(357);
+#line 357 "CAN_matrix_test.ttcn"
+SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__frame__to__send;
+current_location.update_lineno(358);
+#line 358 "CAN_matrix_test.ttcn"
+v__frame__to__send.canfd__frame() = CAN__matrix::canfdmatrixframe2canfd(t__message__Frame1__4.valueof());
+current_location.update_lineno(361);
+#line 361 "CAN_matrix_test.ttcn"
+SocketCANtest::start_f__ptc__RawSendInitiator(v__ptc__rawSendInitiator, SocketCANtest::e__Phase::e__testbody2, v__canfd__frame__to__send);
+current_location.update_lineno(362);
+#line 362 "CAN_matrix_test.ttcn"
+SocketCANtest::start_f__ptc__RawFrameReceiver(v__ptc__rawFrameReceiver, SocketCANtest::e__Phase::e__testbody3, SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame_template(v__canfd__frame__to__send));
+current_location.update_lineno(364);
+#line 364 "CAN_matrix_test.ttcn"
+SocketCANtest::e__Phase v__phase;
+current_location.update_lineno(366);
+#line 366 "CAN_matrix_test.ttcn"
+v__phase = SocketCANtest::c__firstPhase;
+current_location.update_lineno(366);
+#line 366 "CAN_matrix_test.ttcn"
+for ( ; ; ) {
+current_location.update_lineno(366);
+#line 366 "CAN_matrix_test.ttcn"
+if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
+current_location.update_lineno(367);
+#line 367 "CAN_matrix_test.ttcn"
+SocketCANtest::f__startPhase(v__phase);
+current_location.update_lineno(368);
+#line 368 "CAN_matrix_test.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+TTCN_Logger::log_event_str("MTC: ");
+v__phase.log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(369);
+#line 369 "CAN_matrix_test.ttcn"
+SocketCANtest::f__awaitEndPhase(v__phase);
+current_location.update_lineno(366);
+#line 366 "CAN_matrix_test.ttcn"
+v__phase = SocketCANtest::f__incMTCPhase(v__phase);
+}
+current_location.update_lineno(372);
+#line 372 "CAN_matrix_test.ttcn"
+{
+tmp_30:
+alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
+TTCN_Snapshot::take_new(FALSE);
+for ( ; ; ) {
+if (alt_flag != ALT_NO) {
+alt_flag = TTCN_Runtime::component_done(ALL_COMPREF);
+if (alt_flag == ALT_YES) break;
+else if (alt_flag == ALT_REPEAT) goto tmp_30;
+}
+if (default_flag != ALT_NO) {
+default_flag = TTCN_Default::try_altsteps();
+if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
+else if (default_flag == ALT_REPEAT) goto tmp_30;
+}
+current_location.update_lineno(372);
+#line 372 "CAN_matrix_test.ttcn"
+if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file CAN_matrix_test.ttcn, line 372.");
+TTCN_Snapshot::take_new(TRUE);
+}
+}
+current_location.update_lineno(373);
+#line 373 "CAN_matrix_test.ttcn"
+TTCN_Logger::log_str(TTCN_USER, "MTC done");
+current_location.update_lineno(376);
+#line 376 "CAN_matrix_test.ttcn"
+TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSendInitiator, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(377);
+#line 377 "CAN_matrix_test.ttcn"
+TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawFrameReceiver, SocketCANtest::PTC_component_pt__sync.get_name());
+current_location.update_lineno(379);
+#line 379 "CAN_matrix_test.ttcn"
+TTCN_Runtime::kill_component(ALL_COMPREF);
+} catch (const TC_Error& tc_error) {
+} catch (const TC_End& tc_end) {
+TTCN_Logger::log_str(TTCN_FUNCTION, "Test case tc_can_raw_send_and_receive_canfd_frame was stopped.");
+}
+return TTCN_Runtime::end_testcase();
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("CAN_matrix_test.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_test");
+CanError::module_object.pre_init_module();
+SocketCANtest::module_object.pre_init_module();
+CAN__matrix__templates::module_object.pre_init_module();
+module_object.add_testcase_nonpard("tc_encdec", testcase_tc__encdec);
+module_object.add_testcase_nonpard("tc_can_raw_send_and_receive_can_frame", testcase_tc__can__raw__send__and__receive__can__frame);
+module_object.add_testcase_nonpard("tc_can_raw_send_and_receive_canfd_frame", testcase_tc__can__raw__send__and__receive__canfd__frame);
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("CAN_matrix_test.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CAN_matrix_test");
+CanError::module_object.post_init_module();
+SocketCANtest::module_object.post_init_module();
+CAN__matrix__templates::module_object.post_init_module();
+}
+
+static boolean init_comp_type(const char *component_type, boolean init_base_comps)
+{
+(void)init_base_comps;
+if (!strcmp(component_type, "MTC_CT")) {
+return TRUE;
+} else return FALSE;
+}
+
+
+} /* end of namespace */
diff --git a/demo/CAN_matrix_test.d b/demo/CAN_matrix_test.d
new file mode 100644
index 0000000..9bb61e1
--- /dev/null
+++ b/demo/CAN_matrix_test.d
@@ -0,0 +1,63 @@
+CAN_matrix_test.o CAN_matrix_test.d : CAN_matrix_test.cc CAN_matrix_test.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh \
+ CanError.hh SocketCANtest.hh SocketCAN_PortType.hh SocketCAN_Types.hh \
+ Bcm.hh Can.hh General_Types.hh Raw.hh ../src/SocketCAN_PT.hh \
+ SocketCAN_Types.hh SocketCAN_Templates.hh CAN_matrix_templates.hh \
+ CAN_matrix.hh CAN_matrix_messages.hh CAN_matrix_signals.hh \
+ CAN_matrix_general_types.hh CANFD_matrix_messages.hh
diff --git a/demo/CAN_matrix_test.hh b/demo/CAN_matrix_test.hh
new file mode 100644
index 0000000..3719dea
--- /dev/null
+++ b/demo/CAN_matrix_test.hh
@@ -0,0 +1,54 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CAN__matrix__test_HH
+#define CAN__matrix__test_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "CanError.hh"
+#include "SocketCANtest.hh"
+#include "CAN_matrix_templates.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CAN__matrix__test {
+
+/* Type definitions */
+
+typedef COMPONENT MTC__CT;
+typedef COMPONENT_template MTC__CT_template;
+
+/* Function prototypes */
+
+extern verdicttype testcase_tc__encdec(boolean has_timer, double timer_value);
+extern verdicttype testcase_tc__can__raw__send__and__receive__can__frame(boolean has_timer, double timer_value);
+extern verdicttype testcase_tc__can__raw__send__and__receive__canfd__frame(boolean has_timer, double timer_value);
+
+/* Global variable declarations */
+
+extern const TTCN_Typedescriptor_t& MTC__CT_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CAN_matrix_test.o b/demo/CAN_matrix_test.o
new file mode 100644
index 0000000..bd58c67
--- /dev/null
+++ b/demo/CAN_matrix_test.o
Binary files differ
diff --git a/demo/Can.cc b/demo/Can.cc
new file mode 100644
index 0000000..e5f6a61
--- /dev/null
+++ b/demo/Can.cc
@@ -0,0 +1,4171 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "Can.hh"
+
+namespace Can {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_3_octets[] = { 0, 0, 7, 255 },
+os_4_octets[] = { 31, 255, 255, 255 },
+os_2_octets[] = { 32, 0, 0, 0 },
+os_1_octets[] = { 64, 0, 0, 0 },
+os_0_octets[] = { 128, 0, 0, 0 };
+static const OCTETSTRING os_3(4, os_3_octets),
+os_4(4, os_4_octets),
+os_2(4, os_2_octets),
+os_1(4, os_1_octets),
+os_0(4, os_0_octets);
+static const unsigned short op_128_elements[] = { 0, 256, 256, 256 },
+op_129_elements[] = { 1, 256, 256, 256 },
+op_130_elements[] = { 2, 256, 256, 256 },
+op_131_elements[] = { 3, 256, 256, 256 },
+op_132_elements[] = { 4, 256, 256, 256 },
+op_133_elements[] = { 5, 256, 256, 256 },
+op_134_elements[] = { 6, 256, 256, 256 },
+op_135_elements[] = { 7, 256, 256, 256 },
+op_136_elements[] = { 8, 256, 256, 256 },
+op_137_elements[] = { 9, 256, 256, 256 },
+op_138_elements[] = { 10, 256, 256, 256 },
+op_139_elements[] = { 11, 256, 256, 256 },
+op_140_elements[] = { 12, 256, 256, 256 },
+op_141_elements[] = { 13, 256, 256, 256 },
+op_142_elements[] = { 14, 256, 256, 256 },
+op_143_elements[] = { 15, 256, 256, 256 },
+op_144_elements[] = { 16, 256, 256, 256 },
+op_145_elements[] = { 17, 256, 256, 256 },
+op_146_elements[] = { 18, 256, 256, 256 },
+op_147_elements[] = { 19, 256, 256, 256 },
+op_148_elements[] = { 20, 256, 256, 256 },
+op_149_elements[] = { 21, 256, 256, 256 },
+op_150_elements[] = { 22, 256, 256, 256 },
+op_151_elements[] = { 23, 256, 256, 256 },
+op_152_elements[] = { 24, 256, 256, 256 },
+op_153_elements[] = { 25, 256, 256, 256 },
+op_154_elements[] = { 26, 256, 256, 256 },
+op_155_elements[] = { 27, 256, 256, 256 },
+op_156_elements[] = { 28, 256, 256, 256 },
+op_157_elements[] = { 29, 256, 256, 256 },
+op_158_elements[] = { 30, 256, 256, 256 },
+op_159_elements[] = { 31, 256, 256, 256 },
+op_160_elements[] = { 32, 256, 256, 256 },
+op_161_elements[] = { 33, 256, 256, 256 },
+op_162_elements[] = { 34, 256, 256, 256 },
+op_163_elements[] = { 35, 256, 256, 256 },
+op_164_elements[] = { 36, 256, 256, 256 },
+op_165_elements[] = { 37, 256, 256, 256 },
+op_166_elements[] = { 38, 256, 256, 256 },
+op_167_elements[] = { 39, 256, 256, 256 },
+op_168_elements[] = { 40, 256, 256, 256 },
+op_169_elements[] = { 41, 256, 256, 256 },
+op_170_elements[] = { 42, 256, 256, 256 },
+op_171_elements[] = { 43, 256, 256, 256 },
+op_172_elements[] = { 44, 256, 256, 256 },
+op_173_elements[] = { 45, 256, 256, 256 },
+op_174_elements[] = { 46, 256, 256, 256 },
+op_175_elements[] = { 47, 256, 256, 256 },
+op_176_elements[] = { 48, 256, 256, 256 },
+op_177_elements[] = { 49, 256, 256, 256 },
+op_178_elements[] = { 50, 256, 256, 256 },
+op_179_elements[] = { 51, 256, 256, 256 },
+op_180_elements[] = { 52, 256, 256, 256 },
+op_181_elements[] = { 53, 256, 256, 256 },
+op_182_elements[] = { 54, 256, 256, 256 },
+op_183_elements[] = { 55, 256, 256, 256 },
+op_184_elements[] = { 56, 256, 256, 256 },
+op_185_elements[] = { 57, 256, 256, 256 },
+op_186_elements[] = { 58, 256, 256, 256 },
+op_187_elements[] = { 59, 256, 256, 256 },
+op_188_elements[] = { 60, 256, 256, 256 },
+op_189_elements[] = { 61, 256, 256, 256 },
+op_190_elements[] = { 62, 256, 256, 256 },
+op_191_elements[] = { 63, 256, 256, 256 },
+op_192_elements[] = { 64, 256, 256, 256 },
+op_193_elements[] = { 65, 256, 256, 256 },
+op_194_elements[] = { 66, 256, 256, 256 },
+op_195_elements[] = { 67, 256, 256, 256 },
+op_196_elements[] = { 68, 256, 256, 256 },
+op_197_elements[] = { 69, 256, 256, 256 },
+op_198_elements[] = { 70, 256, 256, 256 },
+op_199_elements[] = { 71, 256, 256, 256 },
+op_200_elements[] = { 72, 256, 256, 256 },
+op_201_elements[] = { 73, 256, 256, 256 },
+op_202_elements[] = { 74, 256, 256, 256 },
+op_203_elements[] = { 75, 256, 256, 256 },
+op_204_elements[] = { 76, 256, 256, 256 },
+op_205_elements[] = { 77, 256, 256, 256 },
+op_206_elements[] = { 78, 256, 256, 256 },
+op_207_elements[] = { 79, 256, 256, 256 },
+op_208_elements[] = { 80, 256, 256, 256 },
+op_209_elements[] = { 81, 256, 256, 256 },
+op_210_elements[] = { 82, 256, 256, 256 },
+op_211_elements[] = { 83, 256, 256, 256 },
+op_212_elements[] = { 84, 256, 256, 256 },
+op_213_elements[] = { 85, 256, 256, 256 },
+op_214_elements[] = { 86, 256, 256, 256 },
+op_215_elements[] = { 87, 256, 256, 256 },
+op_216_elements[] = { 88, 256, 256, 256 },
+op_217_elements[] = { 89, 256, 256, 256 },
+op_218_elements[] = { 90, 256, 256, 256 },
+op_219_elements[] = { 91, 256, 256, 256 },
+op_220_elements[] = { 92, 256, 256, 256 },
+op_221_elements[] = { 93, 256, 256, 256 },
+op_222_elements[] = { 94, 256, 256, 256 },
+op_223_elements[] = { 95, 256, 256, 256 },
+op_224_elements[] = { 96, 256, 256, 256 },
+op_225_elements[] = { 97, 256, 256, 256 },
+op_226_elements[] = { 98, 256, 256, 256 },
+op_227_elements[] = { 99, 256, 256, 256 },
+op_228_elements[] = { 100, 256, 256, 256 },
+op_229_elements[] = { 101, 256, 256, 256 },
+op_230_elements[] = { 102, 256, 256, 256 },
+op_231_elements[] = { 103, 256, 256, 256 },
+op_232_elements[] = { 104, 256, 256, 256 },
+op_233_elements[] = { 105, 256, 256, 256 },
+op_234_elements[] = { 106, 256, 256, 256 },
+op_235_elements[] = { 107, 256, 256, 256 },
+op_236_elements[] = { 108, 256, 256, 256 },
+op_237_elements[] = { 109, 256, 256, 256 },
+op_238_elements[] = { 110, 256, 256, 256 },
+op_239_elements[] = { 111, 256, 256, 256 },
+op_240_elements[] = { 112, 256, 256, 256 },
+op_241_elements[] = { 113, 256, 256, 256 },
+op_242_elements[] = { 114, 256, 256, 256 },
+op_243_elements[] = { 115, 256, 256, 256 },
+op_244_elements[] = { 116, 256, 256, 256 },
+op_245_elements[] = { 117, 256, 256, 256 },
+op_246_elements[] = { 118, 256, 256, 256 },
+op_247_elements[] = { 119, 256, 256, 256 },
+op_248_elements[] = { 120, 256, 256, 256 },
+op_249_elements[] = { 121, 256, 256, 256 },
+op_250_elements[] = { 122, 256, 256, 256 },
+op_251_elements[] = { 123, 256, 256, 256 },
+op_252_elements[] = { 124, 256, 256, 256 },
+op_253_elements[] = { 125, 256, 256, 256 },
+op_254_elements[] = { 126, 256, 256, 256 },
+op_255_elements[] = { 127, 256, 256, 256 },
+op_0_elements[] = { 128, 256, 256, 256 },
+op_1_elements[] = { 129, 256, 256, 256 },
+op_2_elements[] = { 130, 256, 256, 256 },
+op_3_elements[] = { 131, 256, 256, 256 },
+op_4_elements[] = { 132, 256, 256, 256 },
+op_5_elements[] = { 133, 256, 256, 256 },
+op_6_elements[] = { 134, 256, 256, 256 },
+op_7_elements[] = { 135, 256, 256, 256 },
+op_8_elements[] = { 136, 256, 256, 256 },
+op_9_elements[] = { 137, 256, 256, 256 },
+op_10_elements[] = { 138, 256, 256, 256 },
+op_11_elements[] = { 139, 256, 256, 256 },
+op_12_elements[] = { 140, 256, 256, 256 },
+op_13_elements[] = { 141, 256, 256, 256 },
+op_14_elements[] = { 142, 256, 256, 256 },
+op_15_elements[] = { 143, 256, 256, 256 },
+op_16_elements[] = { 144, 256, 256, 256 },
+op_17_elements[] = { 145, 256, 256, 256 },
+op_18_elements[] = { 146, 256, 256, 256 },
+op_19_elements[] = { 147, 256, 256, 256 },
+op_20_elements[] = { 148, 256, 256, 256 },
+op_21_elements[] = { 149, 256, 256, 256 },
+op_22_elements[] = { 150, 256, 256, 256 },
+op_23_elements[] = { 151, 256, 256, 256 },
+op_24_elements[] = { 152, 256, 256, 256 },
+op_25_elements[] = { 153, 256, 256, 256 },
+op_26_elements[] = { 154, 256, 256, 256 },
+op_27_elements[] = { 155, 256, 256, 256 },
+op_28_elements[] = { 156, 256, 256, 256 },
+op_29_elements[] = { 157, 256, 256, 256 },
+op_30_elements[] = { 158, 256, 256, 256 },
+op_31_elements[] = { 159, 256, 256, 256 },
+op_32_elements[] = { 160, 256, 256, 256 },
+op_33_elements[] = { 161, 256, 256, 256 },
+op_34_elements[] = { 162, 256, 256, 256 },
+op_35_elements[] = { 163, 256, 256, 256 },
+op_36_elements[] = { 164, 256, 256, 256 },
+op_37_elements[] = { 165, 256, 256, 256 },
+op_38_elements[] = { 166, 256, 256, 256 },
+op_39_elements[] = { 167, 256, 256, 256 },
+op_40_elements[] = { 168, 256, 256, 256 },
+op_41_elements[] = { 169, 256, 256, 256 },
+op_42_elements[] = { 170, 256, 256, 256 },
+op_43_elements[] = { 171, 256, 256, 256 },
+op_44_elements[] = { 172, 256, 256, 256 },
+op_45_elements[] = { 173, 256, 256, 256 },
+op_46_elements[] = { 174, 256, 256, 256 },
+op_47_elements[] = { 175, 256, 256, 256 },
+op_48_elements[] = { 176, 256, 256, 256 },
+op_49_elements[] = { 177, 256, 256, 256 },
+op_50_elements[] = { 178, 256, 256, 256 },
+op_51_elements[] = { 179, 256, 256, 256 },
+op_52_elements[] = { 180, 256, 256, 256 },
+op_53_elements[] = { 181, 256, 256, 256 },
+op_54_elements[] = { 182, 256, 256, 256 },
+op_55_elements[] = { 183, 256, 256, 256 },
+op_56_elements[] = { 184, 256, 256, 256 },
+op_57_elements[] = { 185, 256, 256, 256 },
+op_58_elements[] = { 186, 256, 256, 256 },
+op_59_elements[] = { 187, 256, 256, 256 },
+op_60_elements[] = { 188, 256, 256, 256 },
+op_61_elements[] = { 189, 256, 256, 256 },
+op_62_elements[] = { 190, 256, 256, 256 },
+op_63_elements[] = { 191, 256, 256, 256 },
+op_64_elements[] = { 192, 256, 256, 256 },
+op_65_elements[] = { 193, 256, 256, 256 },
+op_66_elements[] = { 194, 256, 256, 256 },
+op_67_elements[] = { 195, 256, 256, 256 },
+op_68_elements[] = { 196, 256, 256, 256 },
+op_69_elements[] = { 197, 256, 256, 256 },
+op_70_elements[] = { 198, 256, 256, 256 },
+op_71_elements[] = { 199, 256, 256, 256 },
+op_72_elements[] = { 200, 256, 256, 256 },
+op_73_elements[] = { 201, 256, 256, 256 },
+op_74_elements[] = { 202, 256, 256, 256 },
+op_75_elements[] = { 203, 256, 256, 256 },
+op_76_elements[] = { 204, 256, 256, 256 },
+op_77_elements[] = { 205, 256, 256, 256 },
+op_78_elements[] = { 206, 256, 256, 256 },
+op_79_elements[] = { 207, 256, 256, 256 },
+op_80_elements[] = { 208, 256, 256, 256 },
+op_81_elements[] = { 209, 256, 256, 256 },
+op_82_elements[] = { 210, 256, 256, 256 },
+op_83_elements[] = { 211, 256, 256, 256 },
+op_84_elements[] = { 212, 256, 256, 256 },
+op_85_elements[] = { 213, 256, 256, 256 },
+op_86_elements[] = { 214, 256, 256, 256 },
+op_87_elements[] = { 215, 256, 256, 256 },
+op_88_elements[] = { 216, 256, 256, 256 },
+op_89_elements[] = { 217, 256, 256, 256 },
+op_90_elements[] = { 218, 256, 256, 256 },
+op_91_elements[] = { 219, 256, 256, 256 },
+op_92_elements[] = { 220, 256, 256, 256 },
+op_93_elements[] = { 221, 256, 256, 256 },
+op_94_elements[] = { 222, 256, 256, 256 },
+op_95_elements[] = { 223, 256, 256, 256 },
+op_96_elements[] = { 224, 256, 256, 256 },
+op_97_elements[] = { 225, 256, 256, 256 },
+op_98_elements[] = { 226, 256, 256, 256 },
+op_99_elements[] = { 227, 256, 256, 256 },
+op_100_elements[] = { 228, 256, 256, 256 },
+op_101_elements[] = { 229, 256, 256, 256 },
+op_102_elements[] = { 230, 256, 256, 256 },
+op_103_elements[] = { 231, 256, 256, 256 },
+op_104_elements[] = { 232, 256, 256, 256 },
+op_105_elements[] = { 233, 256, 256, 256 },
+op_106_elements[] = { 234, 256, 256, 256 },
+op_107_elements[] = { 235, 256, 256, 256 },
+op_108_elements[] = { 236, 256, 256, 256 },
+op_109_elements[] = { 237, 256, 256, 256 },
+op_110_elements[] = { 238, 256, 256, 256 },
+op_111_elements[] = { 239, 256, 256, 256 },
+op_112_elements[] = { 240, 256, 256, 256 },
+op_113_elements[] = { 241, 256, 256, 256 },
+op_114_elements[] = { 242, 256, 256, 256 },
+op_115_elements[] = { 243, 256, 256, 256 },
+op_116_elements[] = { 244, 256, 256, 256 },
+op_117_elements[] = { 245, 256, 256, 256 },
+op_118_elements[] = { 246, 256, 256, 256 },
+op_119_elements[] = { 247, 256, 256, 256 },
+op_120_elements[] = { 248, 256, 256, 256 },
+op_121_elements[] = { 249, 256, 256, 256 },
+op_122_elements[] = { 250, 256, 256, 256 },
+op_123_elements[] = { 251, 256, 256, 256 },
+op_124_elements[] = { 252, 256, 256, 256 },
+op_125_elements[] = { 253, 256, 256, 256 },
+op_126_elements[] = { 254, 256, 256, 256 },
+op_127_elements[] = { 255, 256, 256, 256 };
+static const OCTETSTRING_template op_128(4, op_128_elements),
+op_129(4, op_129_elements),
+op_130(4, op_130_elements),
+op_131(4, op_131_elements),
+op_132(4, op_132_elements),
+op_133(4, op_133_elements),
+op_134(4, op_134_elements),
+op_135(4, op_135_elements),
+op_136(4, op_136_elements),
+op_137(4, op_137_elements),
+op_138(4, op_138_elements),
+op_139(4, op_139_elements),
+op_140(4, op_140_elements),
+op_141(4, op_141_elements),
+op_142(4, op_142_elements),
+op_143(4, op_143_elements),
+op_144(4, op_144_elements),
+op_145(4, op_145_elements),
+op_146(4, op_146_elements),
+op_147(4, op_147_elements),
+op_148(4, op_148_elements),
+op_149(4, op_149_elements),
+op_150(4, op_150_elements),
+op_151(4, op_151_elements),
+op_152(4, op_152_elements),
+op_153(4, op_153_elements),
+op_154(4, op_154_elements),
+op_155(4, op_155_elements),
+op_156(4, op_156_elements),
+op_157(4, op_157_elements),
+op_158(4, op_158_elements),
+op_159(4, op_159_elements),
+op_160(4, op_160_elements),
+op_161(4, op_161_elements),
+op_162(4, op_162_elements),
+op_163(4, op_163_elements),
+op_164(4, op_164_elements),
+op_165(4, op_165_elements),
+op_166(4, op_166_elements),
+op_167(4, op_167_elements),
+op_168(4, op_168_elements),
+op_169(4, op_169_elements),
+op_170(4, op_170_elements),
+op_171(4, op_171_elements),
+op_172(4, op_172_elements),
+op_173(4, op_173_elements),
+op_174(4, op_174_elements),
+op_175(4, op_175_elements),
+op_176(4, op_176_elements),
+op_177(4, op_177_elements),
+op_178(4, op_178_elements),
+op_179(4, op_179_elements),
+op_180(4, op_180_elements),
+op_181(4, op_181_elements),
+op_182(4, op_182_elements),
+op_183(4, op_183_elements),
+op_184(4, op_184_elements),
+op_185(4, op_185_elements),
+op_186(4, op_186_elements),
+op_187(4, op_187_elements),
+op_188(4, op_188_elements),
+op_189(4, op_189_elements),
+op_190(4, op_190_elements),
+op_191(4, op_191_elements),
+op_192(4, op_192_elements),
+op_193(4, op_193_elements),
+op_194(4, op_194_elements),
+op_195(4, op_195_elements),
+op_196(4, op_196_elements),
+op_197(4, op_197_elements),
+op_198(4, op_198_elements),
+op_199(4, op_199_elements),
+op_200(4, op_200_elements),
+op_201(4, op_201_elements),
+op_202(4, op_202_elements),
+op_203(4, op_203_elements),
+op_204(4, op_204_elements),
+op_205(4, op_205_elements),
+op_206(4, op_206_elements),
+op_207(4, op_207_elements),
+op_208(4, op_208_elements),
+op_209(4, op_209_elements),
+op_210(4, op_210_elements),
+op_211(4, op_211_elements),
+op_212(4, op_212_elements),
+op_213(4, op_213_elements),
+op_214(4, op_214_elements),
+op_215(4, op_215_elements),
+op_216(4, op_216_elements),
+op_217(4, op_217_elements),
+op_218(4, op_218_elements),
+op_219(4, op_219_elements),
+op_220(4, op_220_elements),
+op_221(4, op_221_elements),
+op_222(4, op_222_elements),
+op_223(4, op_223_elements),
+op_224(4, op_224_elements),
+op_225(4, op_225_elements),
+op_226(4, op_226_elements),
+op_227(4, op_227_elements),
+op_228(4, op_228_elements),
+op_229(4, op_229_elements),
+op_230(4, op_230_elements),
+op_231(4, op_231_elements),
+op_232(4, op_232_elements),
+op_233(4, op_233_elements),
+op_234(4, op_234_elements),
+op_235(4, op_235_elements),
+op_236(4, op_236_elements),
+op_237(4, op_237_elements),
+op_238(4, op_238_elements),
+op_239(4, op_239_elements),
+op_240(4, op_240_elements),
+op_241(4, op_241_elements),
+op_242(4, op_242_elements),
+op_243(4, op_243_elements),
+op_244(4, op_244_elements),
+op_245(4, op_245_elements),
+op_246(4, op_246_elements),
+op_247(4, op_247_elements),
+op_248(4, op_248_elements),
+op_249(4, op_249_elements),
+op_250(4, op_250_elements),
+op_251(4, op_251_elements),
+op_252(4, op_252_elements),
+op_253(4, op_253_elements),
+op_254(4, op_254_elements),
+op_255(4, op_255_elements),
+op_0(4, op_0_elements),
+op_1(4, op_1_elements),
+op_2(4, op_2_elements),
+op_3(4, op_3_elements),
+op_4(4, op_4_elements),
+op_5(4, op_5_elements),
+op_6(4, op_6_elements),
+op_7(4, op_7_elements),
+op_8(4, op_8_elements),
+op_9(4, op_9_elements),
+op_10(4, op_10_elements),
+op_11(4, op_11_elements),
+op_12(4, op_12_elements),
+op_13(4, op_13_elements),
+op_14(4, op_14_elements),
+op_15(4, op_15_elements),
+op_16(4, op_16_elements),
+op_17(4, op_17_elements),
+op_18(4, op_18_elements),
+op_19(4, op_19_elements),
+op_20(4, op_20_elements),
+op_21(4, op_21_elements),
+op_22(4, op_22_elements),
+op_23(4, op_23_elements),
+op_24(4, op_24_elements),
+op_25(4, op_25_elements),
+op_26(4, op_26_elements),
+op_27(4, op_27_elements),
+op_28(4, op_28_elements),
+op_29(4, op_29_elements),
+op_30(4, op_30_elements),
+op_31(4, op_31_elements),
+op_32(4, op_32_elements),
+op_33(4, op_33_elements),
+op_34(4, op_34_elements),
+op_35(4, op_35_elements),
+op_36(4, op_36_elements),
+op_37(4, op_37_elements),
+op_38(4, op_38_elements),
+op_39(4, op_39_elements),
+op_40(4, op_40_elements),
+op_41(4, op_41_elements),
+op_42(4, op_42_elements),
+op_43(4, op_43_elements),
+op_44(4, op_44_elements),
+op_45(4, op_45_elements),
+op_46(4, op_46_elements),
+op_47(4, op_47_elements),
+op_48(4, op_48_elements),
+op_49(4, op_49_elements),
+op_50(4, op_50_elements),
+op_51(4, op_51_elements),
+op_52(4, op_52_elements),
+op_53(4, op_53_elements),
+op_54(4, op_54_elements),
+op_55(4, op_55_elements),
+op_56(4, op_56_elements),
+op_57(4, op_57_elements),
+op_58(4, op_58_elements),
+op_59(4, op_59_elements),
+op_60(4, op_60_elements),
+op_61(4, op_61_elements),
+op_62(4, op_62_elements),
+op_63(4, op_63_elements),
+op_64(4, op_64_elements),
+op_65(4, op_65_elements),
+op_66(4, op_66_elements),
+op_67(4, op_67_elements),
+op_68(4, op_68_elements),
+op_69(4, op_69_elements),
+op_70(4, op_70_elements),
+op_71(4, op_71_elements),
+op_72(4, op_72_elements),
+op_73(4, op_73_elements),
+op_74(4, op_74_elements),
+op_75(4, op_75_elements),
+op_76(4, op_76_elements),
+op_77(4, op_77_elements),
+op_78(4, op_78_elements),
+op_79(4, op_79_elements),
+op_80(4, op_80_elements),
+op_81(4, op_81_elements),
+op_82(4, op_82_elements),
+op_83(4, op_83_elements),
+op_84(4, op_84_elements),
+op_85(4, op_85_elements),
+op_86(4, op_86_elements),
+op_87(4, op_87_elements),
+op_88(4, op_88_elements),
+op_89(4, op_89_elements),
+op_90(4, op_90_elements),
+op_91(4, op_91_elements),
+op_92(4, op_92_elements),
+op_93(4, op_93_elements),
+op_94(4, op_94_elements),
+op_95(4, op_95_elements),
+op_96(4, op_96_elements),
+op_97(4, op_97_elements),
+op_98(4, op_98_elements),
+op_99(4, op_99_elements),
+op_100(4, op_100_elements),
+op_101(4, op_101_elements),
+op_102(4, op_102_elements),
+op_103(4, op_103_elements),
+op_104(4, op_104_elements),
+op_105(4, op_105_elements),
+op_106(4, op_106_elements),
+op_107(4, op_107_elements),
+op_108(4, op_108_elements),
+op_109(4, op_109_elements),
+op_110(4, op_110_elements),
+op_111(4, op_111_elements),
+op_112(4, op_112_elements),
+op_113(4, op_113_elements),
+op_114(4, op_114_elements),
+op_115(4, op_115_elements),
+op_116(4, op_116_elements),
+op_117(4, op_117_elements),
+op_118(4, op_118_elements),
+op_119(4, op_119_elements),
+op_120(4, op_120_elements),
+op_121(4, op_121_elements),
+op_122(4, op_122_elements),
+op_123(4, op_123_elements),
+op_124(4, op_124_elements),
+op_125(4, op_125_elements),
+op_126(4, op_126_elements),
+op_127(4, op_127_elements);
+static const unsigned char module_checksum[] = { 0x53, 0x65, 0xa1, 0xba, 0x1c, 0x6d, 0x2a, 0xa6, 0xcc, 0xb6, 0x37, 0x4b, 0xb9, 0x1b, 0xae, 0xe1 };
+
+/* Global variable definitions */
+
+static OCTETSTRING const_CAN__EFF__FLAG;
+const OCTETSTRING& CAN__EFF__FLAG = const_CAN__EFF__FLAG;
+static OCTETSTRING const_CAN__RTR__FLAG;
+const OCTETSTRING& CAN__RTR__FLAG = const_CAN__RTR__FLAG;
+static OCTETSTRING const_CAN__ERR__FLAG;
+const OCTETSTRING& CAN__ERR__FLAG = const_CAN__ERR__FLAG;
+static OCTETSTRING const_CAN__SFF__MASK;
+const OCTETSTRING& CAN__SFF__MASK = const_CAN__SFF__MASK;
+static OCTETSTRING const_CAN__EFF__MASK;
+const OCTETSTRING& CAN__EFF__MASK = const_CAN__EFF__MASK;
+static OCTETSTRING const_CAN__ERR__MASK;
+const OCTETSTRING& CAN__ERR__MASK = const_CAN__ERR__MASK;
+static OCTETSTRING_template template_t__CAN__EFF__FLAG;
+const OCTETSTRING_template& t__CAN__EFF__FLAG = template_t__CAN__EFF__FLAG;
+static OCTETSTRING_template template_t__CAN__SFF__FLAG;
+const OCTETSTRING_template& t__CAN__SFF__FLAG = template_t__CAN__SFF__FLAG;
+static OCTETSTRING_template template_t__CAN__RTR__FLAG;
+const OCTETSTRING_template& t__CAN__RTR__FLAG = template_t__CAN__RTR__FLAG;
+static OCTETSTRING_template template_t__CAN__ERR__FLAG;
+const OCTETSTRING_template& t__CAN__ERR__FLAG = template_t__CAN__ERR__FLAG;
+// No XER for AdresseFamily__enum
+const TTCN_Typedescriptor_t AdresseFamily__enum_descr_ = { "@Can.AdresseFamily_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+static INTEGER const_AF__CAN;
+const INTEGER& AF__CAN = const_AF__CAN;
+// No XER for ProtocolFamily__enum
+const TTCN_Typedescriptor_t ProtocolFamily__enum_descr_ = { "@Can.ProtocolFamily_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for PF__CAN__protocols__enum
+const TTCN_Typedescriptor_t PF__CAN__protocols__enum_descr_ = { "@Can.PF_CAN_protocols_enum", NULL, NULL, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+static INTEGER const_CAN__MAX__DLEN;
+const INTEGER& CAN__MAX__DLEN = const_CAN__MAX__DLEN;
+static INTEGER const_CANFD__MAX__DLEN;
+const INTEGER& CANFD__MAX__DLEN = const_CANFD__MAX__DLEN;
+const TTCN_RAWdescriptor_t CAN__id_raw_ = {32,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__id_xer_ = { {"CAN_id>\n", "CAN_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__id_oer_ext_arr_[0] = {};
+const int CAN__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, CAN__id_oer_ext_arr_, 0, CAN__id_oer_p_};
+const TTCN_Typedescriptor_t CAN__id_descr_ = { "@Can.CAN_id", &OCTETSTRING_ber_, &CAN__id_raw_, &OCTETSTRING_text_, &CAN__id_xer_, &OCTETSTRING_json_, &CAN__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__flags_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CAN__flags_xer_ = { {"CAN_flags>\n", "CAN_flags>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CAN__flags_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CAN__flags_descr_ = { "@Can.CAN_flags", &BITSTRING_ber_, &CAN__flags_raw_, NULL, &CAN__flags_xer_, &BITSTRING_json_, &CAN__flags_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CAN__PDU_xer_ = { {"CAN_PDU>\n", "CAN_PDU>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__PDU_oer_ext_arr_[0] = {};
+const int CAN__PDU_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__PDU_oer_ = { -1, TRUE, -1, FALSE, 0, 0, CAN__PDU_oer_ext_arr_, 0, CAN__PDU_oer_p_};
+const TTCN_Typedescriptor_t CAN__PDU_descr_ = { "@Can.CAN_PDU", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &CAN__PDU_xer_, &OCTETSTRING_json_, &CAN__PDU_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CAN__frame_can__id_xer_ = { {"can_id>\n", "can_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__frame_can__id_oer_ext_arr_[0] = {};
+const int CAN__frame_can__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__frame_can__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, CAN__frame_can__id_oer_ext_arr_, 0, CAN__frame_can__id_oer_p_};
+const TTCN_Typedescriptor_t CAN__frame_can__id_descr_ = { "@Can.CAN_frame.can_id", &OCTETSTRING_ber_, &CAN__id_raw_, &OCTETSTRING_text_, &CAN__frame_can__id_xer_, &OCTETSTRING_json_, &CAN__frame_can__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CAN__frame_can__pdu_xer_ = { {"can_pdu>\n", "can_pdu>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CAN__frame_can__pdu_oer_ext_arr_[0] = {};
+const int CAN__frame_can__pdu_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CAN__frame_can__pdu_oer_ = { -1, TRUE, -1, FALSE, 0, 0, CAN__frame_can__pdu_oer_ext_arr_, 0, CAN__frame_can__pdu_oer_p_};
+const TTCN_Typedescriptor_t CAN__frame_can__pdu_descr_ = { "@Can.CAN_frame.can_pdu", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &CAN__frame_can__pdu_xer_, &OCTETSTRING_json_, &CAN__frame_can__pdu_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for CAN__frame
+const TTCN_Typedescriptor_t CAN__frame_descr_ = { "@Can.CAN_frame", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__frame_can__id_xer_ = { {"can_id>\n", "can_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__frame_can__id_oer_ext_arr_[0] = {};
+const int CANFD__frame_can__id_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__frame_can__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, CANFD__frame_can__id_oer_ext_arr_, 0, CANFD__frame_can__id_oer_p_};
+const TTCN_Typedescriptor_t CANFD__frame_can__id_descr_ = { "@Can.CANFD_frame.can_id", &OCTETSTRING_ber_, &CAN__id_raw_, &OCTETSTRING_text_, &CANFD__frame_can__id_xer_, &OCTETSTRING_json_, &CANFD__frame_can__id_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__frame_can__flags_xer_ = { {"can_flags>\n", "can_flags>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t CANFD__frame_can__flags_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t CANFD__frame_can__flags_descr_ = { "@Can.CANFD_frame.can_flags", &BITSTRING_ber_, &CAN__flags_raw_, NULL, &CANFD__frame_can__flags_xer_, &BITSTRING_json_, &CANFD__frame_can__flags_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CANFD__frame_can__pdu_xer_ = { {"can_pdu>\n", "can_pdu>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int CANFD__frame_can__pdu_oer_ext_arr_[0] = {};
+const int CANFD__frame_can__pdu_oer_p_[0] = {};
+const TTCN_OERdescriptor_t CANFD__frame_can__pdu_oer_ = { -1, TRUE, -1, FALSE, 0, 0, CANFD__frame_can__pdu_oer_ext_arr_, 0, CANFD__frame_can__pdu_oer_p_};
+const TTCN_Typedescriptor_t CANFD__frame_can__pdu_descr_ = { "@Can.CANFD_frame.can_pdu", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &CANFD__frame_can__pdu_xer_, &OCTETSTRING_json_, &CANFD__frame_can__pdu_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for CANFD__frame
+const TTCN_Typedescriptor_t CANFD__frame_descr_ = { "@Can.CANFD_frame", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("Can", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+AdresseFamily__enum::AdresseFamily__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+AdresseFamily__enum::AdresseFamily__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Can.AdresseFamily_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+AdresseFamily__enum::AdresseFamily__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+AdresseFamily__enum::AdresseFamily__enum(const AdresseFamily__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Can.AdresseFamily_enum.");
+enum_value = other_value.enum_value;
+}
+
+AdresseFamily__enum& AdresseFamily__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Can.AdresseFamily_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+AdresseFamily__enum& AdresseFamily__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+AdresseFamily__enum& AdresseFamily__enum::operator=(const AdresseFamily__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.AdresseFamily_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean AdresseFamily__enum::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 @Can.AdresseFamily_enum.");
+return enum_value == other_value;
+}
+
+boolean AdresseFamily__enum::operator==(const AdresseFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean AdresseFamily__enum::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 @Can.AdresseFamily_enum.");
+return enum_value < other_value;
+}
+
+boolean AdresseFamily__enum::operator<(const AdresseFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean AdresseFamily__enum::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 @Can.AdresseFamily_enum.");
+return enum_value > other_value;
+}
+
+boolean AdresseFamily__enum::operator>(const AdresseFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.AdresseFamily_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *AdresseFamily__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case PF__CAN: return "PF_CAN";
+default: return "<unknown>";
+}
+}
+
+AdresseFamily__enum::enum_type AdresseFamily__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "PF_CAN")) return PF__CAN;
+else return UNKNOWN_VALUE;
+}
+
+boolean AdresseFamily__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 29:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int AdresseFamily__enum::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 @Can.AdresseFamily_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int AdresseFamily__enum::enum2int(const AdresseFamily__enum& 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 @Can.AdresseFamily_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void AdresseFamily__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Can.AdresseFamily_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+AdresseFamily__enum::operator AdresseFamily__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Can.AdresseFamily_enum.");
+return enum_value;
+}
+
+void AdresseFamily__enum::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 AdresseFamily__enum::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", "@Can.AdresseFamily_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Can.AdresseFamily_enum.");
+ }
+}
+
+void AdresseFamily__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Can.AdresseFamily_enum.");
+text_buf.push_int(enum_value);
+}
+
+void AdresseFamily__enum::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 @Can.AdresseFamily_enum.", enum_value);
+}
+
+void AdresseFamily__enum_template::copy_template(const AdresseFamily__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new AdresseFamily__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Can.AdresseFamily_enum.");
+}
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template()
+{
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!AdresseFamily__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Can.AdresseFamily_enum with unknown numeric value %d.", other_value);
+single_value = (AdresseFamily__enum::enum_type)other_value;
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(AdresseFamily__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(const AdresseFamily__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == AdresseFamily__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Can.AdresseFamily_enum.");
+single_value = other_value.enum_value;
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(const OPTIONAL<AdresseFamily__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (AdresseFamily__enum::enum_type)(const AdresseFamily__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Can.AdresseFamily_enum from an unbound optional field.");
+}
+}
+
+AdresseFamily__enum_template::AdresseFamily__enum_template(const AdresseFamily__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+AdresseFamily__enum_template::~AdresseFamily__enum_template()
+{
+clean_up();
+}
+
+boolean AdresseFamily__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean AdresseFamily__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != AdresseFamily__enum::UNBOUND_VALUE;
+}
+
+void AdresseFamily__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(int other_value)
+{
+if (!AdresseFamily__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Can.AdresseFamily_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (AdresseFamily__enum::enum_type)other_value;
+return *this;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(AdresseFamily__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(const AdresseFamily__enum& other_value)
+{
+if (other_value.enum_value == AdresseFamily__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.AdresseFamily_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(const OPTIONAL<AdresseFamily__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (AdresseFamily__enum::enum_type)(const AdresseFamily__enum&)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 @Can.AdresseFamily_enum.");
+}
+return *this;
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::operator=(const AdresseFamily__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean AdresseFamily__enum_template::match(AdresseFamily__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Can.AdresseFamily_enum.");
+}
+return FALSE;
+}
+
+boolean AdresseFamily__enum_template::match(const AdresseFamily__enum& other_value, boolean) const
+{
+if (other_value.enum_value == AdresseFamily__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Can.AdresseFamily_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+AdresseFamily__enum::enum_type AdresseFamily__enum_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 @Can.AdresseFamily_enum.");
+return single_value;
+}
+
+void AdresseFamily__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Can.AdresseFamily_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new AdresseFamily__enum_template[list_length];
+}
+
+AdresseFamily__enum_template& AdresseFamily__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Can.AdresseFamily_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Can.AdresseFamily_enum.");
+return value_list.list_value[list_index];
+}
+
+void AdresseFamily__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(AdresseFamily__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void AdresseFamily__enum_template::log_match(const AdresseFamily__enum& 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 AdresseFamily__enum_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 @Can.AdresseFamily_enum.");
+}
+}
+
+void AdresseFamily__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (AdresseFamily__enum::enum_type)text_buf.pull_int().get_val();
+if (!AdresseFamily__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Can.AdresseFamily_enum.", 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 AdresseFamily__enum_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 @Can.AdresseFamily_enum.");
+}
+}
+
+boolean AdresseFamily__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean AdresseFamily__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void AdresseFamily__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ AdresseFamily__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ AdresseFamily__enum::enum_type enum_val = AdresseFamily__enum::str_to_enum(m_p->get_enumerated());
+ if (!AdresseFamily__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Can.AdresseFamily_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Can.AdresseFamily_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void AdresseFamily__enum_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 : "@Can.AdresseFamily_enum");
+}
+
+ProtocolFamily__enum::ProtocolFamily__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+ProtocolFamily__enum::ProtocolFamily__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Can.ProtocolFamily_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+ProtocolFamily__enum::ProtocolFamily__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+ProtocolFamily__enum::ProtocolFamily__enum(const ProtocolFamily__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+enum_value = other_value.enum_value;
+}
+
+ProtocolFamily__enum& ProtocolFamily__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Can.ProtocolFamily_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+ProtocolFamily__enum& ProtocolFamily__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+ProtocolFamily__enum& ProtocolFamily__enum::operator=(const ProtocolFamily__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean ProtocolFamily__enum::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 @Can.ProtocolFamily_enum.");
+return enum_value == other_value;
+}
+
+boolean ProtocolFamily__enum::operator==(const ProtocolFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean ProtocolFamily__enum::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 @Can.ProtocolFamily_enum.");
+return enum_value < other_value;
+}
+
+boolean ProtocolFamily__enum::operator<(const ProtocolFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean ProtocolFamily__enum::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 @Can.ProtocolFamily_enum.");
+return enum_value > other_value;
+}
+
+boolean ProtocolFamily__enum::operator>(const ProtocolFamily__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *ProtocolFamily__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case SOCK__DGRAM: return "SOCK_DGRAM";
+case SOCK__RAW: return "SOCK_RAW";
+default: return "<unknown>";
+}
+}
+
+ProtocolFamily__enum::enum_type ProtocolFamily__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "SOCK_DGRAM")) return SOCK__DGRAM;
+else if (!strcmp(str_par, "SOCK_RAW")) return SOCK__RAW;
+else return UNKNOWN_VALUE;
+}
+
+boolean ProtocolFamily__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 2:
+case 3:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int ProtocolFamily__enum::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 @Can.ProtocolFamily_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int ProtocolFamily__enum::enum2int(const ProtocolFamily__enum& 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 @Can.ProtocolFamily_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void ProtocolFamily__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Can.ProtocolFamily_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+ProtocolFamily__enum::operator ProtocolFamily__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Can.ProtocolFamily_enum.");
+return enum_value;
+}
+
+void ProtocolFamily__enum::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 ProtocolFamily__enum::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", "@Can.ProtocolFamily_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Can.ProtocolFamily_enum.");
+ }
+}
+
+void ProtocolFamily__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+text_buf.push_int(enum_value);
+}
+
+void ProtocolFamily__enum::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 @Can.ProtocolFamily_enum.", enum_value);
+}
+
+void ProtocolFamily__enum_template::copy_template(const ProtocolFamily__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ProtocolFamily__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Can.ProtocolFamily_enum.");
+}
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template()
+{
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!ProtocolFamily__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Can.ProtocolFamily_enum with unknown numeric value %d.", other_value);
+single_value = (ProtocolFamily__enum::enum_type)other_value;
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(ProtocolFamily__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(const ProtocolFamily__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == ProtocolFamily__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Can.ProtocolFamily_enum.");
+single_value = other_value.enum_value;
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(const OPTIONAL<ProtocolFamily__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (ProtocolFamily__enum::enum_type)(const ProtocolFamily__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Can.ProtocolFamily_enum from an unbound optional field.");
+}
+}
+
+ProtocolFamily__enum_template::ProtocolFamily__enum_template(const ProtocolFamily__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+ProtocolFamily__enum_template::~ProtocolFamily__enum_template()
+{
+clean_up();
+}
+
+boolean ProtocolFamily__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean ProtocolFamily__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != ProtocolFamily__enum::UNBOUND_VALUE;
+}
+
+void ProtocolFamily__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(int other_value)
+{
+if (!ProtocolFamily__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Can.ProtocolFamily_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (ProtocolFamily__enum::enum_type)other_value;
+return *this;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(ProtocolFamily__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(const ProtocolFamily__enum& other_value)
+{
+if (other_value.enum_value == ProtocolFamily__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.ProtocolFamily_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(const OPTIONAL<ProtocolFamily__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (ProtocolFamily__enum::enum_type)(const ProtocolFamily__enum&)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 @Can.ProtocolFamily_enum.");
+}
+return *this;
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::operator=(const ProtocolFamily__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean ProtocolFamily__enum_template::match(ProtocolFamily__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Can.ProtocolFamily_enum.");
+}
+return FALSE;
+}
+
+boolean ProtocolFamily__enum_template::match(const ProtocolFamily__enum& other_value, boolean) const
+{
+if (other_value.enum_value == ProtocolFamily__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Can.ProtocolFamily_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+ProtocolFamily__enum::enum_type ProtocolFamily__enum_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 @Can.ProtocolFamily_enum.");
+return single_value;
+}
+
+void ProtocolFamily__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Can.ProtocolFamily_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new ProtocolFamily__enum_template[list_length];
+}
+
+ProtocolFamily__enum_template& ProtocolFamily__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Can.ProtocolFamily_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Can.ProtocolFamily_enum.");
+return value_list.list_value[list_index];
+}
+
+void ProtocolFamily__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(ProtocolFamily__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void ProtocolFamily__enum_template::log_match(const ProtocolFamily__enum& 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 ProtocolFamily__enum_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 @Can.ProtocolFamily_enum.");
+}
+}
+
+void ProtocolFamily__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (ProtocolFamily__enum::enum_type)text_buf.pull_int().get_val();
+if (!ProtocolFamily__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Can.ProtocolFamily_enum.", 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 ProtocolFamily__enum_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 @Can.ProtocolFamily_enum.");
+}
+}
+
+boolean ProtocolFamily__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ProtocolFamily__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void ProtocolFamily__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ ProtocolFamily__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ ProtocolFamily__enum::enum_type enum_val = ProtocolFamily__enum::str_to_enum(m_p->get_enumerated());
+ if (!ProtocolFamily__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Can.ProtocolFamily_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Can.ProtocolFamily_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void ProtocolFamily__enum_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 : "@Can.ProtocolFamily_enum");
+}
+
+PF__CAN__protocols__enum::PF__CAN__protocols__enum()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+PF__CAN__protocols__enum::PF__CAN__protocols__enum(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Can.PF_CAN_protocols_enum with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+PF__CAN__protocols__enum::PF__CAN__protocols__enum(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+PF__CAN__protocols__enum::PF__CAN__protocols__enum(const PF__CAN__protocols__enum& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+enum_value = other_value.enum_value;
+}
+
+PF__CAN__protocols__enum& PF__CAN__protocols__enum::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Can.PF_CAN_protocols_enum.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+PF__CAN__protocols__enum& PF__CAN__protocols__enum::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+PF__CAN__protocols__enum& PF__CAN__protocols__enum::operator=(const PF__CAN__protocols__enum& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean PF__CAN__protocols__enum::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 @Can.PF_CAN_protocols_enum.");
+return enum_value == other_value;
+}
+
+boolean PF__CAN__protocols__enum::operator==(const PF__CAN__protocols__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+return enum_value == other_value.enum_value;
+}
+
+boolean PF__CAN__protocols__enum::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 @Can.PF_CAN_protocols_enum.");
+return enum_value < other_value;
+}
+
+boolean PF__CAN__protocols__enum::operator<(const PF__CAN__protocols__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+return enum_value < other_value.enum_value;
+}
+
+boolean PF__CAN__protocols__enum::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 @Can.PF_CAN_protocols_enum.");
+return enum_value > other_value;
+}
+
+boolean PF__CAN__protocols__enum::operator>(const PF__CAN__protocols__enum& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+return enum_value > other_value.enum_value;
+}
+
+const char *PF__CAN__protocols__enum::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case CAN__RAW: return "CAN_RAW";
+case CAN__BCM: return "CAN_BCM";
+case CAN__TP16: return "CAN_TP16";
+case CAN__TP20: return "CAN_TP20";
+case CAN__MCNET: return "CAN_MCNET";
+case CAN__ISOTP: return "CAN_ISOTP";
+case CAN__NPROTO: return "CAN_NPROTO";
+default: return "<unknown>";
+}
+}
+
+PF__CAN__protocols__enum::enum_type PF__CAN__protocols__enum::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "CAN_RAW")) return CAN__RAW;
+else if (!strcmp(str_par, "CAN_BCM")) return CAN__BCM;
+else if (!strcmp(str_par, "CAN_TP16")) return CAN__TP16;
+else if (!strcmp(str_par, "CAN_TP20")) return CAN__TP20;
+else if (!strcmp(str_par, "CAN_MCNET")) return CAN__MCNET;
+else if (!strcmp(str_par, "CAN_ISOTP")) return CAN__ISOTP;
+else if (!strcmp(str_par, "CAN_NPROTO")) return CAN__NPROTO;
+else return UNKNOWN_VALUE;
+}
+
+boolean PF__CAN__protocols__enum::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 1:
+case 2:
+case 3:
+case 4:
+case 5:
+case 6:
+case 7:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int PF__CAN__protocols__enum::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 @Can.PF_CAN_protocols_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int PF__CAN__protocols__enum::enum2int(const PF__CAN__protocols__enum& 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 @Can.PF_CAN_protocols_enum.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void PF__CAN__protocols__enum::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Can.PF_CAN_protocols_enum.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+PF__CAN__protocols__enum::operator PF__CAN__protocols__enum::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Can.PF_CAN_protocols_enum.");
+return enum_value;
+}
+
+void PF__CAN__protocols__enum::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 PF__CAN__protocols__enum::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", "@Can.PF_CAN_protocols_enum");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @Can.PF_CAN_protocols_enum.");
+ }
+}
+
+void PF__CAN__protocols__enum::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+text_buf.push_int(enum_value);
+}
+
+void PF__CAN__protocols__enum::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 @Can.PF_CAN_protocols_enum.", enum_value);
+}
+
+void PF__CAN__protocols__enum_template::copy_template(const PF__CAN__protocols__enum_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new PF__CAN__protocols__enum_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @Can.PF_CAN_protocols_enum.");
+}
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template()
+{
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!PF__CAN__protocols__enum::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Can.PF_CAN_protocols_enum with unknown numeric value %d.", other_value);
+single_value = (PF__CAN__protocols__enum::enum_type)other_value;
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(PF__CAN__protocols__enum::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(const PF__CAN__protocols__enum& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == PF__CAN__protocols__enum::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Can.PF_CAN_protocols_enum.");
+single_value = other_value.enum_value;
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(const OPTIONAL<PF__CAN__protocols__enum>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (PF__CAN__protocols__enum::enum_type)(const PF__CAN__protocols__enum&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @Can.PF_CAN_protocols_enum from an unbound optional field.");
+}
+}
+
+PF__CAN__protocols__enum_template::PF__CAN__protocols__enum_template(const PF__CAN__protocols__enum_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+PF__CAN__protocols__enum_template::~PF__CAN__protocols__enum_template()
+{
+clean_up();
+}
+
+boolean PF__CAN__protocols__enum_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean PF__CAN__protocols__enum_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != PF__CAN__protocols__enum::UNBOUND_VALUE;
+}
+
+void PF__CAN__protocols__enum_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(int other_value)
+{
+if (!PF__CAN__protocols__enum::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Can.PF_CAN_protocols_enum.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (PF__CAN__protocols__enum::enum_type)other_value;
+return *this;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(PF__CAN__protocols__enum::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(const PF__CAN__protocols__enum& other_value)
+{
+if (other_value.enum_value == PF__CAN__protocols__enum::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Can.PF_CAN_protocols_enum to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(const OPTIONAL<PF__CAN__protocols__enum>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (PF__CAN__protocols__enum::enum_type)(const PF__CAN__protocols__enum&)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 @Can.PF_CAN_protocols_enum.");
+}
+return *this;
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::operator=(const PF__CAN__protocols__enum_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean PF__CAN__protocols__enum_template::match(PF__CAN__protocols__enum::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @Can.PF_CAN_protocols_enum.");
+}
+return FALSE;
+}
+
+boolean PF__CAN__protocols__enum_template::match(const PF__CAN__protocols__enum& other_value, boolean) const
+{
+if (other_value.enum_value == PF__CAN__protocols__enum::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Can.PF_CAN_protocols_enum with an unbound value.");
+return match(other_value.enum_value);
+}
+
+PF__CAN__protocols__enum::enum_type PF__CAN__protocols__enum_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 @Can.PF_CAN_protocols_enum.");
+return single_value;
+}
+
+void PF__CAN__protocols__enum_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @Can.PF_CAN_protocols_enum.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new PF__CAN__protocols__enum_template[list_length];
+}
+
+PF__CAN__protocols__enum_template& PF__CAN__protocols__enum_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @Can.PF_CAN_protocols_enum.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Can.PF_CAN_protocols_enum.");
+return value_list.list_value[list_index];
+}
+
+void PF__CAN__protocols__enum_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(PF__CAN__protocols__enum::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void PF__CAN__protocols__enum_template::log_match(const PF__CAN__protocols__enum& 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 PF__CAN__protocols__enum_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 @Can.PF_CAN_protocols_enum.");
+}
+}
+
+void PF__CAN__protocols__enum_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (PF__CAN__protocols__enum::enum_type)text_buf.pull_int().get_val();
+if (!PF__CAN__protocols__enum::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Can.PF_CAN_protocols_enum.", 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 PF__CAN__protocols__enum_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 @Can.PF_CAN_protocols_enum.");
+}
+}
+
+boolean PF__CAN__protocols__enum_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean PF__CAN__protocols__enum_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void PF__CAN__protocols__enum_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ PF__CAN__protocols__enum_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ PF__CAN__protocols__enum::enum_type enum_val = PF__CAN__protocols__enum::str_to_enum(m_p->get_enumerated());
+ if (!PF__CAN__protocols__enum::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @Can.PF_CAN_protocols_enum.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@Can.PF_CAN_protocols_enum");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void PF__CAN__protocols__enum_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 : "@Can.PF_CAN_protocols_enum");
+}
+
+CAN__frame::CAN__frame()
+{
+}
+
+CAN__frame::CAN__frame(const OCTETSTRING& par_can__id,
+ const OCTETSTRING& par_can__pdu)
+ : field_can__id(par_can__id),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CAN__frame::CAN__frame(const CAN__frame& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Can.CAN_frame.");
+if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+else field_can__id.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CAN__frame::clean_up()
+{
+field_can__id.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__frame::get_descriptor() const { return &CAN__frame_descr_; }
+CAN__frame& CAN__frame::operator=(const CAN__frame& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Can.CAN_frame.");
+ if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+ else field_can__id.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CAN__frame::operator==(const CAN__frame& other_value) const
+{
+return field_can__id==other_value.field_can__id
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CAN__frame::is_bound() const
+{
+return (field_can__id.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CAN__frame::is_value() const
+{
+return field_can__id.is_value()
+ && field_can__pdu.is_value();
+}
+void CAN__frame::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_id := ");
+field_can__id.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__frame::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 (2<param.get_size()) {
+ param.error("record value of type @Can.CAN_frame has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Can.CAN_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Can.CAN_frame");
+ }
+}
+
+void CAN__frame::set_implicit_omit()
+{
+if (can__id().is_bound()) can__id().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CAN__frame::encode_text(Text_Buf& text_buf) const
+{
+field_can__id.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CAN__frame::decode_text(Text_Buf& text_buf)
+{
+field_can__id.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+struct CAN__frame_template::single_value_struct {
+OCTETSTRING_template field_can__id;
+OCTETSTRING_template field_can__pdu;
+};
+
+void CAN__frame_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_can__id = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CAN__frame_template::copy_value(const CAN__frame& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__id().is_bound()) {
+ single_value->field_can__id = other_value.can__id();
+} else {
+ single_value->field_can__id.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__frame_template::copy_template(const CAN__frame_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__id().get_selection()) {
+single_value->field_can__id = other_value.can__id();
+} else {
+single_value->field_can__id.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__frame_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Can.CAN_frame.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__frame_template::CAN__frame_template()
+{
+}
+
+CAN__frame_template::CAN__frame_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__frame_template::CAN__frame_template(const CAN__frame& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__frame_template::CAN__frame_template(const OPTIONAL<CAN__frame>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Can.CAN_frame from an unbound optional field.");
+}
+}
+
+CAN__frame_template::CAN__frame_template(const CAN__frame_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__frame_template::~CAN__frame_template()
+{
+clean_up();
+}
+
+CAN__frame_template& CAN__frame_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__frame_template& CAN__frame_template::operator=(const CAN__frame& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__frame_template& CAN__frame_template::operator=(const OPTIONAL<CAN__frame>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame&)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 @Can.CAN_frame.");
+}
+return *this;
+}
+
+CAN__frame_template& CAN__frame_template::operator=(const CAN__frame_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__frame_template::match(const CAN__frame& 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.can__id().is_bound()) return FALSE;
+if(!single_value->field_can__id.match(other_value.can__id(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Can.CAN_frame.");
+}
+return FALSE;
+}
+
+boolean CAN__frame_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__id.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CAN__frame_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__id.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CAN__frame_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__frame CAN__frame_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 @Can.CAN_frame.");
+CAN__frame ret_val;
+if (single_value->field_can__id.is_bound()) {
+ret_val.can__id() = single_value->field_can__id.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CAN__frame_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Can.CAN_frame.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__frame_template[list_length];
+}
+
+CAN__frame_template& CAN__frame_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Can.CAN_frame.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Can.CAN_frame.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CAN__frame_template::can__id()
+{
+set_specific();
+return single_value->field_can__id;
+}
+
+const OCTETSTRING_template& CAN__frame_template::can__id() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_id of a non-specific template of type @Can.CAN_frame.");
+return single_value->field_can__id;
+}
+
+OCTETSTRING_template& CAN__frame_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const OCTETSTRING_template& CAN__frame_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @Can.CAN_frame.");
+return single_value->field_can__pdu;
+}
+
+int CAN__frame_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Can.CAN_frame which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Can.CAN_frame 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 @Can.CAN_frame containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CAN_frame containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CAN_frame containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CAN_frame containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Can.CAN_frame.");
+ }
+ return 0;
+}
+
+void CAN__frame_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_id := ");
+single_value->field_can__id.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__frame_template::log_match(const CAN__frame& 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_can__id.match(match_value.can__id(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_id");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_id := ");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CAN__frame_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__id.encode_text(text_buf);
+single_value->field_can__pdu.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 @Can.CAN_frame.");
+}
+}
+
+void CAN__frame_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_can__id.decode_text(text_buf);
+single_value->field_can__pdu.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 CAN__frame_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 @Can.CAN_frame.");
+}
+}
+
+void CAN__frame_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: {
+ CAN__frame_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @Can.CAN_frame has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Can.CAN_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Can.CAN_frame");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__frame_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_can__id.check_restriction(t_res, t_name ? t_name : "@Can.CAN_frame");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@Can.CAN_frame");
+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 : "@Can.CAN_frame");
+}
+
+boolean CAN__frame_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__frame_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CANFD__frame::CANFD__frame()
+{
+}
+
+CANFD__frame::CANFD__frame(const OCTETSTRING& par_can__id,
+ const BITSTRING& par_can__flags,
+ const OCTETSTRING& par_can__pdu)
+ : field_can__id(par_can__id),
+ field_can__flags(par_can__flags),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CANFD__frame::CANFD__frame(const CANFD__frame& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Can.CANFD_frame.");
+if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+else field_can__id.clean_up();
+if (other_value.can__flags().is_bound()) field_can__flags = other_value.can__flags();
+else field_can__flags.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CANFD__frame::clean_up()
+{
+field_can__id.clean_up();
+field_can__flags.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CANFD__frame::get_descriptor() const { return &CANFD__frame_descr_; }
+CANFD__frame& CANFD__frame::operator=(const CANFD__frame& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Can.CANFD_frame.");
+ if (other_value.can__id().is_bound()) field_can__id = other_value.can__id();
+ else field_can__id.clean_up();
+ if (other_value.can__flags().is_bound()) field_can__flags = other_value.can__flags();
+ else field_can__flags.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CANFD__frame::operator==(const CANFD__frame& other_value) const
+{
+return field_can__id==other_value.field_can__id
+ && field_can__flags==other_value.field_can__flags
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CANFD__frame::is_bound() const
+{
+return (field_can__id.is_bound())
+ || (field_can__flags.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CANFD__frame::is_value() const
+{
+return field_can__id.is_value()
+ && field_can__flags.is_value()
+ && field_can__pdu.is_value();
+}
+void CANFD__frame::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_id := ");
+field_can__id.log();
+TTCN_Logger::log_event_str(", can_flags := ");
+field_can__flags.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CANFD__frame::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 (3<param.get_size()) {
+ param.error("record value of type @Can.CANFD_frame has 3 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(2));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Can.CANFD_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Can.CANFD_frame");
+ }
+}
+
+void CANFD__frame::set_implicit_omit()
+{
+if (can__id().is_bound()) can__id().set_implicit_omit();
+if (can__flags().is_bound()) can__flags().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CANFD__frame::encode_text(Text_Buf& text_buf) const
+{
+field_can__id.encode_text(text_buf);
+field_can__flags.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CANFD__frame::decode_text(Text_Buf& text_buf)
+{
+field_can__id.decode_text(text_buf);
+field_can__flags.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+struct CANFD__frame_template::single_value_struct {
+OCTETSTRING_template field_can__id;
+BITSTRING_template field_can__flags;
+OCTETSTRING_template field_can__pdu;
+};
+
+void CANFD__frame_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_can__id = ANY_VALUE;
+single_value->field_can__flags = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CANFD__frame_template::copy_value(const CANFD__frame& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__id().is_bound()) {
+ single_value->field_can__id = other_value.can__id();
+} else {
+ single_value->field_can__id.clean_up();
+}
+if (other_value.can__flags().is_bound()) {
+ single_value->field_can__flags = other_value.can__flags();
+} else {
+ single_value->field_can__flags.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CANFD__frame_template::copy_template(const CANFD__frame_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__id().get_selection()) {
+single_value->field_can__id = other_value.can__id();
+} else {
+single_value->field_can__id.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__flags().get_selection()) {
+single_value->field_can__flags = other_value.can__flags();
+} else {
+single_value->field_can__flags.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CANFD__frame_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Can.CANFD_frame.");
+break;
+}
+set_selection(other_value);
+}
+
+CANFD__frame_template::CANFD__frame_template()
+{
+}
+
+CANFD__frame_template::CANFD__frame_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CANFD__frame_template::CANFD__frame_template(const CANFD__frame& other_value)
+{
+copy_value(other_value);
+}
+
+CANFD__frame_template::CANFD__frame_template(const OPTIONAL<CANFD__frame>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__frame&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Can.CANFD_frame from an unbound optional field.");
+}
+}
+
+CANFD__frame_template::CANFD__frame_template(const CANFD__frame_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CANFD__frame_template::~CANFD__frame_template()
+{
+clean_up();
+}
+
+CANFD__frame_template& CANFD__frame_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CANFD__frame_template& CANFD__frame_template::operator=(const CANFD__frame& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CANFD__frame_template& CANFD__frame_template::operator=(const OPTIONAL<CANFD__frame>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CANFD__frame&)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 @Can.CANFD_frame.");
+}
+return *this;
+}
+
+CANFD__frame_template& CANFD__frame_template::operator=(const CANFD__frame_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CANFD__frame_template::match(const CANFD__frame& 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.can__id().is_bound()) return FALSE;
+if(!single_value->field_can__id.match(other_value.can__id(), legacy))return FALSE;
+if(!other_value.can__flags().is_bound()) return FALSE;
+if(!single_value->field_can__flags.match(other_value.can__flags(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Can.CANFD_frame.");
+}
+return FALSE;
+}
+
+boolean CANFD__frame_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__id.is_bound()
+
+ ||single_value->field_can__flags.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CANFD__frame_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__id.is_value()
+ &&single_value->field_can__flags.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CANFD__frame_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CANFD__frame CANFD__frame_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 @Can.CANFD_frame.");
+CANFD__frame ret_val;
+if (single_value->field_can__id.is_bound()) {
+ret_val.can__id() = single_value->field_can__id.valueof();
+}
+if (single_value->field_can__flags.is_bound()) {
+ret_val.can__flags() = single_value->field_can__flags.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CANFD__frame_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Can.CANFD_frame.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CANFD__frame_template[list_length];
+}
+
+CANFD__frame_template& CANFD__frame_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Can.CANFD_frame.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Can.CANFD_frame.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& CANFD__frame_template::can__id()
+{
+set_specific();
+return single_value->field_can__id;
+}
+
+const OCTETSTRING_template& CANFD__frame_template::can__id() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_id of a non-specific template of type @Can.CANFD_frame.");
+return single_value->field_can__id;
+}
+
+BITSTRING_template& CANFD__frame_template::can__flags()
+{
+set_specific();
+return single_value->field_can__flags;
+}
+
+const BITSTRING_template& CANFD__frame_template::can__flags() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_flags of a non-specific template of type @Can.CANFD_frame.");
+return single_value->field_can__flags;
+}
+
+OCTETSTRING_template& CANFD__frame_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const OCTETSTRING_template& CANFD__frame_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @Can.CANFD_frame.");
+return single_value->field_can__pdu;
+}
+
+int CANFD__frame_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Can.CANFD_frame which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 3;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Can.CANFD_frame 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 @Can.CANFD_frame containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CANFD_frame containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CANFD_frame containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Can.CANFD_frame containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Can.CANFD_frame.");
+ }
+ return 0;
+}
+
+void CANFD__frame_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_id := ");
+single_value->field_can__id.log();
+TTCN_Logger::log_event_str(", can_flags := ");
+single_value->field_can__flags.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CANFD__frame_template::log_match(const CANFD__frame& 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_can__id.match(match_value.can__id(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_id");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__flags.match(match_value.can__flags(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_flags");
+single_value->field_can__flags.log_match(match_value.can__flags(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_id := ");
+single_value->field_can__id.log_match(match_value.can__id(), legacy);
+TTCN_Logger::log_event_str(", can_flags := ");
+single_value->field_can__flags.log_match(match_value.can__flags(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CANFD__frame_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__id.encode_text(text_buf);
+single_value->field_can__flags.encode_text(text_buf);
+single_value->field_can__pdu.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 @Can.CANFD_frame.");
+}
+}
+
+void CANFD__frame_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_can__id.decode_text(text_buf);
+single_value->field_can__flags.decode_text(text_buf);
+single_value->field_can__pdu.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 CANFD__frame_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 @Can.CANFD_frame.");
+}
+}
+
+void CANFD__frame_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: {
+ CANFD__frame_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (3<param.get_size()) {
+ param.error("record template of type @Can.CANFD_frame has 3 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__id().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__flags().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(2));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_id")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__id().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_flags")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__flags().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Can.CANFD_frame: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Can.CANFD_frame");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CANFD__frame_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_can__id.check_restriction(t_res, t_name ? t_name : "@Can.CANFD_frame");
+single_value->field_can__flags.check_restriction(t_res, t_name ? t_name : "@Can.CANFD_frame");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@Can.CANFD_frame");
+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 : "@Can.CANFD_frame");
+}
+
+boolean CANFD__frame_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CANFD__frame_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("../src/Can.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Can");
+General__Types::module_object.pre_init_module();
+current_location.update_lineno(21);
+#line 21 "../src/Can.ttcn"
+const_CAN__EFF__FLAG = os_0;
+current_location.update_lineno(22);
+#line 22 "../src/Can.ttcn"
+const_CAN__RTR__FLAG = os_1;
+current_location.update_lineno(23);
+#line 23 "../src/Can.ttcn"
+const_CAN__ERR__FLAG = os_2;
+current_location.update_lineno(26);
+#line 26 "../src/Can.ttcn"
+const_CAN__SFF__MASK = os_3;
+current_location.update_lineno(27);
+#line 27 "../src/Can.ttcn"
+const_CAN__EFF__MASK = os_4;
+current_location.update_lineno(28);
+#line 28 "../src/Can.ttcn"
+const_CAN__ERR__MASK = os_4;
+current_location.update_lineno(109);
+#line 109 "../src/Can.ttcn"
+const_AF__CAN = 29;
+current_location.update_lineno(134);
+#line 134 "../src/Can.ttcn"
+const_CAN__MAX__DLEN = 8;
+current_location.update_lineno(138);
+#line 138 "../src/Can.ttcn"
+const_CANFD__MAX__DLEN = 64;
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("../src/Can.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Can");
+General__Types::module_object.post_init_module();
+current_location.update_lineno(30);
+#line 30 "../src/Can.ttcn"
+template_t__CAN__EFF__FLAG.set_type(VALUE_LIST, 128);
+template_t__CAN__EFF__FLAG.list_item(0) = op_0;
+template_t__CAN__EFF__FLAG.list_item(1) = op_1;
+template_t__CAN__EFF__FLAG.list_item(2) = op_2;
+template_t__CAN__EFF__FLAG.list_item(3) = op_3;
+template_t__CAN__EFF__FLAG.list_item(4) = op_4;
+template_t__CAN__EFF__FLAG.list_item(5) = op_5;
+template_t__CAN__EFF__FLAG.list_item(6) = op_6;
+template_t__CAN__EFF__FLAG.list_item(7) = op_7;
+template_t__CAN__EFF__FLAG.list_item(8) = op_8;
+template_t__CAN__EFF__FLAG.list_item(9) = op_9;
+template_t__CAN__EFF__FLAG.list_item(10) = op_10;
+template_t__CAN__EFF__FLAG.list_item(11) = op_11;
+template_t__CAN__EFF__FLAG.list_item(12) = op_12;
+template_t__CAN__EFF__FLAG.list_item(13) = op_13;
+template_t__CAN__EFF__FLAG.list_item(14) = op_14;
+template_t__CAN__EFF__FLAG.list_item(15) = op_15;
+template_t__CAN__EFF__FLAG.list_item(16) = op_16;
+template_t__CAN__EFF__FLAG.list_item(17) = op_17;
+template_t__CAN__EFF__FLAG.list_item(18) = op_18;
+template_t__CAN__EFF__FLAG.list_item(19) = op_19;
+template_t__CAN__EFF__FLAG.list_item(20) = op_20;
+template_t__CAN__EFF__FLAG.list_item(21) = op_21;
+template_t__CAN__EFF__FLAG.list_item(22) = op_22;
+template_t__CAN__EFF__FLAG.list_item(23) = op_23;
+template_t__CAN__EFF__FLAG.list_item(24) = op_24;
+template_t__CAN__EFF__FLAG.list_item(25) = op_25;
+template_t__CAN__EFF__FLAG.list_item(26) = op_26;
+template_t__CAN__EFF__FLAG.list_item(27) = op_27;
+template_t__CAN__EFF__FLAG.list_item(28) = op_28;
+template_t__CAN__EFF__FLAG.list_item(29) = op_29;
+template_t__CAN__EFF__FLAG.list_item(30) = op_30;
+template_t__CAN__EFF__FLAG.list_item(31) = op_31;
+template_t__CAN__EFF__FLAG.list_item(32) = op_32;
+template_t__CAN__EFF__FLAG.list_item(33) = op_33;
+template_t__CAN__EFF__FLAG.list_item(34) = op_34;
+template_t__CAN__EFF__FLAG.list_item(35) = op_35;
+template_t__CAN__EFF__FLAG.list_item(36) = op_36;
+template_t__CAN__EFF__FLAG.list_item(37) = op_37;
+template_t__CAN__EFF__FLAG.list_item(38) = op_38;
+template_t__CAN__EFF__FLAG.list_item(39) = op_39;
+template_t__CAN__EFF__FLAG.list_item(40) = op_40;
+template_t__CAN__EFF__FLAG.list_item(41) = op_41;
+template_t__CAN__EFF__FLAG.list_item(42) = op_42;
+template_t__CAN__EFF__FLAG.list_item(43) = op_43;
+template_t__CAN__EFF__FLAG.list_item(44) = op_44;
+template_t__CAN__EFF__FLAG.list_item(45) = op_45;
+template_t__CAN__EFF__FLAG.list_item(46) = op_46;
+template_t__CAN__EFF__FLAG.list_item(47) = op_47;
+template_t__CAN__EFF__FLAG.list_item(48) = op_48;
+template_t__CAN__EFF__FLAG.list_item(49) = op_49;
+template_t__CAN__EFF__FLAG.list_item(50) = op_50;
+template_t__CAN__EFF__FLAG.list_item(51) = op_51;
+template_t__CAN__EFF__FLAG.list_item(52) = op_52;
+template_t__CAN__EFF__FLAG.list_item(53) = op_53;
+template_t__CAN__EFF__FLAG.list_item(54) = op_54;
+template_t__CAN__EFF__FLAG.list_item(55) = op_55;
+template_t__CAN__EFF__FLAG.list_item(56) = op_56;
+template_t__CAN__EFF__FLAG.list_item(57) = op_57;
+template_t__CAN__EFF__FLAG.list_item(58) = op_58;
+template_t__CAN__EFF__FLAG.list_item(59) = op_59;
+template_t__CAN__EFF__FLAG.list_item(60) = op_60;
+template_t__CAN__EFF__FLAG.list_item(61) = op_61;
+template_t__CAN__EFF__FLAG.list_item(62) = op_62;
+template_t__CAN__EFF__FLAG.list_item(63) = op_63;
+template_t__CAN__EFF__FLAG.list_item(64) = op_64;
+template_t__CAN__EFF__FLAG.list_item(65) = op_65;
+template_t__CAN__EFF__FLAG.list_item(66) = op_66;
+template_t__CAN__EFF__FLAG.list_item(67) = op_67;
+template_t__CAN__EFF__FLAG.list_item(68) = op_68;
+template_t__CAN__EFF__FLAG.list_item(69) = op_69;
+template_t__CAN__EFF__FLAG.list_item(70) = op_70;
+template_t__CAN__EFF__FLAG.list_item(71) = op_71;
+template_t__CAN__EFF__FLAG.list_item(72) = op_72;
+template_t__CAN__EFF__FLAG.list_item(73) = op_73;
+template_t__CAN__EFF__FLAG.list_item(74) = op_74;
+template_t__CAN__EFF__FLAG.list_item(75) = op_75;
+template_t__CAN__EFF__FLAG.list_item(76) = op_76;
+template_t__CAN__EFF__FLAG.list_item(77) = op_77;
+template_t__CAN__EFF__FLAG.list_item(78) = op_78;
+template_t__CAN__EFF__FLAG.list_item(79) = op_79;
+template_t__CAN__EFF__FLAG.list_item(80) = op_80;
+template_t__CAN__EFF__FLAG.list_item(81) = op_81;
+template_t__CAN__EFF__FLAG.list_item(82) = op_82;
+template_t__CAN__EFF__FLAG.list_item(83) = op_83;
+template_t__CAN__EFF__FLAG.list_item(84) = op_84;
+template_t__CAN__EFF__FLAG.list_item(85) = op_85;
+template_t__CAN__EFF__FLAG.list_item(86) = op_86;
+template_t__CAN__EFF__FLAG.list_item(87) = op_87;
+template_t__CAN__EFF__FLAG.list_item(88) = op_88;
+template_t__CAN__EFF__FLAG.list_item(89) = op_89;
+template_t__CAN__EFF__FLAG.list_item(90) = op_90;
+template_t__CAN__EFF__FLAG.list_item(91) = op_91;
+template_t__CAN__EFF__FLAG.list_item(92) = op_92;
+template_t__CAN__EFF__FLAG.list_item(93) = op_93;
+template_t__CAN__EFF__FLAG.list_item(94) = op_94;
+template_t__CAN__EFF__FLAG.list_item(95) = op_95;
+template_t__CAN__EFF__FLAG.list_item(96) = op_96;
+template_t__CAN__EFF__FLAG.list_item(97) = op_97;
+template_t__CAN__EFF__FLAG.list_item(98) = op_98;
+template_t__CAN__EFF__FLAG.list_item(99) = op_99;
+template_t__CAN__EFF__FLAG.list_item(100) = op_100;
+template_t__CAN__EFF__FLAG.list_item(101) = op_101;
+template_t__CAN__EFF__FLAG.list_item(102) = op_102;
+template_t__CAN__EFF__FLAG.list_item(103) = op_103;
+template_t__CAN__EFF__FLAG.list_item(104) = op_104;
+template_t__CAN__EFF__FLAG.list_item(105) = op_105;
+template_t__CAN__EFF__FLAG.list_item(106) = op_106;
+template_t__CAN__EFF__FLAG.list_item(107) = op_107;
+template_t__CAN__EFF__FLAG.list_item(108) = op_108;
+template_t__CAN__EFF__FLAG.list_item(109) = op_109;
+template_t__CAN__EFF__FLAG.list_item(110) = op_110;
+template_t__CAN__EFF__FLAG.list_item(111) = op_111;
+template_t__CAN__EFF__FLAG.list_item(112) = op_112;
+template_t__CAN__EFF__FLAG.list_item(113) = op_113;
+template_t__CAN__EFF__FLAG.list_item(114) = op_114;
+template_t__CAN__EFF__FLAG.list_item(115) = op_115;
+template_t__CAN__EFF__FLAG.list_item(116) = op_116;
+template_t__CAN__EFF__FLAG.list_item(117) = op_117;
+template_t__CAN__EFF__FLAG.list_item(118) = op_118;
+template_t__CAN__EFF__FLAG.list_item(119) = op_119;
+template_t__CAN__EFF__FLAG.list_item(120) = op_120;
+template_t__CAN__EFF__FLAG.list_item(121) = op_121;
+template_t__CAN__EFF__FLAG.list_item(122) = op_122;
+template_t__CAN__EFF__FLAG.list_item(123) = op_123;
+template_t__CAN__EFF__FLAG.list_item(124) = op_124;
+template_t__CAN__EFF__FLAG.list_item(125) = op_125;
+template_t__CAN__EFF__FLAG.list_item(126) = op_126;
+template_t__CAN__EFF__FLAG.list_item(127) = op_127;
+current_location.update_lineno(48);
+#line 48 "../src/Can.ttcn"
+template_t__CAN__SFF__FLAG.set_type(VALUE_LIST, 128);
+template_t__CAN__SFF__FLAG.list_item(0) = op_128;
+template_t__CAN__SFF__FLAG.list_item(1) = op_129;
+template_t__CAN__SFF__FLAG.list_item(2) = op_130;
+template_t__CAN__SFF__FLAG.list_item(3) = op_131;
+template_t__CAN__SFF__FLAG.list_item(4) = op_132;
+template_t__CAN__SFF__FLAG.list_item(5) = op_133;
+template_t__CAN__SFF__FLAG.list_item(6) = op_134;
+template_t__CAN__SFF__FLAG.list_item(7) = op_135;
+template_t__CAN__SFF__FLAG.list_item(8) = op_136;
+template_t__CAN__SFF__FLAG.list_item(9) = op_137;
+template_t__CAN__SFF__FLAG.list_item(10) = op_138;
+template_t__CAN__SFF__FLAG.list_item(11) = op_139;
+template_t__CAN__SFF__FLAG.list_item(12) = op_140;
+template_t__CAN__SFF__FLAG.list_item(13) = op_141;
+template_t__CAN__SFF__FLAG.list_item(14) = op_142;
+template_t__CAN__SFF__FLAG.list_item(15) = op_143;
+template_t__CAN__SFF__FLAG.list_item(16) = op_144;
+template_t__CAN__SFF__FLAG.list_item(17) = op_145;
+template_t__CAN__SFF__FLAG.list_item(18) = op_146;
+template_t__CAN__SFF__FLAG.list_item(19) = op_147;
+template_t__CAN__SFF__FLAG.list_item(20) = op_148;
+template_t__CAN__SFF__FLAG.list_item(21) = op_149;
+template_t__CAN__SFF__FLAG.list_item(22) = op_150;
+template_t__CAN__SFF__FLAG.list_item(23) = op_151;
+template_t__CAN__SFF__FLAG.list_item(24) = op_152;
+template_t__CAN__SFF__FLAG.list_item(25) = op_153;
+template_t__CAN__SFF__FLAG.list_item(26) = op_154;
+template_t__CAN__SFF__FLAG.list_item(27) = op_155;
+template_t__CAN__SFF__FLAG.list_item(28) = op_156;
+template_t__CAN__SFF__FLAG.list_item(29) = op_157;
+template_t__CAN__SFF__FLAG.list_item(30) = op_158;
+template_t__CAN__SFF__FLAG.list_item(31) = op_159;
+template_t__CAN__SFF__FLAG.list_item(32) = op_160;
+template_t__CAN__SFF__FLAG.list_item(33) = op_161;
+template_t__CAN__SFF__FLAG.list_item(34) = op_162;
+template_t__CAN__SFF__FLAG.list_item(35) = op_163;
+template_t__CAN__SFF__FLAG.list_item(36) = op_164;
+template_t__CAN__SFF__FLAG.list_item(37) = op_165;
+template_t__CAN__SFF__FLAG.list_item(38) = op_166;
+template_t__CAN__SFF__FLAG.list_item(39) = op_167;
+template_t__CAN__SFF__FLAG.list_item(40) = op_168;
+template_t__CAN__SFF__FLAG.list_item(41) = op_169;
+template_t__CAN__SFF__FLAG.list_item(42) = op_170;
+template_t__CAN__SFF__FLAG.list_item(43) = op_171;
+template_t__CAN__SFF__FLAG.list_item(44) = op_172;
+template_t__CAN__SFF__FLAG.list_item(45) = op_173;
+template_t__CAN__SFF__FLAG.list_item(46) = op_174;
+template_t__CAN__SFF__FLAG.list_item(47) = op_175;
+template_t__CAN__SFF__FLAG.list_item(48) = op_176;
+template_t__CAN__SFF__FLAG.list_item(49) = op_177;
+template_t__CAN__SFF__FLAG.list_item(50) = op_178;
+template_t__CAN__SFF__FLAG.list_item(51) = op_179;
+template_t__CAN__SFF__FLAG.list_item(52) = op_180;
+template_t__CAN__SFF__FLAG.list_item(53) = op_181;
+template_t__CAN__SFF__FLAG.list_item(54) = op_182;
+template_t__CAN__SFF__FLAG.list_item(55) = op_183;
+template_t__CAN__SFF__FLAG.list_item(56) = op_184;
+template_t__CAN__SFF__FLAG.list_item(57) = op_185;
+template_t__CAN__SFF__FLAG.list_item(58) = op_186;
+template_t__CAN__SFF__FLAG.list_item(59) = op_187;
+template_t__CAN__SFF__FLAG.list_item(60) = op_188;
+template_t__CAN__SFF__FLAG.list_item(61) = op_189;
+template_t__CAN__SFF__FLAG.list_item(62) = op_190;
+template_t__CAN__SFF__FLAG.list_item(63) = op_191;
+template_t__CAN__SFF__FLAG.list_item(64) = op_192;
+template_t__CAN__SFF__FLAG.list_item(65) = op_193;
+template_t__CAN__SFF__FLAG.list_item(66) = op_194;
+template_t__CAN__SFF__FLAG.list_item(67) = op_195;
+template_t__CAN__SFF__FLAG.list_item(68) = op_196;
+template_t__CAN__SFF__FLAG.list_item(69) = op_197;
+template_t__CAN__SFF__FLAG.list_item(70) = op_198;
+template_t__CAN__SFF__FLAG.list_item(71) = op_199;
+template_t__CAN__SFF__FLAG.list_item(72) = op_200;
+template_t__CAN__SFF__FLAG.list_item(73) = op_201;
+template_t__CAN__SFF__FLAG.list_item(74) = op_202;
+template_t__CAN__SFF__FLAG.list_item(75) = op_203;
+template_t__CAN__SFF__FLAG.list_item(76) = op_204;
+template_t__CAN__SFF__FLAG.list_item(77) = op_205;
+template_t__CAN__SFF__FLAG.list_item(78) = op_206;
+template_t__CAN__SFF__FLAG.list_item(79) = op_207;
+template_t__CAN__SFF__FLAG.list_item(80) = op_208;
+template_t__CAN__SFF__FLAG.list_item(81) = op_209;
+template_t__CAN__SFF__FLAG.list_item(82) = op_210;
+template_t__CAN__SFF__FLAG.list_item(83) = op_211;
+template_t__CAN__SFF__FLAG.list_item(84) = op_212;
+template_t__CAN__SFF__FLAG.list_item(85) = op_213;
+template_t__CAN__SFF__FLAG.list_item(86) = op_214;
+template_t__CAN__SFF__FLAG.list_item(87) = op_215;
+template_t__CAN__SFF__FLAG.list_item(88) = op_216;
+template_t__CAN__SFF__FLAG.list_item(89) = op_217;
+template_t__CAN__SFF__FLAG.list_item(90) = op_218;
+template_t__CAN__SFF__FLAG.list_item(91) = op_219;
+template_t__CAN__SFF__FLAG.list_item(92) = op_220;
+template_t__CAN__SFF__FLAG.list_item(93) = op_221;
+template_t__CAN__SFF__FLAG.list_item(94) = op_222;
+template_t__CAN__SFF__FLAG.list_item(95) = op_223;
+template_t__CAN__SFF__FLAG.list_item(96) = op_224;
+template_t__CAN__SFF__FLAG.list_item(97) = op_225;
+template_t__CAN__SFF__FLAG.list_item(98) = op_226;
+template_t__CAN__SFF__FLAG.list_item(99) = op_227;
+template_t__CAN__SFF__FLAG.list_item(100) = op_228;
+template_t__CAN__SFF__FLAG.list_item(101) = op_229;
+template_t__CAN__SFF__FLAG.list_item(102) = op_230;
+template_t__CAN__SFF__FLAG.list_item(103) = op_231;
+template_t__CAN__SFF__FLAG.list_item(104) = op_232;
+template_t__CAN__SFF__FLAG.list_item(105) = op_233;
+template_t__CAN__SFF__FLAG.list_item(106) = op_234;
+template_t__CAN__SFF__FLAG.list_item(107) = op_235;
+template_t__CAN__SFF__FLAG.list_item(108) = op_236;
+template_t__CAN__SFF__FLAG.list_item(109) = op_237;
+template_t__CAN__SFF__FLAG.list_item(110) = op_238;
+template_t__CAN__SFF__FLAG.list_item(111) = op_239;
+template_t__CAN__SFF__FLAG.list_item(112) = op_240;
+template_t__CAN__SFF__FLAG.list_item(113) = op_241;
+template_t__CAN__SFF__FLAG.list_item(114) = op_242;
+template_t__CAN__SFF__FLAG.list_item(115) = op_243;
+template_t__CAN__SFF__FLAG.list_item(116) = op_244;
+template_t__CAN__SFF__FLAG.list_item(117) = op_245;
+template_t__CAN__SFF__FLAG.list_item(118) = op_246;
+template_t__CAN__SFF__FLAG.list_item(119) = op_247;
+template_t__CAN__SFF__FLAG.list_item(120) = op_248;
+template_t__CAN__SFF__FLAG.list_item(121) = op_249;
+template_t__CAN__SFF__FLAG.list_item(122) = op_250;
+template_t__CAN__SFF__FLAG.list_item(123) = op_251;
+template_t__CAN__SFF__FLAG.list_item(124) = op_252;
+template_t__CAN__SFF__FLAG.list_item(125) = op_253;
+template_t__CAN__SFF__FLAG.list_item(126) = op_254;
+template_t__CAN__SFF__FLAG.list_item(127) = op_255;
+current_location.update_lineno(66);
+#line 66 "../src/Can.ttcn"
+template_t__CAN__RTR__FLAG.set_type(VALUE_LIST, 128);
+template_t__CAN__RTR__FLAG.list_item(0) = op_192;
+template_t__CAN__RTR__FLAG.list_item(1) = op_193;
+template_t__CAN__RTR__FLAG.list_item(2) = op_194;
+template_t__CAN__RTR__FLAG.list_item(3) = op_195;
+template_t__CAN__RTR__FLAG.list_item(4) = op_196;
+template_t__CAN__RTR__FLAG.list_item(5) = op_197;
+template_t__CAN__RTR__FLAG.list_item(6) = op_198;
+template_t__CAN__RTR__FLAG.list_item(7) = op_199;
+template_t__CAN__RTR__FLAG.list_item(8) = op_200;
+template_t__CAN__RTR__FLAG.list_item(9) = op_201;
+template_t__CAN__RTR__FLAG.list_item(10) = op_202;
+template_t__CAN__RTR__FLAG.list_item(11) = op_203;
+template_t__CAN__RTR__FLAG.list_item(12) = op_204;
+template_t__CAN__RTR__FLAG.list_item(13) = op_205;
+template_t__CAN__RTR__FLAG.list_item(14) = op_206;
+template_t__CAN__RTR__FLAG.list_item(15) = op_207;
+template_t__CAN__RTR__FLAG.list_item(16) = op_208;
+template_t__CAN__RTR__FLAG.list_item(17) = op_209;
+template_t__CAN__RTR__FLAG.list_item(18) = op_210;
+template_t__CAN__RTR__FLAG.list_item(19) = op_211;
+template_t__CAN__RTR__FLAG.list_item(20) = op_212;
+template_t__CAN__RTR__FLAG.list_item(21) = op_213;
+template_t__CAN__RTR__FLAG.list_item(22) = op_214;
+template_t__CAN__RTR__FLAG.list_item(23) = op_215;
+template_t__CAN__RTR__FLAG.list_item(24) = op_216;
+template_t__CAN__RTR__FLAG.list_item(25) = op_217;
+template_t__CAN__RTR__FLAG.list_item(26) = op_218;
+template_t__CAN__RTR__FLAG.list_item(27) = op_219;
+template_t__CAN__RTR__FLAG.list_item(28) = op_220;
+template_t__CAN__RTR__FLAG.list_item(29) = op_221;
+template_t__CAN__RTR__FLAG.list_item(30) = op_222;
+template_t__CAN__RTR__FLAG.list_item(31) = op_223;
+template_t__CAN__RTR__FLAG.list_item(32) = op_224;
+template_t__CAN__RTR__FLAG.list_item(33) = op_225;
+template_t__CAN__RTR__FLAG.list_item(34) = op_226;
+template_t__CAN__RTR__FLAG.list_item(35) = op_227;
+template_t__CAN__RTR__FLAG.list_item(36) = op_228;
+template_t__CAN__RTR__FLAG.list_item(37) = op_229;
+template_t__CAN__RTR__FLAG.list_item(38) = op_230;
+template_t__CAN__RTR__FLAG.list_item(39) = op_231;
+template_t__CAN__RTR__FLAG.list_item(40) = op_232;
+template_t__CAN__RTR__FLAG.list_item(41) = op_233;
+template_t__CAN__RTR__FLAG.list_item(42) = op_234;
+template_t__CAN__RTR__FLAG.list_item(43) = op_235;
+template_t__CAN__RTR__FLAG.list_item(44) = op_236;
+template_t__CAN__RTR__FLAG.list_item(45) = op_237;
+template_t__CAN__RTR__FLAG.list_item(46) = op_238;
+template_t__CAN__RTR__FLAG.list_item(47) = op_239;
+template_t__CAN__RTR__FLAG.list_item(48) = op_240;
+template_t__CAN__RTR__FLAG.list_item(49) = op_241;
+template_t__CAN__RTR__FLAG.list_item(50) = op_242;
+template_t__CAN__RTR__FLAG.list_item(51) = op_243;
+template_t__CAN__RTR__FLAG.list_item(52) = op_244;
+template_t__CAN__RTR__FLAG.list_item(53) = op_245;
+template_t__CAN__RTR__FLAG.list_item(54) = op_246;
+template_t__CAN__RTR__FLAG.list_item(55) = op_247;
+template_t__CAN__RTR__FLAG.list_item(56) = op_248;
+template_t__CAN__RTR__FLAG.list_item(57) = op_249;
+template_t__CAN__RTR__FLAG.list_item(58) = op_250;
+template_t__CAN__RTR__FLAG.list_item(59) = op_251;
+template_t__CAN__RTR__FLAG.list_item(60) = op_252;
+template_t__CAN__RTR__FLAG.list_item(61) = op_253;
+template_t__CAN__RTR__FLAG.list_item(62) = op_254;
+template_t__CAN__RTR__FLAG.list_item(63) = op_255;
+template_t__CAN__RTR__FLAG.list_item(64) = op_64;
+template_t__CAN__RTR__FLAG.list_item(65) = op_65;
+template_t__CAN__RTR__FLAG.list_item(66) = op_66;
+template_t__CAN__RTR__FLAG.list_item(67) = op_67;
+template_t__CAN__RTR__FLAG.list_item(68) = op_68;
+template_t__CAN__RTR__FLAG.list_item(69) = op_69;
+template_t__CAN__RTR__FLAG.list_item(70) = op_70;
+template_t__CAN__RTR__FLAG.list_item(71) = op_71;
+template_t__CAN__RTR__FLAG.list_item(72) = op_72;
+template_t__CAN__RTR__FLAG.list_item(73) = op_73;
+template_t__CAN__RTR__FLAG.list_item(74) = op_74;
+template_t__CAN__RTR__FLAG.list_item(75) = op_75;
+template_t__CAN__RTR__FLAG.list_item(76) = op_76;
+template_t__CAN__RTR__FLAG.list_item(77) = op_77;
+template_t__CAN__RTR__FLAG.list_item(78) = op_78;
+template_t__CAN__RTR__FLAG.list_item(79) = op_79;
+template_t__CAN__RTR__FLAG.list_item(80) = op_80;
+template_t__CAN__RTR__FLAG.list_item(81) = op_81;
+template_t__CAN__RTR__FLAG.list_item(82) = op_82;
+template_t__CAN__RTR__FLAG.list_item(83) = op_83;
+template_t__CAN__RTR__FLAG.list_item(84) = op_84;
+template_t__CAN__RTR__FLAG.list_item(85) = op_85;
+template_t__CAN__RTR__FLAG.list_item(86) = op_86;
+template_t__CAN__RTR__FLAG.list_item(87) = op_87;
+template_t__CAN__RTR__FLAG.list_item(88) = op_88;
+template_t__CAN__RTR__FLAG.list_item(89) = op_89;
+template_t__CAN__RTR__FLAG.list_item(90) = op_90;
+template_t__CAN__RTR__FLAG.list_item(91) = op_91;
+template_t__CAN__RTR__FLAG.list_item(92) = op_92;
+template_t__CAN__RTR__FLAG.list_item(93) = op_93;
+template_t__CAN__RTR__FLAG.list_item(94) = op_94;
+template_t__CAN__RTR__FLAG.list_item(95) = op_95;
+template_t__CAN__RTR__FLAG.list_item(96) = op_96;
+template_t__CAN__RTR__FLAG.list_item(97) = op_97;
+template_t__CAN__RTR__FLAG.list_item(98) = op_98;
+template_t__CAN__RTR__FLAG.list_item(99) = op_99;
+template_t__CAN__RTR__FLAG.list_item(100) = op_100;
+template_t__CAN__RTR__FLAG.list_item(101) = op_101;
+template_t__CAN__RTR__FLAG.list_item(102) = op_102;
+template_t__CAN__RTR__FLAG.list_item(103) = op_103;
+template_t__CAN__RTR__FLAG.list_item(104) = op_104;
+template_t__CAN__RTR__FLAG.list_item(105) = op_105;
+template_t__CAN__RTR__FLAG.list_item(106) = op_106;
+template_t__CAN__RTR__FLAG.list_item(107) = op_107;
+template_t__CAN__RTR__FLAG.list_item(108) = op_108;
+template_t__CAN__RTR__FLAG.list_item(109) = op_109;
+template_t__CAN__RTR__FLAG.list_item(110) = op_110;
+template_t__CAN__RTR__FLAG.list_item(111) = op_111;
+template_t__CAN__RTR__FLAG.list_item(112) = op_112;
+template_t__CAN__RTR__FLAG.list_item(113) = op_113;
+template_t__CAN__RTR__FLAG.list_item(114) = op_114;
+template_t__CAN__RTR__FLAG.list_item(115) = op_115;
+template_t__CAN__RTR__FLAG.list_item(116) = op_116;
+template_t__CAN__RTR__FLAG.list_item(117) = op_117;
+template_t__CAN__RTR__FLAG.list_item(118) = op_118;
+template_t__CAN__RTR__FLAG.list_item(119) = op_119;
+template_t__CAN__RTR__FLAG.list_item(120) = op_120;
+template_t__CAN__RTR__FLAG.list_item(121) = op_121;
+template_t__CAN__RTR__FLAG.list_item(122) = op_122;
+template_t__CAN__RTR__FLAG.list_item(123) = op_123;
+template_t__CAN__RTR__FLAG.list_item(124) = op_124;
+template_t__CAN__RTR__FLAG.list_item(125) = op_125;
+template_t__CAN__RTR__FLAG.list_item(126) = op_126;
+template_t__CAN__RTR__FLAG.list_item(127) = op_127;
+current_location.update_lineno(84);
+#line 84 "../src/Can.ttcn"
+template_t__CAN__ERR__FLAG.set_type(VALUE_LIST, 128);
+template_t__CAN__ERR__FLAG.list_item(0) = op_160;
+template_t__CAN__ERR__FLAG.list_item(1) = op_161;
+template_t__CAN__ERR__FLAG.list_item(2) = op_162;
+template_t__CAN__ERR__FLAG.list_item(3) = op_163;
+template_t__CAN__ERR__FLAG.list_item(4) = op_164;
+template_t__CAN__ERR__FLAG.list_item(5) = op_165;
+template_t__CAN__ERR__FLAG.list_item(6) = op_166;
+template_t__CAN__ERR__FLAG.list_item(7) = op_167;
+template_t__CAN__ERR__FLAG.list_item(8) = op_168;
+template_t__CAN__ERR__FLAG.list_item(9) = op_169;
+template_t__CAN__ERR__FLAG.list_item(10) = op_170;
+template_t__CAN__ERR__FLAG.list_item(11) = op_171;
+template_t__CAN__ERR__FLAG.list_item(12) = op_172;
+template_t__CAN__ERR__FLAG.list_item(13) = op_173;
+template_t__CAN__ERR__FLAG.list_item(14) = op_174;
+template_t__CAN__ERR__FLAG.list_item(15) = op_175;
+template_t__CAN__ERR__FLAG.list_item(16) = op_176;
+template_t__CAN__ERR__FLAG.list_item(17) = op_177;
+template_t__CAN__ERR__FLAG.list_item(18) = op_178;
+template_t__CAN__ERR__FLAG.list_item(19) = op_179;
+template_t__CAN__ERR__FLAG.list_item(20) = op_180;
+template_t__CAN__ERR__FLAG.list_item(21) = op_181;
+template_t__CAN__ERR__FLAG.list_item(22) = op_182;
+template_t__CAN__ERR__FLAG.list_item(23) = op_183;
+template_t__CAN__ERR__FLAG.list_item(24) = op_184;
+template_t__CAN__ERR__FLAG.list_item(25) = op_185;
+template_t__CAN__ERR__FLAG.list_item(26) = op_186;
+template_t__CAN__ERR__FLAG.list_item(27) = op_187;
+template_t__CAN__ERR__FLAG.list_item(28) = op_188;
+template_t__CAN__ERR__FLAG.list_item(29) = op_189;
+template_t__CAN__ERR__FLAG.list_item(30) = op_190;
+template_t__CAN__ERR__FLAG.list_item(31) = op_191;
+template_t__CAN__ERR__FLAG.list_item(32) = op_224;
+template_t__CAN__ERR__FLAG.list_item(33) = op_225;
+template_t__CAN__ERR__FLAG.list_item(34) = op_226;
+template_t__CAN__ERR__FLAG.list_item(35) = op_227;
+template_t__CAN__ERR__FLAG.list_item(36) = op_228;
+template_t__CAN__ERR__FLAG.list_item(37) = op_229;
+template_t__CAN__ERR__FLAG.list_item(38) = op_230;
+template_t__CAN__ERR__FLAG.list_item(39) = op_231;
+template_t__CAN__ERR__FLAG.list_item(40) = op_232;
+template_t__CAN__ERR__FLAG.list_item(41) = op_233;
+template_t__CAN__ERR__FLAG.list_item(42) = op_234;
+template_t__CAN__ERR__FLAG.list_item(43) = op_235;
+template_t__CAN__ERR__FLAG.list_item(44) = op_236;
+template_t__CAN__ERR__FLAG.list_item(45) = op_237;
+template_t__CAN__ERR__FLAG.list_item(46) = op_238;
+template_t__CAN__ERR__FLAG.list_item(47) = op_239;
+template_t__CAN__ERR__FLAG.list_item(48) = op_240;
+template_t__CAN__ERR__FLAG.list_item(49) = op_241;
+template_t__CAN__ERR__FLAG.list_item(50) = op_242;
+template_t__CAN__ERR__FLAG.list_item(51) = op_243;
+template_t__CAN__ERR__FLAG.list_item(52) = op_244;
+template_t__CAN__ERR__FLAG.list_item(53) = op_245;
+template_t__CAN__ERR__FLAG.list_item(54) = op_246;
+template_t__CAN__ERR__FLAG.list_item(55) = op_247;
+template_t__CAN__ERR__FLAG.list_item(56) = op_248;
+template_t__CAN__ERR__FLAG.list_item(57) = op_249;
+template_t__CAN__ERR__FLAG.list_item(58) = op_250;
+template_t__CAN__ERR__FLAG.list_item(59) = op_251;
+template_t__CAN__ERR__FLAG.list_item(60) = op_252;
+template_t__CAN__ERR__FLAG.list_item(61) = op_253;
+template_t__CAN__ERR__FLAG.list_item(62) = op_254;
+template_t__CAN__ERR__FLAG.list_item(63) = op_255;
+template_t__CAN__ERR__FLAG.list_item(64) = op_32;
+template_t__CAN__ERR__FLAG.list_item(65) = op_33;
+template_t__CAN__ERR__FLAG.list_item(66) = op_34;
+template_t__CAN__ERR__FLAG.list_item(67) = op_35;
+template_t__CAN__ERR__FLAG.list_item(68) = op_36;
+template_t__CAN__ERR__FLAG.list_item(69) = op_37;
+template_t__CAN__ERR__FLAG.list_item(70) = op_38;
+template_t__CAN__ERR__FLAG.list_item(71) = op_39;
+template_t__CAN__ERR__FLAG.list_item(72) = op_40;
+template_t__CAN__ERR__FLAG.list_item(73) = op_41;
+template_t__CAN__ERR__FLAG.list_item(74) = op_42;
+template_t__CAN__ERR__FLAG.list_item(75) = op_43;
+template_t__CAN__ERR__FLAG.list_item(76) = op_44;
+template_t__CAN__ERR__FLAG.list_item(77) = op_45;
+template_t__CAN__ERR__FLAG.list_item(78) = op_46;
+template_t__CAN__ERR__FLAG.list_item(79) = op_47;
+template_t__CAN__ERR__FLAG.list_item(80) = op_48;
+template_t__CAN__ERR__FLAG.list_item(81) = op_49;
+template_t__CAN__ERR__FLAG.list_item(82) = op_50;
+template_t__CAN__ERR__FLAG.list_item(83) = op_51;
+template_t__CAN__ERR__FLAG.list_item(84) = op_52;
+template_t__CAN__ERR__FLAG.list_item(85) = op_53;
+template_t__CAN__ERR__FLAG.list_item(86) = op_54;
+template_t__CAN__ERR__FLAG.list_item(87) = op_55;
+template_t__CAN__ERR__FLAG.list_item(88) = op_56;
+template_t__CAN__ERR__FLAG.list_item(89) = op_57;
+template_t__CAN__ERR__FLAG.list_item(90) = op_58;
+template_t__CAN__ERR__FLAG.list_item(91) = op_59;
+template_t__CAN__ERR__FLAG.list_item(92) = op_60;
+template_t__CAN__ERR__FLAG.list_item(93) = op_61;
+template_t__CAN__ERR__FLAG.list_item(94) = op_62;
+template_t__CAN__ERR__FLAG.list_item(95) = op_63;
+template_t__CAN__ERR__FLAG.list_item(96) = op_96;
+template_t__CAN__ERR__FLAG.list_item(97) = op_97;
+template_t__CAN__ERR__FLAG.list_item(98) = op_98;
+template_t__CAN__ERR__FLAG.list_item(99) = op_99;
+template_t__CAN__ERR__FLAG.list_item(100) = op_100;
+template_t__CAN__ERR__FLAG.list_item(101) = op_101;
+template_t__CAN__ERR__FLAG.list_item(102) = op_102;
+template_t__CAN__ERR__FLAG.list_item(103) = op_103;
+template_t__CAN__ERR__FLAG.list_item(104) = op_104;
+template_t__CAN__ERR__FLAG.list_item(105) = op_105;
+template_t__CAN__ERR__FLAG.list_item(106) = op_106;
+template_t__CAN__ERR__FLAG.list_item(107) = op_107;
+template_t__CAN__ERR__FLAG.list_item(108) = op_108;
+template_t__CAN__ERR__FLAG.list_item(109) = op_109;
+template_t__CAN__ERR__FLAG.list_item(110) = op_110;
+template_t__CAN__ERR__FLAG.list_item(111) = op_111;
+template_t__CAN__ERR__FLAG.list_item(112) = op_112;
+template_t__CAN__ERR__FLAG.list_item(113) = op_113;
+template_t__CAN__ERR__FLAG.list_item(114) = op_114;
+template_t__CAN__ERR__FLAG.list_item(115) = op_115;
+template_t__CAN__ERR__FLAG.list_item(116) = op_116;
+template_t__CAN__ERR__FLAG.list_item(117) = op_117;
+template_t__CAN__ERR__FLAG.list_item(118) = op_118;
+template_t__CAN__ERR__FLAG.list_item(119) = op_119;
+template_t__CAN__ERR__FLAG.list_item(120) = op_120;
+template_t__CAN__ERR__FLAG.list_item(121) = op_121;
+template_t__CAN__ERR__FLAG.list_item(122) = op_122;
+template_t__CAN__ERR__FLAG.list_item(123) = op_123;
+template_t__CAN__ERR__FLAG.list_item(124) = op_124;
+template_t__CAN__ERR__FLAG.list_item(125) = op_125;
+template_t__CAN__ERR__FLAG.list_item(126) = op_126;
+template_t__CAN__ERR__FLAG.list_item(127) = op_127;
+}
+
+
+} /* end of namespace */
diff --git a/demo/Can.d b/demo/Can.d
new file mode 100644
index 0000000..3d61251
--- /dev/null
+++ b/demo/Can.d
@@ -0,0 +1,59 @@
+Can.o Can.d : Can.cc Can.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh \
+ General_Types.hh
diff --git a/demo/Can.hh b/demo/Can.hh
new file mode 100644
index 0000000..b656c84
--- /dev/null
+++ b/demo/Can.hh
@@ -0,0 +1,585 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef Can_HH
+#define Can_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "General_Types.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef Can_HH
+#endif
+
+namespace Can {
+
+/* Forward declarations of classes */
+
+class AdresseFamily__enum;
+class AdresseFamily__enum_template;
+class ProtocolFamily__enum;
+class ProtocolFamily__enum_template;
+class PF__CAN__protocols__enum;
+class PF__CAN__protocols__enum_template;
+class CAN__frame;
+class CAN__frame_template;
+class CANFD__frame;
+class CANFD__frame_template;
+
+} /* end of namespace */
+
+#ifndef Can_HH
+#define Can_HH
+
+namespace Can {
+
+/* Type definitions */
+
+typedef OCTETSTRING CAN__id;
+typedef OCTETSTRING_template CAN__id_template;
+typedef BITSTRING CAN__flags;
+typedef BITSTRING_template CAN__flags_template;
+typedef OCTETSTRING CAN__PDU;
+typedef OCTETSTRING_template CAN__PDU_template;
+
+/* Class definitions */
+
+class AdresseFamily__enum : public Base_Type { // enum
+friend class AdresseFamily__enum_template;
+public:
+enum enum_type { PF__CAN = 29, UNKNOWN_VALUE = 0, UNBOUND_VALUE = 1 };
+private:
+enum_type enum_value;
+
+public:
+AdresseFamily__enum();
+AdresseFamily__enum(int other_value);
+AdresseFamily__enum(enum_type other_value);
+AdresseFamily__enum(const AdresseFamily__enum& other_value);
+
+AdresseFamily__enum& operator=(int other_value);
+AdresseFamily__enum& operator=(enum_type other_value);
+AdresseFamily__enum& operator=(const AdresseFamily__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const AdresseFamily__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const AdresseFamily__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const AdresseFamily__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const AdresseFamily__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const AdresseFamily__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const AdresseFamily__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const AdresseFamily__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class AdresseFamily__enum_template : public Base_Template {
+union {
+AdresseFamily__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+AdresseFamily__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const AdresseFamily__enum_template& other_value);
+
+public:
+AdresseFamily__enum_template();
+AdresseFamily__enum_template(template_sel other_value);
+AdresseFamily__enum_template(int other_value);
+AdresseFamily__enum_template(AdresseFamily__enum::enum_type other_value);
+AdresseFamily__enum_template(const AdresseFamily__enum& other_value);
+AdresseFamily__enum_template(const OPTIONAL<AdresseFamily__enum>& other_value);
+AdresseFamily__enum_template(const AdresseFamily__enum_template& other_value);
+~AdresseFamily__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+AdresseFamily__enum_template& operator=(template_sel other_value);
+AdresseFamily__enum_template& operator=(int other_value);
+AdresseFamily__enum_template& operator=(AdresseFamily__enum::enum_type other_value);
+AdresseFamily__enum_template& operator=(const AdresseFamily__enum& other_value);
+AdresseFamily__enum_template& operator=(const OPTIONAL<AdresseFamily__enum>& other_value);
+AdresseFamily__enum_template& operator=(const AdresseFamily__enum_template& other_value);
+
+boolean match(AdresseFamily__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const AdresseFamily__enum& other_value, boolean legacy = FALSE) const;
+AdresseFamily__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+AdresseFamily__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const AdresseFamily__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class ProtocolFamily__enum : public Base_Type { // enum
+friend class ProtocolFamily__enum_template;
+public:
+enum enum_type { SOCK__DGRAM = 2, SOCK__RAW = 3, UNKNOWN_VALUE = 0, UNBOUND_VALUE = 1 };
+private:
+enum_type enum_value;
+
+public:
+ProtocolFamily__enum();
+ProtocolFamily__enum(int other_value);
+ProtocolFamily__enum(enum_type other_value);
+ProtocolFamily__enum(const ProtocolFamily__enum& other_value);
+
+ProtocolFamily__enum& operator=(int other_value);
+ProtocolFamily__enum& operator=(enum_type other_value);
+ProtocolFamily__enum& operator=(const ProtocolFamily__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const ProtocolFamily__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const ProtocolFamily__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const ProtocolFamily__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const ProtocolFamily__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const ProtocolFamily__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const ProtocolFamily__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const ProtocolFamily__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class ProtocolFamily__enum_template : public Base_Template {
+union {
+ProtocolFamily__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+ProtocolFamily__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const ProtocolFamily__enum_template& other_value);
+
+public:
+ProtocolFamily__enum_template();
+ProtocolFamily__enum_template(template_sel other_value);
+ProtocolFamily__enum_template(int other_value);
+ProtocolFamily__enum_template(ProtocolFamily__enum::enum_type other_value);
+ProtocolFamily__enum_template(const ProtocolFamily__enum& other_value);
+ProtocolFamily__enum_template(const OPTIONAL<ProtocolFamily__enum>& other_value);
+ProtocolFamily__enum_template(const ProtocolFamily__enum_template& other_value);
+~ProtocolFamily__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+ProtocolFamily__enum_template& operator=(template_sel other_value);
+ProtocolFamily__enum_template& operator=(int other_value);
+ProtocolFamily__enum_template& operator=(ProtocolFamily__enum::enum_type other_value);
+ProtocolFamily__enum_template& operator=(const ProtocolFamily__enum& other_value);
+ProtocolFamily__enum_template& operator=(const OPTIONAL<ProtocolFamily__enum>& other_value);
+ProtocolFamily__enum_template& operator=(const ProtocolFamily__enum_template& other_value);
+
+boolean match(ProtocolFamily__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const ProtocolFamily__enum& other_value, boolean legacy = FALSE) const;
+ProtocolFamily__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+ProtocolFamily__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const ProtocolFamily__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class PF__CAN__protocols__enum : public Base_Type { // enum
+friend class PF__CAN__protocols__enum_template;
+public:
+enum enum_type { CAN__RAW = 1, CAN__BCM = 2, CAN__TP16 = 3, CAN__TP20 = 4, CAN__MCNET = 5, CAN__ISOTP = 6, CAN__NPROTO = 7, UNKNOWN_VALUE = 0, UNBOUND_VALUE = 8 };
+private:
+enum_type enum_value;
+
+public:
+PF__CAN__protocols__enum();
+PF__CAN__protocols__enum(int other_value);
+PF__CAN__protocols__enum(enum_type other_value);
+PF__CAN__protocols__enum(const PF__CAN__protocols__enum& other_value);
+
+PF__CAN__protocols__enum& operator=(int other_value);
+PF__CAN__protocols__enum& operator=(enum_type other_value);
+PF__CAN__protocols__enum& operator=(const PF__CAN__protocols__enum& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const PF__CAN__protocols__enum& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const PF__CAN__protocols__enum& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const PF__CAN__protocols__enum& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const PF__CAN__protocols__enum& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const PF__CAN__protocols__enum& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const PF__CAN__protocols__enum& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const PF__CAN__protocols__enum& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class PF__CAN__protocols__enum_template : public Base_Template {
+union {
+PF__CAN__protocols__enum::enum_type single_value;
+struct {
+unsigned int n_values;
+PF__CAN__protocols__enum_template *list_value;
+} value_list;
+};
+
+void copy_template(const PF__CAN__protocols__enum_template& other_value);
+
+public:
+PF__CAN__protocols__enum_template();
+PF__CAN__protocols__enum_template(template_sel other_value);
+PF__CAN__protocols__enum_template(int other_value);
+PF__CAN__protocols__enum_template(PF__CAN__protocols__enum::enum_type other_value);
+PF__CAN__protocols__enum_template(const PF__CAN__protocols__enum& other_value);
+PF__CAN__protocols__enum_template(const OPTIONAL<PF__CAN__protocols__enum>& other_value);
+PF__CAN__protocols__enum_template(const PF__CAN__protocols__enum_template& other_value);
+~PF__CAN__protocols__enum_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+PF__CAN__protocols__enum_template& operator=(template_sel other_value);
+PF__CAN__protocols__enum_template& operator=(int other_value);
+PF__CAN__protocols__enum_template& operator=(PF__CAN__protocols__enum::enum_type other_value);
+PF__CAN__protocols__enum_template& operator=(const PF__CAN__protocols__enum& other_value);
+PF__CAN__protocols__enum_template& operator=(const OPTIONAL<PF__CAN__protocols__enum>& other_value);
+PF__CAN__protocols__enum_template& operator=(const PF__CAN__protocols__enum_template& other_value);
+
+boolean match(PF__CAN__protocols__enum::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const PF__CAN__protocols__enum& other_value, boolean legacy = FALSE) const;
+PF__CAN__protocols__enum::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+PF__CAN__protocols__enum_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const PF__CAN__protocols__enum& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class CAN__frame {
+ OCTETSTRING field_can__id;
+ OCTETSTRING field_can__pdu;
+public:
+ CAN__frame();
+ CAN__frame(const OCTETSTRING& par_can__id,
+ const OCTETSTRING& par_can__pdu);
+ CAN__frame(const CAN__frame& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__frame& operator=(const CAN__frame& other_value);
+ boolean operator==(const CAN__frame& other_value) const;
+ inline boolean operator!=(const CAN__frame& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& can__id()
+ {return field_can__id;}
+ inline const OCTETSTRING& can__id() const
+ {return field_can__id;}
+ inline OCTETSTRING& can__pdu()
+ {return field_can__pdu;}
+ inline const OCTETSTRING& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+};
+
+class CAN__frame_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__frame_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__frame& other_value);
+void copy_template(const CAN__frame_template& other_value);
+
+public:
+CAN__frame_template();
+CAN__frame_template(template_sel other_value);
+CAN__frame_template(const CAN__frame& other_value);
+CAN__frame_template(const OPTIONAL<CAN__frame>& other_value);
+CAN__frame_template(const CAN__frame_template& other_value);
+~CAN__frame_template();
+CAN__frame_template& operator=(template_sel other_value);
+CAN__frame_template& operator=(const CAN__frame& other_value);
+CAN__frame_template& operator=(const OPTIONAL<CAN__frame>& other_value);
+CAN__frame_template& operator=(const CAN__frame_template& other_value);
+boolean match(const CAN__frame& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__frame valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__frame_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& can__id();
+const OCTETSTRING_template& can__id() const;
+OCTETSTRING_template& can__pdu();
+const OCTETSTRING_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__frame& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CANFD__frame {
+ OCTETSTRING field_can__id;
+ BITSTRING field_can__flags;
+ OCTETSTRING field_can__pdu;
+public:
+ CANFD__frame();
+ CANFD__frame(const OCTETSTRING& par_can__id,
+ const BITSTRING& par_can__flags,
+ const OCTETSTRING& par_can__pdu);
+ CANFD__frame(const CANFD__frame& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CANFD__frame& operator=(const CANFD__frame& other_value);
+ boolean operator==(const CANFD__frame& other_value) const;
+ inline boolean operator!=(const CANFD__frame& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline OCTETSTRING& can__id()
+ {return field_can__id;}
+ inline const OCTETSTRING& can__id() const
+ {return field_can__id;}
+ inline BITSTRING& can__flags()
+ {return field_can__flags;}
+ inline const BITSTRING& can__flags() const
+ {return field_can__flags;}
+ inline OCTETSTRING& can__pdu()
+ {return field_can__pdu;}
+ inline const OCTETSTRING& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 3;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+};
+
+class CANFD__frame_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CANFD__frame_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CANFD__frame& other_value);
+void copy_template(const CANFD__frame_template& other_value);
+
+public:
+CANFD__frame_template();
+CANFD__frame_template(template_sel other_value);
+CANFD__frame_template(const CANFD__frame& other_value);
+CANFD__frame_template(const OPTIONAL<CANFD__frame>& other_value);
+CANFD__frame_template(const CANFD__frame_template& other_value);
+~CANFD__frame_template();
+CANFD__frame_template& operator=(template_sel other_value);
+CANFD__frame_template& operator=(const CANFD__frame& other_value);
+CANFD__frame_template& operator=(const OPTIONAL<CANFD__frame>& other_value);
+CANFD__frame_template& operator=(const CANFD__frame_template& other_value);
+boolean match(const CANFD__frame& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CANFD__frame valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CANFD__frame_template& list_item(unsigned int list_index) const;
+OCTETSTRING_template& can__id();
+const OCTETSTRING_template& can__id() const;
+BITSTRING_template& can__flags();
+const BITSTRING_template& can__flags() const;
+OCTETSTRING_template& can__pdu();
+const OCTETSTRING_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CANFD__frame& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+
+/* Global variable declarations */
+
+extern const OCTETSTRING& CAN__EFF__FLAG;
+extern const OCTETSTRING& CAN__RTR__FLAG;
+extern const OCTETSTRING& CAN__ERR__FLAG;
+extern const OCTETSTRING& CAN__SFF__MASK;
+extern const OCTETSTRING& CAN__EFF__MASK;
+extern const OCTETSTRING& CAN__ERR__MASK;
+extern const OCTETSTRING_template& t__CAN__EFF__FLAG;
+extern const OCTETSTRING_template& t__CAN__SFF__FLAG;
+extern const OCTETSTRING_template& t__CAN__RTR__FLAG;
+extern const OCTETSTRING_template& t__CAN__ERR__FLAG;
+extern const TTCN_Typedescriptor_t AdresseFamily__enum_descr_;
+extern const INTEGER& AF__CAN;
+extern const TTCN_Typedescriptor_t ProtocolFamily__enum_descr_;
+extern const TTCN_Typedescriptor_t PF__CAN__protocols__enum_descr_;
+extern const INTEGER& CAN__MAX__DLEN;
+extern const INTEGER& CANFD__MAX__DLEN;
+extern const TTCN_RAWdescriptor_t CAN__id_raw_;
+extern const XERdescriptor_t CAN__id_xer_;
+extern const TTCN_OERdescriptor_t CAN__id_oer_;
+extern const TTCN_Typedescriptor_t CAN__id_descr_;
+extern const TTCN_RAWdescriptor_t CAN__flags_raw_;
+extern const XERdescriptor_t CAN__flags_xer_;
+extern const TTCN_OERdescriptor_t CAN__flags_oer_;
+extern const TTCN_Typedescriptor_t CAN__flags_descr_;
+extern const XERdescriptor_t CAN__PDU_xer_;
+extern const TTCN_OERdescriptor_t CAN__PDU_oer_;
+extern const TTCN_Typedescriptor_t CAN__PDU_descr_;
+extern const XERdescriptor_t CAN__frame_can__id_xer_;
+extern const TTCN_OERdescriptor_t CAN__frame_can__id_oer_;
+extern const TTCN_Typedescriptor_t CAN__frame_can__id_descr_;
+extern const XERdescriptor_t CAN__frame_can__pdu_xer_;
+extern const TTCN_OERdescriptor_t CAN__frame_can__pdu_oer_;
+extern const TTCN_Typedescriptor_t CAN__frame_can__pdu_descr_;
+extern const TTCN_Typedescriptor_t CAN__frame_descr_;
+extern const XERdescriptor_t CANFD__frame_can__id_xer_;
+extern const TTCN_OERdescriptor_t CANFD__frame_can__id_oer_;
+extern const TTCN_Typedescriptor_t CANFD__frame_can__id_descr_;
+extern const XERdescriptor_t CANFD__frame_can__flags_xer_;
+extern const TTCN_OERdescriptor_t CANFD__frame_can__flags_oer_;
+extern const TTCN_Typedescriptor_t CANFD__frame_can__flags_descr_;
+extern const XERdescriptor_t CANFD__frame_can__pdu_xer_;
+extern const TTCN_OERdescriptor_t CANFD__frame_can__pdu_oer_;
+extern const TTCN_Typedescriptor_t CANFD__frame_can__pdu_descr_;
+extern const TTCN_Typedescriptor_t CANFD__frame_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/Can.o b/demo/Can.o
new file mode 100644
index 0000000..4dd131e
--- /dev/null
+++ b/demo/Can.o
Binary files differ
diff --git a/demo/CanError.cc b/demo/CanError.cc
new file mode 100644
index 0000000..dd52464
--- /dev/null
+++ b/demo/CanError.cc
@@ -0,0 +1,403 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "CanError.hh"
+
+namespace CanError {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_9_octets[] = { 0 },
+os_0_octets[] = { 0, 0, 0, 1 },
+os_1_octets[] = { 0, 0, 0, 2 },
+os_2_octets[] = { 0, 0, 0, 4 },
+os_3_octets[] = { 0, 0, 0, 8 },
+os_4_octets[] = { 0, 0, 0, 16 },
+os_5_octets[] = { 0, 0, 0, 32 },
+os_6_octets[] = { 0, 0, 0, 64 },
+os_7_octets[] = { 0, 0, 0, 128 },
+os_8_octets[] = { 0, 0, 1, 0 },
+os_10_octets[] = { 1 },
+os_11_octets[] = { 2 },
+os_18_octets[] = { 3 },
+os_12_octets[] = { 4 },
+os_20_octets[] = { 5 },
+os_19_octets[] = { 6 },
+os_21_octets[] = { 7 },
+os_13_octets[] = { 8 },
+os_26_octets[] = { 9 },
+os_28_octets[] = { 10 },
+os_27_octets[] = { 11 },
+os_24_octets[] = { 12 },
+os_25_octets[] = { 13 },
+os_23_octets[] = { 14 },
+os_22_octets[] = { 15 },
+os_14_octets[] = { 16 },
+os_33_octets[] = { 18 },
+os_29_octets[] = { 24 },
+os_30_octets[] = { 25 },
+os_32_octets[] = { 26 },
+os_31_octets[] = { 27 },
+os_15_octets[] = { 32 },
+os_16_octets[] = { 64 },
+os_34_octets[] = { 80 },
+os_35_octets[] = { 96 },
+os_36_octets[] = { 112 },
+os_17_octets[] = { 128 };
+static const OCTETSTRING os_9(1, os_9_octets),
+os_0(4, os_0_octets),
+os_1(4, os_1_octets),
+os_2(4, os_2_octets),
+os_3(4, os_3_octets),
+os_4(4, os_4_octets),
+os_5(4, os_5_octets),
+os_6(4, os_6_octets),
+os_7(4, os_7_octets),
+os_8(4, os_8_octets),
+os_10(1, os_10_octets),
+os_11(1, os_11_octets),
+os_18(1, os_18_octets),
+os_12(1, os_12_octets),
+os_20(1, os_20_octets),
+os_19(1, os_19_octets),
+os_21(1, os_21_octets),
+os_13(1, os_13_octets),
+os_26(1, os_26_octets),
+os_28(1, os_28_octets),
+os_27(1, os_27_octets),
+os_24(1, os_24_octets),
+os_25(1, os_25_octets),
+os_23(1, os_23_octets),
+os_22(1, os_22_octets),
+os_14(1, os_14_octets),
+os_33(1, os_33_octets),
+os_29(1, os_29_octets),
+os_30(1, os_30_octets),
+os_32(1, os_32_octets),
+os_31(1, os_31_octets),
+os_15(1, os_15_octets),
+os_16(1, os_16_octets),
+os_34(1, os_34_octets),
+os_35(1, os_35_octets),
+os_36(1, os_36_octets),
+os_17(1, os_17_octets);
+static const unsigned char module_checksum[] = { 0xa1, 0x48, 0x1f, 0x80, 0xd2, 0x74, 0xfa, 0xcc, 0xdb, 0xb8, 0x7b, 0x2f, 0x67, 0xc4, 0x12, 0xe5 };
+
+/* Global variable definitions */
+
+static INTEGER const_CAN__ERR__DLC;
+const INTEGER& CAN__ERR__DLC = const_CAN__ERR__DLC;
+static OCTETSTRING const_CAN__ERR__TX__TIMEOUT;
+const OCTETSTRING& CAN__ERR__TX__TIMEOUT = const_CAN__ERR__TX__TIMEOUT;
+static OCTETSTRING const_CAN__ERR__LOSTARB;
+const OCTETSTRING& CAN__ERR__LOSTARB = const_CAN__ERR__LOSTARB;
+static OCTETSTRING const_CAN__ERR__CRTL;
+const OCTETSTRING& CAN__ERR__CRTL = const_CAN__ERR__CRTL;
+static OCTETSTRING const_CAN__ERR__PROT;
+const OCTETSTRING& CAN__ERR__PROT = const_CAN__ERR__PROT;
+static OCTETSTRING const_CAN__ERR__TRX;
+const OCTETSTRING& CAN__ERR__TRX = const_CAN__ERR__TRX;
+static OCTETSTRING const_CAN__ERR__ACK;
+const OCTETSTRING& CAN__ERR__ACK = const_CAN__ERR__ACK;
+static OCTETSTRING const_CAN__ERR__BUSOFF;
+const OCTETSTRING& CAN__ERR__BUSOFF = const_CAN__ERR__BUSOFF;
+static OCTETSTRING const_CAN__ERR__BUSERROR;
+const OCTETSTRING& CAN__ERR__BUSERROR = const_CAN__ERR__BUSERROR;
+static OCTETSTRING const_CAN__ERR__RESTARTED;
+const OCTETSTRING& CAN__ERR__RESTARTED = const_CAN__ERR__RESTARTED;
+static OCTETSTRING const_CAN__ERR__LOSTARB__UNSPEC;
+const OCTETSTRING& CAN__ERR__LOSTARB__UNSPEC = const_CAN__ERR__LOSTARB__UNSPEC;
+static OCTETSTRING const_CAN__ERR__CRTL__UNSPEC;
+const OCTETSTRING& CAN__ERR__CRTL__UNSPEC = const_CAN__ERR__CRTL__UNSPEC;
+static OCTETSTRING const_CAN__ERR__CRTL__RX__OVERFLOW;
+const OCTETSTRING& CAN__ERR__CRTL__RX__OVERFLOW = const_CAN__ERR__CRTL__RX__OVERFLOW;
+static OCTETSTRING const_CAN__ERR__CRTL__TX__OVERFLOW;
+const OCTETSTRING& CAN__ERR__CRTL__TX__OVERFLOW = const_CAN__ERR__CRTL__TX__OVERFLOW;
+static OCTETSTRING const_CAN__ERR__CRTL__RX__WARNING;
+const OCTETSTRING& CAN__ERR__CRTL__RX__WARNING = const_CAN__ERR__CRTL__RX__WARNING;
+static OCTETSTRING const_CAN__ERR__CRTL__TX__WARNING;
+const OCTETSTRING& CAN__ERR__CRTL__TX__WARNING = const_CAN__ERR__CRTL__TX__WARNING;
+static OCTETSTRING const_CAN__ERR__CRTL__RX__PASSIVE;
+const OCTETSTRING& CAN__ERR__CRTL__RX__PASSIVE = const_CAN__ERR__CRTL__RX__PASSIVE;
+static OCTETSTRING const_CAN__ERR__CRTL__TX__PASSIVE;
+const OCTETSTRING& CAN__ERR__CRTL__TX__PASSIVE = const_CAN__ERR__CRTL__TX__PASSIVE;
+static OCTETSTRING const_CAN__ERR__CRTL__ACTIVE;
+const OCTETSTRING& CAN__ERR__CRTL__ACTIVE = const_CAN__ERR__CRTL__ACTIVE;
+static OCTETSTRING const_CAN__ERR__PROT__UNSPEC;
+const OCTETSTRING& CAN__ERR__PROT__UNSPEC = const_CAN__ERR__PROT__UNSPEC;
+static OCTETSTRING const_CAN__ERR__PROT__BIT;
+const OCTETSTRING& CAN__ERR__PROT__BIT = const_CAN__ERR__PROT__BIT;
+static OCTETSTRING const_CAN__ERR__PROT__FORM;
+const OCTETSTRING& CAN__ERR__PROT__FORM = const_CAN__ERR__PROT__FORM;
+static OCTETSTRING const_CAN__ERR__PROT__STUFF;
+const OCTETSTRING& CAN__ERR__PROT__STUFF = const_CAN__ERR__PROT__STUFF;
+static OCTETSTRING const_CAN__ERR__PROT__BIT0;
+const OCTETSTRING& CAN__ERR__PROT__BIT0 = const_CAN__ERR__PROT__BIT0;
+static OCTETSTRING const_CAN__ERR__PROT__BIT1;
+const OCTETSTRING& CAN__ERR__PROT__BIT1 = const_CAN__ERR__PROT__BIT1;
+static OCTETSTRING const_CAN__ERR__PROT__OVERLOAD;
+const OCTETSTRING& CAN__ERR__PROT__OVERLOAD = const_CAN__ERR__PROT__OVERLOAD;
+static OCTETSTRING const_CAN__ERR__PROT__ACTIVE;
+const OCTETSTRING& CAN__ERR__PROT__ACTIVE = const_CAN__ERR__PROT__ACTIVE;
+static OCTETSTRING const_CAN__ERR__PROT__TX;
+const OCTETSTRING& CAN__ERR__PROT__TX = const_CAN__ERR__PROT__TX;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__UNSPEC;
+const OCTETSTRING& CAN__ERR__PROT__LOC__UNSPEC = const_CAN__ERR__PROT__LOC__UNSPEC;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__SOF;
+const OCTETSTRING& CAN__ERR__PROT__LOC__SOF = const_CAN__ERR__PROT__LOC__SOF;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ID28__21;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ID28__21 = const_CAN__ERR__PROT__LOC__ID28__21;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ID20__18;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ID20__18 = const_CAN__ERR__PROT__LOC__ID20__18;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__SRTR;
+const OCTETSTRING& CAN__ERR__PROT__LOC__SRTR = const_CAN__ERR__PROT__LOC__SRTR;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__IDE;
+const OCTETSTRING& CAN__ERR__PROT__LOC__IDE = const_CAN__ERR__PROT__LOC__IDE;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ID17__13;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ID17__13 = const_CAN__ERR__PROT__LOC__ID17__13;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ID12__05;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ID12__05 = const_CAN__ERR__PROT__LOC__ID12__05;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ID04__00;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ID04__00 = const_CAN__ERR__PROT__LOC__ID04__00;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__RTR;
+const OCTETSTRING& CAN__ERR__PROT__LOC__RTR = const_CAN__ERR__PROT__LOC__RTR;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__RES1;
+const OCTETSTRING& CAN__ERR__PROT__LOC__RES1 = const_CAN__ERR__PROT__LOC__RES1;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__RES0;
+const OCTETSTRING& CAN__ERR__PROT__LOC__RES0 = const_CAN__ERR__PROT__LOC__RES0;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__DLC;
+const OCTETSTRING& CAN__ERR__PROT__LOC__DLC = const_CAN__ERR__PROT__LOC__DLC;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__DATA;
+const OCTETSTRING& CAN__ERR__PROT__LOC__DATA = const_CAN__ERR__PROT__LOC__DATA;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__CRC__SEQ;
+const OCTETSTRING& CAN__ERR__PROT__LOC__CRC__SEQ = const_CAN__ERR__PROT__LOC__CRC__SEQ;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__CRC__DEL;
+const OCTETSTRING& CAN__ERR__PROT__LOC__CRC__DEL = const_CAN__ERR__PROT__LOC__CRC__DEL;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ACK;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ACK = const_CAN__ERR__PROT__LOC__ACK;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__ACK__DEL;
+const OCTETSTRING& CAN__ERR__PROT__LOC__ACK__DEL = const_CAN__ERR__PROT__LOC__ACK__DEL;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__EOF;
+const OCTETSTRING& CAN__ERR__PROT__LOC__EOF = const_CAN__ERR__PROT__LOC__EOF;
+static OCTETSTRING const_CAN__ERR__PROT__LOC__INTERM;
+const OCTETSTRING& CAN__ERR__PROT__LOC__INTERM = const_CAN__ERR__PROT__LOC__INTERM;
+static OCTETSTRING const_CAN__ERR__TRX__UNSPEC;
+const OCTETSTRING& CAN__ERR__TRX__UNSPEC = const_CAN__ERR__TRX__UNSPEC;
+static OCTETSTRING const_CAN__ERR__TRX__CANH__NO__WIRE;
+const OCTETSTRING& CAN__ERR__TRX__CANH__NO__WIRE = const_CAN__ERR__TRX__CANH__NO__WIRE;
+static OCTETSTRING const_CAN__ERR__TRX__CANH__SHORT__TO__BAT;
+const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__BAT = const_CAN__ERR__TRX__CANH__SHORT__TO__BAT;
+static OCTETSTRING const_CAN__ERR__TRX__CANH__SHORT__TO__VCC;
+const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__VCC = const_CAN__ERR__TRX__CANH__SHORT__TO__VCC;
+static OCTETSTRING const_CAN__ERR__TRX__CANH__SHORT__TO__GND;
+const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__GND = const_CAN__ERR__TRX__CANH__SHORT__TO__GND;
+static OCTETSTRING const_CAN__ERR__TRX__CANL__NO__WIRE;
+const OCTETSTRING& CAN__ERR__TRX__CANL__NO__WIRE = const_CAN__ERR__TRX__CANL__NO__WIRE;
+static OCTETSTRING const_CAN__ERR__TRX__CANL__SHORT__TO__BAT;
+const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__BAT = const_CAN__ERR__TRX__CANL__SHORT__TO__BAT;
+static OCTETSTRING const_CAN__ERR__TRX__CANL__SHORT__TO__VCC;
+const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__VCC = const_CAN__ERR__TRX__CANL__SHORT__TO__VCC;
+static OCTETSTRING const_CAN__ERR__TRX__CANL__SHORT__TO__GND;
+const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__GND = const_CAN__ERR__TRX__CANL__SHORT__TO__GND;
+static OCTETSTRING const_CAN__ERR__TRX__CANL__SHORT__TO__CANH;
+const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__CANH = const_CAN__ERR__TRX__CANL__SHORT__TO__CANH;
+TTCN_Module module_object("CanError", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("../src/CanError.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "CanError");
+current_location.update_lineno(16);
+#line 16 "../src/CanError.ttcn"
+const_CAN__ERR__DLC = 8;
+current_location.update_lineno(19);
+#line 19 "../src/CanError.ttcn"
+const_CAN__ERR__TX__TIMEOUT = os_0;
+current_location.update_lineno(20);
+#line 20 "../src/CanError.ttcn"
+const_CAN__ERR__LOSTARB = os_1;
+current_location.update_lineno(21);
+#line 21 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL = os_2;
+current_location.update_lineno(22);
+#line 22 "../src/CanError.ttcn"
+const_CAN__ERR__PROT = os_3;
+current_location.update_lineno(23);
+#line 23 "../src/CanError.ttcn"
+const_CAN__ERR__TRX = os_4;
+current_location.update_lineno(24);
+#line 24 "../src/CanError.ttcn"
+const_CAN__ERR__ACK = os_5;
+current_location.update_lineno(25);
+#line 25 "../src/CanError.ttcn"
+const_CAN__ERR__BUSOFF = os_6;
+current_location.update_lineno(26);
+#line 26 "../src/CanError.ttcn"
+const_CAN__ERR__BUSERROR = os_7;
+current_location.update_lineno(27);
+#line 27 "../src/CanError.ttcn"
+const_CAN__ERR__RESTARTED = os_8;
+current_location.update_lineno(30);
+#line 30 "../src/CanError.ttcn"
+const_CAN__ERR__LOSTARB__UNSPEC = os_9;
+current_location.update_lineno(34);
+#line 34 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__UNSPEC = os_9;
+current_location.update_lineno(35);
+#line 35 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__RX__OVERFLOW = os_10;
+current_location.update_lineno(36);
+#line 36 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__TX__OVERFLOW = os_11;
+current_location.update_lineno(37);
+#line 37 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__RX__WARNING = os_12;
+current_location.update_lineno(38);
+#line 38 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__TX__WARNING = os_13;
+current_location.update_lineno(39);
+#line 39 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__RX__PASSIVE = os_14;
+current_location.update_lineno(40);
+#line 40 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__TX__PASSIVE = os_15;
+current_location.update_lineno(43);
+#line 43 "../src/CanError.ttcn"
+const_CAN__ERR__CRTL__ACTIVE = os_16;
+current_location.update_lineno(46);
+#line 46 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__UNSPEC = os_9;
+current_location.update_lineno(47);
+#line 47 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__BIT = os_10;
+current_location.update_lineno(48);
+#line 48 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__FORM = os_11;
+current_location.update_lineno(49);
+#line 49 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__STUFF = os_12;
+current_location.update_lineno(50);
+#line 50 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__BIT0 = os_13;
+current_location.update_lineno(51);
+#line 51 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__BIT1 = os_14;
+current_location.update_lineno(52);
+#line 52 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__OVERLOAD = os_15;
+current_location.update_lineno(53);
+#line 53 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__ACTIVE = os_16;
+current_location.update_lineno(54);
+#line 54 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__TX = os_17;
+current_location.update_lineno(57);
+#line 57 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__UNSPEC = os_9;
+current_location.update_lineno(58);
+#line 58 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__SOF = os_18;
+current_location.update_lineno(59);
+#line 59 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ID28__21 = os_11;
+current_location.update_lineno(60);
+#line 60 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ID20__18 = os_19;
+current_location.update_lineno(61);
+#line 61 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__SRTR = os_12;
+current_location.update_lineno(62);
+#line 62 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__IDE = os_20;
+current_location.update_lineno(63);
+#line 63 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ID17__13 = os_21;
+current_location.update_lineno(64);
+#line 64 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ID12__05 = os_22;
+current_location.update_lineno(65);
+#line 65 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ID04__00 = os_23;
+current_location.update_lineno(66);
+#line 66 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__RTR = os_24;
+current_location.update_lineno(67);
+#line 67 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__RES1 = os_25;
+current_location.update_lineno(68);
+#line 68 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__RES0 = os_26;
+current_location.update_lineno(69);
+#line 69 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__DLC = os_27;
+current_location.update_lineno(70);
+#line 70 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__DATA = os_28;
+current_location.update_lineno(71);
+#line 71 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__CRC__SEQ = os_13;
+current_location.update_lineno(72);
+#line 72 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__CRC__DEL = os_29;
+current_location.update_lineno(73);
+#line 73 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ACK = os_30;
+current_location.update_lineno(74);
+#line 74 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__ACK__DEL = os_31;
+current_location.update_lineno(75);
+#line 75 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__EOF = os_32;
+current_location.update_lineno(76);
+#line 76 "../src/CanError.ttcn"
+const_CAN__ERR__PROT__LOC__INTERM = os_33;
+current_location.update_lineno(80);
+#line 80 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__UNSPEC = os_9;
+current_location.update_lineno(81);
+#line 81 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANH__NO__WIRE = os_12;
+current_location.update_lineno(82);
+#line 82 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANH__SHORT__TO__BAT = os_20;
+current_location.update_lineno(83);
+#line 83 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANH__SHORT__TO__VCC = os_19;
+current_location.update_lineno(84);
+#line 84 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANH__SHORT__TO__GND = os_21;
+current_location.update_lineno(85);
+#line 85 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANL__NO__WIRE = os_16;
+current_location.update_lineno(86);
+#line 86 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANL__SHORT__TO__BAT = os_34;
+current_location.update_lineno(87);
+#line 87 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANL__SHORT__TO__VCC = os_35;
+current_location.update_lineno(88);
+#line 88 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANL__SHORT__TO__GND = os_36;
+current_location.update_lineno(89);
+#line 89 "../src/CanError.ttcn"
+const_CAN__ERR__TRX__CANL__SHORT__TO__CANH = os_17;
+}
+
+
+} /* end of namespace */
diff --git a/demo/CanError.d b/demo/CanError.d
new file mode 100644
index 0000000..26a6814
--- /dev/null
+++ b/demo/CanError.d
@@ -0,0 +1,58 @@
+CanError.o CanError.d : CanError.cc CanError.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh
diff --git a/demo/CanError.hh b/demo/CanError.hh
new file mode 100644
index 0000000..e5d4076
--- /dev/null
+++ b/demo/CanError.hh
@@ -0,0 +1,97 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef CanError_HH
+#define CanError_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+namespace CanError {
+
+/* Global variable declarations */
+
+extern const INTEGER& CAN__ERR__DLC;
+extern const OCTETSTRING& CAN__ERR__TX__TIMEOUT;
+extern const OCTETSTRING& CAN__ERR__LOSTARB;
+extern const OCTETSTRING& CAN__ERR__CRTL;
+extern const OCTETSTRING& CAN__ERR__PROT;
+extern const OCTETSTRING& CAN__ERR__TRX;
+extern const OCTETSTRING& CAN__ERR__ACK;
+extern const OCTETSTRING& CAN__ERR__BUSOFF;
+extern const OCTETSTRING& CAN__ERR__BUSERROR;
+extern const OCTETSTRING& CAN__ERR__RESTARTED;
+extern const OCTETSTRING& CAN__ERR__LOSTARB__UNSPEC;
+extern const OCTETSTRING& CAN__ERR__CRTL__UNSPEC;
+extern const OCTETSTRING& CAN__ERR__CRTL__RX__OVERFLOW;
+extern const OCTETSTRING& CAN__ERR__CRTL__TX__OVERFLOW;
+extern const OCTETSTRING& CAN__ERR__CRTL__RX__WARNING;
+extern const OCTETSTRING& CAN__ERR__CRTL__TX__WARNING;
+extern const OCTETSTRING& CAN__ERR__CRTL__RX__PASSIVE;
+extern const OCTETSTRING& CAN__ERR__CRTL__TX__PASSIVE;
+extern const OCTETSTRING& CAN__ERR__CRTL__ACTIVE;
+extern const OCTETSTRING& CAN__ERR__PROT__UNSPEC;
+extern const OCTETSTRING& CAN__ERR__PROT__BIT;
+extern const OCTETSTRING& CAN__ERR__PROT__FORM;
+extern const OCTETSTRING& CAN__ERR__PROT__STUFF;
+extern const OCTETSTRING& CAN__ERR__PROT__BIT0;
+extern const OCTETSTRING& CAN__ERR__PROT__BIT1;
+extern const OCTETSTRING& CAN__ERR__PROT__OVERLOAD;
+extern const OCTETSTRING& CAN__ERR__PROT__ACTIVE;
+extern const OCTETSTRING& CAN__ERR__PROT__TX;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__UNSPEC;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__SOF;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ID28__21;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ID20__18;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__SRTR;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__IDE;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ID17__13;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ID12__05;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ID04__00;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__RTR;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__RES1;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__RES0;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__DLC;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__DATA;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__CRC__SEQ;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__CRC__DEL;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ACK;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__ACK__DEL;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__EOF;
+extern const OCTETSTRING& CAN__ERR__PROT__LOC__INTERM;
+extern const OCTETSTRING& CAN__ERR__TRX__UNSPEC;
+extern const OCTETSTRING& CAN__ERR__TRX__CANH__NO__WIRE;
+extern const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__BAT;
+extern const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__VCC;
+extern const OCTETSTRING& CAN__ERR__TRX__CANH__SHORT__TO__GND;
+extern const OCTETSTRING& CAN__ERR__TRX__CANL__NO__WIRE;
+extern const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__BAT;
+extern const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__VCC;
+extern const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__GND;
+extern const OCTETSTRING& CAN__ERR__TRX__CANL__SHORT__TO__CANH;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/CanError.o b/demo/CanError.o
new file mode 100644
index 0000000..c117f63
--- /dev/null
+++ b/demo/CanError.o
Binary files differ
diff --git a/demo/General_Types.cc b/demo/General_Types.cc
new file mode 100644
index 0000000..20b0bec
--- /dev/null
+++ b/demo/General_Types.cc
@@ -0,0 +1,12858 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "General_Types.hh"
+
+namespace General__Types {
+
+/* Prototypes of static functions */
+
+static boolean init_comp_type(const char *component_type, boolean init_base_comps);
+
+/* Literal string constants */
+
+static const unsigned char module_checksum[] = { 0x38, 0xab, 0x27, 0xd4, 0xfd, 0x80, 0xda, 0x36, 0xf2, 0xea, 0x3a, 0x72, 0x9f, 0x2a, 0xd2, 0xb5 };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t BIT1n_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT1n_xer_ = { {"BIT1n>\n", "BIT1n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT1n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT1n_descr_ = { "@General_Types.BIT1n", &BITSTRING_ber_, &BIT1n_raw_, NULL, &BIT1n_xer_, &BITSTRING_json_, &BIT1n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT2n_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT2n_xer_ = { {"BIT2n>\n", "BIT2n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT2n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT2n_descr_ = { "@General_Types.BIT2n", &BITSTRING_ber_, &BIT2n_raw_, NULL, &BIT2n_xer_, &BITSTRING_json_, &BIT2n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT3n_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT3n_xer_ = { {"BIT3n>\n", "BIT3n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT3n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT3n_descr_ = { "@General_Types.BIT3n", &BITSTRING_ber_, &BIT3n_raw_, NULL, &BIT3n_xer_, &BITSTRING_json_, &BIT3n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT4n_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT4n_xer_ = { {"BIT4n>\n", "BIT4n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT4n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT4n_descr_ = { "@General_Types.BIT4n", &BITSTRING_ber_, &BIT4n_raw_, NULL, &BIT4n_xer_, &BITSTRING_json_, &BIT4n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5n_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5n_xer_ = { {"BIT5n>\n", "BIT5n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5n_descr_ = { "@General_Types.BIT5n", &BITSTRING_ber_, &BIT5n_raw_, NULL, &BIT5n_xer_, &BITSTRING_json_, &BIT5n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6n_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6n_xer_ = { {"BIT6n>\n", "BIT6n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6n_descr_ = { "@General_Types.BIT6n", &BITSTRING_ber_, &BIT6n_raw_, NULL, &BIT6n_xer_, &BITSTRING_json_, &BIT6n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT7n_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT7n_xer_ = { {"BIT7n>\n", "BIT7n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT7n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT7n_descr_ = { "@General_Types.BIT7n", &BITSTRING_ber_, &BIT7n_raw_, NULL, &BIT7n_xer_, &BITSTRING_json_, &BIT7n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT8n_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT8n_xer_ = { {"BIT8n>\n", "BIT8n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT8n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT8n_descr_ = { "@General_Types.BIT8n", &BITSTRING_ber_, &BIT8n_raw_, NULL, &BIT8n_xer_, &BITSTRING_json_, &BIT8n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT9n_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT9n_xer_ = { {"BIT9n>\n", "BIT9n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT9n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT9n_descr_ = { "@General_Types.BIT9n", &BITSTRING_ber_, &BIT9n_raw_, NULL, &BIT9n_xer_, &BITSTRING_json_, &BIT9n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT12n_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT12n_xer_ = { {"BIT12n>\n", "BIT12n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT12n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT12n_descr_ = { "@General_Types.BIT12n", &BITSTRING_ber_, &BIT12n_raw_, NULL, &BIT12n_xer_, &BITSTRING_json_, &BIT12n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT14n_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT14n_xer_ = { {"BIT14n>\n", "BIT14n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT14n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT14n_descr_ = { "@General_Types.BIT14n", &BITSTRING_ber_, &BIT14n_raw_, NULL, &BIT14n_xer_, &BITSTRING_json_, &BIT14n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT15n_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT15n_xer_ = { {"BIT15n>\n", "BIT15n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT15n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT15n_descr_ = { "@General_Types.BIT15n", &BITSTRING_ber_, &BIT15n_raw_, NULL, &BIT15n_xer_, &BITSTRING_json_, &BIT15n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT16n_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT16n_xer_ = { {"BIT16n>\n", "BIT16n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT16n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT16n_descr_ = { "@General_Types.BIT16n", &BITSTRING_ber_, &BIT16n_raw_, NULL, &BIT16n_xer_, &BITSTRING_json_, &BIT16n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT56n_raw_ = {56,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT56n_xer_ = { {"BIT56n>\n", "BIT56n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT56n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT56n_descr_ = { "@General_Types.BIT56n", &BITSTRING_ber_, &BIT56n_raw_, NULL, &BIT56n_xer_, &BITSTRING_json_, &BIT56n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT14__24n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT14__24n_xer_ = { {"BIT14_24n>\n", "BIT14_24n>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT14__24n_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT14__24n_descr_ = { "@General_Types.BIT14_24n", &BITSTRING_ber_, &BIT14__24n_raw_, NULL, &BIT14__24n_xer_, &BITSTRING_json_, &BIT14__24n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT1np_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT1np_xer_ = { {"BIT1np>\n", "BIT1np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT1np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT1np_descr_ = { "@General_Types.BIT1np", &BITSTRING_ber_, &BIT1np_raw_, NULL, &BIT1np_xer_, &BITSTRING_json_, &BIT1np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT2np_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT2np_xer_ = { {"BIT2np>\n", "BIT2np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT2np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT2np_descr_ = { "@General_Types.BIT2np", &BITSTRING_ber_, &BIT2np_raw_, NULL, &BIT2np_xer_, &BITSTRING_json_, &BIT2np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT3np_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT3np_xer_ = { {"BIT3np>\n", "BIT3np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT3np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT3np_descr_ = { "@General_Types.BIT3np", &BITSTRING_ber_, &BIT3np_raw_, NULL, &BIT3np_xer_, &BITSTRING_json_, &BIT3np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT4np_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT4np_xer_ = { {"BIT4np>\n", "BIT4np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT4np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT4np_descr_ = { "@General_Types.BIT4np", &BITSTRING_ber_, &BIT4np_raw_, NULL, &BIT4np_xer_, &BITSTRING_json_, &BIT4np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5np_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5np_xer_ = { {"BIT5np>\n", "BIT5np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5np_descr_ = { "@General_Types.BIT5np", &BITSTRING_ber_, &BIT5np_raw_, NULL, &BIT5np_xer_, &BITSTRING_json_, &BIT5np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6np_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6np_xer_ = { {"BIT6np>\n", "BIT6np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6np_descr_ = { "@General_Types.BIT6np", &BITSTRING_ber_, &BIT6np_raw_, NULL, &BIT6np_xer_, &BITSTRING_json_, &BIT6np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT7np_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT7np_xer_ = { {"BIT7np>\n", "BIT7np>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT7np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT7np_descr_ = { "@General_Types.BIT7np", &BITSTRING_ber_, &BIT7np_raw_, NULL, &BIT7np_xer_, &BITSTRING_json_, &BIT7np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT15np_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT15np_xer_ = { {"BIT15np>\n", "BIT15np>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT15np_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT15np_descr_ = { "@General_Types.BIT15np", &BITSTRING_ber_, &BIT15np_raw_, NULL, &BIT15np_xer_, &BITSTRING_json_, &BIT15np_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT1_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT1_xer_ = { {"BIT1>\n", "BIT1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT1_descr_ = { "@General_Types.BIT1", &BITSTRING_ber_, &BIT1_raw_, NULL, &BIT1_xer_, &BITSTRING_json_, &BIT1_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT2_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT2_xer_ = { {"BIT2>\n", "BIT2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT2_descr_ = { "@General_Types.BIT2", &BITSTRING_ber_, &BIT2_raw_, NULL, &BIT2_xer_, &BITSTRING_json_, &BIT2_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT3_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT3_xer_ = { {"BIT3>\n", "BIT3>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT3_descr_ = { "@General_Types.BIT3", &BITSTRING_ber_, &BIT3_raw_, NULL, &BIT3_xer_, &BITSTRING_json_, &BIT3_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT4_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT4_xer_ = { {"BIT4>\n", "BIT4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT4_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT4_descr_ = { "@General_Types.BIT4", &BITSTRING_ber_, &BIT4_raw_, NULL, &BIT4_xer_, &BITSTRING_json_, &BIT4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT5_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT5_xer_ = { {"BIT5>\n", "BIT5>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT5_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT5_descr_ = { "@General_Types.BIT5", &BITSTRING_ber_, &BIT5_raw_, NULL, &BIT5_xer_, &BITSTRING_json_, &BIT5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6_xer_ = { {"BIT6>\n", "BIT6>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6_descr_ = { "@General_Types.BIT6", &BITSTRING_ber_, &BIT6_raw_, NULL, &BIT6_xer_, &BITSTRING_json_, &BIT6_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT7_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,7,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT7_xer_ = { {"BIT7>\n", "BIT7>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT7_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT7_descr_ = { "@General_Types.BIT7", &BITSTRING_ber_, &BIT7_raw_, NULL, &BIT7_xer_, &BITSTRING_json_, &BIT7_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT8_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT8_xer_ = { {"BIT8>\n", "BIT8>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT8_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT8_descr_ = { "@General_Types.BIT8", &BITSTRING_ber_, &BIT8_raw_, NULL, &BIT8_xer_, &BITSTRING_json_, &BIT8_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT9_raw_ = {9,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,9,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT9_xer_ = { {"BIT9>\n", "BIT9>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT9_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT9_descr_ = { "@General_Types.BIT9", &BITSTRING_ber_, &BIT9_raw_, NULL, &BIT9_xer_, &BITSTRING_json_, &BIT9_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT10_raw_ = {10,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,10,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT10_xer_ = { {"BIT10>\n", "BIT10>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT10_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT10_descr_ = { "@General_Types.BIT10", &BITSTRING_ber_, &BIT10_raw_, NULL, &BIT10_xer_, &BITSTRING_json_, &BIT10_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT11_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT11_xer_ = { {"BIT11>\n", "BIT11>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT11_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT11_descr_ = { "@General_Types.BIT11", &BITSTRING_ber_, &BIT11_raw_, NULL, &BIT11_xer_, &BITSTRING_json_, &BIT11_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT12_raw_ = {12,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,12,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT12_xer_ = { {"BIT12>\n", "BIT12>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT12_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT12_descr_ = { "@General_Types.BIT12", &BITSTRING_ber_, &BIT12_raw_, NULL, &BIT12_xer_, &BITSTRING_json_, &BIT12_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT14_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,14,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT14_xer_ = { {"BIT14>\n", "BIT14>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT14_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT14_descr_ = { "@General_Types.BIT14", &BITSTRING_ber_, &BIT14_raw_, NULL, &BIT14_xer_, &BITSTRING_json_, &BIT14_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT15_raw_ = {15,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,15,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT15_xer_ = { {"BIT15>\n", "BIT15>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT15_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT15_descr_ = { "@General_Types.BIT15", &BITSTRING_ber_, &BIT15_raw_, NULL, &BIT15_xer_, &BITSTRING_json_, &BIT15_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT16_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,16,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT16_xer_ = { {"BIT16>\n", "BIT16>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT16_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT16_descr_ = { "@General_Types.BIT16", &BITSTRING_ber_, &BIT16_raw_, NULL, &BIT16_xer_, &BITSTRING_json_, &BIT16_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT24_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,24,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT24_xer_ = { {"BIT24>\n", "BIT24>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT24_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT24_descr_ = { "@General_Types.BIT24", &BITSTRING_ber_, &BIT24_raw_, NULL, &BIT24_xer_, &BITSTRING_json_, &BIT24_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT31_raw_ = {31,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,31,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT31_xer_ = { {"BIT31>\n", "BIT31>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT31_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT31_descr_ = { "@General_Types.BIT31", &BITSTRING_ber_, &BIT31_raw_, NULL, &BIT31_xer_, &BITSTRING_json_, &BIT31_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT56_raw_ = {56,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,56,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT56_xer_ = { {"BIT56>\n", "BIT56>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT56_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT56_descr_ = { "@General_Types.BIT56", &BITSTRING_ber_, &BIT56_raw_, NULL, &BIT56_xer_, &BITSTRING_json_, &BIT56_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Bitstrings_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Bitstrings
+const TTCN_Typedescriptor_t Bitstrings_descr_ = { "@General_Types.Bitstrings", NULL, &Bitstrings_raw_, NULL, NULL, NULL, NULL, &BITSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Bitstrings_0_xer_ = { {"BITSTRING>\n", "BITSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Bitstrings_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Bitstrings_0_descr_ = { "@General_Types.Bitstrings.<oftype>", &BITSTRING_ber_, &BITSTRING_raw_, NULL, &Bitstrings_0_xer_, &BITSTRING_json_, &Bitstrings_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& BitstringList_descr_ = Bitstrings_descr_;
+const TTCN_RAWdescriptor_t BitstringSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for BitstringSet
+const TTCN_Typedescriptor_t BitstringSet_descr_ = { "@General_Types.BitstringSet", NULL, &BitstringSet_raw_, NULL, NULL, NULL, NULL, &BITSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t BitstringSet_0_xer_ = { {"BITSTRING>\n", "BITSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BitstringSet_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BitstringSet_0_descr_ = { "@General_Types.BitstringSet.<oftype>", &BITSTRING_ber_, &BITSTRING_raw_, NULL, &BitstringSet_0_xer_, &BITSTRING_json_, &BitstringSet_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT0n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT0n_xer_ = { {"OCT0n>\n", "OCT0n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT0n_oer_ext_arr_[0] = {};
+const int OCT0n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT0n_oer_ = { -1, TRUE, 0, FALSE, 0, 0, OCT0n_oer_ext_arr_, 0, OCT0n_oer_p_};
+const TTCN_Typedescriptor_t OCT0n_descr_ = { "@General_Types.OCT0n", &OCTETSTRING_ber_, &OCT0n_raw_, &OCTETSTRING_text_, &OCT0n_xer_, &OCTETSTRING_json_, &OCT0n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1n_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1n_xer_ = { {"OCT1n>\n", "OCT1n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1n_oer_ext_arr_[0] = {};
+const int OCT1n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1n_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1n_oer_ext_arr_, 0, OCT1n_oer_p_};
+const TTCN_Typedescriptor_t OCT1n_descr_ = { "@General_Types.OCT1n", &OCTETSTRING_ber_, &OCT1n_raw_, &OCTETSTRING_text_, &OCT1n_xer_, &OCTETSTRING_json_, &OCT1n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2n_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT2n_xer_ = { {"OCT2n>\n", "OCT2n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2n_oer_ext_arr_[0] = {};
+const int OCT2n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2n_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2n_oer_ext_arr_, 0, OCT2n_oer_p_};
+const TTCN_Typedescriptor_t OCT2n_descr_ = { "@General_Types.OCT2n", &OCTETSTRING_ber_, &OCT2n_raw_, &OCTETSTRING_text_, &OCT2n_xer_, &OCTETSTRING_json_, &OCT2n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3n_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3n_xer_ = { {"OCT3n>\n", "OCT3n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3n_oer_ext_arr_[0] = {};
+const int OCT3n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3n_oer_ = { -1, TRUE, 3, FALSE, 0, 0, OCT3n_oer_ext_arr_, 0, OCT3n_oer_p_};
+const TTCN_Typedescriptor_t OCT3n_descr_ = { "@General_Types.OCT3n", &OCTETSTRING_ber_, &OCT3n_raw_, &OCTETSTRING_text_, &OCT3n_xer_, &OCTETSTRING_json_, &OCT3n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4n_raw_ = {32,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT4n_xer_ = { {"OCT4n>\n", "OCT4n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4n_oer_ext_arr_[0] = {};
+const int OCT4n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4n_oer_ = { -1, TRUE, 4, FALSE, 0, 0, OCT4n_oer_ext_arr_, 0, OCT4n_oer_p_};
+const TTCN_Typedescriptor_t OCT4n_descr_ = { "@General_Types.OCT4n", &OCTETSTRING_ber_, &OCT4n_raw_, &OCTETSTRING_text_, &OCT4n_xer_, &OCTETSTRING_json_, &OCT4n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT5n_raw_ = {40,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT5n_xer_ = { {"OCT5n>\n", "OCT5n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT5n_oer_ext_arr_[0] = {};
+const int OCT5n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT5n_oer_ = { -1, TRUE, 5, FALSE, 0, 0, OCT5n_oer_ext_arr_, 0, OCT5n_oer_p_};
+const TTCN_Typedescriptor_t OCT5n_descr_ = { "@General_Types.OCT5n", &OCTETSTRING_ber_, &OCT5n_raw_, &OCTETSTRING_text_, &OCT5n_xer_, &OCTETSTRING_json_, &OCT5n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT6n_raw_ = {48,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT6n_xer_ = { {"OCT6n>\n", "OCT6n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT6n_oer_ext_arr_[0] = {};
+const int OCT6n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT6n_oer_ = { -1, TRUE, 6, FALSE, 0, 0, OCT6n_oer_ext_arr_, 0, OCT6n_oer_p_};
+const TTCN_Typedescriptor_t OCT6n_descr_ = { "@General_Types.OCT6n", &OCTETSTRING_ber_, &OCT6n_raw_, &OCTETSTRING_text_, &OCT6n_xer_, &OCTETSTRING_json_, &OCT6n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT7n_raw_ = {56,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT7n_xer_ = { {"OCT7n>\n", "OCT7n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT7n_oer_ext_arr_[0] = {};
+const int OCT7n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT7n_oer_ = { -1, TRUE, 7, FALSE, 0, 0, OCT7n_oer_ext_arr_, 0, OCT7n_oer_p_};
+const TTCN_Typedescriptor_t OCT7n_descr_ = { "@General_Types.OCT7n", &OCTETSTRING_ber_, &OCT7n_raw_, &OCTETSTRING_text_, &OCT7n_xer_, &OCTETSTRING_json_, &OCT7n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT8n_raw_ = {64,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT8n_xer_ = { {"OCT8n>\n", "OCT8n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT8n_oer_ext_arr_[0] = {};
+const int OCT8n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT8n_oer_ = { -1, TRUE, 8, FALSE, 0, 0, OCT8n_oer_ext_arr_, 0, OCT8n_oer_p_};
+const TTCN_Typedescriptor_t OCT8n_descr_ = { "@General_Types.OCT8n", &OCTETSTRING_ber_, &OCT8n_raw_, &OCTETSTRING_text_, &OCT8n_xer_, &OCTETSTRING_json_, &OCT8n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT9n_raw_ = {72,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT9n_xer_ = { {"OCT9n>\n", "OCT9n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT9n_oer_ext_arr_[0] = {};
+const int OCT9n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT9n_oer_ = { -1, TRUE, 9, FALSE, 0, 0, OCT9n_oer_ext_arr_, 0, OCT9n_oer_p_};
+const TTCN_Typedescriptor_t OCT9n_descr_ = { "@General_Types.OCT9n", &OCTETSTRING_ber_, &OCT9n_raw_, &OCTETSTRING_text_, &OCT9n_xer_, &OCTETSTRING_json_, &OCT9n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT10n_raw_ = {80,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT10n_xer_ = { {"OCT10n>\n", "OCT10n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT10n_oer_ext_arr_[0] = {};
+const int OCT10n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT10n_oer_ = { -1, TRUE, 10, FALSE, 0, 0, OCT10n_oer_ext_arr_, 0, OCT10n_oer_p_};
+const TTCN_Typedescriptor_t OCT10n_descr_ = { "@General_Types.OCT10n", &OCTETSTRING_ber_, &OCT10n_raw_, &OCTETSTRING_text_, &OCT10n_xer_, &OCTETSTRING_json_, &OCT10n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT11n_raw_ = {88,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT11n_xer_ = { {"OCT11n>\n", "OCT11n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT11n_oer_ext_arr_[0] = {};
+const int OCT11n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT11n_oer_ = { -1, TRUE, 11, FALSE, 0, 0, OCT11n_oer_ext_arr_, 0, OCT11n_oer_p_};
+const TTCN_Typedescriptor_t OCT11n_descr_ = { "@General_Types.OCT11n", &OCTETSTRING_ber_, &OCT11n_raw_, &OCTETSTRING_text_, &OCT11n_xer_, &OCTETSTRING_json_, &OCT11n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT12n_raw_ = {96,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT12n_xer_ = { {"OCT12n>\n", "OCT12n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT12n_oer_ext_arr_[0] = {};
+const int OCT12n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT12n_oer_ = { -1, TRUE, 12, FALSE, 0, 0, OCT12n_oer_ext_arr_, 0, OCT12n_oer_p_};
+const TTCN_Typedescriptor_t OCT12n_descr_ = { "@General_Types.OCT12n", &OCTETSTRING_ber_, &OCT12n_raw_, &OCTETSTRING_text_, &OCT12n_xer_, &OCTETSTRING_json_, &OCT12n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT13n_raw_ = {104,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT13n_xer_ = { {"OCT13n>\n", "OCT13n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT13n_oer_ext_arr_[0] = {};
+const int OCT13n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT13n_oer_ = { -1, TRUE, 13, FALSE, 0, 0, OCT13n_oer_ext_arr_, 0, OCT13n_oer_p_};
+const TTCN_Typedescriptor_t OCT13n_descr_ = { "@General_Types.OCT13n", &OCTETSTRING_ber_, &OCT13n_raw_, &OCTETSTRING_text_, &OCT13n_xer_, &OCTETSTRING_json_, &OCT13n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT14n_raw_ = {112,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT14n_xer_ = { {"OCT14n>\n", "OCT14n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT14n_oer_ext_arr_[0] = {};
+const int OCT14n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT14n_oer_ = { -1, TRUE, 14, FALSE, 0, 0, OCT14n_oer_ext_arr_, 0, OCT14n_oer_p_};
+const TTCN_Typedescriptor_t OCT14n_descr_ = { "@General_Types.OCT14n", &OCTETSTRING_ber_, &OCT14n_raw_, &OCTETSTRING_text_, &OCT14n_xer_, &OCTETSTRING_json_, &OCT14n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT15n_raw_ = {120,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT15n_xer_ = { {"OCT15n>\n", "OCT15n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT15n_oer_ext_arr_[0] = {};
+const int OCT15n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT15n_oer_ = { -1, TRUE, 15, FALSE, 0, 0, OCT15n_oer_ext_arr_, 0, OCT15n_oer_p_};
+const TTCN_Typedescriptor_t OCT15n_descr_ = { "@General_Types.OCT15n", &OCTETSTRING_ber_, &OCT15n_raw_, &OCTETSTRING_text_, &OCT15n_xer_, &OCTETSTRING_json_, &OCT15n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT16n_raw_ = {128,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT16n_xer_ = { {"OCT16n>\n", "OCT16n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT16n_oer_ext_arr_[0] = {};
+const int OCT16n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT16n_oer_ = { -1, TRUE, 16, FALSE, 0, 0, OCT16n_oer_ext_arr_, 0, OCT16n_oer_p_};
+const TTCN_Typedescriptor_t OCT16n_descr_ = { "@General_Types.OCT16n", &OCTETSTRING_ber_, &OCT16n_raw_, &OCTETSTRING_text_, &OCT16n_xer_, &OCTETSTRING_json_, &OCT16n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT17n_raw_ = {136,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT17n_xer_ = { {"OCT17n>\n", "OCT17n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT17n_oer_ext_arr_[0] = {};
+const int OCT17n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT17n_oer_ = { -1, TRUE, 17, FALSE, 0, 0, OCT17n_oer_ext_arr_, 0, OCT17n_oer_p_};
+const TTCN_Typedescriptor_t OCT17n_descr_ = { "@General_Types.OCT17n", &OCTETSTRING_ber_, &OCT17n_raw_, &OCTETSTRING_text_, &OCT17n_xer_, &OCTETSTRING_json_, &OCT17n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT18n_raw_ = {144,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT18n_xer_ = { {"OCT18n>\n", "OCT18n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT18n_oer_ext_arr_[0] = {};
+const int OCT18n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT18n_oer_ = { -1, TRUE, 18, FALSE, 0, 0, OCT18n_oer_ext_arr_, 0, OCT18n_oer_p_};
+const TTCN_Typedescriptor_t OCT18n_descr_ = { "@General_Types.OCT18n", &OCTETSTRING_ber_, &OCT18n_raw_, &OCTETSTRING_text_, &OCT18n_xer_, &OCTETSTRING_json_, &OCT18n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT19n_raw_ = {152,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT19n_xer_ = { {"OCT19n>\n", "OCT19n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT19n_oer_ext_arr_[0] = {};
+const int OCT19n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT19n_oer_ = { -1, TRUE, 19, FALSE, 0, 0, OCT19n_oer_ext_arr_, 0, OCT19n_oer_p_};
+const TTCN_Typedescriptor_t OCT19n_descr_ = { "@General_Types.OCT19n", &OCTETSTRING_ber_, &OCT19n_raw_, &OCTETSTRING_text_, &OCT19n_xer_, &OCTETSTRING_json_, &OCT19n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT20n_raw_ = {160,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT20n_xer_ = { {"OCT20n>\n", "OCT20n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT20n_oer_ext_arr_[0] = {};
+const int OCT20n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT20n_oer_ = { -1, TRUE, 20, FALSE, 0, 0, OCT20n_oer_ext_arr_, 0, OCT20n_oer_p_};
+const TTCN_Typedescriptor_t OCT20n_descr_ = { "@General_Types.OCT20n", &OCTETSTRING_ber_, &OCT20n_raw_, &OCTETSTRING_text_, &OCT20n_xer_, &OCTETSTRING_json_, &OCT20n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT28n_raw_ = {224,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT28n_xer_ = { {"OCT28n>\n", "OCT28n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT28n_oer_ext_arr_[0] = {};
+const int OCT28n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT28n_oer_ = { -1, TRUE, 28, FALSE, 0, 0, OCT28n_oer_ext_arr_, 0, OCT28n_oer_p_};
+const TTCN_Typedescriptor_t OCT28n_descr_ = { "@General_Types.OCT28n", &OCTETSTRING_ber_, &OCT28n_raw_, &OCTETSTRING_text_, &OCT28n_xer_, &OCTETSTRING_json_, &OCT28n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT32n_raw_ = {256,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT32n_xer_ = { {"OCT32n>\n", "OCT32n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT32n_oer_ext_arr_[0] = {};
+const int OCT32n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT32n_oer_ = { -1, TRUE, 32, FALSE, 0, 0, OCT32n_oer_ext_arr_, 0, OCT32n_oer_p_};
+const TTCN_Typedescriptor_t OCT32n_descr_ = { "@General_Types.OCT32n", &OCTETSTRING_ber_, &OCT32n_raw_, &OCTETSTRING_text_, &OCT32n_xer_, &OCTETSTRING_json_, &OCT32n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT34n_raw_ = {272,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT34n_xer_ = { {"OCT34n>\n", "OCT34n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT34n_oer_ext_arr_[0] = {};
+const int OCT34n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT34n_oer_ = { -1, TRUE, 34, FALSE, 0, 0, OCT34n_oer_ext_arr_, 0, OCT34n_oer_p_};
+const TTCN_Typedescriptor_t OCT34n_descr_ = { "@General_Types.OCT34n", &OCTETSTRING_ber_, &OCT34n_raw_, &OCTETSTRING_text_, &OCT34n_xer_, &OCTETSTRING_json_, &OCT34n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT46n_raw_ = {368,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT46n_xer_ = { {"OCT46n>\n", "OCT46n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT46n_oer_ext_arr_[0] = {};
+const int OCT46n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT46n_oer_ = { -1, TRUE, 46, FALSE, 0, 0, OCT46n_oer_ext_arr_, 0, OCT46n_oer_p_};
+const TTCN_Typedescriptor_t OCT46n_descr_ = { "@General_Types.OCT46n", &OCTETSTRING_ber_, &OCT46n_raw_, &OCTETSTRING_text_, &OCT46n_xer_, &OCTETSTRING_json_, &OCT46n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT50n_raw_ = {400,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT50n_xer_ = { {"OCT50n>\n", "OCT50n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT50n_oer_ext_arr_[0] = {};
+const int OCT50n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT50n_oer_ = { -1, TRUE, 50, FALSE, 0, 0, OCT50n_oer_ext_arr_, 0, OCT50n_oer_p_};
+const TTCN_Typedescriptor_t OCT50n_descr_ = { "@General_Types.OCT50n", &OCTETSTRING_ber_, &OCT50n_raw_, &OCTETSTRING_text_, &OCT50n_xer_, &OCTETSTRING_json_, &OCT50n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT69n_raw_ = {552,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT69n_xer_ = { {"OCT69n>\n", "OCT69n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT69n_oer_ext_arr_[0] = {};
+const int OCT69n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT69n_oer_ = { -1, TRUE, 69, FALSE, 0, 0, OCT69n_oer_ext_arr_, 0, OCT69n_oer_p_};
+const TTCN_Typedescriptor_t OCT69n_descr_ = { "@General_Types.OCT69n", &OCTETSTRING_ber_, &OCT69n_raw_, &OCTETSTRING_text_, &OCT69n_xer_, &OCTETSTRING_json_, &OCT69n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT100n_raw_ = {800,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT100n_xer_ = { {"OCT100n>\n", "OCT100n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT100n_oer_ext_arr_[0] = {};
+const int OCT100n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT100n_oer_ = { -1, TRUE, 100, FALSE, 0, 0, OCT100n_oer_ext_arr_, 0, OCT100n_oer_p_};
+const TTCN_Typedescriptor_t OCT100n_descr_ = { "@General_Types.OCT100n", &OCTETSTRING_ber_, &OCT100n_raw_, &OCTETSTRING_text_, &OCT100n_xer_, &OCTETSTRING_json_, &OCT100n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT128n_raw_ = {1024,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT128n_xer_ = { {"OCT128n>\n", "OCT128n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT128n_oer_ext_arr_[0] = {};
+const int OCT128n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT128n_oer_ = { -1, TRUE, 128, FALSE, 0, 0, OCT128n_oer_ext_arr_, 0, OCT128n_oer_p_};
+const TTCN_Typedescriptor_t OCT128n_descr_ = { "@General_Types.OCT128n", &OCTETSTRING_ber_, &OCT128n_raw_, &OCTETSTRING_text_, &OCT128n_xer_, &OCTETSTRING_json_, &OCT128n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT500n_raw_ = {4000,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT500n_xer_ = { {"OCT500n>\n", "OCT500n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT500n_oer_ext_arr_[0] = {};
+const int OCT500n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT500n_oer_ = { -1, TRUE, 500, FALSE, 0, 0, OCT500n_oer_ext_arr_, 0, OCT500n_oer_p_};
+const TTCN_Typedescriptor_t OCT500n_descr_ = { "@General_Types.OCT500n", &OCTETSTRING_ber_, &OCT500n_raw_, &OCTETSTRING_text_, &OCT500n_xer_, &OCTETSTRING_json_, &OCT500n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCTNn_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCTNn_xer_ = { {"OCTNn>\n", "OCTNn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCTNn_oer_ext_arr_[0] = {};
+const int OCTNn_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCTNn_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCTNn_oer_ext_arr_, 0, OCTNn_oer_p_};
+const TTCN_Typedescriptor_t OCTNn_descr_ = { "@General_Types.OCTNn", &OCTETSTRING_ber_, &OCTNn_raw_, &OCTETSTRING_text_, &OCTNn_xer_, &OCTETSTRING_json_, &OCTNn_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__3n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__3n_xer_ = { {"OCT1_3n>\n", "OCT1_3n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__3n_oer_ext_arr_[0] = {};
+const int OCT1__3n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__3n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__3n_oer_ext_arr_, 0, OCT1__3n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__3n_descr_ = { "@General_Types.OCT1_3n", &OCTETSTRING_ber_, &OCT1__3n_raw_, &OCTETSTRING_text_, &OCT1__3n_xer_, &OCTETSTRING_json_, &OCT1__3n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__4n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__4n_xer_ = { {"OCT1_4n>\n", "OCT1_4n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__4n_oer_ext_arr_[0] = {};
+const int OCT1__4n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__4n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__4n_oer_ext_arr_, 0, OCT1__4n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__4n_descr_ = { "@General_Types.OCT1_4n", &OCTETSTRING_ber_, &OCT1__4n_raw_, &OCTETSTRING_text_, &OCT1__4n_xer_, &OCTETSTRING_json_, &OCT1__4n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__5n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__5n_xer_ = { {"OCT1_5n>\n", "OCT1_5n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__5n_oer_ext_arr_[0] = {};
+const int OCT1__5n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__5n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__5n_oer_ext_arr_, 0, OCT1__5n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__5n_descr_ = { "@General_Types.OCT1_5n", &OCTETSTRING_ber_, &OCT1__5n_raw_, &OCTETSTRING_text_, &OCT1__5n_xer_, &OCTETSTRING_json_, &OCT1__5n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__6n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__6n_xer_ = { {"OCT1_6n>\n", "OCT1_6n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__6n_oer_ext_arr_[0] = {};
+const int OCT1__6n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__6n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__6n_oer_ext_arr_, 0, OCT1__6n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__6n_descr_ = { "@General_Types.OCT1_6n", &OCTETSTRING_ber_, &OCT1__6n_raw_, &OCTETSTRING_text_, &OCT1__6n_xer_, &OCTETSTRING_json_, &OCT1__6n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__7n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__7n_xer_ = { {"OCT1_7n>\n", "OCT1_7n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__7n_oer_ext_arr_[0] = {};
+const int OCT1__7n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__7n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__7n_oer_ext_arr_, 0, OCT1__7n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__7n_descr_ = { "@General_Types.OCT1_7n", &OCTETSTRING_ber_, &OCT1__7n_raw_, &OCTETSTRING_text_, &OCT1__7n_xer_, &OCTETSTRING_json_, &OCT1__7n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__8n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__8n_xer_ = { {"OCT1_8n>\n", "OCT1_8n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__8n_oer_ext_arr_[0] = {};
+const int OCT1__8n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__8n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__8n_oer_ext_arr_, 0, OCT1__8n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__8n_descr_ = { "@General_Types.OCT1_8n", &OCTETSTRING_ber_, &OCT1__8n_raw_, &OCTETSTRING_text_, &OCT1__8n_xer_, &OCTETSTRING_json_, &OCT1__8n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__12n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__12n_xer_ = { {"OCT1_12n>\n", "OCT1_12n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__12n_oer_ext_arr_[0] = {};
+const int OCT1__12n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__12n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__12n_oer_ext_arr_, 0, OCT1__12n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__12n_descr_ = { "@General_Types.OCT1_12n", &OCTETSTRING_ber_, &OCT1__12n_raw_, &OCTETSTRING_text_, &OCT1__12n_xer_, &OCTETSTRING_json_, &OCT1__12n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__15n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__15n_xer_ = { {"OCT1_15n>\n", "OCT1_15n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__15n_oer_ext_arr_[0] = {};
+const int OCT1__15n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__15n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__15n_oer_ext_arr_, 0, OCT1__15n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__15n_descr_ = { "@General_Types.OCT1_15n", &OCTETSTRING_ber_, &OCT1__15n_raw_, &OCTETSTRING_text_, &OCT1__15n_xer_, &OCTETSTRING_json_, &OCT1__15n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__16n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__16n_xer_ = { {"OCT1_16n>\n", "OCT1_16n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__16n_oer_ext_arr_[0] = {};
+const int OCT1__16n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__16n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__16n_oer_ext_arr_, 0, OCT1__16n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__16n_descr_ = { "@General_Types.OCT1_16n", &OCTETSTRING_ber_, &OCT1__16n_raw_, &OCTETSTRING_text_, &OCT1__16n_xer_, &OCTETSTRING_json_, &OCT1__16n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__18n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__18n_xer_ = { {"OCT1_18n>\n", "OCT1_18n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__18n_oer_ext_arr_[0] = {};
+const int OCT1__18n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__18n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__18n_oer_ext_arr_, 0, OCT1__18n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__18n_descr_ = { "@General_Types.OCT1_18n", &OCTETSTRING_ber_, &OCT1__18n_raw_, &OCTETSTRING_text_, &OCT1__18n_xer_, &OCTETSTRING_json_, &OCT1__18n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__20n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__20n_xer_ = { {"OCT1_20n>\n", "OCT1_20n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__20n_oer_ext_arr_[0] = {};
+const int OCT1__20n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__20n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__20n_oer_ext_arr_, 0, OCT1__20n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__20n_descr_ = { "@General_Types.OCT1_20n", &OCTETSTRING_ber_, &OCT1__20n_raw_, &OCTETSTRING_text_, &OCT1__20n_xer_, &OCTETSTRING_json_, &OCT1__20n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__24n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__24n_xer_ = { {"OCT1_24n>\n", "OCT1_24n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__24n_oer_ext_arr_[0] = {};
+const int OCT1__24n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__24n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__24n_oer_ext_arr_, 0, OCT1__24n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__24n_descr_ = { "@General_Types.OCT1_24n", &OCTETSTRING_ber_, &OCT1__24n_raw_, &OCTETSTRING_text_, &OCT1__24n_xer_, &OCTETSTRING_json_, &OCT1__24n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__32n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__32n_xer_ = { {"OCT1_32n>\n", "OCT1_32n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__32n_oer_ext_arr_[0] = {};
+const int OCT1__32n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__32n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__32n_oer_ext_arr_, 0, OCT1__32n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__32n_descr_ = { "@General_Types.OCT1_32n", &OCTETSTRING_ber_, &OCT1__32n_raw_, &OCTETSTRING_text_, &OCT1__32n_xer_, &OCTETSTRING_json_, &OCT1__32n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__34n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__34n_xer_ = { {"OCT1_34n>\n", "OCT1_34n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__34n_oer_ext_arr_[0] = {};
+const int OCT1__34n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__34n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__34n_oer_ext_arr_, 0, OCT1__34n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__34n_descr_ = { "@General_Types.OCT1_34n", &OCTETSTRING_ber_, &OCT1__34n_raw_, &OCTETSTRING_text_, &OCT1__34n_xer_, &OCTETSTRING_json_, &OCT1__34n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__46n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__46n_xer_ = { {"OCT1_46n>\n", "OCT1_46n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__46n_oer_ext_arr_[0] = {};
+const int OCT1__46n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__46n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__46n_oer_ext_arr_, 0, OCT1__46n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__46n_descr_ = { "@General_Types.OCT1_46n", &OCTETSTRING_ber_, &OCT1__46n_raw_, &OCTETSTRING_text_, &OCT1__46n_xer_, &OCTETSTRING_json_, &OCT1__46n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__50n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__50n_xer_ = { {"OCT1_50n>\n", "OCT1_50n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__50n_oer_ext_arr_[0] = {};
+const int OCT1__50n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__50n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__50n_oer_ext_arr_, 0, OCT1__50n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__50n_descr_ = { "@General_Types.OCT1_50n", &OCTETSTRING_ber_, &OCT1__50n_raw_, &OCTETSTRING_text_, &OCT1__50n_xer_, &OCTETSTRING_json_, &OCT1__50n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__112n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__112n_xer_ = { {"OCT1_112n>\n", "OCT1_112n>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__112n_oer_ext_arr_[0] = {};
+const int OCT1__112n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__112n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__112n_oer_ext_arr_, 0, OCT1__112n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__112n_descr_ = { "@General_Types.OCT1_112n", &OCTETSTRING_ber_, &OCT1__112n_raw_, &OCTETSTRING_text_, &OCT1__112n_xer_, &OCTETSTRING_json_, &OCT1__112n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__127n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__127n_xer_ = { {"OCT1_127n>\n", "OCT1_127n>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__127n_oer_ext_arr_[0] = {};
+const int OCT1__127n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__127n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__127n_oer_ext_arr_, 0, OCT1__127n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__127n_descr_ = { "@General_Types.OCT1_127n", &OCTETSTRING_ber_, &OCT1__127n_raw_, &OCTETSTRING_text_, &OCT1__127n_xer_, &OCTETSTRING_json_, &OCT1__127n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__128n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__128n_xer_ = { {"OCT1_128n>\n", "OCT1_128n>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__128n_oer_ext_arr_[0] = {};
+const int OCT1__128n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__128n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__128n_oer_ext_arr_, 0, OCT1__128n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__128n_descr_ = { "@General_Types.OCT1_128n", &OCTETSTRING_ber_, &OCT1__128n_raw_, &OCTETSTRING_text_, &OCT1__128n_xer_, &OCTETSTRING_json_, &OCT1__128n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__172n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__172n_xer_ = { {"OCT1_172n>\n", "OCT1_172n>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__172n_oer_ext_arr_[0] = {};
+const int OCT1__172n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__172n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__172n_oer_ext_arr_, 0, OCT1__172n_oer_p_};
+const TTCN_Typedescriptor_t OCT1__172n_descr_ = { "@General_Types.OCT1_172n", &OCTETSTRING_ber_, &OCT1__172n_raw_, &OCTETSTRING_text_, &OCT1__172n_xer_, &OCTETSTRING_json_, &OCT1__172n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__5n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__5n_xer_ = { {"OCT3_5n>\n", "OCT3_5n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__5n_oer_ext_arr_[0] = {};
+const int OCT3__5n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__5n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__5n_oer_ext_arr_, 0, OCT3__5n_oer_p_};
+const TTCN_Typedescriptor_t OCT3__5n_descr_ = { "@General_Types.OCT3_5n", &OCTETSTRING_ber_, &OCT3__5n_raw_, &OCTETSTRING_text_, &OCT3__5n_xer_, &OCTETSTRING_json_, &OCT3__5n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__7n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__7n_xer_ = { {"OCT3_7n>\n", "OCT3_7n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__7n_oer_ext_arr_[0] = {};
+const int OCT3__7n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__7n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__7n_oer_ext_arr_, 0, OCT3__7n_oer_p_};
+const TTCN_Typedescriptor_t OCT3__7n_descr_ = { "@General_Types.OCT3_7n", &OCTETSTRING_ber_, &OCT3__7n_raw_, &OCTETSTRING_text_, &OCT3__7n_xer_, &OCTETSTRING_json_, &OCT3__7n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__8n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__8n_xer_ = { {"OCT3_8n>\n", "OCT3_8n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__8n_oer_ext_arr_[0] = {};
+const int OCT3__8n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__8n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__8n_oer_ext_arr_, 0, OCT3__8n_oer_p_};
+const TTCN_Typedescriptor_t OCT3__8n_descr_ = { "@General_Types.OCT3_8n", &OCTETSTRING_ber_, &OCT3__8n_raw_, &OCTETSTRING_text_, &OCT3__8n_xer_, &OCTETSTRING_json_, &OCT3__8n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__14n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__14n_xer_ = { {"OCT3_14n>\n", "OCT3_14n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__14n_oer_ext_arr_[0] = {};
+const int OCT3__14n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__14n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__14n_oer_ext_arr_, 0, OCT3__14n_oer_p_};
+const TTCN_Typedescriptor_t OCT3__14n_descr_ = { "@General_Types.OCT3_14n", &OCTETSTRING_ber_, &OCT3__14n_raw_, &OCTETSTRING_text_, &OCT3__14n_xer_, &OCTETSTRING_json_, &OCT3__14n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__17n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__17n_xer_ = { {"OCT3_17n>\n", "OCT3_17n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__17n_oer_ext_arr_[0] = {};
+const int OCT3__17n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__17n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__17n_oer_ext_arr_, 0, OCT3__17n_oer_p_};
+const TTCN_Typedescriptor_t OCT3__17n_descr_ = { "@General_Types.OCT3_17n", &OCTETSTRING_ber_, &OCT3__17n_raw_, &OCTETSTRING_text_, &OCT3__17n_xer_, &OCTETSTRING_json_, &OCT3__17n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4__8n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT4__8n_xer_ = { {"OCT4_8n>\n", "OCT4_8n>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4__8n_oer_ext_arr_[0] = {};
+const int OCT4__8n_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4__8n_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT4__8n_oer_ext_arr_, 0, OCT4__8n_oer_p_};
+const TTCN_Typedescriptor_t OCT4__8n_descr_ = { "@General_Types.OCT4_8n", &OCTETSTRING_ber_, &OCT4__8n_raw_, &OCTETSTRING_text_, &OCT4__8n_xer_, &OCTETSTRING_json_, &OCT4__8n_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Octetstrings_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Octetstrings
+const TTCN_Typedescriptor_t Octetstrings_descr_ = { "@General_Types.Octetstrings", NULL, &Octetstrings_raw_, NULL, NULL, NULL, NULL, &OCTETSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Octetstrings_0_xer_ = { {"OCTETSTRING>\n", "OCTETSTRING>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int Octetstrings_0_oer_ext_arr_[0] = {};
+const int Octetstrings_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t Octetstrings_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Octetstrings_0_oer_ext_arr_, 0, Octetstrings_0_oer_p_};
+const TTCN_Typedescriptor_t Octetstrings_0_descr_ = { "@General_Types.Octetstrings.<oftype>", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &Octetstrings_0_xer_, &OCTETSTRING_json_, &Octetstrings_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& OctetstringList_descr_ = Octetstrings_descr_;
+const TTCN_RAWdescriptor_t OctetstringSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OctetstringSet
+const TTCN_Typedescriptor_t OctetstringSet_descr_ = { "@General_Types.OctetstringSet", NULL, &OctetstringSet_raw_, NULL, NULL, NULL, NULL, &OCTETSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OctetstringSet_0_xer_ = { {"OCTETSTRING>\n", "OCTETSTRING>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OctetstringSet_0_oer_ext_arr_[0] = {};
+const int OctetstringSet_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OctetstringSet_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OctetstringSet_0_oer_ext_arr_, 0, OctetstringSet_0_oer_p_};
+const TTCN_Typedescriptor_t OctetstringSet_0_descr_ = { "@General_Types.OctetstringSet.<oftype>", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &OctetstringSet_0_xer_, &OCTETSTRING_json_, &OctetstringSet_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CHAR4_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t CHAR4_xer_ = { {"CHAR4>\n", "CHAR4>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t CHAR4_descr_ = { "@General_Types.CHAR4", NULL, &CHAR4_raw_, &CHARSTRING_text_, &CHAR4_xer_, &CHARSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Charstrings_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Charstrings
+const TTCN_Typedescriptor_t Charstrings_descr_ = { "@General_Types.Charstrings", NULL, &Charstrings_raw_, NULL, NULL, NULL, NULL, &CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Charstrings_0_xer_ = { {"CHARSTRING>\n", "CHARSTRING>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t Charstrings_0_descr_ = { "@General_Types.Charstrings.<oftype>", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &Charstrings_0_xer_, &CHARSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& CharstringList_descr_ = Charstrings_descr_;
+const TTCN_RAWdescriptor_t CharstringSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CharstringSet
+const TTCN_Typedescriptor_t CharstringSet_descr_ = { "@General_Types.CharstringSet", NULL, &CharstringSet_raw_, NULL, NULL, NULL, NULL, &CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t CharstringSet_0_xer_ = { {"CHARSTRING>\n", "CHARSTRING>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t CharstringSet_0_descr_ = { "@General_Types.CharstringSet.<oftype>", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &CharstringSet_0_xer_, &CHARSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX4n_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX4n_xer_ = { {"HEX4n>\n", "HEX4n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX4n_descr_ = { "@General_Types.HEX4n", NULL, &HEX4n_raw_, NULL, &HEX4n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX6n_raw_ = {24,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX6n_xer_ = { {"HEX6n>\n", "HEX6n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX6n_descr_ = { "@General_Types.HEX6n", NULL, &HEX6n_raw_, NULL, &HEX6n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX8n_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX8n_xer_ = { {"HEX8n>\n", "HEX8n>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX8n_descr_ = { "@General_Types.HEX8n", NULL, &HEX8n_raw_, NULL, &HEX8n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX15n_raw_ = {60,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX15n_xer_ = { {"HEX15n>\n", "HEX15n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX15n_descr_ = { "@General_Types.HEX15n", NULL, &HEX15n_raw_, NULL, &HEX15n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX16n_raw_ = {64,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX16n_xer_ = { {"HEX16n>\n", "HEX16n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX16n_descr_ = { "@General_Types.HEX16n", NULL, &HEX16n_raw_, NULL, &HEX16n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX24n_raw_ = {96,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX24n_xer_ = { {"HEX24n>\n", "HEX24n>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX24n_descr_ = { "@General_Types.HEX24n", NULL, &HEX24n_raw_, NULL, &HEX24n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX0__18n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX0__18n_xer_ = { {"HEX0_18n>\n", "HEX0_18n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX0__18n_descr_ = { "@General_Types.HEX0_18n", NULL, &HEX0__18n_raw_, NULL, &HEX0__18n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX1__20n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX1__20n_xer_ = { {"HEX1_20n>\n", "HEX1_20n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX1__20n_descr_ = { "@General_Types.HEX1_20n", NULL, &HEX1__20n_raw_, NULL, &HEX1__20n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX1__34n_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX1__34n_xer_ = { {"HEX1_34n>\n", "HEX1_34n>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX1__34n_descr_ = { "@General_Types.HEX1_34n", NULL, &HEX1__34n_raw_, NULL, &HEX1__34n_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Hexstrings_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Hexstrings
+const TTCN_Typedescriptor_t Hexstrings_descr_ = { "@General_Types.Hexstrings", NULL, &Hexstrings_raw_, NULL, NULL, NULL, NULL, &HEXSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Hexstrings_0_xer_ = { {"HEXSTRING>\n", "HEXSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t Hexstrings_0_descr_ = { "@General_Types.Hexstrings.<oftype>", NULL, &HEXSTRING_raw_, NULL, &Hexstrings_0_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& HexstringList_descr_ = Hexstrings_descr_;
+const TTCN_RAWdescriptor_t HexstringSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for HexstringSet
+const TTCN_Typedescriptor_t HexstringSet_descr_ = { "@General_Types.HexstringSet", NULL, &HexstringSet_raw_, NULL, NULL, NULL, NULL, &HEXSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t HexstringSet_0_xer_ = { {"HEXSTRING>\n", "HEXSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HexstringSet_0_descr_ = { "@General_Types.HexstringSet.<oftype>", NULL, &HEXSTRING_raw_, NULL, &HexstringSet_0_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT3nb_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT3nb_xer_ = { {"INT3nb>\n", "INT3nb>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT3nb_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT3nb_descr_ = { "@General_Types.INT3nb", &INTEGER_ber_, &INT3nb_raw_, &INTEGER_text_, &INT3nb_xer_, &INTEGER_json_, &INT3nb_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT4nb_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT4nb_xer_ = { {"INT4nb>\n", "INT4nb>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT4nb_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT4nb_descr_ = { "@General_Types.INT4nb", &INTEGER_ber_, &INT4nb_raw_, &INTEGER_text_, &INT4nb_xer_, &INTEGER_json_, &INT4nb_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT5nb_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT5nb_xer_ = { {"INT5nb>\n", "INT5nb>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT5nb_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT5nb_descr_ = { "@General_Types.INT5nb", &INTEGER_ber_, &INT5nb_raw_, &INTEGER_text_, &INT5nb_xer_, &INTEGER_json_, &INT5nb_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT8nb_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT8nb_xer_ = { {"INT8nb>\n", "INT8nb>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT8nb_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT8nb_descr_ = { "@General_Types.INT8nb", &INTEGER_ber_, &INT8nb_raw_, &INTEGER_text_, &INT8nb_xer_, &INTEGER_json_, &INT8nb_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT2nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT2nbp_xer_ = { {"INT2nbp>\n", "INT2nbp>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT2nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT2nbp_descr_ = { "@General_Types.INT2nbp", &INTEGER_ber_, &INT2nbp_raw_, &INTEGER_text_, &INT2nbp_xer_, &INTEGER_json_, &INT2nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT1nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT1nbp_xer_ = { {"INT1nbp>\n", "INT1nbp>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT1nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT1nbp_descr_ = { "@General_Types.INT1nbp", &INTEGER_ber_, &INT1nbp_raw_, &INTEGER_text_, &INT1nbp_xer_, &INTEGER_json_, &INT1nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT3nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT3nbp_xer_ = { {"INT3nbp>\n", "INT3nbp>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT3nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT3nbp_descr_ = { "@General_Types.INT3nbp", &INTEGER_ber_, &INT3nbp_raw_, &INTEGER_text_, &INT3nbp_xer_, &INTEGER_json_, &INT3nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT5nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT5nbp_xer_ = { {"INT5nbp>\n", "INT5nbp>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT5nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT5nbp_descr_ = { "@General_Types.INT5nbp", &INTEGER_ber_, &INT5nbp_raw_, &INTEGER_text_, &INT5nbp_xer_, &INTEGER_json_, &INT5nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT9nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT9nbp_xer_ = { {"INT9nbp>\n", "INT9nbp>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT9nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT9nbp_descr_ = { "@General_Types.INT9nbp", &INTEGER_ber_, &INT9nbp_raw_, &INTEGER_text_, &INT9nbp_xer_, &INTEGER_json_, &INT9nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT13nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT13nbp_xer_ = { {"INT13nbp>\n", "INT13nbp>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT13nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT13nbp_descr_ = { "@General_Types.INT13nbp", &INTEGER_ber_, &INT13nbp_raw_, &INTEGER_text_, &INT13nbp_xer_, &INTEGER_json_, &INT13nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT15nbp_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT15nbp_xer_ = { {"INT15nbp>\n", "INT15nbp>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT15nbp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT15nbp_descr_ = { "@General_Types.INT15nbp", &INTEGER_ber_, &INT15nbp_raw_, &INTEGER_text_, &INT15nbp_xer_, &INTEGER_json_, &INT15nbp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Integers_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Integers
+const TTCN_Typedescriptor_t Integers_descr_ = { "@General_Types.Integers", NULL, &Integers_raw_, NULL, NULL, NULL, NULL, &INTEGER_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Integers_0_xer_ = { {"INTEGER>\n", "INTEGER>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Integers_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Integers_0_descr_ = { "@General_Types.Integers.INTEGER", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Integers_0_xer_, &INTEGER_json_, &Integers_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& IntegerList_descr_ = Integers_descr_;
+const TTCN_RAWdescriptor_t Integer__array_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Integer__array
+const TTCN_Typedescriptor_t Integer__array_descr_ = { "@General_Types.Integer_array", NULL, &Integer__array_raw_, NULL, NULL, NULL, NULL, &Integers_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t IntegerSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for IntegerSet
+const TTCN_Typedescriptor_t IntegerSet_descr_ = { "@General_Types.IntegerSet", NULL, &IntegerSet_raw_, NULL, NULL, NULL, NULL, &INTEGER_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t IntegerSet_0_xer_ = { {"INTEGER>\n", "INTEGER>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t IntegerSet_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t IntegerSet_0_descr_ = { "@General_Types.IntegerSet.INTEGER", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &IntegerSet_0_xer_, &INTEGER_json_, &IntegerSet_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Floats_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Floats
+const TTCN_Typedescriptor_t Floats_descr_ = { "@General_Types.Floats", NULL, &Floats_raw_, NULL, NULL, NULL, NULL, &FLOAT_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Floats_0_xer_ = { {"FLOAT>\n", "FLOAT>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int Floats_0_oer_ext_arr_[0] = {};
+const int Floats_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t Floats_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Floats_0_oer_ext_arr_, 0, Floats_0_oer_p_};
+const TTCN_Typedescriptor_t Floats_0_descr_ = { "@General_Types.Floats.<oftype>", &FLOAT_ber_, &FLOAT_raw_, NULL, &Floats_0_xer_, &FLOAT_json_, &Floats_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& FloatList_descr_ = Floats_descr_;
+const TTCN_RAWdescriptor_t FloatSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for FloatSet
+const TTCN_Typedescriptor_t FloatSet_descr_ = { "@General_Types.FloatSet", NULL, &FloatSet_raw_, NULL, NULL, NULL, NULL, &FLOAT_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t FloatSet_0_xer_ = { {"FLOAT>\n", "FLOAT>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int FloatSet_0_oer_ext_arr_[0] = {};
+const int FloatSet_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t FloatSet_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, FloatSet_0_oer_ext_arr_, 0, FloatSet_0_oer_p_};
+const TTCN_Typedescriptor_t FloatSet_0_descr_ = { "@General_Types.FloatSet.<oftype>", &FLOAT_ber_, &FLOAT_raw_, NULL, &FloatSet_0_xer_, &FLOAT_json_, &FloatSet_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t UniversalCharstrings_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for UniversalCharstrings
+const TTCN_Typedescriptor_t UniversalCharstrings_descr_ = { "@General_Types.UniversalCharstrings", NULL, &UniversalCharstrings_raw_, NULL, NULL, NULL, NULL, &UNIVERSAL_CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t UniversalCharstrings_0_xer_ = { {"UNIVERSAL_CHARSTRING>\n", "UNIVERSAL_CHARSTRING>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t UniversalCharstrings_0_descr_ = { "@General_Types.UniversalCharstrings.<oftype>", NULL, &UNIVERSAL_CHARSTRING_raw_, &UNIVERSAL_CHARSTRING_text_, &UniversalCharstrings_0_xer_, &UNIVERSAL_CHARSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& UniversalCharstringList_descr_ = UniversalCharstrings_descr_;
+const TTCN_RAWdescriptor_t UniversalCharstringSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for UniversalCharstringSet
+const TTCN_Typedescriptor_t UniversalCharstringSet_descr_ = { "@General_Types.UniversalCharstringSet", NULL, &UniversalCharstringSet_raw_, NULL, NULL, NULL, NULL, &UNIVERSAL_CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t UniversalCharstringSet_0_xer_ = { {"UNIVERSAL_CHARSTRING>\n", "UNIVERSAL_CHARSTRING>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t UniversalCharstringSet_0_descr_ = { "@General_Types.UniversalCharstringSet.<oftype>", NULL, &UNIVERSAL_CHARSTRING_raw_, &UNIVERSAL_CHARSTRING_text_, &UniversalCharstringSet_0_xer_, &UNIVERSAL_CHARSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Booleans_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Booleans
+const TTCN_Typedescriptor_t Booleans_descr_ = { "@General_Types.Booleans", NULL, &Booleans_raw_, NULL, NULL, NULL, NULL, &BOOLEAN_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Booleans_0_xer_ = { {"BOOLEAN>\n", "BOOLEAN>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int Booleans_0_oer_ext_arr_[0] = {};
+const int Booleans_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t Booleans_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Booleans_0_oer_ext_arr_, 0, Booleans_0_oer_p_};
+const TTCN_Typedescriptor_t Booleans_0_descr_ = { "@General_Types.Booleans.BOOLEAN", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &Booleans_0_xer_, &BOOLEAN_json_, &Booleans_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& BooleanList_descr_ = Booleans_descr_;
+const TTCN_RAWdescriptor_t BooleanSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for BooleanSet
+const TTCN_Typedescriptor_t BooleanSet_descr_ = { "@General_Types.BooleanSet", NULL, &BooleanSet_raw_, NULL, NULL, NULL, NULL, &BOOLEAN_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t BooleanSet_0_xer_ = { {"BOOLEAN>\n", "BOOLEAN>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int BooleanSet_0_oer_ext_arr_[0] = {};
+const int BooleanSet_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t BooleanSet_0_oer_ = { -1, TRUE, -1, FALSE, 0, 0, BooleanSet_0_oer_ext_arr_, 0, BooleanSet_0_oer_p_};
+const TTCN_Typedescriptor_t BooleanSet_0_descr_ = { "@General_Types.BooleanSet.BOOLEAN", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &BooleanSet_0_xer_, &BOOLEAN_json_, &BooleanSet_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Verdicttypes_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Verdicttypes
+const TTCN_Typedescriptor_t Verdicttypes_descr_ = { "@General_Types.Verdicttypes", NULL, &Verdicttypes_raw_, NULL, NULL, NULL, NULL, &VERDICTTYPE_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Verdicttypes_0_xer_ = { {"VERDICTTYPE>\n", "VERDICTTYPE>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t Verdicttypes_0_descr_ = { "@General_Types.Verdicttypes.<oftype>", NULL, NULL, NULL, &Verdicttypes_0_xer_, &VERDICTTYPE_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& VerdicttypeList_descr_ = Verdicttypes_descr_;
+const TTCN_RAWdescriptor_t VerdicttypeSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for VerdicttypeSet
+const TTCN_Typedescriptor_t VerdicttypeSet_descr_ = { "@General_Types.VerdicttypeSet", NULL, &VerdicttypeSet_raw_, NULL, NULL, NULL, NULL, &VERDICTTYPE_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t VerdicttypeSet_0_xer_ = { {"VERDICTTYPE>\n", "VERDICTTYPE>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t VerdicttypeSet_0_descr_ = { "@General_Types.VerdicttypeSet.<oftype>", NULL, NULL, NULL, &VerdicttypeSet_0_xer_, &VERDICTTYPE_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Anytypes_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Anytypes
+const TTCN_Typedescriptor_t Anytypes_descr_ = { "@General_Types.Anytypes", NULL, &Anytypes_raw_, NULL, NULL, NULL, NULL, &Anytypes_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for anytype
+const TTCN_Typedescriptor_t anytype_descr_ = { "@General_Types.anytype", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for Anytypes_0
+const TTCN_Typedescriptor_t Anytypes_0_descr_ = { "@General_Types.Anytypes.<oftype>", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& AnytypeList_descr_ = Anytypes_descr_;
+const TTCN_RAWdescriptor_t AnytypeSet_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for AnytypeSet
+const TTCN_Typedescriptor_t AnytypeSet_descr_ = { "@General_Types.AnytypeSet", NULL, &AnytypeSet_raw_, NULL, NULL, NULL, NULL, &AnytypeSet_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
+// No XER for AnytypeSet_0
+const TTCN_Typedescriptor_t AnytypeSet_0_descr_ = { "@General_Types.AnytypeSet.<oftype>", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT6__BO__LAST_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT6__BO__LAST_xer_ = { {"BIT6_BO_LAST>\n", "BIT6_BO_LAST>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT6__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT6__BO__LAST_descr_ = { "@General_Types.BIT6_BO_LAST", &BITSTRING_ber_, &BIT6__BO__LAST_raw_, NULL, &BIT6__BO__LAST_xer_, &BITSTRING_json_, &BIT6__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT16__BO__LAST_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT16__BO__LAST_xer_ = { {"BIT16_BO_LAST>\n", "BIT16_BO_LAST>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT16__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT16__BO__LAST_descr_ = { "@General_Types.BIT16_BO_LAST", &BITSTRING_ber_, &BIT16__BO__LAST_raw_, NULL, &BIT16__BO__LAST_xer_, &BITSTRING_json_, &BIT16__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BIT32__BO__LAST_raw_ = {32,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BIT32__BO__LAST_xer_ = { {"BIT32_BO_LAST>\n", "BIT32_BO_LAST>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BIT32__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BIT32__BO__LAST_descr_ = { "@General_Types.BIT32_BO_LAST", &BITSTRING_ber_, &BIT32__BO__LAST_raw_, NULL, &BIT32__BO__LAST_xer_, &BITSTRING_json_, &BIT32__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t Dummy_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t Dummy_xer_ = { {"Dummy>\n", "Dummy>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int Dummy_oer_ext_arr_[0] = {};
+const int Dummy_oer_p_[0] = {};
+const TTCN_OERdescriptor_t Dummy_oer_ = { -1, TRUE, 0, FALSE, 0, 0, Dummy_oer_ext_arr_, 0, Dummy_oer_p_};
+const TTCN_Typedescriptor_t Dummy_descr_ = { "@General_Types.Dummy", &OCTETSTRING_ber_, &Dummy_raw_, &OCTETSTRING_text_, &Dummy_xer_, &OCTETSTRING_json_, &Dummy_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT0_xer_ = { {"OCT0>\n", "OCT0>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT0_oer_ext_arr_[0] = {};
+const int OCT0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT0_oer_ = { -1, TRUE, 0, FALSE, 0, 0, OCT0_oer_ext_arr_, 0, OCT0_oer_p_};
+const TTCN_Typedescriptor_t OCT0_descr_ = { "@General_Types.OCT0", &OCTETSTRING_ber_, &OCT0_raw_, &OCTETSTRING_text_, &OCT0_xer_, &OCTETSTRING_json_, &OCT0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1_xer_ = { {"OCT1>\n", "OCT1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1_oer_ext_arr_[0] = {};
+const int OCT1_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1_oer_ext_arr_, 0, OCT1_oer_p_};
+const TTCN_Typedescriptor_t OCT1_descr_ = { "@General_Types.OCT1", &OCTETSTRING_ber_, &OCT1_raw_, &OCTETSTRING_text_, &OCT1_xer_, &OCTETSTRING_json_, &OCT1_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT2_xer_ = { {"OCT2>\n", "OCT2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2_oer_ext_arr_[0] = {};
+const int OCT2_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2_oer_ext_arr_, 0, OCT2_oer_p_};
+const TTCN_Typedescriptor_t OCT2_descr_ = { "@General_Types.OCT2", &OCTETSTRING_ber_, &OCT2_raw_, &OCTETSTRING_text_, &OCT2_xer_, &OCTETSTRING_json_, &OCT2_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3_xer_ = { {"OCT3>\n", "OCT3>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3_oer_ext_arr_[0] = {};
+const int OCT3_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3_oer_ = { -1, TRUE, 3, FALSE, 0, 0, OCT3_oer_ext_arr_, 0, OCT3_oer_p_};
+const TTCN_Typedescriptor_t OCT3_descr_ = { "@General_Types.OCT3", &OCTETSTRING_ber_, &OCT3_raw_, &OCTETSTRING_text_, &OCT3_xer_, &OCTETSTRING_json_, &OCT3_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4_raw_ = {32,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT4_xer_ = { {"OCT4>\n", "OCT4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4_oer_ext_arr_[0] = {};
+const int OCT4_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4_oer_ = { -1, TRUE, 4, FALSE, 0, 0, OCT4_oer_ext_arr_, 0, OCT4_oer_p_};
+const TTCN_Typedescriptor_t OCT4_descr_ = { "@General_Types.OCT4", &OCTETSTRING_ber_, &OCT4_raw_, &OCTETSTRING_text_, &OCT4_xer_, &OCTETSTRING_json_, &OCT4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT5_raw_ = {40,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,5,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT5_xer_ = { {"OCT5>\n", "OCT5>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT5_oer_ext_arr_[0] = {};
+const int OCT5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT5_oer_ = { -1, TRUE, 5, FALSE, 0, 0, OCT5_oer_ext_arr_, 0, OCT5_oer_p_};
+const TTCN_Typedescriptor_t OCT5_descr_ = { "@General_Types.OCT5", &OCTETSTRING_ber_, &OCT5_raw_, &OCTETSTRING_text_, &OCT5_xer_, &OCTETSTRING_json_, &OCT5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT6_raw_ = {48,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT6_xer_ = { {"OCT6>\n", "OCT6>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT6_oer_ext_arr_[0] = {};
+const int OCT6_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT6_oer_ = { -1, TRUE, 6, FALSE, 0, 0, OCT6_oer_ext_arr_, 0, OCT6_oer_p_};
+const TTCN_Typedescriptor_t OCT6_descr_ = { "@General_Types.OCT6", &OCTETSTRING_ber_, &OCT6_raw_, &OCTETSTRING_text_, &OCT6_xer_, &OCTETSTRING_json_, &OCT6_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT7_raw_ = {56,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,7,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT7_xer_ = { {"OCT7>\n", "OCT7>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT7_oer_ext_arr_[0] = {};
+const int OCT7_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT7_oer_ = { -1, TRUE, 7, FALSE, 0, 0, OCT7_oer_ext_arr_, 0, OCT7_oer_p_};
+const TTCN_Typedescriptor_t OCT7_descr_ = { "@General_Types.OCT7", &OCTETSTRING_ber_, &OCT7_raw_, &OCTETSTRING_text_, &OCT7_xer_, &OCTETSTRING_json_, &OCT7_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT8_raw_ = {64,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT8_xer_ = { {"OCT8>\n", "OCT8>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT8_oer_ext_arr_[0] = {};
+const int OCT8_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT8_oer_ = { -1, TRUE, 8, FALSE, 0, 0, OCT8_oer_ext_arr_, 0, OCT8_oer_p_};
+const TTCN_Typedescriptor_t OCT8_descr_ = { "@General_Types.OCT8", &OCTETSTRING_ber_, &OCT8_raw_, &OCTETSTRING_text_, &OCT8_xer_, &OCTETSTRING_json_, &OCT8_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT9_raw_ = {72,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,9,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT9_xer_ = { {"OCT9>\n", "OCT9>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT9_oer_ext_arr_[0] = {};
+const int OCT9_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT9_oer_ = { -1, TRUE, 9, FALSE, 0, 0, OCT9_oer_ext_arr_, 0, OCT9_oer_p_};
+const TTCN_Typedescriptor_t OCT9_descr_ = { "@General_Types.OCT9", &OCTETSTRING_ber_, &OCT9_raw_, &OCTETSTRING_text_, &OCT9_xer_, &OCTETSTRING_json_, &OCT9_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT10_raw_ = {80,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,10,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT10_xer_ = { {"OCT10>\n", "OCT10>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT10_oer_ext_arr_[0] = {};
+const int OCT10_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT10_oer_ = { -1, TRUE, 10, FALSE, 0, 0, OCT10_oer_ext_arr_, 0, OCT10_oer_p_};
+const TTCN_Typedescriptor_t OCT10_descr_ = { "@General_Types.OCT10", &OCTETSTRING_ber_, &OCT10_raw_, &OCTETSTRING_text_, &OCT10_xer_, &OCTETSTRING_json_, &OCT10_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT11_raw_ = {88,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,11,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT11_xer_ = { {"OCT11>\n", "OCT11>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT11_oer_ext_arr_[0] = {};
+const int OCT11_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT11_oer_ = { -1, TRUE, 11, FALSE, 0, 0, OCT11_oer_ext_arr_, 0, OCT11_oer_p_};
+const TTCN_Typedescriptor_t OCT11_descr_ = { "@General_Types.OCT11", &OCTETSTRING_ber_, &OCT11_raw_, &OCTETSTRING_text_, &OCT11_xer_, &OCTETSTRING_json_, &OCT11_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT12_raw_ = {96,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,12,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT12_xer_ = { {"OCT12>\n", "OCT12>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT12_oer_ext_arr_[0] = {};
+const int OCT12_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT12_oer_ = { -1, TRUE, 12, FALSE, 0, 0, OCT12_oer_ext_arr_, 0, OCT12_oer_p_};
+const TTCN_Typedescriptor_t OCT12_descr_ = { "@General_Types.OCT12", &OCTETSTRING_ber_, &OCT12_raw_, &OCTETSTRING_text_, &OCT12_xer_, &OCTETSTRING_json_, &OCT12_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT13_raw_ = {104,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,13,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT13_xer_ = { {"OCT13>\n", "OCT13>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT13_oer_ext_arr_[0] = {};
+const int OCT13_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT13_oer_ = { -1, TRUE, 13, FALSE, 0, 0, OCT13_oer_ext_arr_, 0, OCT13_oer_p_};
+const TTCN_Typedescriptor_t OCT13_descr_ = { "@General_Types.OCT13", &OCTETSTRING_ber_, &OCT13_raw_, &OCTETSTRING_text_, &OCT13_xer_, &OCTETSTRING_json_, &OCT13_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT14_raw_ = {112,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,14,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT14_xer_ = { {"OCT14>\n", "OCT14>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT14_oer_ext_arr_[0] = {};
+const int OCT14_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT14_oer_ = { -1, TRUE, 14, FALSE, 0, 0, OCT14_oer_ext_arr_, 0, OCT14_oer_p_};
+const TTCN_Typedescriptor_t OCT14_descr_ = { "@General_Types.OCT14", &OCTETSTRING_ber_, &OCT14_raw_, &OCTETSTRING_text_, &OCT14_xer_, &OCTETSTRING_json_, &OCT14_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT15_raw_ = {120,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,15,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT15_xer_ = { {"OCT15>\n", "OCT15>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT15_oer_ext_arr_[0] = {};
+const int OCT15_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT15_oer_ = { -1, TRUE, 15, FALSE, 0, 0, OCT15_oer_ext_arr_, 0, OCT15_oer_p_};
+const TTCN_Typedescriptor_t OCT15_descr_ = { "@General_Types.OCT15", &OCTETSTRING_ber_, &OCT15_raw_, &OCTETSTRING_text_, &OCT15_xer_, &OCTETSTRING_json_, &OCT15_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT16_raw_ = {128,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,16,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT16_xer_ = { {"OCT16>\n", "OCT16>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT16_oer_ext_arr_[0] = {};
+const int OCT16_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT16_oer_ = { -1, TRUE, 16, FALSE, 0, 0, OCT16_oer_ext_arr_, 0, OCT16_oer_p_};
+const TTCN_Typedescriptor_t OCT16_descr_ = { "@General_Types.OCT16", &OCTETSTRING_ber_, &OCT16_raw_, &OCTETSTRING_text_, &OCT16_xer_, &OCTETSTRING_json_, &OCT16_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT17_raw_ = {136,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,17,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT17_xer_ = { {"OCT17>\n", "OCT17>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT17_oer_ext_arr_[0] = {};
+const int OCT17_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT17_oer_ = { -1, TRUE, 17, FALSE, 0, 0, OCT17_oer_ext_arr_, 0, OCT17_oer_p_};
+const TTCN_Typedescriptor_t OCT17_descr_ = { "@General_Types.OCT17", &OCTETSTRING_ber_, &OCT17_raw_, &OCTETSTRING_text_, &OCT17_xer_, &OCTETSTRING_json_, &OCT17_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT18_raw_ = {144,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,18,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT18_xer_ = { {"OCT18>\n", "OCT18>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT18_oer_ext_arr_[0] = {};
+const int OCT18_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT18_oer_ = { -1, TRUE, 18, FALSE, 0, 0, OCT18_oer_ext_arr_, 0, OCT18_oer_p_};
+const TTCN_Typedescriptor_t OCT18_descr_ = { "@General_Types.OCT18", &OCTETSTRING_ber_, &OCT18_raw_, &OCTETSTRING_text_, &OCT18_xer_, &OCTETSTRING_json_, &OCT18_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT19_raw_ = {152,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,19,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT19_xer_ = { {"OCT19>\n", "OCT19>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT19_oer_ext_arr_[0] = {};
+const int OCT19_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT19_oer_ = { -1, TRUE, 19, FALSE, 0, 0, OCT19_oer_ext_arr_, 0, OCT19_oer_p_};
+const TTCN_Typedescriptor_t OCT19_descr_ = { "@General_Types.OCT19", &OCTETSTRING_ber_, &OCT19_raw_, &OCTETSTRING_text_, &OCT19_xer_, &OCTETSTRING_json_, &OCT19_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT20_raw_ = {160,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,20,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT20_xer_ = { {"OCT20>\n", "OCT20>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT20_oer_ext_arr_[0] = {};
+const int OCT20_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT20_oer_ = { -1, TRUE, 20, FALSE, 0, 0, OCT20_oer_ext_arr_, 0, OCT20_oer_p_};
+const TTCN_Typedescriptor_t OCT20_descr_ = { "@General_Types.OCT20", &OCTETSTRING_ber_, &OCT20_raw_, &OCTETSTRING_text_, &OCT20_xer_, &OCTETSTRING_json_, &OCT20_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT32_raw_ = {256,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,32,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT32_xer_ = { {"OCT32>\n", "OCT32>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT32_oer_ext_arr_[0] = {};
+const int OCT32_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT32_oer_ = { -1, TRUE, 32, FALSE, 0, 0, OCT32_oer_ext_arr_, 0, OCT32_oer_p_};
+const TTCN_Typedescriptor_t OCT32_descr_ = { "@General_Types.OCT32", &OCTETSTRING_ber_, &OCT32_raw_, &OCTETSTRING_text_, &OCT32_xer_, &OCTETSTRING_json_, &OCT32_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT34_raw_ = {272,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,34,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT34_xer_ = { {"OCT34>\n", "OCT34>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT34_oer_ext_arr_[0] = {};
+const int OCT34_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT34_oer_ = { -1, TRUE, 34, FALSE, 0, 0, OCT34_oer_ext_arr_, 0, OCT34_oer_p_};
+const TTCN_Typedescriptor_t OCT34_descr_ = { "@General_Types.OCT34", &OCTETSTRING_ber_, &OCT34_raw_, &OCTETSTRING_text_, &OCT34_xer_, &OCTETSTRING_json_, &OCT34_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT46_raw_ = {368,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,46,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT46_xer_ = { {"OCT46>\n", "OCT46>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT46_oer_ext_arr_[0] = {};
+const int OCT46_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT46_oer_ = { -1, TRUE, 46, FALSE, 0, 0, OCT46_oer_ext_arr_, 0, OCT46_oer_p_};
+const TTCN_Typedescriptor_t OCT46_descr_ = { "@General_Types.OCT46", &OCTETSTRING_ber_, &OCT46_raw_, &OCTETSTRING_text_, &OCT46_xer_, &OCTETSTRING_json_, &OCT46_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__260_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__260_xer_ = { {"OCT1_260>\n", "OCT1_260>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__260_oer_ext_arr_[0] = {};
+const int OCT1__260_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__260_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__260_oer_ext_arr_, 0, OCT1__260_oer_p_};
+const TTCN_Typedescriptor_t OCT1__260_descr_ = { "@General_Types.OCT1_260", &OCTETSTRING_ber_, &OCT1__260_raw_, &OCTETSTRING_text_, &OCT1__260_xer_, &OCTETSTRING_json_, &OCT1__260_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__8_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__8_xer_ = { {"OCT1_8>\n", "OCT1_8>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__8_oer_ext_arr_[0] = {};
+const int OCT1__8_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__8_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__8_oer_ext_arr_, 0, OCT1__8_oer_p_};
+const TTCN_Typedescriptor_t OCT1__8_descr_ = { "@General_Types.OCT1_8", &OCTETSTRING_ber_, &OCT1__8_raw_, &OCTETSTRING_text_, &OCT1__8_xer_, &OCTETSTRING_json_, &OCT1__8_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__12_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__12_xer_ = { {"OCT1_12>\n", "OCT1_12>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__12_oer_ext_arr_[0] = {};
+const int OCT1__12_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__12_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__12_oer_ext_arr_, 0, OCT1__12_oer_p_};
+const TTCN_Typedescriptor_t OCT1__12_descr_ = { "@General_Types.OCT1_12", &OCTETSTRING_ber_, &OCT1__12_raw_, &OCTETSTRING_text_, &OCT1__12_xer_, &OCTETSTRING_json_, &OCT1__12_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__32_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__32_xer_ = { {"OCT1_32>\n", "OCT1_32>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__32_oer_ext_arr_[0] = {};
+const int OCT1__32_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__32_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__32_oer_ext_arr_, 0, OCT1__32_oer_p_};
+const TTCN_Typedescriptor_t OCT1__32_descr_ = { "@General_Types.OCT1_32", &OCTETSTRING_ber_, &OCT1__32_raw_, &OCTETSTRING_text_, &OCT1__32_xer_, &OCTETSTRING_json_, &OCT1__32_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1__50_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT1__50_xer_ = { {"OCT1_50>\n", "OCT1_50>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1__50_oer_ext_arr_[0] = {};
+const int OCT1__50_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1__50_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT1__50_oer_ext_arr_, 0, OCT1__50_oer_p_};
+const TTCN_Typedescriptor_t OCT1__50_descr_ = { "@General_Types.OCT1_50", &OCTETSTRING_ber_, &OCT1__50_raw_, &OCTETSTRING_text_, &OCT1__50_xer_, &OCTETSTRING_json_, &OCT1__50_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3__8_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCT3__8_xer_ = { {"OCT3_8>\n", "OCT3_8>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3__8_oer_ext_arr_[0] = {};
+const int OCT3__8_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3__8_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCT3__8_oer_ext_arr_, 0, OCT3__8_oer_p_};
+const TTCN_Typedescriptor_t OCT3__8_descr_ = { "@General_Types.OCT3_8", &OCTETSTRING_ber_, &OCT3__8_raw_, &OCTETSTRING_text_, &OCT3__8_xer_, &OCTETSTRING_json_, &OCT3__8_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCTN_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t OCTN_xer_ = { {"OCTN>\n", "OCTN>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCTN_oer_ext_arr_[0] = {};
+const int OCTN_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCTN_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OCTN_oer_ext_arr_, 0, OCTN_oer_p_};
+const TTCN_Typedescriptor_t OCTN_descr_ = { "@General_Types.OCTN", &OCTETSTRING_ber_, &OCTN_raw_, &OCTETSTRING_text_, &OCTN_xer_, &OCTETSTRING_json_, &OCTN_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX1_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX1_xer_ = { {"HEX1>\n", "HEX1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX1_descr_ = { "@General_Types.HEX1", NULL, &HEX1_raw_, NULL, &HEX1_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX0__16_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX0__16_xer_ = { {"HEX0_16>\n", "HEX0_16>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX0__16_descr_ = { "@General_Types.HEX0_16", NULL, &HEX0__16_raw_, NULL, &HEX0__16_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX5__16_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX5__16_xer_ = { {"HEX5_16>\n", "HEX5_16>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX5__16_descr_ = { "@General_Types.HEX5_16", NULL, &HEX5__16_raw_, NULL, &HEX5__16_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t HEX1__32_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t HEX1__32_xer_ = { {"HEX1_32>\n", "HEX1_32>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_Typedescriptor_t HEX1__32_descr_ = { "@General_Types.HEX1_32", NULL, &HEX1__32_raw_, NULL, &HEX1__32_xer_, &HEXSTRING_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT1_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT1_xer_ = { {"INT1>\n", "INT1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT1_descr_ = { "@General_Types.INT1", &INTEGER_ber_, &INT1_raw_, &INTEGER_text_, &INT1_xer_, &INTEGER_json_, &INT1_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t LIN1_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t LIN1_xer_ = { {"LIN1>\n", "LIN1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t LIN1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t LIN1_descr_ = { "@General_Types.LIN1", &INTEGER_ber_, &LIN1_raw_, &INTEGER_text_, &LIN1_xer_, &INTEGER_json_, &LIN1_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t LIN2_raw_ = {16,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t LIN2_xer_ = { {"LIN2>\n", "LIN2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t LIN2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t LIN2_descr_ = { "@General_Types.LIN2", &INTEGER_ber_, &LIN2_raw_, &INTEGER_text_, &LIN2_xer_, &INTEGER_json_, &LIN2_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t LIN2__BO__LAST_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t LIN2__BO__LAST_xer_ = { {"LIN2_BO_LAST>\n", "LIN2_BO_LAST>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t LIN2__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t LIN2__BO__LAST_descr_ = { "@General_Types.LIN2_BO_LAST", &INTEGER_ber_, &LIN2__BO__LAST_raw_, &INTEGER_text_, &LIN2__BO__LAST_xer_, &INTEGER_json_, &LIN2__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t LIN3__BO__LAST_raw_ = {24,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t LIN3__BO__LAST_xer_ = { {"LIN3_BO_LAST>\n", "LIN3_BO_LAST>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t LIN3__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t LIN3__BO__LAST_descr_ = { "@General_Types.LIN3_BO_LAST", &INTEGER_ber_, &LIN3__BO__LAST_raw_, &INTEGER_text_, &LIN3__BO__LAST_xer_, &INTEGER_json_, &LIN3__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t LIN4__BO__LAST_raw_ = {32,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t LIN4__BO__LAST_xer_ = { {"LIN4_BO_LAST>\n", "LIN4_BO_LAST>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t LIN4__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t LIN4__BO__LAST_descr_ = { "@General_Types.LIN4_BO_LAST", &INTEGER_ber_, &LIN4__BO__LAST_raw_, &INTEGER_text_, &LIN4__BO__LAST_xer_, &INTEGER_json_, &LIN4__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT1b_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT1b_xer_ = { {"INT1b>\n", "INT1b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT1b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT1b_descr_ = { "@General_Types.INT1b", &INTEGER_ber_, &INT1b_raw_, &INTEGER_text_, &INT1b_xer_, &INTEGER_json_, &INT1b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT2b_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT2b_xer_ = { {"INT2b>\n", "INT2b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT2b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT2b_descr_ = { "@General_Types.INT2b", &INTEGER_ber_, &INT2b_raw_, &INTEGER_text_, &INT2b_xer_, &INTEGER_json_, &INT2b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT3b_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT3b_xer_ = { {"INT3b>\n", "INT3b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT3b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT3b_descr_ = { "@General_Types.INT3b", &INTEGER_ber_, &INT3b_raw_, &INTEGER_text_, &INT3b_xer_, &INTEGER_json_, &INT3b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT4b_raw_ = {4,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT4b_xer_ = { {"INT4b>\n", "INT4b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT4b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT4b_descr_ = { "@General_Types.INT4b", &INTEGER_ber_, &INT4b_raw_, &INTEGER_text_, &INT4b_xer_, &INTEGER_json_, &INT4b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT5b_raw_ = {5,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT5b_xer_ = { {"INT5b>\n", "INT5b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT5b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT5b_descr_ = { "@General_Types.INT5b", &INTEGER_ber_, &INT5b_raw_, &INTEGER_text_, &INT5b_xer_, &INTEGER_json_, &INT5b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT6b_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT6b_xer_ = { {"INT6b>\n", "INT6b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT6b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT6b_descr_ = { "@General_Types.INT6b", &INTEGER_ber_, &INT6b_raw_, &INTEGER_text_, &INT6b_xer_, &INTEGER_json_, &INT6b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT7b_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT7b_xer_ = { {"INT7b>\n", "INT7b>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT7b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT7b_descr_ = { "@General_Types.INT7b", &INTEGER_ber_, &INT7b_raw_, &INTEGER_text_, &INT7b_xer_, &INTEGER_json_, &INT7b_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT11b__BO__LAST_raw_ = {11,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT11b__BO__LAST_xer_ = { {"INT11b_BO_LAST>\n", "INT11b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT11b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT11b__BO__LAST_descr_ = { "@General_Types.INT11b_BO_LAST", &INTEGER_ber_, &INT11b__BO__LAST_raw_, &INTEGER_text_, &INT11b__BO__LAST_xer_, &INTEGER_json_, &INT11b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT12b__BO__LAST_raw_ = {12,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT12b__BO__LAST_xer_ = { {"INT12b_BO_LAST>\n", "INT12b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT12b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT12b__BO__LAST_descr_ = { "@General_Types.INT12b_BO_LAST", &INTEGER_ber_, &INT12b__BO__LAST_raw_, &INTEGER_text_, &INT12b__BO__LAST_xer_, &INTEGER_json_, &INT12b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT13b__BO__LAST_raw_ = {13,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT13b__BO__LAST_xer_ = { {"INT13b_BO_LAST>\n", "INT13b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT13b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT13b__BO__LAST_descr_ = { "@General_Types.INT13b_BO_LAST", &INTEGER_ber_, &INT13b__BO__LAST_raw_, &INTEGER_text_, &INT13b__BO__LAST_xer_, &INTEGER_json_, &INT13b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT14b__BO__LAST_raw_ = {14,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT14b__BO__LAST_xer_ = { {"INT14b_BO_LAST>\n", "INT14b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT14b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT14b__BO__LAST_descr_ = { "@General_Types.INT14b_BO_LAST", &INTEGER_ber_, &INT14b__BO__LAST_raw_, &INTEGER_text_, &INT14b__BO__LAST_xer_, &INTEGER_json_, &INT14b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT20b__BO__LAST_raw_ = {20,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT20b__BO__LAST_xer_ = { {"INT20b_BO_LAST>\n", "INT20b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT20b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT20b__BO__LAST_descr_ = { "@General_Types.INT20b_BO_LAST", &INTEGER_ber_, &INT20b__BO__LAST_raw_, &INTEGER_text_, &INT20b__BO__LAST_xer_, &INTEGER_json_, &INT20b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t INT31b__BO__LAST_raw_ = {31,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t INT31b__BO__LAST_xer_ = { {"INT31b_BO_LAST>\n", "INT31b_BO_LAST>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t INT31b__BO__LAST_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t INT31b__BO__LAST_descr_ = { "@General_Types.INT31b_BO_LAST", &INTEGER_ber_, &INT31b__BO__LAST_raw_, &INTEGER_text_, &INT31b__BO__LAST_xer_, &INTEGER_json_, &INT31b__BO__LAST_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_Typedescriptor_t& Dummy__comptype_descr_ = COMPONENT_descr_;
+const TTCN_Typedescriptor_t& Dummy__CT_descr_ = COMPONENT_descr_;
+const TTCN_RAWdescriptor_t Protocols_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for Protocols
+const TTCN_Typedescriptor_t Protocols_descr_ = { "@General_Types.Protocols", NULL, &Protocols_raw_, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT1List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT1List
+const TTCN_Typedescriptor_t OCT1List_descr_ = { "@General_Types.OCT1List", NULL, &OCT1List_raw_, NULL, NULL, NULL, NULL, &OCT1_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT1List_0_xer_ = { {"OCT1>\n", "OCT1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT1List_0_oer_ext_arr_[0] = {};
+const int OCT1List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT1List_0_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OCT1List_0_oer_ext_arr_, 0, OCT1List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT1List_0_descr_ = { "@General_Types.OCT1List.<oftype>", &OCTETSTRING_ber_, &OCT1_raw_, &OCTETSTRING_text_, &OCT1List_0_xer_, &OCTETSTRING_json_, &OCT1List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT2List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT2List
+const TTCN_Typedescriptor_t OCT2List_descr_ = { "@General_Types.OCT2List", NULL, &OCT2List_raw_, NULL, NULL, NULL, NULL, &OCT2_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT2List_0_xer_ = { {"OCT2>\n", "OCT2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT2List_0_oer_ext_arr_[0] = {};
+const int OCT2List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT2List_0_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OCT2List_0_oer_ext_arr_, 0, OCT2List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT2List_0_descr_ = { "@General_Types.OCT2List.<oftype>", &OCTETSTRING_ber_, &OCT2_raw_, &OCTETSTRING_text_, &OCT2List_0_xer_, &OCTETSTRING_json_, &OCT2List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT3List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT3List
+const TTCN_Typedescriptor_t OCT3List_descr_ = { "@General_Types.OCT3List", NULL, &OCT3List_raw_, NULL, NULL, NULL, NULL, &OCT3_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT3List_0_xer_ = { {"OCT3>\n", "OCT3>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT3List_0_oer_ext_arr_[0] = {};
+const int OCT3List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT3List_0_oer_ = { -1, TRUE, 3, FALSE, 0, 0, OCT3List_0_oer_ext_arr_, 0, OCT3List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT3List_0_descr_ = { "@General_Types.OCT3List.<oftype>", &OCTETSTRING_ber_, &OCT3_raw_, &OCTETSTRING_text_, &OCT3List_0_xer_, &OCTETSTRING_json_, &OCT3List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT4List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT4List
+const TTCN_Typedescriptor_t OCT4List_descr_ = { "@General_Types.OCT4List", NULL, &OCT4List_raw_, NULL, NULL, NULL, NULL, &OCT4_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT4List_0_xer_ = { {"OCT4>\n", "OCT4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT4List_0_oer_ext_arr_[0] = {};
+const int OCT4List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT4List_0_oer_ = { -1, TRUE, 4, FALSE, 0, 0, OCT4List_0_oer_ext_arr_, 0, OCT4List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT4List_0_descr_ = { "@General_Types.OCT4List.<oftype>", &OCTETSTRING_ber_, &OCT4_raw_, &OCTETSTRING_text_, &OCT4List_0_xer_, &OCTETSTRING_json_, &OCT4List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT5List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT5List
+const TTCN_Typedescriptor_t OCT5List_descr_ = { "@General_Types.OCT5List", NULL, &OCT5List_raw_, NULL, NULL, NULL, NULL, &OCT5_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT5List_0_xer_ = { {"OCT5>\n", "OCT5>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT5List_0_oer_ext_arr_[0] = {};
+const int OCT5List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT5List_0_oer_ = { -1, TRUE, 5, FALSE, 0, 0, OCT5List_0_oer_ext_arr_, 0, OCT5List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT5List_0_descr_ = { "@General_Types.OCT5List.<oftype>", &OCTETSTRING_ber_, &OCT5_raw_, &OCTETSTRING_text_, &OCT5List_0_xer_, &OCTETSTRING_json_, &OCT5List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT6List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT6List
+const TTCN_Typedescriptor_t OCT6List_descr_ = { "@General_Types.OCT6List", NULL, &OCT6List_raw_, NULL, NULL, NULL, NULL, &OCT6_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT6List_0_xer_ = { {"OCT6>\n", "OCT6>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT6List_0_oer_ext_arr_[0] = {};
+const int OCT6List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT6List_0_oer_ = { -1, TRUE, 6, FALSE, 0, 0, OCT6List_0_oer_ext_arr_, 0, OCT6List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT6List_0_descr_ = { "@General_Types.OCT6List.<oftype>", &OCTETSTRING_ber_, &OCT6_raw_, &OCTETSTRING_text_, &OCT6List_0_xer_, &OCTETSTRING_json_, &OCT6List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t OCT7List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for OCT7List
+const TTCN_Typedescriptor_t OCT7List_descr_ = { "@General_Types.OCT7List", NULL, &OCT7List_raw_, NULL, NULL, NULL, NULL, &OCT7_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t OCT7List_0_xer_ = { {"OCT7>\n", "OCT7>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int OCT7List_0_oer_ext_arr_[0] = {};
+const int OCT7List_0_oer_p_[0] = {};
+const TTCN_OERdescriptor_t OCT7List_0_oer_ = { -1, TRUE, 7, FALSE, 0, 0, OCT7List_0_oer_ext_arr_, 0, OCT7List_0_oer_p_};
+const TTCN_Typedescriptor_t OCT7List_0_descr_ = { "@General_Types.OCT7List.<oftype>", &OCTETSTRING_ber_, &OCT7_raw_, &OCTETSTRING_text_, &OCT7List_0_xer_, &OCTETSTRING_json_, &OCT7List_0_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ListOfDummy__comptype_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ListOfDummy__comptype
+const TTCN_Typedescriptor_t ListOfDummy__comptype_descr_ = { "@General_Types.ListOfDummy_comptype", NULL, &ListOfDummy__comptype_raw_, NULL, NULL, NULL, NULL, &COMPONENT_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ListOfDummy__CT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ListOfDummy__CT
+const TTCN_Typedescriptor_t ListOfDummy__CT_descr_ = { "@General_Types.ListOfDummy_CT", NULL, &ListOfDummy__CT_raw_, NULL, NULL, NULL, NULL, &COMPONENT_descr_, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ProtocolList_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ProtocolList
+const TTCN_Typedescriptor_t ProtocolList_descr_ = { "@General_Types.ProtocolList", NULL, &ProtocolList_raw_, NULL, NULL, NULL, NULL, &Protocols_descr_, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("General_Types", __DATE__, __TIME__, module_checksum, NULL, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, NULL, NULL, NULL, NULL, init_comp_type, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+
+const Integers Integer__array::UNBOUND_ELEM;
+Integer__array::Integer__array()
+{
+val_ptr = NULL;
+}
+
+Integer__array::Integer__array(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+Integer__array::Integer__array(const Integer__array& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.Integer_array.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+Integer__array::~Integer__array()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void Integer__array::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+Integer__array& Integer__array::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+Integer__array& Integer__array::operator=(const Integer__array& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.Integer_array.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean Integer__array::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Integer_array.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean Integer__array::operator==(const Integer__array& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Integer_array.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Integer_array.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+Integers& Integer__array::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Integer_array using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (Integers**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Integers(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new Integers;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+Integers& Integer__array::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Integer_array.");
+return (*this)[(int)index_value];
+}
+
+const Integers& Integer__array::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.Integer_array.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Integer_array using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.Integer_array: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const Integers& Integer__array::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Integer_array.");
+return (*this)[(int)index_value];
+}
+
+Integer__array Integer__array::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+Integer__array Integer__array::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+Integer__array Integer__array::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+Integer__array Integer__array::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.Integer_array.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+Integer__array ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new Integers(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Integer__array Integer__array::operator+(const Integer__array& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.Integer_array concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+Integer__array ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Integers(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new Integers(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Integer__array Integer__array::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.Integer_array.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.Integer_array","element");
+Integer__array ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Integers(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+Integer__array Integer__array::replace(int index, int len, const Integer__array& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.Integer_array.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.Integer_array.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.Integer_array","element");
+Integer__array ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Integers(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new Integers(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new Integers(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+Integer__array Integer__array::replace(int index, int len, const Integer__array_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void Integer__array::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.Integer_array.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (Integers**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Integers(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (Integers**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.Integer_array: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (Integers**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean Integer__array::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int Integer__array::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.Integer_array.");
+return val_ptr->n_elements;
+}
+
+int Integer__array::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.Integer_array.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void Integer__array::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void Integer__array::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Integer_array");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Integer_array");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void Integer__array::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void Integer__array::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.Integer_array.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void Integer__array::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.Integer_array.");
+val_ptr->value_elements = (Integers**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new Integers;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void Integer__array::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 Integer__array::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int Integer__array::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int Integer__array::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void Integer__array_template::copy_value(const Integer__array& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.Integer_array with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (Integers_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new Integers_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Integers_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void Integer__array_template::copy_template(const Integer__array_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (Integers_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new Integers_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Integers_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new Integer__array_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.Integer_array.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean Integer__array_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const Integer__array_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const Integer__array*)value_ptr)[value_index], legacy);
+else return ((const Integer__array_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+Integer__array_template::Integer__array_template()
+{
+}
+
+Integer__array_template::Integer__array_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+Integer__array_template::Integer__array_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+Integer__array_template::Integer__array_template(const Integer__array& other_value)
+{
+copy_value(other_value);
+}
+
+Integer__array_template::Integer__array_template(const OPTIONAL<Integer__array>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Integer__array&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.Integer_array from an unbound optional field.");
+}
+}
+
+Integer__array_template::Integer__array_template(const Integer__array_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+Integer__array_template::~Integer__array_template()
+{
+clean_up();
+}
+
+void Integer__array_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+Integer__array_template& Integer__array_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+Integer__array_template& Integer__array_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+Integer__array_template& Integer__array_template::operator=(const Integer__array& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+Integer__array_template& Integer__array_template::operator=(const OPTIONAL<Integer__array>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Integer__array&)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 @General_Types.Integer_array.");
+}
+return *this;
+}
+
+Integer__array_template& Integer__array_template::operator=(const Integer__array_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+Integers_template& Integer__array_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Integer_array using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.Integer_array.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+Integers_template& Integer__array_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Integer_array.");
+return (*this)[(int)index_value];
+}
+
+const Integers_template& Integer__array_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Integer_array using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.Integer_array.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.Integer_array: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const Integers_template& Integer__array_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Integer_array.");
+return (*this)[(int)index_value];
+}
+
+void Integer__array_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.Integer_array.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (Integers_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Integers_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Integers_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (Integers_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int Integer__array_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int Integer__array_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Integer_array containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.Integer_array.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.Integer_array");
+}
+
+boolean Integer__array_template::match(const Integer__array& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.Integer_array.");
+}
+return FALSE;
+}
+
+boolean Integer__array_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+Integer__array Integer__array_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 @General_Types.Integer_array.");
+Integer__array ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+Integer__array Integer__array_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+Integer__array Integer__array_template::replace(int index, int len, const Integer__array_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+Integer__array Integer__array_template::replace(int index, int len, const Integer__array& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void Integer__array_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new Integer__array_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.Integer_array.");
+}
+set_selection(template_type);
+}
+
+Integer__array_template& Integer__array_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.Integer_array.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.Integer_array.");
+return value_list.list_value[list_index];
+}
+
+void Integer__array_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void Integer__array_template::log_match(const Integer__array& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 Integer__array_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.Integer_array.");
+}
+}
+
+void Integer__array_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.Integer_array.");
+single_value.value_elements = (Integers_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new Integers_template;
+single_value.value_elements[elem_count]->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 Integer__array_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 for a template of type @General_Types.Integer_array.");
+}
+}
+
+boolean Integer__array_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean Integer__array_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void Integer__array_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ Integer__array_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.Integer_array");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void Integer__array_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.Integer_array");
+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 : "@General_Types.Integer_array");
+}
+
+boolean Integer__array_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const VERDICTTYPE Verdicttypes::UNBOUND_ELEM;
+Verdicttypes::Verdicttypes()
+{
+val_ptr = NULL;
+}
+
+Verdicttypes::Verdicttypes(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+Verdicttypes::Verdicttypes(const Verdicttypes& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.Verdicttypes.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+Verdicttypes::~Verdicttypes()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void Verdicttypes::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+Verdicttypes& Verdicttypes::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+Verdicttypes& Verdicttypes::operator=(const Verdicttypes& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.Verdicttypes.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean Verdicttypes::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Verdicttypes.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean Verdicttypes::operator==(const Verdicttypes& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Verdicttypes.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Verdicttypes.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+VERDICTTYPE& Verdicttypes::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Verdicttypes using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new VERDICTTYPE(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new VERDICTTYPE;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+VERDICTTYPE& Verdicttypes::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Verdicttypes.");
+return (*this)[(int)index_value];
+}
+
+const VERDICTTYPE& Verdicttypes::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.Verdicttypes.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Verdicttypes using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.Verdicttypes: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const VERDICTTYPE& Verdicttypes::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Verdicttypes.");
+return (*this)[(int)index_value];
+}
+
+Verdicttypes Verdicttypes::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+Verdicttypes Verdicttypes::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+Verdicttypes Verdicttypes::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+Verdicttypes Verdicttypes::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.Verdicttypes.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+Verdicttypes ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Verdicttypes Verdicttypes::operator+(const Verdicttypes& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.Verdicttypes concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+Verdicttypes ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new VERDICTTYPE(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Verdicttypes Verdicttypes::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.Verdicttypes.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.Verdicttypes","element");
+Verdicttypes ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+Verdicttypes Verdicttypes::replace(int index, int len, const Verdicttypes& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.Verdicttypes.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.Verdicttypes.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.Verdicttypes","element");
+Verdicttypes ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new VERDICTTYPE(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new VERDICTTYPE(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+Verdicttypes Verdicttypes::replace(int index, int len, const Verdicttypes_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void Verdicttypes::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.Verdicttypes.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new VERDICTTYPE(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (VERDICTTYPE**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.Verdicttypes: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (VERDICTTYPE**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean Verdicttypes::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int Verdicttypes::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.Verdicttypes.");
+return val_ptr->n_elements;
+}
+
+int Verdicttypes::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.Verdicttypes.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void Verdicttypes::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void Verdicttypes::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Verdicttypes");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Verdicttypes");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void Verdicttypes::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void Verdicttypes::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.Verdicttypes.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void Verdicttypes::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.Verdicttypes.");
+val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new VERDICTTYPE;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void Verdicttypes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 Verdicttypes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int Verdicttypes::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int Verdicttypes::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void Verdicttypes_template::copy_value(const Verdicttypes& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.Verdicttypes with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void Verdicttypes_template::copy_template(const Verdicttypes_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new Verdicttypes_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.Verdicttypes.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean Verdicttypes_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const Verdicttypes_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const Verdicttypes*)value_ptr)[value_index], legacy);
+else return ((const Verdicttypes_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+Verdicttypes_template::Verdicttypes_template()
+{
+}
+
+Verdicttypes_template::Verdicttypes_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+Verdicttypes_template::Verdicttypes_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+Verdicttypes_template::Verdicttypes_template(const Verdicttypes& other_value)
+{
+copy_value(other_value);
+}
+
+Verdicttypes_template::Verdicttypes_template(const OPTIONAL<Verdicttypes>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Verdicttypes&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.Verdicttypes from an unbound optional field.");
+}
+}
+
+Verdicttypes_template::Verdicttypes_template(const Verdicttypes_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+Verdicttypes_template::~Verdicttypes_template()
+{
+clean_up();
+}
+
+void Verdicttypes_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+Verdicttypes_template& Verdicttypes_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+Verdicttypes_template& Verdicttypes_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+Verdicttypes_template& Verdicttypes_template::operator=(const Verdicttypes& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+Verdicttypes_template& Verdicttypes_template::operator=(const OPTIONAL<Verdicttypes>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Verdicttypes&)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 @General_Types.Verdicttypes.");
+}
+return *this;
+}
+
+Verdicttypes_template& Verdicttypes_template::operator=(const Verdicttypes_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+VERDICTTYPE_template& Verdicttypes_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Verdicttypes using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.Verdicttypes.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+VERDICTTYPE_template& Verdicttypes_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Verdicttypes.");
+return (*this)[(int)index_value];
+}
+
+const VERDICTTYPE_template& Verdicttypes_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Verdicttypes using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.Verdicttypes.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.Verdicttypes: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const VERDICTTYPE_template& Verdicttypes_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Verdicttypes.");
+return (*this)[(int)index_value];
+}
+
+void Verdicttypes_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.Verdicttypes.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (VERDICTTYPE_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (VERDICTTYPE_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int Verdicttypes_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int Verdicttypes_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Verdicttypes containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.Verdicttypes.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.Verdicttypes");
+}
+
+boolean Verdicttypes_template::match(const Verdicttypes& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.Verdicttypes.");
+}
+return FALSE;
+}
+
+boolean Verdicttypes_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+Verdicttypes Verdicttypes_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 @General_Types.Verdicttypes.");
+Verdicttypes ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+Verdicttypes Verdicttypes_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+Verdicttypes Verdicttypes_template::replace(int index, int len, const Verdicttypes_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+Verdicttypes Verdicttypes_template::replace(int index, int len, const Verdicttypes& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void Verdicttypes_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new Verdicttypes_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.Verdicttypes.");
+}
+set_selection(template_type);
+}
+
+Verdicttypes_template& Verdicttypes_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.Verdicttypes.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.Verdicttypes.");
+return value_list.list_value[list_index];
+}
+
+void Verdicttypes_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void Verdicttypes_template::log_match(const Verdicttypes& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 Verdicttypes_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.Verdicttypes.");
+}
+}
+
+void Verdicttypes_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.Verdicttypes.");
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+single_value.value_elements[elem_count]->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 Verdicttypes_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 for a template of type @General_Types.Verdicttypes.");
+}
+}
+
+boolean Verdicttypes_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean Verdicttypes_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void Verdicttypes_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ Verdicttypes_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.Verdicttypes");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void Verdicttypes_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.Verdicttypes");
+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 : "@General_Types.Verdicttypes");
+}
+
+boolean Verdicttypes_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const VERDICTTYPE VerdicttypeSet::UNBOUND_ELEM;
+boolean VerdicttypeSet::compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index)
+{
+if (((const VerdicttypeSet*)left_ptr)->val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+if (((const VerdicttypeSet*)right_ptr)->val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+if (((const VerdicttypeSet*)left_ptr)->val_ptr->value_elements[left_index] != NULL){
+if (((const VerdicttypeSet*)right_ptr)->val_ptr->value_elements[right_index] != NULL){
+return *((const VerdicttypeSet*)left_ptr)->val_ptr->value_elements[left_index] == *((const VerdicttypeSet*)right_ptr)->val_ptr->value_elements[right_index];
+} else return FALSE;
+} else {
+return ((const VerdicttypeSet*)right_ptr)->val_ptr->value_elements[right_index] == NULL;
+}
+}
+
+VerdicttypeSet::VerdicttypeSet()
+{
+val_ptr = NULL;
+}
+
+VerdicttypeSet::VerdicttypeSet(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+VerdicttypeSet::VerdicttypeSet(const VerdicttypeSet& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.VerdicttypeSet.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+VerdicttypeSet::~VerdicttypeSet()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void VerdicttypeSet::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+VerdicttypeSet& VerdicttypeSet::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+VerdicttypeSet& VerdicttypeSet::operator=(const VerdicttypeSet& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.VerdicttypeSet.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean VerdicttypeSet::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean VerdicttypeSet::operator==(const VerdicttypeSet& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+return compare_set_of(this, val_ptr->n_elements, &other_value, (other_value.val_ptr)->n_elements, compare_function);
+}
+
+VERDICTTYPE& VerdicttypeSet::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.VerdicttypeSet using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new VERDICTTYPE(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new VERDICTTYPE;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+VERDICTTYPE& VerdicttypeSet::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.VerdicttypeSet.");
+return (*this)[(int)index_value];
+}
+
+const VERDICTTYPE& VerdicttypeSet::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.VerdicttypeSet.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.VerdicttypeSet using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.VerdicttypeSet: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const VERDICTTYPE& VerdicttypeSet::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.VerdicttypeSet.");
+return (*this)[(int)index_value];
+}
+
+VerdicttypeSet VerdicttypeSet::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+VerdicttypeSet VerdicttypeSet::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+VerdicttypeSet VerdicttypeSet::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+VerdicttypeSet VerdicttypeSet::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.VerdicttypeSet.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+VerdicttypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+VerdicttypeSet VerdicttypeSet::operator+(const VerdicttypeSet& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.VerdicttypeSet concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+VerdicttypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new VERDICTTYPE(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+VerdicttypeSet VerdicttypeSet::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.VerdicttypeSet.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.VerdicttypeSet","element");
+VerdicttypeSet ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+VerdicttypeSet VerdicttypeSet::replace(int index, int len, const VerdicttypeSet& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.VerdicttypeSet.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.VerdicttypeSet.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.VerdicttypeSet","element");
+VerdicttypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new VERDICTTYPE(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new VERDICTTYPE(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new VERDICTTYPE(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+VerdicttypeSet VerdicttypeSet::replace(int index, int len, const VerdicttypeSet_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void VerdicttypeSet::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.VerdicttypeSet.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new VERDICTTYPE(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (VERDICTTYPE**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.VerdicttypeSet: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (VERDICTTYPE**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean VerdicttypeSet::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int VerdicttypeSet::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.VerdicttypeSet.");
+return val_ptr->n_elements;
+}
+
+int VerdicttypeSet::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.VerdicttypeSet.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void VerdicttypeSet::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void VerdicttypeSet::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "set of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("set of value", "@General_Types.VerdicttypeSet");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("set of value", "@General_Types.VerdicttypeSet");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void VerdicttypeSet::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void VerdicttypeSet::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.VerdicttypeSet.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void VerdicttypeSet::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.VerdicttypeSet.");
+val_ptr->value_elements = (VERDICTTYPE**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new VERDICTTYPE;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void VerdicttypeSet::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 VerdicttypeSet::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int VerdicttypeSet::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int VerdicttypeSet::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void VerdicttypeSet_template::copy_value(const VerdicttypeSet& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.VerdicttypeSet with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void VerdicttypeSet_template::copy_template(const VerdicttypeSet_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new VerdicttypeSet_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 SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = other_value.value_set.n_items;
+value_set.set_items = new VERDICTTYPE_template[value_set.n_items];
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count] = other_value.value_set.set_items[set_count];
+break;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.VerdicttypeSet.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean VerdicttypeSet_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const VerdicttypeSet_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const VerdicttypeSet*)value_ptr)[value_index], legacy);
+else return ((const VerdicttypeSet_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+boolean VerdicttypeSet_template::match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const VerdicttypeSet_template*)template_ptr)->value_set.set_items[template_index].match((*(const VerdicttypeSet*)value_ptr)[value_index], legacy);
+else return ((const VerdicttypeSet_template*)template_ptr)->value_set.set_items[template_index].is_any_or_omit();
+}
+
+void VerdicttypeSet_template::log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy)
+{
+if (value_ptr == NULL) {
+if (template_ptr != NULL) {
+((const VerdicttypeSet_template*)template_ptr)->single_value.value_elements[index_template]->log();
+}
+} else if (template_ptr == NULL) {
+(*(const VerdicttypeSet*)value_ptr)[index_value].log();
+} else {
+((const VerdicttypeSet_template*)template_ptr)->single_value.value_elements[index_template]->log_match((*(const VerdicttypeSet*)value_ptr)[index_value], legacy);
+}
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template()
+{
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template(template_sel other_value)
+ : Restricted_Length_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template(null_type)
+ : Restricted_Length_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template(const VerdicttypeSet& other_value)
+{
+copy_value(other_value);
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template(const OPTIONAL<VerdicttypeSet>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const VerdicttypeSet&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.VerdicttypeSet from an unbound optional field.");
+}
+}
+
+VerdicttypeSet_template::VerdicttypeSet_template(const VerdicttypeSet_template& other_value)
+ : Restricted_Length_Template()
+{
+copy_template(other_value);
+}
+
+VerdicttypeSet_template::~VerdicttypeSet_template()
+{
+clean_up();
+}
+
+void VerdicttypeSet_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+delete [] value_set.set_items;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::operator=(const VerdicttypeSet& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::operator=(const OPTIONAL<VerdicttypeSet>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const VerdicttypeSet&)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 @General_Types.VerdicttypeSet.");
+}
+return *this;
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::operator=(const VerdicttypeSet_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+VERDICTTYPE_template& VerdicttypeSet_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.VerdicttypeSet using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.VerdicttypeSet.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+VERDICTTYPE_template& VerdicttypeSet_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.VerdicttypeSet.");
+return (*this)[(int)index_value];
+}
+
+const VERDICTTYPE_template& VerdicttypeSet_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.VerdicttypeSet using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.VerdicttypeSet.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.VerdicttypeSet: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const VERDICTTYPE_template& VerdicttypeSet_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.VerdicttypeSet.");
+return (*this)[(int)index_value];
+}
+
+void VerdicttypeSet_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.VerdicttypeSet.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (VERDICTTYPE_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new VERDICTTYPE_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (VERDICTTYPE_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int VerdicttypeSet_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int VerdicttypeSet_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = value_set.n_items;
+ if (!is_size) { while (elem_count>0 && !value_set.set_items[elem_count-1].is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (value_set.set_items[i].get_selection())
+ {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+ if (template_selection==SUPERSET_MATCH) {
+ has_any_or_none = TRUE;
+ } else {
+ int max_size = min_size;
+ min_size = 0;
+ if (!has_any_or_none) { // [0,max_size]
+ switch (length_restriction_type) {
+ case NO_LENGTH_RESTRICTION:
+ if (max_size==0) return 0;
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet with no exact size.", op_name);
+ case SINGLE_LENGTH_RESTRICTION:
+ if (length_restriction.single_length<=max_size)
+ return length_restriction.single_length;
+ TTCN_error("Performing %sof() operation on an invalid template of type @General_Types.VerdicttypeSet. The maximum size (%d) contradicts the length restriction (%d).", op_name, max_size, length_restriction.single_length);
+ case RANGE_LENGTH_RESTRICTION:
+ if (max_size==length_restriction.range_length.min_length) {
+ return max_size;
+ } else if (max_size>length_restriction.range_length.min_length){
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet with no exact size.", op_name);
+ } else
+ TTCN_error("Performing %sof() operation on an invalid template of type @General_Types.VerdicttypeSet. Maximum size (%d) contradicts the length restriction (%d..%d).", op_name, max_size, length_restriction.range_length.min_length, length_restriction.range_length.max_length);
+ default:
+ TTCN_error("Internal error: Template has invalid length restriction type.");
+ }
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.VerdicttypeSet containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.VerdicttypeSet.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.VerdicttypeSet");
+}
+
+boolean VerdicttypeSet_template::match(const VerdicttypeSet& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_set_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+return match_set_of(&other_value, value_length, this, value_set.n_items, match_function_set, legacy);
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.VerdicttypeSet.");
+}
+return FALSE;
+}
+
+boolean VerdicttypeSet_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+VerdicttypeSet VerdicttypeSet_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 @General_Types.VerdicttypeSet.");
+VerdicttypeSet ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+VerdicttypeSet VerdicttypeSet_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+VerdicttypeSet VerdicttypeSet_template::replace(int index, int len, const VerdicttypeSet_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+VerdicttypeSet VerdicttypeSet_template::replace(int index, int len, const VerdicttypeSet& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void VerdicttypeSet_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new VerdicttypeSet_template[list_length];
+break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = list_length;
+value_set.set_items = new VERDICTTYPE_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.VerdicttypeSet.");
+}
+set_selection(template_type);
+}
+
+VerdicttypeSet_template& VerdicttypeSet_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.VerdicttypeSet.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.VerdicttypeSet.");
+return value_list.list_value[list_index];
+}
+
+VERDICTTYPE_template& VerdicttypeSet_template::set_item(unsigned int set_index)
+{
+if (template_selection != SUPERSET_MATCH && template_selection != SUBSET_MATCH) TTCN_error("Internal error: Accessing a set element of a non-set template of type @General_Types.VerdicttypeSet.");
+if (set_index >= value_set.n_items) TTCN_error("Internal error: Index overflow in a set template of type @General_Types.VerdicttypeSet.");
+return value_set.set_items[set_index];
+}
+
+void VerdicttypeSet_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log();
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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 SUPERSET_MATCH:
+case SUBSET_MATCH:
+TTCN_Logger::log_event("%s(", template_selection == SUPERSET_MATCH ? "superset" : "subset");
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++) {
+if (set_count > 0) TTCN_Logger::log_event_str(", ");
+value_set.set_items[set_count].log();
+}
+TTCN_Logger::log_char(')');
+break;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void VerdicttypeSet_template::log_match(const VerdicttypeSet& 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{
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+if (template_selection == SPECIFIC_VALUE)
+ log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
+else{
+if(previous_size != 0){
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+TTCN_Logger::log_event_str(":=");
+}
+}
+match_value.log();
+TTCN_Logger::log_event_str(" with ");
+log();
+TTCN_Logger::log_event_str(" unmatched");
+}
+return;
+}
+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");
+if (template_selection == SPECIFIC_VALUE) log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
+}
+}
+
+void VerdicttypeSet_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_restricted(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+text_buf.push_int(value_set.n_items);
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count].encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @General_Types.VerdicttypeSet.");
+}
+}
+
+void VerdicttypeSet_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_restricted(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.VerdicttypeSet.");
+single_value.value_elements = (VERDICTTYPE_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new VERDICTTYPE_template;
+single_value.value_elements[elem_count]->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 VerdicttypeSet_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;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = text_buf.pull_int().get_val();
+value_set.set_items = new VERDICTTYPE_template[value_set.n_items];
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count].decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @General_Types.VerdicttypeSet.");
+}
+}
+
+boolean VerdicttypeSet_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean VerdicttypeSet_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void VerdicttypeSet_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "set of 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: {
+ VerdicttypeSet_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ if (param.get_elem(p_i)->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[p_i].set_param(*param.get_elem(p_i));
+ }
+ }
+ break;
+ case Module_Param::MP_Superset_Template:
+ case Module_Param::MP_Subset_Template:
+ set_type(param.get_type()==Module_Param::MP_Superset_Template ? SUPERSET_MATCH : SUBSET_MATCH, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ set_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ break;
+ default:
+ param.type_error("set of template", "@General_Types.VerdicttypeSet");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void VerdicttypeSet_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.VerdicttypeSet");
+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 : "@General_Types.VerdicttypeSet");
+}
+
+boolean VerdicttypeSet_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return FALSE;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const anytype Anytypes::UNBOUND_ELEM;
+Anytypes::Anytypes()
+{
+val_ptr = NULL;
+}
+
+Anytypes::Anytypes(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+Anytypes::Anytypes(const Anytypes& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.Anytypes.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+Anytypes::~Anytypes()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void Anytypes::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+Anytypes& Anytypes::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+Anytypes& Anytypes::operator=(const Anytypes& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.Anytypes.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean Anytypes::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Anytypes.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean Anytypes::operator==(const Anytypes& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.Anytypes.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Anytypes.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+anytype& Anytypes::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Anytypes using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (anytype**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new anytype(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new anytype;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+anytype& Anytypes::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Anytypes.");
+return (*this)[(int)index_value];
+}
+
+const anytype& Anytypes::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.Anytypes.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.Anytypes using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.Anytypes: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const anytype& Anytypes::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.Anytypes.");
+return (*this)[(int)index_value];
+}
+
+Anytypes Anytypes::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+Anytypes Anytypes::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+Anytypes Anytypes::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+Anytypes Anytypes::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.Anytypes.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+Anytypes ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new anytype(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Anytypes Anytypes::operator+(const Anytypes& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.Anytypes concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+Anytypes ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new anytype(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+Anytypes Anytypes::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.Anytypes.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.Anytypes","element");
+Anytypes ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+Anytypes Anytypes::replace(int index, int len, const Anytypes& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.Anytypes.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.Anytypes.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.Anytypes","element");
+Anytypes ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new anytype(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new anytype(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+Anytypes Anytypes::replace(int index, int len, const Anytypes_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void Anytypes::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.Anytypes.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (anytype**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new anytype(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (anytype**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.Anytypes: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (anytype**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean Anytypes::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int Anytypes::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.Anytypes.");
+return val_ptr->n_elements;
+}
+
+int Anytypes::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.Anytypes.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void Anytypes::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void Anytypes::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Anytypes");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.Anytypes");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void Anytypes::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void Anytypes::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.Anytypes.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void Anytypes::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.Anytypes.");
+val_ptr->value_elements = (anytype**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new anytype;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void Anytypes::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 Anytypes::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int Anytypes::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int Anytypes::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void Anytypes_template::copy_value(const Anytypes& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.Anytypes with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new anytype_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new anytype_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void Anytypes_template::copy_template(const Anytypes_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new anytype_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new anytype_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new Anytypes_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.Anytypes.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean Anytypes_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const Anytypes_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const Anytypes*)value_ptr)[value_index], legacy);
+else return ((const Anytypes_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+Anytypes_template::Anytypes_template()
+{
+}
+
+Anytypes_template::Anytypes_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+Anytypes_template::Anytypes_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+Anytypes_template::Anytypes_template(const Anytypes& other_value)
+{
+copy_value(other_value);
+}
+
+Anytypes_template::Anytypes_template(const OPTIONAL<Anytypes>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Anytypes&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.Anytypes from an unbound optional field.");
+}
+}
+
+Anytypes_template::Anytypes_template(const Anytypes_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+Anytypes_template::~Anytypes_template()
+{
+clean_up();
+}
+
+void Anytypes_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+Anytypes_template& Anytypes_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+Anytypes_template& Anytypes_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+Anytypes_template& Anytypes_template::operator=(const Anytypes& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+Anytypes_template& Anytypes_template::operator=(const OPTIONAL<Anytypes>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const Anytypes&)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 @General_Types.Anytypes.");
+}
+return *this;
+}
+
+Anytypes_template& Anytypes_template::operator=(const Anytypes_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+anytype_template& Anytypes_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Anytypes using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.Anytypes.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+anytype_template& Anytypes_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Anytypes.");
+return (*this)[(int)index_value];
+}
+
+const anytype_template& Anytypes_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.Anytypes using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.Anytypes.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.Anytypes: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const anytype_template& Anytypes_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.Anytypes.");
+return (*this)[(int)index_value];
+}
+
+void Anytypes_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.Anytypes.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (anytype_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new anytype_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new anytype_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (anytype_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int Anytypes_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int Anytypes_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.Anytypes containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.Anytypes.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.Anytypes");
+}
+
+boolean Anytypes_template::match(const Anytypes& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.Anytypes.");
+}
+return FALSE;
+}
+
+boolean Anytypes_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+Anytypes Anytypes_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 @General_Types.Anytypes.");
+Anytypes ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+Anytypes Anytypes_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+Anytypes Anytypes_template::replace(int index, int len, const Anytypes_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+Anytypes Anytypes_template::replace(int index, int len, const Anytypes& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void Anytypes_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new Anytypes_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.Anytypes.");
+}
+set_selection(template_type);
+}
+
+Anytypes_template& Anytypes_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.Anytypes.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.Anytypes.");
+return value_list.list_value[list_index];
+}
+
+void Anytypes_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void Anytypes_template::log_match(const Anytypes& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 Anytypes_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.Anytypes.");
+}
+}
+
+void Anytypes_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.Anytypes.");
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new anytype_template;
+single_value.value_elements[elem_count]->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 Anytypes_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 for a template of type @General_Types.Anytypes.");
+}
+}
+
+boolean Anytypes_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean Anytypes_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void Anytypes_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ Anytypes_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.Anytypes");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void Anytypes_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.Anytypes");
+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 : "@General_Types.Anytypes");
+}
+
+boolean Anytypes_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+void anytype::copy_value(const anytype& other_value)
+{
+switch (other_value.union_selection) {
+default:
+TTCN_error("Assignment of an unbound union value of type @General_Types.anytype.");
+}
+union_selection = other_value.union_selection;
+}
+
+anytype::anytype()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+anytype::anytype(const anytype& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+anytype::~anytype()
+{
+clean_up();
+}
+
+anytype& anytype::operator=(const anytype& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean anytype::operator==(const anytype& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @General_Types.anytype.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @General_Types.anytype.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+default:
+return FALSE;
+}
+}
+
+boolean anytype::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @General_Types.anytype.");
+return union_selection == checked_selection;
+}
+
+boolean anytype::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean anytype::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void anytype::clean_up()
+{
+switch (union_selection) {
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void anytype::log() const
+{
+switch (union_selection) {
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void anytype::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();
+ mp_last->error("Field %s does not exist in type @General_Types.anytype.", last_name);
+}
+
+void anytype::set_implicit_omit()
+{
+switch (union_selection) {
+default: break;
+}
+}
+
+void anytype::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @General_Types.anytype.");
+}
+}
+
+void anytype::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @General_Types.anytype.");
+}
+}
+
+void anytype_template::copy_value(const anytype& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+default:
+TTCN_error("Initializing a template with an unbound value of type @General_Types.anytype.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void anytype_template::copy_template(const anytype_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) {
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @General_Types.anytype.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new anytype_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @General_Types.anytype.");
+}
+set_selection(other_value);
+}
+
+anytype_template::anytype_template()
+{
+}
+
+anytype_template::anytype_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+anytype_template::anytype_template(const anytype& other_value)
+{
+copy_value(other_value);
+}
+
+anytype_template::anytype_template(const OPTIONAL<anytype>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const anytype&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @General_Types.anytype from an unbound optional field.");
+}
+}
+
+anytype_template::anytype_template(const anytype_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+anytype_template::~anytype_template()
+{
+clean_up();
+}
+
+void anytype_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+anytype_template& anytype_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+anytype_template& anytype_template::operator=(const anytype& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+anytype_template& anytype_template::operator=(const OPTIONAL<anytype>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const anytype&)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 @General_Types.anytype.");
+}
+return *this;
+}
+
+anytype_template& anytype_template::operator=(const anytype_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean anytype_template::match(const anytype& 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:
+{
+anytype::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == anytype::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @General_Types.anytype.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @General_Types.anytype.");
+}
+return FALSE;
+}
+
+boolean anytype_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @General_Types.anytype.");
+}
+}
+
+anytype anytype_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 @General_Types.anytype.");
+anytype ret_val;
+switch (single_value.union_selection) {
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @General_Types.anytype.");
+}
+return ret_val;
+}
+
+anytype_template& anytype_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @General_Types.anytype.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @General_Types.anytype.");
+return value_list.list_value[list_index];
+}
+void anytype_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @General_Types.anytype.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new anytype_template[list_length];
+}
+
+boolean anytype_template::ischosen(anytype::union_selection_type checked_selection) const
+{
+if (checked_selection == anytype::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @General_Types.anytype.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == anytype::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @General_Types.anytype.");
+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 @General_Types.anytype 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 anytype_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void anytype_template::log_match(const anytype& 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()) {
+switch (single_value.union_selection) {
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 anytype_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) {
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @General_Types.anytype.");
+}
+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 @General_Types.anytype.");
+}
+}
+
+void anytype_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+{
+single_value.union_selection = anytype::UNBOUND_VALUE;
+anytype::union_selection_type new_selection = (anytype::union_selection_type)text_buf.pull_int().get_val();
+switch (new_selection) {
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @General_Types.anytype.");
+}
+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 anytype_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 @General_Types.anytype.");
+}
+}
+
+boolean anytype_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean anytype_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
+if (value_list.list_value[v_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void anytype_template::set_param(Module_Param& param)
+{
+ if (dynamic_cast<Module_Param_Name*>(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 `@General_Types.anytype'");
+ }
+ param.error("Field `%s' not found in union template type `@General_Types.anytype'", 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: {
+ anytype_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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", "@General_Types.anytype");
+ 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();
+ mp_last->error("Field %s does not exist in type @General_Types.anytype.", last_name);
+ } break;
+ default:
+ param.type_error("union template", "@General_Types.anytype");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void anytype_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) {
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @General_Types.anytype.");
+}
+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 : "@General_Types.anytype");
+}
+
+
+const anytype AnytypeSet::UNBOUND_ELEM;
+boolean AnytypeSet::compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index)
+{
+if (((const AnytypeSet*)left_ptr)->val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+if (((const AnytypeSet*)right_ptr)->val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+if (((const AnytypeSet*)left_ptr)->val_ptr->value_elements[left_index] != NULL){
+if (((const AnytypeSet*)right_ptr)->val_ptr->value_elements[right_index] != NULL){
+return *((const AnytypeSet*)left_ptr)->val_ptr->value_elements[left_index] == *((const AnytypeSet*)right_ptr)->val_ptr->value_elements[right_index];
+} else return FALSE;
+} else {
+return ((const AnytypeSet*)right_ptr)->val_ptr->value_elements[right_index] == NULL;
+}
+}
+
+AnytypeSet::AnytypeSet()
+{
+val_ptr = NULL;
+}
+
+AnytypeSet::AnytypeSet(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+AnytypeSet::AnytypeSet(const AnytypeSet& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.AnytypeSet.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+AnytypeSet::~AnytypeSet()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void AnytypeSet::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+AnytypeSet& AnytypeSet::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+AnytypeSet& AnytypeSet::operator=(const AnytypeSet& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.AnytypeSet.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean AnytypeSet::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean AnytypeSet::operator==(const AnytypeSet& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+return compare_set_of(this, val_ptr->n_elements, &other_value, (other_value.val_ptr)->n_elements, compare_function);
+}
+
+anytype& AnytypeSet::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.AnytypeSet using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (anytype**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new anytype(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new anytype;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+anytype& AnytypeSet::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.AnytypeSet.");
+return (*this)[(int)index_value];
+}
+
+const anytype& AnytypeSet::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.AnytypeSet.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.AnytypeSet using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.AnytypeSet: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const anytype& AnytypeSet::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.AnytypeSet.");
+return (*this)[(int)index_value];
+}
+
+AnytypeSet AnytypeSet::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+AnytypeSet AnytypeSet::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+AnytypeSet AnytypeSet::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+AnytypeSet AnytypeSet::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.AnytypeSet.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+AnytypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new anytype(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+AnytypeSet AnytypeSet::operator+(const AnytypeSet& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.AnytypeSet concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+AnytypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new anytype(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+AnytypeSet AnytypeSet::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.AnytypeSet.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.AnytypeSet","element");
+AnytypeSet ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+AnytypeSet AnytypeSet::replace(int index, int len, const AnytypeSet& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.AnytypeSet.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.AnytypeSet.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.AnytypeSet","element");
+AnytypeSet ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new anytype(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new anytype(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new anytype(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+AnytypeSet AnytypeSet::replace(int index, int len, const AnytypeSet_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void AnytypeSet::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.AnytypeSet.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (anytype**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new anytype(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (anytype**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.AnytypeSet: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (anytype**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean AnytypeSet::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int AnytypeSet::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.AnytypeSet.");
+return val_ptr->n_elements;
+}
+
+int AnytypeSet::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.AnytypeSet.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void AnytypeSet::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void AnytypeSet::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "set of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("set of value", "@General_Types.AnytypeSet");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("set of value", "@General_Types.AnytypeSet");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void AnytypeSet::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void AnytypeSet::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.AnytypeSet.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void AnytypeSet::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.AnytypeSet.");
+val_ptr->value_elements = (anytype**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new anytype;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void AnytypeSet::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 AnytypeSet::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int AnytypeSet::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int AnytypeSet::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void AnytypeSet_template::copy_value(const AnytypeSet& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.AnytypeSet with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new anytype_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new anytype_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void AnytypeSet_template::copy_template(const AnytypeSet_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new anytype_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new anytype_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new AnytypeSet_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 SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = other_value.value_set.n_items;
+value_set.set_items = new anytype_template[value_set.n_items];
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count] = other_value.value_set.set_items[set_count];
+break;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.AnytypeSet.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean AnytypeSet_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const AnytypeSet_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const AnytypeSet*)value_ptr)[value_index], legacy);
+else return ((const AnytypeSet_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+boolean AnytypeSet_template::match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const AnytypeSet_template*)template_ptr)->value_set.set_items[template_index].match((*(const AnytypeSet*)value_ptr)[value_index], legacy);
+else return ((const AnytypeSet_template*)template_ptr)->value_set.set_items[template_index].is_any_or_omit();
+}
+
+void AnytypeSet_template::log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy)
+{
+if (value_ptr == NULL) {
+if (template_ptr != NULL) {
+((const AnytypeSet_template*)template_ptr)->single_value.value_elements[index_template]->log();
+}
+} else if (template_ptr == NULL) {
+(*(const AnytypeSet*)value_ptr)[index_value].log();
+} else {
+((const AnytypeSet_template*)template_ptr)->single_value.value_elements[index_template]->log_match((*(const AnytypeSet*)value_ptr)[index_value], legacy);
+}
+}
+
+AnytypeSet_template::AnytypeSet_template()
+{
+}
+
+AnytypeSet_template::AnytypeSet_template(template_sel other_value)
+ : Restricted_Length_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+AnytypeSet_template::AnytypeSet_template(null_type)
+ : Restricted_Length_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+AnytypeSet_template::AnytypeSet_template(const AnytypeSet& other_value)
+{
+copy_value(other_value);
+}
+
+AnytypeSet_template::AnytypeSet_template(const OPTIONAL<AnytypeSet>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const AnytypeSet&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.AnytypeSet from an unbound optional field.");
+}
+}
+
+AnytypeSet_template::AnytypeSet_template(const AnytypeSet_template& other_value)
+ : Restricted_Length_Template()
+{
+copy_template(other_value);
+}
+
+AnytypeSet_template::~AnytypeSet_template()
+{
+clean_up();
+}
+
+void AnytypeSet_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+delete [] value_set.set_items;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+AnytypeSet_template& AnytypeSet_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+AnytypeSet_template& AnytypeSet_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+AnytypeSet_template& AnytypeSet_template::operator=(const AnytypeSet& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+AnytypeSet_template& AnytypeSet_template::operator=(const OPTIONAL<AnytypeSet>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const AnytypeSet&)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 @General_Types.AnytypeSet.");
+}
+return *this;
+}
+
+AnytypeSet_template& AnytypeSet_template::operator=(const AnytypeSet_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+anytype_template& AnytypeSet_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.AnytypeSet using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.AnytypeSet.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+anytype_template& AnytypeSet_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.AnytypeSet.");
+return (*this)[(int)index_value];
+}
+
+const anytype_template& AnytypeSet_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.AnytypeSet using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.AnytypeSet.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.AnytypeSet: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const anytype_template& AnytypeSet_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.AnytypeSet.");
+return (*this)[(int)index_value];
+}
+
+void AnytypeSet_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.AnytypeSet.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (anytype_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new anytype_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new anytype_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (anytype_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int AnytypeSet_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int AnytypeSet_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = value_set.n_items;
+ if (!is_size) { while (elem_count>0 && !value_set.set_items[elem_count-1].is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (value_set.set_items[i].get_selection())
+ {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+ if (template_selection==SUPERSET_MATCH) {
+ has_any_or_none = TRUE;
+ } else {
+ int max_size = min_size;
+ min_size = 0;
+ if (!has_any_or_none) { // [0,max_size]
+ switch (length_restriction_type) {
+ case NO_LENGTH_RESTRICTION:
+ if (max_size==0) return 0;
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet with no exact size.", op_name);
+ case SINGLE_LENGTH_RESTRICTION:
+ if (length_restriction.single_length<=max_size)
+ return length_restriction.single_length;
+ TTCN_error("Performing %sof() operation on an invalid template of type @General_Types.AnytypeSet. The maximum size (%d) contradicts the length restriction (%d).", op_name, max_size, length_restriction.single_length);
+ case RANGE_LENGTH_RESTRICTION:
+ if (max_size==length_restriction.range_length.min_length) {
+ return max_size;
+ } else if (max_size>length_restriction.range_length.min_length){
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet with no exact size.", op_name);
+ } else
+ TTCN_error("Performing %sof() operation on an invalid template of type @General_Types.AnytypeSet. Maximum size (%d) contradicts the length restriction (%d..%d).", op_name, max_size, length_restriction.range_length.min_length, length_restriction.range_length.max_length);
+ default:
+ TTCN_error("Internal error: Template has invalid length restriction type.");
+ }
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.AnytypeSet containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.AnytypeSet.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.AnytypeSet");
+}
+
+boolean AnytypeSet_template::match(const AnytypeSet& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_set_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+return match_set_of(&other_value, value_length, this, value_set.n_items, match_function_set, legacy);
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.AnytypeSet.");
+}
+return FALSE;
+}
+
+boolean AnytypeSet_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+AnytypeSet AnytypeSet_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 @General_Types.AnytypeSet.");
+AnytypeSet ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+AnytypeSet AnytypeSet_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+AnytypeSet AnytypeSet_template::replace(int index, int len, const AnytypeSet_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+AnytypeSet AnytypeSet_template::replace(int index, int len, const AnytypeSet& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void AnytypeSet_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new AnytypeSet_template[list_length];
+break;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = list_length;
+value_set.set_items = new anytype_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.AnytypeSet.");
+}
+set_selection(template_type);
+}
+
+AnytypeSet_template& AnytypeSet_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.AnytypeSet.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.AnytypeSet.");
+return value_list.list_value[list_index];
+}
+
+anytype_template& AnytypeSet_template::set_item(unsigned int set_index)
+{
+if (template_selection != SUPERSET_MATCH && template_selection != SUBSET_MATCH) TTCN_error("Internal error: Accessing a set element of a non-set template of type @General_Types.AnytypeSet.");
+if (set_index >= value_set.n_items) TTCN_error("Internal error: Index overflow in a set template of type @General_Types.AnytypeSet.");
+return value_set.set_items[set_index];
+}
+
+void AnytypeSet_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log();
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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 SUPERSET_MATCH:
+case SUBSET_MATCH:
+TTCN_Logger::log_event("%s(", template_selection == SUPERSET_MATCH ? "superset" : "subset");
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++) {
+if (set_count > 0) TTCN_Logger::log_event_str(", ");
+value_set.set_items[set_count].log();
+}
+TTCN_Logger::log_char(')');
+break;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void AnytypeSet_template::log_match(const AnytypeSet& 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{
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+if (template_selection == SPECIFIC_VALUE)
+ log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
+else{
+if(previous_size != 0){
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+TTCN_Logger::log_event_str(":=");
+}
+}
+match_value.log();
+TTCN_Logger::log_event_str(" with ");
+log();
+TTCN_Logger::log_event_str(" unmatched");
+}
+return;
+}
+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");
+if (template_selection == SPECIFIC_VALUE) log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
+}
+}
+
+void AnytypeSet_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_restricted(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+text_buf.push_int(value_set.n_items);
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count].encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @General_Types.AnytypeSet.");
+}
+}
+
+void AnytypeSet_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_restricted(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.AnytypeSet.");
+single_value.value_elements = (anytype_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new anytype_template;
+single_value.value_elements[elem_count]->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 AnytypeSet_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;
+case SUPERSET_MATCH:
+case SUBSET_MATCH:
+value_set.n_items = text_buf.pull_int().get_val();
+value_set.set_items = new anytype_template[value_set.n_items];
+for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
+value_set.set_items[set_count].decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @General_Types.AnytypeSet.");
+}
+}
+
+boolean AnytypeSet_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean AnytypeSet_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void AnytypeSet_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "set of 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: {
+ AnytypeSet_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ if (param.get_elem(p_i)->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[p_i].set_param(*param.get_elem(p_i));
+ }
+ }
+ break;
+ case Module_Param::MP_Superset_Template:
+ case Module_Param::MP_Subset_Template:
+ set_type(param.get_type()==Module_Param::MP_Superset_Template ? SUPERSET_MATCH : SUBSET_MATCH, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ set_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ break;
+ default:
+ param.type_error("set of template", "@General_Types.AnytypeSet");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void AnytypeSet_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.AnytypeSet");
+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 : "@General_Types.AnytypeSet");
+}
+
+boolean AnytypeSet_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return FALSE;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+Protocols::Protocols()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+Protocols::Protocols(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @General_Types.Protocols with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+Protocols::Protocols(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+Protocols::Protocols(const Protocols& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @General_Types.Protocols.");
+enum_value = other_value.enum_value;
+}
+
+Protocols& Protocols::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @General_Types.Protocols.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+Protocols& Protocols::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+Protocols& Protocols::operator=(const Protocols& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @General_Types.Protocols.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean Protocols::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 @General_Types.Protocols.");
+return enum_value == other_value;
+}
+
+boolean Protocols::operator==(const Protocols& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+return enum_value == other_value.enum_value;
+}
+
+boolean Protocols::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 @General_Types.Protocols.");
+return enum_value < other_value;
+}
+
+boolean Protocols::operator<(const Protocols& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+return enum_value < other_value.enum_value;
+}
+
+boolean Protocols::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 @General_Types.Protocols.");
+return enum_value > other_value;
+}
+
+boolean Protocols::operator>(const Protocols& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @General_Types.Protocols.");
+return enum_value > other_value.enum_value;
+}
+
+const char *Protocols::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case mtp3: return "mtp3";
+case sccp: return "sccp";
+case isup: return "isup";
+case bicc: return "bicc";
+case qaal2: return "qaal2";
+case gcp: return "gcp";
+case bssap: return "bssap";
+case bssmap: return "bssmap";
+case ranap: return "ranap";
+case dtap: return "dtap";
+default: return "<unknown>";
+}
+}
+
+Protocols::enum_type Protocols::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "mtp3")) return mtp3;
+else if (!strcmp(str_par, "sccp")) return sccp;
+else if (!strcmp(str_par, "isup")) return isup;
+else if (!strcmp(str_par, "bicc")) return bicc;
+else if (!strcmp(str_par, "qaal2")) return qaal2;
+else if (!strcmp(str_par, "gcp")) return gcp;
+else if (!strcmp(str_par, "bssap")) return bssap;
+else if (!strcmp(str_par, "bssmap")) return bssmap;
+else if (!strcmp(str_par, "ranap")) return ranap;
+else if (!strcmp(str_par, "dtap")) return dtap;
+else return UNKNOWN_VALUE;
+}
+
+boolean Protocols::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 0:
+case 1:
+case 2:
+case 3:
+case 4:
+case 5:
+case 6:
+case 7:
+case 8:
+case 9:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int Protocols::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 @General_Types.Protocols.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int Protocols::enum2int(const Protocols& 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 @General_Types.Protocols.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void Protocols::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @General_Types.Protocols.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+Protocols::operator Protocols::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @General_Types.Protocols.");
+return enum_value;
+}
+
+void Protocols::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 Protocols::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", "@General_Types.Protocols");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @General_Types.Protocols.");
+ }
+}
+
+void Protocols::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @General_Types.Protocols.");
+text_buf.push_int(enum_value);
+}
+
+void Protocols::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 @General_Types.Protocols.", enum_value);
+}
+
+void Protocols::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 Protocols::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int Protocols::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
+{
+ int decoded_value = 0;
+ int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 4, no_err);
+ if (decoded_length < 0) return decoded_length;
+ if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
+ else {
+ if(no_err){
+ return -1;
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
+ enum_value = UNKNOWN_VALUE;
+ }
+ }
+ return decoded_length;
+}
+
+int Protocols::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
+{
+ return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 4);
+}
+
+void Protocols_template::copy_template(const Protocols_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new Protocols_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @General_Types.Protocols.");
+}
+}
+
+Protocols_template::Protocols_template()
+{
+}
+
+Protocols_template::Protocols_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+Protocols_template::Protocols_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!Protocols::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @General_Types.Protocols with unknown numeric value %d.", other_value);
+single_value = (Protocols::enum_type)other_value;
+}
+
+Protocols_template::Protocols_template(Protocols::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+Protocols_template::Protocols_template(const Protocols& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == Protocols::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @General_Types.Protocols.");
+single_value = other_value.enum_value;
+}
+
+Protocols_template::Protocols_template(const OPTIONAL<Protocols>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (Protocols::enum_type)(const Protocols&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @General_Types.Protocols from an unbound optional field.");
+}
+}
+
+Protocols_template::Protocols_template(const Protocols_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+Protocols_template::~Protocols_template()
+{
+clean_up();
+}
+
+boolean Protocols_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean Protocols_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != Protocols::UNBOUND_VALUE;
+}
+
+void Protocols_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+Protocols_template& Protocols_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+Protocols_template& Protocols_template::operator=(int other_value)
+{
+if (!Protocols::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @General_Types.Protocols.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (Protocols::enum_type)other_value;
+return *this;
+}
+
+Protocols_template& Protocols_template::operator=(Protocols::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+Protocols_template& Protocols_template::operator=(const Protocols& other_value)
+{
+if (other_value.enum_value == Protocols::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @General_Types.Protocols to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+Protocols_template& Protocols_template::operator=(const OPTIONAL<Protocols>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (Protocols::enum_type)(const Protocols&)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 @General_Types.Protocols.");
+}
+return *this;
+}
+
+Protocols_template& Protocols_template::operator=(const Protocols_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean Protocols_template::match(Protocols::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @General_Types.Protocols.");
+}
+return FALSE;
+}
+
+boolean Protocols_template::match(const Protocols& other_value, boolean) const
+{
+if (other_value.enum_value == Protocols::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @General_Types.Protocols with an unbound value.");
+return match(other_value.enum_value);
+}
+
+Protocols::enum_type Protocols_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 @General_Types.Protocols.");
+return single_value;
+}
+
+void Protocols_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @General_Types.Protocols.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new Protocols_template[list_length];
+}
+
+Protocols_template& Protocols_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @General_Types.Protocols.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @General_Types.Protocols.");
+return value_list.list_value[list_index];
+}
+
+void Protocols_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(Protocols::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void Protocols_template::log_match(const Protocols& 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 Protocols_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 @General_Types.Protocols.");
+}
+}
+
+void Protocols_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (Protocols::enum_type)text_buf.pull_int().get_val();
+if (!Protocols::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @General_Types.Protocols.", 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 Protocols_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 @General_Types.Protocols.");
+}
+}
+
+boolean Protocols_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean Protocols_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void Protocols_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ Protocols_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ Protocols::enum_type enum_val = Protocols::str_to_enum(m_p->get_enumerated());
+ if (!Protocols::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @General_Types.Protocols.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@General_Types.Protocols");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void Protocols_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 : "@General_Types.Protocols");
+}
+
+
+const COMPONENT ListOfDummy__comptype::UNBOUND_ELEM;
+ListOfDummy__comptype::ListOfDummy__comptype()
+{
+val_ptr = NULL;
+}
+
+ListOfDummy__comptype::ListOfDummy__comptype(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+ListOfDummy__comptype::ListOfDummy__comptype(const ListOfDummy__comptype& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.ListOfDummy_comptype.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+ListOfDummy__comptype::~ListOfDummy__comptype()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void ListOfDummy__comptype::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+ListOfDummy__comptype& ListOfDummy__comptype::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+ListOfDummy__comptype& ListOfDummy__comptype::operator=(const ListOfDummy__comptype& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean ListOfDummy__comptype::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ListOfDummy_comptype.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean ListOfDummy__comptype::operator==(const ListOfDummy__comptype& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+COMPONENT& ListOfDummy__comptype::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ListOfDummy_comptype using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new COMPONENT;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+COMPONENT& ListOfDummy__comptype::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ListOfDummy_comptype.");
+return (*this)[(int)index_value];
+}
+
+const COMPONENT& ListOfDummy__comptype::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ListOfDummy_comptype using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.ListOfDummy_comptype: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const COMPONENT& ListOfDummy__comptype::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ListOfDummy_comptype.");
+return (*this)[(int)index_value];
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+ListOfDummy__comptype ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::operator+(const ListOfDummy__comptype& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.ListOfDummy_comptype concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+ListOfDummy__comptype ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new COMPONENT(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.ListOfDummy_comptype.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.ListOfDummy_comptype","element");
+ListOfDummy__comptype ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::replace(int index, int len, const ListOfDummy__comptype& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.ListOfDummy_comptype.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.ListOfDummy_comptype.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.ListOfDummy_comptype","element");
+ListOfDummy__comptype ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new COMPONENT(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new COMPONENT(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype::replace(int index, int len, const ListOfDummy__comptype_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void ListOfDummy__comptype::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.ListOfDummy_comptype.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.ListOfDummy_comptype: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean ListOfDummy__comptype::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int ListOfDummy__comptype::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.ListOfDummy_comptype.");
+return val_ptr->n_elements;
+}
+
+int ListOfDummy__comptype::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.ListOfDummy_comptype.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void ListOfDummy__comptype::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void ListOfDummy__comptype::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ListOfDummy_comptype");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ListOfDummy_comptype");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void ListOfDummy__comptype::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void ListOfDummy__comptype::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.ListOfDummy_comptype.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void ListOfDummy__comptype::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.ListOfDummy_comptype.");
+val_ptr->value_elements = (COMPONENT**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new COMPONENT;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void ListOfDummy__comptype::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 ListOfDummy__comptype::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int ListOfDummy__comptype::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int ListOfDummy__comptype::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void ListOfDummy__comptype_template::copy_value(const ListOfDummy__comptype& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.ListOfDummy_comptype with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new COMPONENT_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void ListOfDummy__comptype_template::copy_template(const ListOfDummy__comptype_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new COMPONENT_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ListOfDummy__comptype_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.ListOfDummy_comptype.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean ListOfDummy__comptype_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const ListOfDummy__comptype_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const ListOfDummy__comptype*)value_ptr)[value_index], legacy);
+else return ((const ListOfDummy__comptype_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template()
+{
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template(const ListOfDummy__comptype& other_value)
+{
+copy_value(other_value);
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template(const OPTIONAL<ListOfDummy__comptype>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ListOfDummy__comptype&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.ListOfDummy_comptype from an unbound optional field.");
+}
+}
+
+ListOfDummy__comptype_template::ListOfDummy__comptype_template(const ListOfDummy__comptype_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+ListOfDummy__comptype_template::~ListOfDummy__comptype_template()
+{
+clean_up();
+}
+
+void ListOfDummy__comptype_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::operator=(const ListOfDummy__comptype& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::operator=(const OPTIONAL<ListOfDummy__comptype>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ListOfDummy__comptype&)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 @General_Types.ListOfDummy_comptype.");
+}
+return *this;
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::operator=(const ListOfDummy__comptype_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+COMPONENT_template& ListOfDummy__comptype_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ListOfDummy_comptype using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.ListOfDummy_comptype.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+COMPONENT_template& ListOfDummy__comptype_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ListOfDummy_comptype.");
+return (*this)[(int)index_value];
+}
+
+const COMPONENT_template& ListOfDummy__comptype_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ListOfDummy_comptype using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.ListOfDummy_comptype.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.ListOfDummy_comptype: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const COMPONENT_template& ListOfDummy__comptype_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ListOfDummy_comptype.");
+return (*this)[(int)index_value];
+}
+
+void ListOfDummy__comptype_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.ListOfDummy_comptype.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new COMPONENT_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int ListOfDummy__comptype_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int ListOfDummy__comptype_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_comptype containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.ListOfDummy_comptype.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.ListOfDummy_comptype");
+}
+
+boolean ListOfDummy__comptype_template::match(const ListOfDummy__comptype& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.ListOfDummy_comptype.");
+}
+return FALSE;
+}
+
+boolean ListOfDummy__comptype_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype_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 @General_Types.ListOfDummy_comptype.");
+ListOfDummy__comptype ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+ListOfDummy__comptype ListOfDummy__comptype_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+ListOfDummy__comptype ListOfDummy__comptype_template::replace(int index, int len, const ListOfDummy__comptype_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+ListOfDummy__comptype ListOfDummy__comptype_template::replace(int index, int len, const ListOfDummy__comptype& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void ListOfDummy__comptype_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new ListOfDummy__comptype_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.ListOfDummy_comptype.");
+}
+set_selection(template_type);
+}
+
+ListOfDummy__comptype_template& ListOfDummy__comptype_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.ListOfDummy_comptype.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.ListOfDummy_comptype.");
+return value_list.list_value[list_index];
+}
+
+void ListOfDummy__comptype_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void ListOfDummy__comptype_template::log_match(const ListOfDummy__comptype& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 ListOfDummy__comptype_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.ListOfDummy_comptype.");
+}
+}
+
+void ListOfDummy__comptype_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.ListOfDummy_comptype.");
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+single_value.value_elements[elem_count]->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 ListOfDummy__comptype_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 for a template of type @General_Types.ListOfDummy_comptype.");
+}
+}
+
+boolean ListOfDummy__comptype_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ListOfDummy__comptype_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void ListOfDummy__comptype_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ ListOfDummy__comptype_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.ListOfDummy_comptype");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void ListOfDummy__comptype_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.ListOfDummy_comptype");
+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 : "@General_Types.ListOfDummy_comptype");
+}
+
+boolean ListOfDummy__comptype_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const COMPONENT ListOfDummy__CT::UNBOUND_ELEM;
+ListOfDummy__CT::ListOfDummy__CT()
+{
+val_ptr = NULL;
+}
+
+ListOfDummy__CT::ListOfDummy__CT(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+ListOfDummy__CT::ListOfDummy__CT(const ListOfDummy__CT& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.ListOfDummy_CT.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+ListOfDummy__CT::~ListOfDummy__CT()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void ListOfDummy__CT::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+ListOfDummy__CT& ListOfDummy__CT::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+ListOfDummy__CT& ListOfDummy__CT::operator=(const ListOfDummy__CT& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.ListOfDummy_CT.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean ListOfDummy__CT::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ListOfDummy_CT.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean ListOfDummy__CT::operator==(const ListOfDummy__CT& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ListOfDummy_CT.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ListOfDummy_CT.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+COMPONENT& ListOfDummy__CT::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ListOfDummy_CT using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new COMPONENT;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+COMPONENT& ListOfDummy__CT::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ListOfDummy_CT.");
+return (*this)[(int)index_value];
+}
+
+const COMPONENT& ListOfDummy__CT::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.ListOfDummy_CT.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ListOfDummy_CT using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.ListOfDummy_CT: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const COMPONENT& ListOfDummy__CT::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ListOfDummy_CT.");
+return (*this)[(int)index_value];
+}
+
+ListOfDummy__CT ListOfDummy__CT::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+ListOfDummy__CT ListOfDummy__CT::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+ListOfDummy__CT ListOfDummy__CT::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+ListOfDummy__CT ListOfDummy__CT::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.ListOfDummy_CT.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+ListOfDummy__CT ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__CT ListOfDummy__CT::operator+(const ListOfDummy__CT& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.ListOfDummy_CT concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+ListOfDummy__CT ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new COMPONENT(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__CT ListOfDummy__CT::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.ListOfDummy_CT.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.ListOfDummy_CT","element");
+ListOfDummy__CT ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__CT ListOfDummy__CT::replace(int index, int len, const ListOfDummy__CT& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.ListOfDummy_CT.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.ListOfDummy_CT.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.ListOfDummy_CT","element");
+ListOfDummy__CT ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new COMPONENT(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new COMPONENT(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+ListOfDummy__CT ListOfDummy__CT::replace(int index, int len, const ListOfDummy__CT_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void ListOfDummy__CT::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.ListOfDummy_CT.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.ListOfDummy_CT: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean ListOfDummy__CT::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int ListOfDummy__CT::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.ListOfDummy_CT.");
+return val_ptr->n_elements;
+}
+
+int ListOfDummy__CT::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.ListOfDummy_CT.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void ListOfDummy__CT::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void ListOfDummy__CT::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ListOfDummy_CT");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ListOfDummy_CT");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void ListOfDummy__CT::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void ListOfDummy__CT::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.ListOfDummy_CT.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void ListOfDummy__CT::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.ListOfDummy_CT.");
+val_ptr->value_elements = (COMPONENT**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new COMPONENT;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void ListOfDummy__CT::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 ListOfDummy__CT::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int ListOfDummy__CT::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int ListOfDummy__CT::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void ListOfDummy__CT_template::copy_value(const ListOfDummy__CT& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.ListOfDummy_CT with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new COMPONENT_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void ListOfDummy__CT_template::copy_template(const ListOfDummy__CT_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new COMPONENT_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ListOfDummy__CT_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.ListOfDummy_CT.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean ListOfDummy__CT_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const ListOfDummy__CT_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const ListOfDummy__CT*)value_ptr)[value_index], legacy);
+else return ((const ListOfDummy__CT_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template()
+{
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template(const ListOfDummy__CT& other_value)
+{
+copy_value(other_value);
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template(const OPTIONAL<ListOfDummy__CT>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ListOfDummy__CT&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.ListOfDummy_CT from an unbound optional field.");
+}
+}
+
+ListOfDummy__CT_template::ListOfDummy__CT_template(const ListOfDummy__CT_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+ListOfDummy__CT_template::~ListOfDummy__CT_template()
+{
+clean_up();
+}
+
+void ListOfDummy__CT_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::operator=(const ListOfDummy__CT& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::operator=(const OPTIONAL<ListOfDummy__CT>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ListOfDummy__CT&)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 @General_Types.ListOfDummy_CT.");
+}
+return *this;
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::operator=(const ListOfDummy__CT_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+COMPONENT_template& ListOfDummy__CT_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ListOfDummy_CT using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.ListOfDummy_CT.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+COMPONENT_template& ListOfDummy__CT_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ListOfDummy_CT.");
+return (*this)[(int)index_value];
+}
+
+const COMPONENT_template& ListOfDummy__CT_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ListOfDummy_CT using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.ListOfDummy_CT.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.ListOfDummy_CT: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const COMPONENT_template& ListOfDummy__CT_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ListOfDummy_CT.");
+return (*this)[(int)index_value];
+}
+
+void ListOfDummy__CT_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.ListOfDummy_CT.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new COMPONENT_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new COMPONENT_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int ListOfDummy__CT_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int ListOfDummy__CT_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ListOfDummy_CT containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.ListOfDummy_CT.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.ListOfDummy_CT");
+}
+
+boolean ListOfDummy__CT_template::match(const ListOfDummy__CT& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.ListOfDummy_CT.");
+}
+return FALSE;
+}
+
+boolean ListOfDummy__CT_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+ListOfDummy__CT ListOfDummy__CT_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 @General_Types.ListOfDummy_CT.");
+ListOfDummy__CT ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+ListOfDummy__CT ListOfDummy__CT_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+ListOfDummy__CT ListOfDummy__CT_template::replace(int index, int len, const ListOfDummy__CT_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+ListOfDummy__CT ListOfDummy__CT_template::replace(int index, int len, const ListOfDummy__CT& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void ListOfDummy__CT_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new ListOfDummy__CT_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.ListOfDummy_CT.");
+}
+set_selection(template_type);
+}
+
+ListOfDummy__CT_template& ListOfDummy__CT_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.ListOfDummy_CT.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.ListOfDummy_CT.");
+return value_list.list_value[list_index];
+}
+
+void ListOfDummy__CT_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void ListOfDummy__CT_template::log_match(const ListOfDummy__CT& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 ListOfDummy__CT_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.ListOfDummy_CT.");
+}
+}
+
+void ListOfDummy__CT_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.ListOfDummy_CT.");
+single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new COMPONENT_template;
+single_value.value_elements[elem_count]->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 ListOfDummy__CT_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 for a template of type @General_Types.ListOfDummy_CT.");
+}
+}
+
+boolean ListOfDummy__CT_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ListOfDummy__CT_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void ListOfDummy__CT_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ ListOfDummy__CT_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.ListOfDummy_CT");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void ListOfDummy__CT_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.ListOfDummy_CT");
+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 : "@General_Types.ListOfDummy_CT");
+}
+
+boolean ListOfDummy__CT_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+const Protocols ProtocolList::UNBOUND_ELEM;
+ProtocolList::ProtocolList()
+{
+val_ptr = NULL;
+}
+
+ProtocolList::ProtocolList(null_type)
+{
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+}
+
+ProtocolList::ProtocolList(const ProtocolList& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @General_Types.ProtocolList.");
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+
+ProtocolList::~ProtocolList()
+{
+clean_up();
+if (val_ptr != NULL) val_ptr = NULL;
+}
+
+void ProtocolList::clean_up()
+{
+if (val_ptr != NULL) {
+if (val_ptr->ref_count > 1) {
+val_ptr->ref_count--;
+val_ptr = NULL;
+}
+else if (val_ptr->ref_count == 1) {
+for (int elem_count = 0; elem_count < val_ptr->n_elements;
+elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)
+delete val_ptr->value_elements[elem_count];
+free_pointers((void**)val_ptr->value_elements);
+delete val_ptr;
+val_ptr = NULL;
+}
+else
+TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
+}
+}
+
+ProtocolList& ProtocolList::operator=(null_type)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+return *this;
+}
+
+ProtocolList& ProtocolList::operator=(const ProtocolList& other_value)
+{
+if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @General_Types.ProtocolList.");
+if (this != &other_value) {
+clean_up();
+val_ptr = other_value.val_ptr;
+val_ptr->ref_count++;
+}
+return *this;
+}
+
+boolean ProtocolList::operator==(null_type) const
+{
+if (val_ptr == NULL)
+TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ProtocolList.");
+return val_ptr->n_elements == 0 ;
+}
+
+boolean ProtocolList::operator==(const ProtocolList& other_value) const
+{
+if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @General_Types.ProtocolList.");
+if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ProtocolList.");
+if (val_ptr == other_value.val_ptr) return TRUE;
+if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
+return FALSE;
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
+ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
+} else return FALSE;
+} else {
+if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
+}
+}
+return TRUE;
+}
+
+Protocols& ProtocolList::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ProtocolList using a negative index: %d.", index_value);
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
+new_val_ptr->value_elements = (Protocols**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Protocols(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
+if (val_ptr->value_elements[index_value] == NULL) {
+val_ptr->value_elements[index_value] = new Protocols;
+}
+return *val_ptr->value_elements[index_value];
+}
+
+Protocols& ProtocolList::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ProtocolList.");
+return (*this)[(int)index_value];
+}
+
+const Protocols& ProtocolList::operator[](int index_value) const
+{
+if (val_ptr == NULL)
+TTCN_error("Accessing an element in an unbound value of type @General_Types.ProtocolList.");
+if (index_value < 0) TTCN_error("Accessing an element of type @General_Types.ProtocolList using a negative index: %d.", index_value);
+if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @General_Types.ProtocolList: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
+return (val_ptr->value_elements[index_value] == NULL) ?
+UNBOUND_ELEM : *val_ptr->value_elements[index_value];
+}
+
+const Protocols& ProtocolList::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a value of type @General_Types.ProtocolList.");
+return (*this)[(int)index_value];
+}
+
+ProtocolList ProtocolList::operator<<=(int rotate_count) const
+{
+return *this >>= (-rotate_count);
+}
+
+ProtocolList ProtocolList::operator<<=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate left operator.");
+return *this >>= (int)(-rotate_count);
+}
+
+ProtocolList ProtocolList::operator>>=(const INTEGER& rotate_count) const
+{
+rotate_count.must_bound("Unbound integer operand of rotate right operator.");
+return *this >>= (int)rotate_count;
+}
+
+ProtocolList ProtocolList::operator>>=(int rotate_count) const
+{
+if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @General_Types.ProtocolList.");
+if (val_ptr->n_elements == 0) return *this;
+int rc;
+if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
+else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
+if (rc == 0) return *this;
+ProtocolList ret_val;
+ret_val.set_size(val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new Protocols(*val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ProtocolList ProtocolList::operator+(const ProtocolList& other_value) const
+{
+if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @General_Types.ProtocolList concatenation.");
+if (val_ptr->n_elements == 0) return other_value;
+if (other_value.val_ptr->n_elements == 0) return *this;
+ProtocolList ret_val;
+ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
+for (int i=0; i<val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Protocols(*val_ptr->value_elements[i]);
+}
+}
+for (int i=0; i<other_value.val_ptr->n_elements; i++) {
+if (other_value.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new Protocols(*other_value.val_ptr->value_elements[i]);
+}
+}
+return ret_val;
+}
+
+ProtocolList ProtocolList::substr(int index, int returncount) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @General_Types.ProtocolList.");
+check_substr_arguments(val_ptr->n_elements, index, returncount, "@General_Types.ProtocolList","element");
+ProtocolList ret_val;
+ret_val.set_size(returncount);
+for (int i=0; i<returncount; i++) {
+if (val_ptr->value_elements[i+index] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Protocols(*val_ptr->value_elements[i+index]);
+}
+}
+return ret_val;
+}
+
+ProtocolList ProtocolList::replace(int index, int len, const ProtocolList& repl) const
+{
+if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @General_Types.ProtocolList.");
+if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @General_Types.ProtocolList.");
+check_replace_arguments(val_ptr->n_elements, index, len, "@General_Types.ProtocolList","element");
+ProtocolList ret_val;
+ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
+for (int i = 0; i < index; i++) {
+if (val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i] = new Protocols(*val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < repl.val_ptr->n_elements; i++) {
+if (repl.val_ptr->value_elements[i] != NULL) {
+ret_val.val_ptr->value_elements[i+index] = new Protocols(*repl.val_ptr->value_elements[i]);
+}
+}
+for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
+if (val_ptr->value_elements[index+i+len] != NULL) {
+ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new Protocols(*val_ptr->value_elements[index+i+len]);
+}
+}
+return ret_val;
+}
+
+ProtocolList ProtocolList::replace(int index, int len, const ProtocolList_template& repl) const
+{
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return replace(index, len, repl.valueof());
+}
+
+void ProtocolList::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @General_Types.ProtocolList.");
+if (val_ptr == NULL) {
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = 0;
+val_ptr->value_elements = NULL;
+} else if (val_ptr->ref_count > 1) {
+struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
+new_val_ptr->ref_count = 1;
+new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
+new_val_ptr->value_elements = (Protocols**)allocate_pointers(new_val_ptr->n_elements);
+for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
+if (val_ptr->value_elements[elem_count] != NULL){
+new_val_ptr->value_elements[elem_count] = new Protocols(*(val_ptr->value_elements[elem_count]));
+}
+}
+clean_up();
+val_ptr = new_val_ptr;
+}
+if (new_size > val_ptr->n_elements) {
+val_ptr->value_elements = (Protocols**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
+if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @General_Types.ProtocolList: %d",new_size);
+#endif
+val_ptr->n_elements = new_size;
+} else if (new_size < val_ptr->n_elements) {
+for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
+if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
+val_ptr->value_elements = (Protocols**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
+val_ptr->n_elements = new_size;
+}
+}
+
+boolean ProtocolList::is_value() const
+{
+if (val_ptr == NULL) return FALSE;
+for(int i = 0; i < val_ptr->n_elements; ++i) {
+if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
+}
+return TRUE;
+}
+
+int ProtocolList::size_of() const
+{
+if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @General_Types.ProtocolList.");
+return val_ptr->n_elements;
+}
+
+int ProtocolList::lengthof() const
+{
+if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @General_Types.ProtocolList.");
+for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
+return 0;
+}
+
+void ProtocolList::log() const
+{
+if (val_ptr == NULL) {;
+TTCN_Logger::log_event_unbound();
+return;
+}
+switch (val_ptr->n_elements) {
+case 0:
+TTCN_Logger::log_event_str("{ }");
+break;
+default:
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+(*this)[elem_count].log();
+}
+TTCN_Logger::log_event_str(" }");
+}
+}
+
+void ProtocolList::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
+ switch (param.get_operation_type()) {
+ case Module_Param::OT_ASSIGN:
+ if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
+ *this = NULL_VALUE;
+ return;
+ }
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List:
+ set_size(param.get_size());
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if (curr->get_type()!=Module_Param::MP_NotUsed) {
+ (*this)[i].set_param(*curr);
+ if (!(*this)[i].is_bound()) {
+ delete val_ptr->value_elements[i];
+ val_ptr->value_elements[i] = NULL;
+ }
+ }
+ }
+ break;
+ case Module_Param::MP_Indexed_List:
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ (*this)[curr->get_id()->get_index()].set_param(*curr);
+ if (!(*this)[curr->get_id()->get_index()].is_bound()) {
+ delete val_ptr->value_elements[curr->get_id()->get_index()];
+ val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
+ }
+ }
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ProtocolList");
+ }
+ break;
+ case Module_Param::OT_CONCAT:
+ switch (param.get_type()) {
+ case Module_Param::MP_Value_List: {
+ if (!is_bound()) *this = NULL_VALUE;
+ int start_idx = lengthof();
+ for (size_t i=0; i<param.get_size(); ++i) {
+ Module_Param* const curr = param.get_elem(i);
+ if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
+ (*this)[start_idx+(int)i].set_param(*curr);
+ }
+ }
+ } break;
+ case Module_Param::MP_Indexed_List:
+ param.error("Cannot concatenate an indexed value list");
+ break;
+ default:
+ param.type_error("record of value", "@General_Types.ProtocolList");
+ }
+ break;
+ default:
+ TTCN_error("Internal error: Unknown operation type.");
+ }
+}
+
+void ProtocolList::set_implicit_omit()
+{
+if (val_ptr == NULL) return;
+for (int i = 0; i < val_ptr->n_elements; i++) {
+if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
+}
+}
+
+void ProtocolList::encode_text(Text_Buf& text_buf) const
+{
+if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @General_Types.ProtocolList.");
+text_buf.push_int(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
+(*this)[elem_count].encode_text(text_buf);
+}
+
+void ProtocolList::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+val_ptr = new recordof_setof_struct;
+val_ptr->ref_count = 1;
+val_ptr->n_elements = text_buf.pull_int().get_val();
+if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @General_Types.ProtocolList.");
+val_ptr->value_elements = (Protocols**)allocate_pointers(val_ptr->n_elements);
+for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
+val_ptr->value_elements[elem_count] = new Protocols;
+val_ptr->value_elements[elem_count]->decode_text(text_buf);
+}
+}
+
+void ProtocolList::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 ProtocolList::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int ProtocolList::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int decoded_field_length=0;
+ size_t start_of_field=0;
+ if(first_call) {
+ clean_up();
+ val_ptr=new recordof_setof_struct;
+ val_ptr->ref_count=1;
+ val_ptr->n_elements=0;
+ val_ptr->value_elements=NULL;
+ }
+ int start_field=val_ptr->n_elements;
+ if(p_td.raw->fieldlength || sel_field!=-1){
+ int a=0;
+ if(sel_field==-1) sel_field=p_td.raw->fieldlength;
+ for(a=0;a<sel_field;a++){
+ decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ }
+ if(a==0) val_ptr->n_elements=0;
+ } else {
+ if(limit==0){
+ if(!first_call) return -1;
+ val_ptr->n_elements=0;
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ }
+ int a=start_field;
+ while(limit>0){
+ start_of_field=p_buf.get_pos_bit();
+ decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
+ if(decoded_field_length < 0){
+ delete &(*this)[a];
+ val_ptr->n_elements--;
+ p_buf.set_pos_bit(start_of_field);
+ if(a>start_field){
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+ } else return -1;
+ }
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ a++;
+ }
+ }
+ return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
+}
+
+int ProtocolList::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
+ int encoded_length=0;
+ int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
+ myleaf.isleaf=FALSE;
+ myleaf.rec_of=TRUE;
+ myleaf.body.node.num_of_nodes=encoded_num_of_records;
+ myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
+ for(int a=0;a<encoded_num_of_records;a++){
+ myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
+ encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
+ }
+ return myleaf.length=encoded_length;
+}
+
+void ProtocolList_template::copy_value(const ProtocolList& other_value)
+{
+if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @General_Types.ProtocolList with an unbound value.");
+single_value.n_elements = other_value.size_of();
+single_value.value_elements = (Protocols_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (other_value[elem_count].is_bound()) {
+single_value.value_elements[elem_count] = new Protocols_template(other_value[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Protocols_template;
+}
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void ProtocolList_template::copy_template(const ProtocolList_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = other_value.single_value.n_elements;
+single_value.value_elements = (Protocols_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
+single_value.value_elements[elem_count] = new Protocols_template(*other_value.single_value.value_elements[elem_count]);
+} else {
+single_value.value_elements[elem_count] = new Protocols_template;
+}
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ProtocolList_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @General_Types.ProtocolList.");
+break;
+}
+set_selection(other_value);
+}
+
+boolean ProtocolList_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
+{
+if (value_index >= 0) return ((const ProtocolList_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const ProtocolList*)value_ptr)[value_index], legacy);
+else return ((const ProtocolList_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
+}
+
+ProtocolList_template::ProtocolList_template()
+{
+}
+
+ProtocolList_template::ProtocolList_template(template_sel other_value)
+ : Record_Of_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ProtocolList_template::ProtocolList_template(null_type)
+ : Record_Of_Template(SPECIFIC_VALUE)
+{
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+
+ProtocolList_template::ProtocolList_template(const ProtocolList& other_value)
+{
+copy_value(other_value);
+}
+
+ProtocolList_template::ProtocolList_template(const OPTIONAL<ProtocolList>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ProtocolList&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @General_Types.ProtocolList from an unbound optional field.");
+}
+}
+
+ProtocolList_template::ProtocolList_template(const ProtocolList_template& other_value)
+ : Record_Of_Template()
+{
+copy_template(other_value);
+}
+
+ProtocolList_template::~ProtocolList_template()
+{
+clean_up();
+}
+
+void ProtocolList_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+free_pointers((void**)single_value.value_elements);
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ProtocolList_template& ProtocolList_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ProtocolList_template& ProtocolList_template::operator=(null_type)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+return *this;
+}
+
+ProtocolList_template& ProtocolList_template::operator=(const ProtocolList& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+ProtocolList_template& ProtocolList_template::operator=(const OPTIONAL<ProtocolList>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ProtocolList&)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 @General_Types.ProtocolList.");
+}
+return *this;
+}
+
+ProtocolList_template& ProtocolList_template::operator=(const ProtocolList_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+Protocols_template& ProtocolList_template::operator[](int index_value)
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ProtocolList using a negative index: %d.", index_value);
+switch (template_selection)
+{
+ case SPECIFIC_VALUE:
+ if(index_value < single_value.n_elements) break;
+ // no break
+ case OMIT_VALUE:
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ case UNINITIALIZED_TEMPLATE:
+ set_size(index_value + 1);
+ break;
+ default:
+ TTCN_error("Accessing an element of a non-specific template for type @General_Types.ProtocolList.");
+ break;
+}
+return *single_value.value_elements[index_value];
+}
+
+Protocols_template& ProtocolList_template::operator[](const INTEGER& index_value)
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ProtocolList.");
+return (*this)[(int)index_value];
+}
+
+const Protocols_template& ProtocolList_template::operator[](int index_value) const
+{
+if (index_value < 0) TTCN_error("Accessing an element of a template for type @General_Types.ProtocolList using a negative index: %d.", index_value);
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @General_Types.ProtocolList.");
+if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @General_Types.ProtocolList: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
+return *single_value.value_elements[index_value];
+}
+
+const Protocols_template& ProtocolList_template::operator[](const INTEGER& index_value) const
+{
+index_value.must_bound("Using an unbound integer value for indexing a template of type @General_Types.ProtocolList.");
+return (*this)[(int)index_value];
+}
+
+void ProtocolList_template::set_size(int new_size)
+{
+if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @General_Types.ProtocolList.");
+template_sel old_selection = template_selection;
+if (old_selection != SPECIFIC_VALUE) {
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value.n_elements = 0;
+single_value.value_elements = NULL;
+}
+if (new_size > single_value.n_elements) {
+single_value.value_elements = (Protocols_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Protocols_template(ANY_VALUE);
+} else {
+for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
+single_value.value_elements[elem_count] = new Protocols_template;
+}
+single_value.n_elements = new_size;
+} else if (new_size < single_value.n_elements) {
+for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
+delete single_value.value_elements[elem_count];
+single_value.value_elements = (Protocols_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
+single_value.n_elements = new_size;
+}
+}
+
+int ProtocolList_template::n_elem() const
+{
+ switch (template_selection) {
+ case SPECIFIC_VALUE:
+ return single_value.n_elements;
+ break;
+ case VALUE_LIST:
+ return value_list.n_values;
+ break;
+ default:
+ TTCN_error("Performing n_elem");
+ }
+}
+
+int ProtocolList_template::size_of(boolean is_size) const
+{
+const char* op_name = is_size ? "size" : "length";
+int min_size;
+boolean has_any_or_none;
+if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList which has an ifpresent attribute.", op_name);
+switch (template_selection)
+{
+case SPECIFIC_VALUE: {
+ min_size = 0;
+ has_any_or_none = FALSE;
+ int elem_count = single_value.n_elements;
+ if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
+ for (int i=0; i<elem_count; i++) {
+ switch (single_value.value_elements[i]->get_selection()) {
+ case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList containing omit element.", op_name);
+ case ANY_OR_OMIT:
+ has_any_or_none = TRUE;
+ break;
+ default:
+ min_size++;
+ break;
+ }
+ }
+} break;
+case OMIT_VALUE:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList containing omit value.", op_name);
+case ANY_VALUE:
+case ANY_OR_OMIT:
+ min_size = 0;
+ has_any_or_none = TRUE;
+ break;
+case VALUE_LIST:
+{
+ if (value_list.n_values<1)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList containing an empty list.", op_name);
+ int item_size = value_list.list_value[0].size_of(is_size);
+ for (unsigned int i = 1; i < value_list.n_values; i++) {
+ if (value_list.list_value[i].size_of(is_size)!=item_size)
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList containing a value list with different sizes.", op_name);
+ }
+ min_size = item_size;
+ has_any_or_none = FALSE;
+ break;
+}
+case COMPLEMENTED_LIST:
+ TTCN_error("Performing %sof() operation on a template of type @General_Types.ProtocolList containing complemented list.", op_name);
+default:
+ TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @General_Types.ProtocolList.", op_name);
+}
+return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @General_Types.ProtocolList");
+}
+
+boolean ProtocolList_template::match(const ProtocolList& other_value, boolean legacy) const
+{
+if (!other_value.is_bound()) return FALSE;
+int value_length = other_value.size_of();
+if (!match_length(value_length)) return FALSE;
+switch (template_selection) {
+case SPECIFIC_VALUE:
+return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
+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, legacy)) return template_selection == VALUE_LIST;
+return template_selection == COMPLEMENTED_LIST;
+default:
+TTCN_error("Matching with an uninitialized/unsupported template of type @General_Types.ProtocolList.");
+}
+return FALSE;
+}
+
+boolean ProtocolList_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
+return TRUE;
+}
+
+ProtocolList ProtocolList_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 @General_Types.ProtocolList.");
+ProtocolList ret_val;
+ret_val.set_size(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+if (single_value.value_elements[elem_count]->is_bound()) {
+ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
+}
+return ret_val;
+}
+
+ProtocolList ProtocolList_template::substr(int index, int returncount) const
+{
+if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
+return valueof().substr(index, returncount);
+}
+
+ProtocolList ProtocolList_template::replace(int index, int len, const ProtocolList_template& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl.valueof());
+}
+
+ProtocolList ProtocolList_template::replace(int index, int len, const ProtocolList& repl) const
+{
+if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
+return valueof().replace(index, len, repl);
+}
+
+void ProtocolList_template::set_type(template_sel template_type, unsigned int list_length)
+{
+clean_up();
+switch (template_type) {
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = list_length;
+value_list.list_value = new ProtocolList_template[list_length];
+break;
+default:
+TTCN_error("Internal error: Setting an invalid type for a template of type @General_Types.ProtocolList.");
+}
+set_selection(template_type);
+}
+
+ProtocolList_template& ProtocolList_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of type @General_Types.ProtocolList.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @General_Types.ProtocolList.");
+return value_list.list_value[list_index];
+}
+
+void ProtocolList_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.n_elements > 0) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
+single_value.value_elements[elem_count]->log();
+if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
+}
+TTCN_Logger::log_event_str(" }");
+} else TTCN_Logger::log_event_str("{ }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_restricted();
+log_ifpresent();
+}
+
+void ProtocolList_template::log_match(const ProtocolList& 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
+TTCN_Logger::log_logmatch_info("[%d]", elem_count);
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+}
+log_match_length(single_value.n_elements);
+} 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 && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
+TTCN_Logger::log_event_str("{ ");
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+if (elem_count > 0) TTCN_Logger::log_event_str(", ");
+single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
+}
+TTCN_Logger::log_event_str(" }");
+log_match_length(single_value.n_elements);
+} 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 ProtocolList_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+text_buf.push_int(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
+single_value.value_elements[elem_count]->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 @General_Types.ProtocolList.");
+}
+}
+
+void ProtocolList_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_permutation(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value.n_elements = text_buf.pull_int().get_val();
+if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @General_Types.ProtocolList.");
+single_value.value_elements = (Protocols_template**)allocate_pointers(single_value.n_elements);
+for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
+single_value.value_elements[elem_count] = new Protocols_template;
+single_value.value_elements[elem_count]->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 ProtocolList_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 for a template of type @General_Types.ProtocolList.");
+}
+}
+
+boolean ProtocolList_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ProtocolList_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void ProtocolList_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of 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: {
+ ProtocolList_template temp;
+ temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = temp;
+ break; }
+ case Module_Param::MP_Indexed_List:
+ if (template_selection!=SPECIFIC_VALUE) set_size(0);
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
+ }
+ break;
+ case Module_Param::MP_Value_List: {
+ set_size(param.get_size());
+ int curr_idx = 0;
+ for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
+ switch (param.get_elem(p_i)->get_type()) {
+ case Module_Param::MP_NotUsed:
+ curr_idx++;
+ break;
+ case Module_Param::MP_Permutation_Template: {
+ int perm_start_idx = curr_idx;
+ Module_Param* param_i = param.get_elem(p_i);
+ for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
+ (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
+ curr_idx++;
+ }
+ int perm_end_idx = curr_idx - 1;
+ add_permutation(perm_start_idx, perm_end_idx);
+ } break;
+ default:
+ (*this)[curr_idx].set_param(*param.get_elem(p_i));
+ curr_idx++;
+ }
+ }
+ } break;
+ default:
+ param.type_error("record of template", "@General_Types.ProtocolList");
+ }
+ is_ifpresent = param.get_ifpresent();
+ set_length_range(param);
+}
+
+void ProtocolList_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;
+for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@General_Types.ProtocolList");
+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 : "@General_Types.ProtocolList");
+}
+
+boolean ProtocolList_template::get_istemplate_kind(const char* type) const {
+if (!strcmp(type, "AnyElement")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "AnyElementsOrNone")) {
+ if (template_selection != SPECIFIC_VALUE) {
+ return FALSE;
+ }
+ for (int i = 0; i < single_value.n_elements; i++) {
+ if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+} else if (!strcmp(type, "permutation")) {
+ return number_of_permutations;
+} else if (!strcmp(type, "length")) {
+ return length_restriction_type != NO_LENGTH_RESTRICTION;
+} else {
+ return Base_Template::get_istemplate_kind(type);
+}
+}
+
+/* Bodies of functions, altsteps and testcases */
+
+boolean operator==(null_type, const Integer__array& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Integer_array.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const Verdicttypes& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Verdicttypes.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const VerdicttypeSet& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.VerdicttypeSet.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const Anytypes& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.Anytypes.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const AnytypeSet& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.AnytypeSet.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const ListOfDummy__comptype& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ListOfDummy_comptype.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const ListOfDummy__CT& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ListOfDummy_CT.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+boolean operator==(null_type, const ProtocolList& other_value)
+{
+if (other_value.val_ptr == NULL)
+TTCN_error("The right operand of comparison is an unbound value of type @General_Types.ProtocolList.");
+return other_value.val_ptr->n_elements == 0;
+}
+
+
+/* Bodies of static functions */
+
+static boolean init_comp_type(const char *component_type, boolean init_base_comps)
+{
+(void)init_base_comps;
+if (!strcmp(component_type, "Dummy_comptype")) {
+return TRUE;
+} else if (!strcmp(component_type, "Dummy_CT")) {
+return TRUE;
+} else return FALSE;
+}
+
+
+} /* end of namespace */
diff --git a/demo/General_Types.d b/demo/General_Types.d
new file mode 100644
index 0000000..e39a30f
--- /dev/null
+++ b/demo/General_Types.d
@@ -0,0 +1,58 @@
+General_Types.o General_Types.d : General_Types.cc General_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh
diff --git a/demo/General_Types.hh b/demo/General_Types.hh
new file mode 100644
index 0000000..6096e98
--- /dev/null
+++ b/demo/General_Types.hh
@@ -0,0 +1,2573 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef General__Types_HH
+#define General__Types_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef General__Types_HH
+#endif
+
+namespace General__Types {
+
+/* Forward declarations of classes */
+
+typedef PreGenRecordOf::PREGEN__RECORD__OF__BITSTRING Bitstrings;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__BITSTRING_template Bitstrings_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__BITSTRING BitstringSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__BITSTRING_template BitstringSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING Octetstrings;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template Octetstrings_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__OCTETSTRING OctetstringSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__OCTETSTRING_template OctetstringSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING Charstrings;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING_template Charstrings_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__CHARSTRING CharstringSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__CHARSTRING_template CharstringSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__HEXSTRING Hexstrings;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__HEXSTRING_template Hexstrings_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__HEXSTRING HexstringSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__HEXSTRING_template HexstringSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__INTEGER Integers;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__INTEGER_template Integers_template;
+class Integer__array;
+class Integer__array_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__INTEGER IntegerSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__INTEGER_template IntegerSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__FLOAT Floats;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__FLOAT_template Floats_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__FLOAT FloatSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__FLOAT_template FloatSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING UniversalCharstrings;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING_template UniversalCharstrings_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__UNIVERSAL__CHARSTRING UniversalCharstringSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__UNIVERSAL__CHARSTRING_template UniversalCharstringSet_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__BOOLEAN Booleans;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__BOOLEAN_template Booleans_template;
+typedef PreGenRecordOf::PREGEN__SET__OF__BOOLEAN BooleanSet;
+typedef PreGenRecordOf::PREGEN__SET__OF__BOOLEAN_template BooleanSet_template;
+class Verdicttypes;
+class Verdicttypes_template;
+class VerdicttypeSet;
+class VerdicttypeSet_template;
+class Anytypes;
+class Anytypes_template;
+class anytype;
+class anytype_template;
+class AnytypeSet;
+class AnytypeSet_template;
+class Protocols;
+class Protocols_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT1List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT1List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT2List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT2List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT3List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT3List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT4List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT4List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT5List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT5List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT6List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT6List_template;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING OCT7List;
+typedef PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING_template OCT7List_template;
+class ListOfDummy__comptype;
+class ListOfDummy__comptype_template;
+class ListOfDummy__CT;
+class ListOfDummy__CT_template;
+class ProtocolList;
+class ProtocolList_template;
+
+} /* end of namespace */
+
+#ifndef General__Types_HH
+#define General__Types_HH
+
+namespace General__Types {
+
+/* Type definitions */
+
+typedef BITSTRING BIT1n;
+typedef BITSTRING_template BIT1n_template;
+typedef BITSTRING BIT2n;
+typedef BITSTRING_template BIT2n_template;
+typedef BITSTRING BIT3n;
+typedef BITSTRING_template BIT3n_template;
+typedef BITSTRING BIT4n;
+typedef BITSTRING_template BIT4n_template;
+typedef BITSTRING BIT5n;
+typedef BITSTRING_template BIT5n_template;
+typedef BITSTRING BIT6n;
+typedef BITSTRING_template BIT6n_template;
+typedef BITSTRING BIT7n;
+typedef BITSTRING_template BIT7n_template;
+typedef BITSTRING BIT8n;
+typedef BITSTRING_template BIT8n_template;
+typedef BITSTRING BIT9n;
+typedef BITSTRING_template BIT9n_template;
+typedef BITSTRING BIT12n;
+typedef BITSTRING_template BIT12n_template;
+typedef BITSTRING BIT14n;
+typedef BITSTRING_template BIT14n_template;
+typedef BITSTRING BIT15n;
+typedef BITSTRING_template BIT15n_template;
+typedef BITSTRING BIT16n;
+typedef BITSTRING_template BIT16n_template;
+typedef BITSTRING BIT56n;
+typedef BITSTRING_template BIT56n_template;
+typedef BITSTRING BIT14__24n;
+typedef BITSTRING_template BIT14__24n_template;
+typedef BITSTRING BIT1np;
+typedef BITSTRING_template BIT1np_template;
+typedef BITSTRING BIT2np;
+typedef BITSTRING_template BIT2np_template;
+typedef BITSTRING BIT3np;
+typedef BITSTRING_template BIT3np_template;
+typedef BITSTRING BIT4np;
+typedef BITSTRING_template BIT4np_template;
+typedef BITSTRING BIT5np;
+typedef BITSTRING_template BIT5np_template;
+typedef BITSTRING BIT6np;
+typedef BITSTRING_template BIT6np_template;
+typedef BITSTRING BIT7np;
+typedef BITSTRING_template BIT7np_template;
+typedef BITSTRING BIT15np;
+typedef BITSTRING_template BIT15np_template;
+typedef BITSTRING BIT1;
+typedef BITSTRING_template BIT1_template;
+typedef BITSTRING BIT2;
+typedef BITSTRING_template BIT2_template;
+typedef BITSTRING BIT3;
+typedef BITSTRING_template BIT3_template;
+typedef BITSTRING BIT4;
+typedef BITSTRING_template BIT4_template;
+typedef BITSTRING BIT5;
+typedef BITSTRING_template BIT5_template;
+typedef BITSTRING BIT6;
+typedef BITSTRING_template BIT6_template;
+typedef BITSTRING BIT7;
+typedef BITSTRING_template BIT7_template;
+typedef BITSTRING BIT8;
+typedef BITSTRING_template BIT8_template;
+typedef BITSTRING BIT9;
+typedef BITSTRING_template BIT9_template;
+typedef BITSTRING BIT10;
+typedef BITSTRING_template BIT10_template;
+typedef BITSTRING BIT11;
+typedef BITSTRING_template BIT11_template;
+typedef BITSTRING BIT12;
+typedef BITSTRING_template BIT12_template;
+typedef BITSTRING BIT14;
+typedef BITSTRING_template BIT14_template;
+typedef BITSTRING BIT15;
+typedef BITSTRING_template BIT15_template;
+typedef BITSTRING BIT16;
+typedef BITSTRING_template BIT16_template;
+typedef BITSTRING BIT24;
+typedef BITSTRING_template BIT24_template;
+typedef BITSTRING BIT31;
+typedef BITSTRING_template BIT31_template;
+typedef BITSTRING BIT56;
+typedef BITSTRING_template BIT56_template;
+typedef Bitstrings BitstringList;
+typedef Bitstrings_template BitstringList_template;
+typedef OCTETSTRING OCT0n;
+typedef OCTETSTRING_template OCT0n_template;
+typedef OCTETSTRING OCT1n;
+typedef OCTETSTRING_template OCT1n_template;
+typedef OCTETSTRING OCT2n;
+typedef OCTETSTRING_template OCT2n_template;
+typedef OCTETSTRING OCT3n;
+typedef OCTETSTRING_template OCT3n_template;
+typedef OCTETSTRING OCT4n;
+typedef OCTETSTRING_template OCT4n_template;
+typedef OCTETSTRING OCT5n;
+typedef OCTETSTRING_template OCT5n_template;
+typedef OCTETSTRING OCT6n;
+typedef OCTETSTRING_template OCT6n_template;
+typedef OCTETSTRING OCT7n;
+typedef OCTETSTRING_template OCT7n_template;
+typedef OCTETSTRING OCT8n;
+typedef OCTETSTRING_template OCT8n_template;
+typedef OCTETSTRING OCT9n;
+typedef OCTETSTRING_template OCT9n_template;
+typedef OCTETSTRING OCT10n;
+typedef OCTETSTRING_template OCT10n_template;
+typedef OCTETSTRING OCT11n;
+typedef OCTETSTRING_template OCT11n_template;
+typedef OCTETSTRING OCT12n;
+typedef OCTETSTRING_template OCT12n_template;
+typedef OCTETSTRING OCT13n;
+typedef OCTETSTRING_template OCT13n_template;
+typedef OCTETSTRING OCT14n;
+typedef OCTETSTRING_template OCT14n_template;
+typedef OCTETSTRING OCT15n;
+typedef OCTETSTRING_template OCT15n_template;
+typedef OCTETSTRING OCT16n;
+typedef OCTETSTRING_template OCT16n_template;
+typedef OCTETSTRING OCT17n;
+typedef OCTETSTRING_template OCT17n_template;
+typedef OCTETSTRING OCT18n;
+typedef OCTETSTRING_template OCT18n_template;
+typedef OCTETSTRING OCT19n;
+typedef OCTETSTRING_template OCT19n_template;
+typedef OCTETSTRING OCT20n;
+typedef OCTETSTRING_template OCT20n_template;
+typedef OCTETSTRING OCT28n;
+typedef OCTETSTRING_template OCT28n_template;
+typedef OCTETSTRING OCT32n;
+typedef OCTETSTRING_template OCT32n_template;
+typedef OCTETSTRING OCT34n;
+typedef OCTETSTRING_template OCT34n_template;
+typedef OCTETSTRING OCT46n;
+typedef OCTETSTRING_template OCT46n_template;
+typedef OCTETSTRING OCT50n;
+typedef OCTETSTRING_template OCT50n_template;
+typedef OCTETSTRING OCT69n;
+typedef OCTETSTRING_template OCT69n_template;
+typedef OCTETSTRING OCT100n;
+typedef OCTETSTRING_template OCT100n_template;
+typedef OCTETSTRING OCT128n;
+typedef OCTETSTRING_template OCT128n_template;
+typedef OCTETSTRING OCT500n;
+typedef OCTETSTRING_template OCT500n_template;
+typedef OCTETSTRING OCTNn;
+typedef OCTETSTRING_template OCTNn_template;
+typedef OCTETSTRING OCT1__3n;
+typedef OCTETSTRING_template OCT1__3n_template;
+typedef OCTETSTRING OCT1__4n;
+typedef OCTETSTRING_template OCT1__4n_template;
+typedef OCTETSTRING OCT1__5n;
+typedef OCTETSTRING_template OCT1__5n_template;
+typedef OCTETSTRING OCT1__6n;
+typedef OCTETSTRING_template OCT1__6n_template;
+typedef OCTETSTRING OCT1__7n;
+typedef OCTETSTRING_template OCT1__7n_template;
+typedef OCTETSTRING OCT1__8n;
+typedef OCTETSTRING_template OCT1__8n_template;
+typedef OCTETSTRING OCT1__12n;
+typedef OCTETSTRING_template OCT1__12n_template;
+typedef OCTETSTRING OCT1__15n;
+typedef OCTETSTRING_template OCT1__15n_template;
+typedef OCTETSTRING OCT1__16n;
+typedef OCTETSTRING_template OCT1__16n_template;
+typedef OCTETSTRING OCT1__18n;
+typedef OCTETSTRING_template OCT1__18n_template;
+typedef OCTETSTRING OCT1__20n;
+typedef OCTETSTRING_template OCT1__20n_template;
+typedef OCTETSTRING OCT1__24n;
+typedef OCTETSTRING_template OCT1__24n_template;
+typedef OCTETSTRING OCT1__32n;
+typedef OCTETSTRING_template OCT1__32n_template;
+typedef OCTETSTRING OCT1__34n;
+typedef OCTETSTRING_template OCT1__34n_template;
+typedef OCTETSTRING OCT1__46n;
+typedef OCTETSTRING_template OCT1__46n_template;
+typedef OCTETSTRING OCT1__50n;
+typedef OCTETSTRING_template OCT1__50n_template;
+typedef OCTETSTRING OCT1__112n;
+typedef OCTETSTRING_template OCT1__112n_template;
+typedef OCTETSTRING OCT1__127n;
+typedef OCTETSTRING_template OCT1__127n_template;
+typedef OCTETSTRING OCT1__128n;
+typedef OCTETSTRING_template OCT1__128n_template;
+typedef OCTETSTRING OCT1__172n;
+typedef OCTETSTRING_template OCT1__172n_template;
+typedef OCTETSTRING OCT3__5n;
+typedef OCTETSTRING_template OCT3__5n_template;
+typedef OCTETSTRING OCT3__7n;
+typedef OCTETSTRING_template OCT3__7n_template;
+typedef OCTETSTRING OCT3__8n;
+typedef OCTETSTRING_template OCT3__8n_template;
+typedef OCTETSTRING OCT3__14n;
+typedef OCTETSTRING_template OCT3__14n_template;
+typedef OCTETSTRING OCT3__17n;
+typedef OCTETSTRING_template OCT3__17n_template;
+typedef OCTETSTRING OCT4__8n;
+typedef OCTETSTRING_template OCT4__8n_template;
+typedef Octetstrings OctetstringList;
+typedef Octetstrings_template OctetstringList_template;
+typedef CHARSTRING CHAR4;
+typedef CHARSTRING_template CHAR4_template;
+typedef Charstrings CharstringList;
+typedef Charstrings_template CharstringList_template;
+typedef HEXSTRING HEX4n;
+typedef HEXSTRING_template HEX4n_template;
+typedef HEXSTRING HEX6n;
+typedef HEXSTRING_template HEX6n_template;
+typedef HEXSTRING HEX8n;
+typedef HEXSTRING_template HEX8n_template;
+typedef HEXSTRING HEX15n;
+typedef HEXSTRING_template HEX15n_template;
+typedef HEXSTRING HEX16n;
+typedef HEXSTRING_template HEX16n_template;
+typedef HEXSTRING HEX24n;
+typedef HEXSTRING_template HEX24n_template;
+typedef HEXSTRING HEX0__18n;
+typedef HEXSTRING_template HEX0__18n_template;
+typedef HEXSTRING HEX1__20n;
+typedef HEXSTRING_template HEX1__20n_template;
+typedef HEXSTRING HEX1__34n;
+typedef HEXSTRING_template HEX1__34n_template;
+typedef Hexstrings HexstringList;
+typedef Hexstrings_template HexstringList_template;
+typedef INTEGER INT3nb;
+typedef INTEGER_template INT3nb_template;
+typedef INTEGER INT4nb;
+typedef INTEGER_template INT4nb_template;
+typedef INTEGER INT5nb;
+typedef INTEGER_template INT5nb_template;
+typedef INTEGER INT8nb;
+typedef INTEGER_template INT8nb_template;
+typedef INTEGER INT2nbp;
+typedef INTEGER_template INT2nbp_template;
+typedef INTEGER INT1nbp;
+typedef INTEGER_template INT1nbp_template;
+typedef INTEGER INT3nbp;
+typedef INTEGER_template INT3nbp_template;
+typedef INTEGER INT5nbp;
+typedef INTEGER_template INT5nbp_template;
+typedef INTEGER INT9nbp;
+typedef INTEGER_template INT9nbp_template;
+typedef INTEGER INT13nbp;
+typedef INTEGER_template INT13nbp_template;
+typedef INTEGER INT15nbp;
+typedef INTEGER_template INT15nbp_template;
+typedef Integers IntegerList;
+typedef Integers_template IntegerList_template;
+typedef Floats FloatList;
+typedef Floats_template FloatList_template;
+typedef UniversalCharstrings UniversalCharstringList;
+typedef UniversalCharstrings_template UniversalCharstringList_template;
+typedef Booleans BooleanList;
+typedef Booleans_template BooleanList_template;
+typedef Verdicttypes VerdicttypeList;
+typedef Verdicttypes_template VerdicttypeList_template;
+typedef Anytypes AnytypeList;
+typedef Anytypes_template AnytypeList_template;
+typedef BITSTRING BIT6__BO__LAST;
+typedef BITSTRING_template BIT6__BO__LAST_template;
+typedef BITSTRING BIT16__BO__LAST;
+typedef BITSTRING_template BIT16__BO__LAST_template;
+typedef BITSTRING BIT32__BO__LAST;
+typedef BITSTRING_template BIT32__BO__LAST_template;
+typedef OCTETSTRING Dummy;
+typedef OCTETSTRING_template Dummy_template;
+typedef OCTETSTRING OCT0;
+typedef OCTETSTRING_template OCT0_template;
+typedef OCTETSTRING OCT1;
+typedef OCTETSTRING_template OCT1_template;
+typedef OCTETSTRING OCT2;
+typedef OCTETSTRING_template OCT2_template;
+typedef OCTETSTRING OCT3;
+typedef OCTETSTRING_template OCT3_template;
+typedef OCTETSTRING OCT4;
+typedef OCTETSTRING_template OCT4_template;
+typedef OCTETSTRING OCT5;
+typedef OCTETSTRING_template OCT5_template;
+typedef OCTETSTRING OCT6;
+typedef OCTETSTRING_template OCT6_template;
+typedef OCTETSTRING OCT7;
+typedef OCTETSTRING_template OCT7_template;
+typedef OCTETSTRING OCT8;
+typedef OCTETSTRING_template OCT8_template;
+typedef OCTETSTRING OCT9;
+typedef OCTETSTRING_template OCT9_template;
+typedef OCTETSTRING OCT10;
+typedef OCTETSTRING_template OCT10_template;
+typedef OCTETSTRING OCT11;
+typedef OCTETSTRING_template OCT11_template;
+typedef OCTETSTRING OCT12;
+typedef OCTETSTRING_template OCT12_template;
+typedef OCTETSTRING OCT13;
+typedef OCTETSTRING_template OCT13_template;
+typedef OCTETSTRING OCT14;
+typedef OCTETSTRING_template OCT14_template;
+typedef OCTETSTRING OCT15;
+typedef OCTETSTRING_template OCT15_template;
+typedef OCTETSTRING OCT16;
+typedef OCTETSTRING_template OCT16_template;
+typedef OCTETSTRING OCT17;
+typedef OCTETSTRING_template OCT17_template;
+typedef OCTETSTRING OCT18;
+typedef OCTETSTRING_template OCT18_template;
+typedef OCTETSTRING OCT19;
+typedef OCTETSTRING_template OCT19_template;
+typedef OCTETSTRING OCT20;
+typedef OCTETSTRING_template OCT20_template;
+typedef OCTETSTRING OCT32;
+typedef OCTETSTRING_template OCT32_template;
+typedef OCTETSTRING OCT34;
+typedef OCTETSTRING_template OCT34_template;
+typedef OCTETSTRING OCT46;
+typedef OCTETSTRING_template OCT46_template;
+typedef OCTETSTRING OCT1__260;
+typedef OCTETSTRING_template OCT1__260_template;
+typedef OCTETSTRING OCT1__8;
+typedef OCTETSTRING_template OCT1__8_template;
+typedef OCTETSTRING OCT1__12;
+typedef OCTETSTRING_template OCT1__12_template;
+typedef OCTETSTRING OCT1__32;
+typedef OCTETSTRING_template OCT1__32_template;
+typedef OCTETSTRING OCT1__50;
+typedef OCTETSTRING_template OCT1__50_template;
+typedef OCTETSTRING OCT3__8;
+typedef OCTETSTRING_template OCT3__8_template;
+typedef OCTETSTRING OCTN;
+typedef OCTETSTRING_template OCTN_template;
+typedef HEXSTRING HEX1;
+typedef HEXSTRING_template HEX1_template;
+typedef HEXSTRING HEX0__16;
+typedef HEXSTRING_template HEX0__16_template;
+typedef HEXSTRING HEX5__16;
+typedef HEXSTRING_template HEX5__16_template;
+typedef HEXSTRING HEX1__32;
+typedef HEXSTRING_template HEX1__32_template;
+typedef INTEGER INT1;
+typedef INTEGER_template INT1_template;
+typedef INTEGER LIN1;
+typedef INTEGER_template LIN1_template;
+typedef INTEGER LIN2;
+typedef INTEGER_template LIN2_template;
+typedef INTEGER LIN2__BO__LAST;
+typedef INTEGER_template LIN2__BO__LAST_template;
+typedef INTEGER LIN3__BO__LAST;
+typedef INTEGER_template LIN3__BO__LAST_template;
+typedef INTEGER LIN4__BO__LAST;
+typedef INTEGER_template LIN4__BO__LAST_template;
+typedef INTEGER INT1b;
+typedef INTEGER_template INT1b_template;
+typedef INTEGER INT2b;
+typedef INTEGER_template INT2b_template;
+typedef INTEGER INT3b;
+typedef INTEGER_template INT3b_template;
+typedef INTEGER INT4b;
+typedef INTEGER_template INT4b_template;
+typedef INTEGER INT5b;
+typedef INTEGER_template INT5b_template;
+typedef INTEGER INT6b;
+typedef INTEGER_template INT6b_template;
+typedef INTEGER INT7b;
+typedef INTEGER_template INT7b_template;
+typedef INTEGER INT11b__BO__LAST;
+typedef INTEGER_template INT11b__BO__LAST_template;
+typedef INTEGER INT12b__BO__LAST;
+typedef INTEGER_template INT12b__BO__LAST_template;
+typedef INTEGER INT13b__BO__LAST;
+typedef INTEGER_template INT13b__BO__LAST_template;
+typedef INTEGER INT14b__BO__LAST;
+typedef INTEGER_template INT14b__BO__LAST_template;
+typedef INTEGER INT20b__BO__LAST;
+typedef INTEGER_template INT20b__BO__LAST_template;
+typedef INTEGER INT31b__BO__LAST;
+typedef INTEGER_template INT31b__BO__LAST_template;
+typedef COMPONENT Dummy__comptype;
+typedef COMPONENT_template Dummy__comptype_template;
+typedef COMPONENT Dummy__CT;
+typedef COMPONENT_template Dummy__CT_template;
+
+/* Class definitions */
+
+class Integer__array : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+Integers **value_elements;
+} *val_ptr;
+
+static const Integers UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const Integer__array& other_value);
+
+public:
+ typedef Integers of_type;
+Integer__array();
+Integer__array(null_type other_value);
+Integer__array(const Integer__array& other_value);
+~Integer__array();
+
+void clean_up();
+Integer__array& operator=(null_type other_value);
+Integer__array& operator=(const Integer__array& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const Integer__array& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const Integer__array& other_value) const { return !(*this == other_value); }
+
+Integers& operator[](int index_value);
+Integers& operator[](const INTEGER& index_value);
+const Integers& operator[](int index_value) const;
+const Integers& operator[](const INTEGER& index_value) const;
+
+Integer__array operator<<=(int rotate_count) const;
+Integer__array operator<<=(const INTEGER& rotate_count) const;
+Integer__array operator>>=(int rotate_count) const;
+Integer__array operator>>=(const INTEGER& rotate_count) const;
+
+Integer__array operator+(const Integer__array& other_value) const;
+
+Integer__array substr(int index, int returncount) const;
+
+Integer__array replace(int index, int len, const Integer__array& repl) const;
+
+Integer__array replace(int index, int len, const Integer__array_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class Integer__array_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+Integers_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+Integer__array_template *list_value;
+} value_list;
+};
+void copy_value(const Integer__array& other_value);
+void copy_template(const Integer__array_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+Integer__array_template();
+Integer__array_template(template_sel other_value);
+Integer__array_template(null_type other_value);
+Integer__array_template(const Integer__array& other_value);
+Integer__array_template(const OPTIONAL<Integer__array>& other_value);
+Integer__array_template(const Integer__array_template& other_value);
+~Integer__array_template();
+
+void clean_up();
+Integer__array_template& operator=(template_sel other_value);
+Integer__array_template& operator=(null_type other_value);
+Integer__array_template& operator=(const Integer__array& other_value);
+Integer__array_template& operator=(const OPTIONAL<Integer__array>& other_value);
+Integer__array_template& operator=(const Integer__array_template& other_value);
+
+Integers_template& operator[](int index_value);
+Integers_template& operator[](const INTEGER& index_value);
+const Integers_template& operator[](int index_value) const;
+const Integers_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const Integer__array& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+Integer__array valueof() const;
+Integer__array substr(int index, int returncount) const;
+
+Integer__array replace(int index, int len, const Integer__array_template& repl) const;
+
+Integer__array replace(int index, int len, const Integer__array& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+Integer__array_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const Integer__array& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class Verdicttypes : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+VERDICTTYPE **value_elements;
+} *val_ptr;
+
+static const VERDICTTYPE UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const Verdicttypes& other_value);
+
+public:
+ typedef VERDICTTYPE of_type;
+Verdicttypes();
+Verdicttypes(null_type other_value);
+Verdicttypes(const Verdicttypes& other_value);
+~Verdicttypes();
+
+void clean_up();
+Verdicttypes& operator=(null_type other_value);
+Verdicttypes& operator=(const Verdicttypes& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const Verdicttypes& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const Verdicttypes& other_value) const { return !(*this == other_value); }
+
+VERDICTTYPE& operator[](int index_value);
+VERDICTTYPE& operator[](const INTEGER& index_value);
+const VERDICTTYPE& operator[](int index_value) const;
+const VERDICTTYPE& operator[](const INTEGER& index_value) const;
+
+Verdicttypes operator<<=(int rotate_count) const;
+Verdicttypes operator<<=(const INTEGER& rotate_count) const;
+Verdicttypes operator>>=(int rotate_count) const;
+Verdicttypes operator>>=(const INTEGER& rotate_count) const;
+
+Verdicttypes operator+(const Verdicttypes& other_value) const;
+
+Verdicttypes substr(int index, int returncount) const;
+
+Verdicttypes replace(int index, int len, const Verdicttypes& repl) const;
+
+Verdicttypes replace(int index, int len, const Verdicttypes_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class Verdicttypes_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+VERDICTTYPE_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+Verdicttypes_template *list_value;
+} value_list;
+};
+void copy_value(const Verdicttypes& other_value);
+void copy_template(const Verdicttypes_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+Verdicttypes_template();
+Verdicttypes_template(template_sel other_value);
+Verdicttypes_template(null_type other_value);
+Verdicttypes_template(const Verdicttypes& other_value);
+Verdicttypes_template(const OPTIONAL<Verdicttypes>& other_value);
+Verdicttypes_template(const Verdicttypes_template& other_value);
+~Verdicttypes_template();
+
+void clean_up();
+Verdicttypes_template& operator=(template_sel other_value);
+Verdicttypes_template& operator=(null_type other_value);
+Verdicttypes_template& operator=(const Verdicttypes& other_value);
+Verdicttypes_template& operator=(const OPTIONAL<Verdicttypes>& other_value);
+Verdicttypes_template& operator=(const Verdicttypes_template& other_value);
+
+VERDICTTYPE_template& operator[](int index_value);
+VERDICTTYPE_template& operator[](const INTEGER& index_value);
+const VERDICTTYPE_template& operator[](int index_value) const;
+const VERDICTTYPE_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const Verdicttypes& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+Verdicttypes valueof() const;
+Verdicttypes substr(int index, int returncount) const;
+
+Verdicttypes replace(int index, int len, const Verdicttypes_template& repl) const;
+
+Verdicttypes replace(int index, int len, const Verdicttypes& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+Verdicttypes_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const Verdicttypes& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class VerdicttypeSet : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+VERDICTTYPE **value_elements;
+} *val_ptr;
+
+static const VERDICTTYPE UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const VerdicttypeSet& other_value);
+static boolean compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index);
+
+public:
+ typedef VERDICTTYPE of_type;
+VerdicttypeSet();
+VerdicttypeSet(null_type other_value);
+VerdicttypeSet(const VerdicttypeSet& other_value);
+~VerdicttypeSet();
+
+void clean_up();
+VerdicttypeSet& operator=(null_type other_value);
+VerdicttypeSet& operator=(const VerdicttypeSet& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const VerdicttypeSet& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const VerdicttypeSet& other_value) const { return !(*this == other_value); }
+
+VERDICTTYPE& operator[](int index_value);
+VERDICTTYPE& operator[](const INTEGER& index_value);
+const VERDICTTYPE& operator[](int index_value) const;
+const VERDICTTYPE& operator[](const INTEGER& index_value) const;
+
+VerdicttypeSet operator<<=(int rotate_count) const;
+VerdicttypeSet operator<<=(const INTEGER& rotate_count) const;
+VerdicttypeSet operator>>=(int rotate_count) const;
+VerdicttypeSet operator>>=(const INTEGER& rotate_count) const;
+
+VerdicttypeSet operator+(const VerdicttypeSet& other_value) const;
+
+VerdicttypeSet substr(int index, int returncount) const;
+
+VerdicttypeSet replace(int index, int len, const VerdicttypeSet& repl) const;
+
+VerdicttypeSet replace(int index, int len, const VerdicttypeSet_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class VerdicttypeSet_template : public Restricted_Length_Template {
+union {
+struct {
+int n_elements;
+VERDICTTYPE_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+VerdicttypeSet_template *list_value;
+} value_list;
+struct {
+unsigned int n_items;
+VERDICTTYPE_template *set_items;
+} value_set;
+};
+void copy_value(const VerdicttypeSet& other_value);
+void copy_template(const VerdicttypeSet_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+static boolean match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+static void log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy);
+
+public:
+VerdicttypeSet_template();
+VerdicttypeSet_template(template_sel other_value);
+VerdicttypeSet_template(null_type other_value);
+VerdicttypeSet_template(const VerdicttypeSet& other_value);
+VerdicttypeSet_template(const OPTIONAL<VerdicttypeSet>& other_value);
+VerdicttypeSet_template(const VerdicttypeSet_template& other_value);
+~VerdicttypeSet_template();
+
+void clean_up();
+VerdicttypeSet_template& operator=(template_sel other_value);
+VerdicttypeSet_template& operator=(null_type other_value);
+VerdicttypeSet_template& operator=(const VerdicttypeSet& other_value);
+VerdicttypeSet_template& operator=(const OPTIONAL<VerdicttypeSet>& other_value);
+VerdicttypeSet_template& operator=(const VerdicttypeSet_template& other_value);
+
+VERDICTTYPE_template& operator[](int index_value);
+VERDICTTYPE_template& operator[](const INTEGER& index_value);
+const VERDICTTYPE_template& operator[](int index_value) const;
+const VERDICTTYPE_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const VerdicttypeSet& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+VerdicttypeSet valueof() const;
+VerdicttypeSet substr(int index, int returncount) const;
+
+VerdicttypeSet replace(int index, int len, const VerdicttypeSet_template& repl) const;
+
+VerdicttypeSet replace(int index, int len, const VerdicttypeSet& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+VerdicttypeSet_template& list_item(unsigned int list_index);
+VERDICTTYPE_template& set_item(unsigned int set_index);
+void log() const;
+void log_match(const VerdicttypeSet& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class Anytypes : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+anytype **value_elements;
+} *val_ptr;
+
+static const anytype UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const Anytypes& other_value);
+
+public:
+ typedef anytype of_type;
+Anytypes();
+Anytypes(null_type other_value);
+Anytypes(const Anytypes& other_value);
+~Anytypes();
+
+void clean_up();
+Anytypes& operator=(null_type other_value);
+Anytypes& operator=(const Anytypes& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const Anytypes& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const Anytypes& other_value) const { return !(*this == other_value); }
+
+anytype& operator[](int index_value);
+anytype& operator[](const INTEGER& index_value);
+const anytype& operator[](int index_value) const;
+const anytype& operator[](const INTEGER& index_value) const;
+
+Anytypes operator<<=(int rotate_count) const;
+Anytypes operator<<=(const INTEGER& rotate_count) const;
+Anytypes operator>>=(int rotate_count) const;
+Anytypes operator>>=(const INTEGER& rotate_count) const;
+
+Anytypes operator+(const Anytypes& other_value) const;
+
+Anytypes substr(int index, int returncount) const;
+
+Anytypes replace(int index, int len, const Anytypes& repl) const;
+
+Anytypes replace(int index, int len, const Anytypes_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class Anytypes_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+anytype_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+Anytypes_template *list_value;
+} value_list;
+};
+void copy_value(const Anytypes& other_value);
+void copy_template(const Anytypes_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+Anytypes_template();
+Anytypes_template(template_sel other_value);
+Anytypes_template(null_type other_value);
+Anytypes_template(const Anytypes& other_value);
+Anytypes_template(const OPTIONAL<Anytypes>& other_value);
+Anytypes_template(const Anytypes_template& other_value);
+~Anytypes_template();
+
+void clean_up();
+Anytypes_template& operator=(template_sel other_value);
+Anytypes_template& operator=(null_type other_value);
+Anytypes_template& operator=(const Anytypes& other_value);
+Anytypes_template& operator=(const OPTIONAL<Anytypes>& other_value);
+Anytypes_template& operator=(const Anytypes_template& other_value);
+
+anytype_template& operator[](int index_value);
+anytype_template& operator[](const INTEGER& index_value);
+const anytype_template& operator[](int index_value) const;
+const anytype_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const Anytypes& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+Anytypes valueof() const;
+Anytypes substr(int index, int returncount) const;
+
+Anytypes replace(int index, int len, const Anytypes_template& repl) const;
+
+Anytypes replace(int index, int len, const Anytypes& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+Anytypes_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const Anytypes& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class anytype : public Base_Type {
+public:
+enum union_selection_type { UNBOUND_VALUE = 0 };
+private:
+union_selection_type union_selection;
+union {
+};
+void copy_value(const anytype& other_value);
+
+public:
+anytype();
+anytype(const anytype& other_value);
+~anytype();
+anytype& operator=(const anytype& other_value);
+boolean operator==(const anytype& other_value) const;
+inline boolean operator!=(const anytype& other_value) const { return !(*this == other_value); }
+inline union_selection_type get_selection() const { return union_selection; }
+boolean ischosen(union_selection_type checked_selection) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+};
+
+class anytype_template : public Base_Template {
+union {
+struct {
+anytype::union_selection_type union_selection;
+union {
+};
+} single_value;
+struct {
+unsigned int n_values;
+anytype_template *list_value;
+} value_list;
+};
+void copy_value(const anytype& other_value);
+
+void copy_template(const anytype_template& other_value);
+
+public:
+anytype_template();
+anytype_template(template_sel other_value);
+anytype_template(const anytype& other_value);
+anytype_template(const OPTIONAL<anytype>& other_value);
+anytype_template(const anytype_template& other_value);
+~anytype_template();
+void clean_up();
+anytype_template& operator=(template_sel other_value);
+anytype_template& operator=(const anytype& other_value);
+anytype_template& operator=(const OPTIONAL<anytype>& other_value);
+anytype_template& operator=(const anytype_template& other_value);
+boolean match(const anytype& other_value, boolean legacy = FALSE) const;
+boolean is_value() const;anytype valueof() const;
+anytype_template& list_item(unsigned int list_index) const;
+void set_type(template_sel template_type, unsigned int list_length);
+boolean ischosen(anytype::union_selection_type checked_selection) const;
+void log() const;
+void log_match(const anytype& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class AnytypeSet : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+anytype **value_elements;
+} *val_ptr;
+
+static const anytype UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const AnytypeSet& other_value);
+static boolean compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index);
+
+public:
+ typedef anytype of_type;
+AnytypeSet();
+AnytypeSet(null_type other_value);
+AnytypeSet(const AnytypeSet& other_value);
+~AnytypeSet();
+
+void clean_up();
+AnytypeSet& operator=(null_type other_value);
+AnytypeSet& operator=(const AnytypeSet& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const AnytypeSet& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const AnytypeSet& other_value) const { return !(*this == other_value); }
+
+anytype& operator[](int index_value);
+anytype& operator[](const INTEGER& index_value);
+const anytype& operator[](int index_value) const;
+const anytype& operator[](const INTEGER& index_value) const;
+
+AnytypeSet operator<<=(int rotate_count) const;
+AnytypeSet operator<<=(const INTEGER& rotate_count) const;
+AnytypeSet operator>>=(int rotate_count) const;
+AnytypeSet operator>>=(const INTEGER& rotate_count) const;
+
+AnytypeSet operator+(const AnytypeSet& other_value) const;
+
+AnytypeSet substr(int index, int returncount) const;
+
+AnytypeSet replace(int index, int len, const AnytypeSet& repl) const;
+
+AnytypeSet replace(int index, int len, const AnytypeSet_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class AnytypeSet_template : public Restricted_Length_Template {
+union {
+struct {
+int n_elements;
+anytype_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+AnytypeSet_template *list_value;
+} value_list;
+struct {
+unsigned int n_items;
+anytype_template *set_items;
+} value_set;
+};
+void copy_value(const AnytypeSet& other_value);
+void copy_template(const AnytypeSet_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+static boolean match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+static void log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy);
+
+public:
+AnytypeSet_template();
+AnytypeSet_template(template_sel other_value);
+AnytypeSet_template(null_type other_value);
+AnytypeSet_template(const AnytypeSet& other_value);
+AnytypeSet_template(const OPTIONAL<AnytypeSet>& other_value);
+AnytypeSet_template(const AnytypeSet_template& other_value);
+~AnytypeSet_template();
+
+void clean_up();
+AnytypeSet_template& operator=(template_sel other_value);
+AnytypeSet_template& operator=(null_type other_value);
+AnytypeSet_template& operator=(const AnytypeSet& other_value);
+AnytypeSet_template& operator=(const OPTIONAL<AnytypeSet>& other_value);
+AnytypeSet_template& operator=(const AnytypeSet_template& other_value);
+
+anytype_template& operator[](int index_value);
+anytype_template& operator[](const INTEGER& index_value);
+const anytype_template& operator[](int index_value) const;
+const anytype_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const AnytypeSet& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+AnytypeSet valueof() const;
+AnytypeSet substr(int index, int returncount) const;
+
+AnytypeSet replace(int index, int len, const AnytypeSet_template& repl) const;
+
+AnytypeSet replace(int index, int len, const AnytypeSet& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+AnytypeSet_template& list_item(unsigned int list_index);
+anytype_template& set_item(unsigned int set_index);
+void log() const;
+void log_match(const AnytypeSet& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class Protocols : public Base_Type { // enum
+friend class Protocols_template;
+public:
+enum enum_type { mtp3 = 0, sccp = 1, isup = 2, bicc = 3, qaal2 = 4, gcp = 5, bssap = 6, bssmap = 7, ranap = 8, dtap = 9, UNKNOWN_VALUE = 10, UNBOUND_VALUE = 11 };
+private:
+enum_type enum_value;
+
+public:
+Protocols();
+Protocols(int other_value);
+Protocols(enum_type other_value);
+Protocols(const Protocols& other_value);
+
+Protocols& operator=(int other_value);
+Protocols& operator=(enum_type other_value);
+Protocols& operator=(const Protocols& other_value);
+
+boolean operator==(enum_type other_value) const;
+boolean operator==(const Protocols& other_value) const;
+inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const Protocols& other_value) const { return !(*this == other_value); }
+boolean operator<(enum_type other_value) const;
+boolean operator<(const Protocols& other_value) const;
+boolean operator>(enum_type other_value) const;
+boolean operator>(const Protocols& other_value) const;
+inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
+inline boolean operator<=(const Protocols& other_value) const { return !(*this > other_value); }
+inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
+inline boolean operator>=(const Protocols& other_value) const { return !(*this < other_value); }
+
+static const char *enum_to_str(enum_type enum_par);
+static enum_type str_to_enum(const char *str_par);
+static boolean is_valid_enum(int int_par);
+
+static int enum2int(enum_type enum_par);
+static int enum2int(const Protocols& enum_par);
+int as_int() const { return enum2int(enum_value); }
+void from_int(int p_val) { *this = p_val; }
+void int2enum(int int_val);
+operator enum_type() const;
+inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; }
+inline boolean is_value() const { return enum_value != UNBOUND_VALUE; }
+inline void clean_up(){ enum_value = UNBOUND_VALUE; }
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class Protocols_template : public Base_Template {
+union {
+Protocols::enum_type single_value;
+struct {
+unsigned int n_values;
+Protocols_template *list_value;
+} value_list;
+};
+
+void copy_template(const Protocols_template& other_value);
+
+public:
+Protocols_template();
+Protocols_template(template_sel other_value);
+Protocols_template(int other_value);
+Protocols_template(Protocols::enum_type other_value);
+Protocols_template(const Protocols& other_value);
+Protocols_template(const OPTIONAL<Protocols>& other_value);
+Protocols_template(const Protocols_template& other_value);
+~Protocols_template();
+
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+Protocols_template& operator=(template_sel other_value);
+Protocols_template& operator=(int other_value);
+Protocols_template& operator=(Protocols::enum_type other_value);
+Protocols_template& operator=(const Protocols& other_value);
+Protocols_template& operator=(const OPTIONAL<Protocols>& other_value);
+Protocols_template& operator=(const Protocols_template& other_value);
+
+boolean match(Protocols::enum_type other_value, boolean legacy = FALSE) const;
+boolean match(const Protocols& other_value, boolean legacy = FALSE) const;
+Protocols::enum_type valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+Protocols_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const Protocols& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class ListOfDummy__comptype : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+COMPONENT **value_elements;
+} *val_ptr;
+
+static const COMPONENT UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const ListOfDummy__comptype& other_value);
+
+public:
+ typedef COMPONENT of_type;
+ListOfDummy__comptype();
+ListOfDummy__comptype(null_type other_value);
+ListOfDummy__comptype(const ListOfDummy__comptype& other_value);
+~ListOfDummy__comptype();
+
+void clean_up();
+ListOfDummy__comptype& operator=(null_type other_value);
+ListOfDummy__comptype& operator=(const ListOfDummy__comptype& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const ListOfDummy__comptype& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const ListOfDummy__comptype& other_value) const { return !(*this == other_value); }
+
+COMPONENT& operator[](int index_value);
+COMPONENT& operator[](const INTEGER& index_value);
+const COMPONENT& operator[](int index_value) const;
+const COMPONENT& operator[](const INTEGER& index_value) const;
+
+ListOfDummy__comptype operator<<=(int rotate_count) const;
+ListOfDummy__comptype operator<<=(const INTEGER& rotate_count) const;
+ListOfDummy__comptype operator>>=(int rotate_count) const;
+ListOfDummy__comptype operator>>=(const INTEGER& rotate_count) const;
+
+ListOfDummy__comptype operator+(const ListOfDummy__comptype& other_value) const;
+
+ListOfDummy__comptype substr(int index, int returncount) const;
+
+ListOfDummy__comptype replace(int index, int len, const ListOfDummy__comptype& repl) const;
+
+ListOfDummy__comptype replace(int index, int len, const ListOfDummy__comptype_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class ListOfDummy__comptype_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+COMPONENT_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+ListOfDummy__comptype_template *list_value;
+} value_list;
+};
+void copy_value(const ListOfDummy__comptype& other_value);
+void copy_template(const ListOfDummy__comptype_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+ListOfDummy__comptype_template();
+ListOfDummy__comptype_template(template_sel other_value);
+ListOfDummy__comptype_template(null_type other_value);
+ListOfDummy__comptype_template(const ListOfDummy__comptype& other_value);
+ListOfDummy__comptype_template(const OPTIONAL<ListOfDummy__comptype>& other_value);
+ListOfDummy__comptype_template(const ListOfDummy__comptype_template& other_value);
+~ListOfDummy__comptype_template();
+
+void clean_up();
+ListOfDummy__comptype_template& operator=(template_sel other_value);
+ListOfDummy__comptype_template& operator=(null_type other_value);
+ListOfDummy__comptype_template& operator=(const ListOfDummy__comptype& other_value);
+ListOfDummy__comptype_template& operator=(const OPTIONAL<ListOfDummy__comptype>& other_value);
+ListOfDummy__comptype_template& operator=(const ListOfDummy__comptype_template& other_value);
+
+COMPONENT_template& operator[](int index_value);
+COMPONENT_template& operator[](const INTEGER& index_value);
+const COMPONENT_template& operator[](int index_value) const;
+const COMPONENT_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const ListOfDummy__comptype& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+ListOfDummy__comptype valueof() const;
+ListOfDummy__comptype substr(int index, int returncount) const;
+
+ListOfDummy__comptype replace(int index, int len, const ListOfDummy__comptype_template& repl) const;
+
+ListOfDummy__comptype replace(int index, int len, const ListOfDummy__comptype& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+ListOfDummy__comptype_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const ListOfDummy__comptype& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class ListOfDummy__CT : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+COMPONENT **value_elements;
+} *val_ptr;
+
+static const COMPONENT UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const ListOfDummy__CT& other_value);
+
+public:
+ typedef COMPONENT of_type;
+ListOfDummy__CT();
+ListOfDummy__CT(null_type other_value);
+ListOfDummy__CT(const ListOfDummy__CT& other_value);
+~ListOfDummy__CT();
+
+void clean_up();
+ListOfDummy__CT& operator=(null_type other_value);
+ListOfDummy__CT& operator=(const ListOfDummy__CT& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const ListOfDummy__CT& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const ListOfDummy__CT& other_value) const { return !(*this == other_value); }
+
+COMPONENT& operator[](int index_value);
+COMPONENT& operator[](const INTEGER& index_value);
+const COMPONENT& operator[](int index_value) const;
+const COMPONENT& operator[](const INTEGER& index_value) const;
+
+ListOfDummy__CT operator<<=(int rotate_count) const;
+ListOfDummy__CT operator<<=(const INTEGER& rotate_count) const;
+ListOfDummy__CT operator>>=(int rotate_count) const;
+ListOfDummy__CT operator>>=(const INTEGER& rotate_count) const;
+
+ListOfDummy__CT operator+(const ListOfDummy__CT& other_value) const;
+
+ListOfDummy__CT substr(int index, int returncount) const;
+
+ListOfDummy__CT replace(int index, int len, const ListOfDummy__CT& repl) const;
+
+ListOfDummy__CT replace(int index, int len, const ListOfDummy__CT_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class ListOfDummy__CT_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+COMPONENT_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+ListOfDummy__CT_template *list_value;
+} value_list;
+};
+void copy_value(const ListOfDummy__CT& other_value);
+void copy_template(const ListOfDummy__CT_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+ListOfDummy__CT_template();
+ListOfDummy__CT_template(template_sel other_value);
+ListOfDummy__CT_template(null_type other_value);
+ListOfDummy__CT_template(const ListOfDummy__CT& other_value);
+ListOfDummy__CT_template(const OPTIONAL<ListOfDummy__CT>& other_value);
+ListOfDummy__CT_template(const ListOfDummy__CT_template& other_value);
+~ListOfDummy__CT_template();
+
+void clean_up();
+ListOfDummy__CT_template& operator=(template_sel other_value);
+ListOfDummy__CT_template& operator=(null_type other_value);
+ListOfDummy__CT_template& operator=(const ListOfDummy__CT& other_value);
+ListOfDummy__CT_template& operator=(const OPTIONAL<ListOfDummy__CT>& other_value);
+ListOfDummy__CT_template& operator=(const ListOfDummy__CT_template& other_value);
+
+COMPONENT_template& operator[](int index_value);
+COMPONENT_template& operator[](const INTEGER& index_value);
+const COMPONENT_template& operator[](int index_value) const;
+const COMPONENT_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const ListOfDummy__CT& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+ListOfDummy__CT valueof() const;
+ListOfDummy__CT substr(int index, int returncount) const;
+
+ListOfDummy__CT replace(int index, int len, const ListOfDummy__CT_template& repl) const;
+
+ListOfDummy__CT replace(int index, int len, const ListOfDummy__CT& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+ListOfDummy__CT_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const ListOfDummy__CT& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+class ProtocolList : public Base_Type {
+struct recordof_setof_struct {
+int ref_count;
+int n_elements;
+Protocols **value_elements;
+} *val_ptr;
+
+static const Protocols UNBOUND_ELEM;
+private:
+friend boolean operator==(null_type null_value, const ProtocolList& other_value);
+
+public:
+ typedef Protocols of_type;
+ProtocolList();
+ProtocolList(null_type other_value);
+ProtocolList(const ProtocolList& other_value);
+~ProtocolList();
+
+void clean_up();
+ProtocolList& operator=(null_type other_value);
+ProtocolList& operator=(const ProtocolList& other_value);
+
+boolean operator==(null_type other_value) const;
+boolean operator==(const ProtocolList& other_value) const;
+inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
+inline boolean operator!=(const ProtocolList& other_value) const { return !(*this == other_value); }
+
+Protocols& operator[](int index_value);
+Protocols& operator[](const INTEGER& index_value);
+const Protocols& operator[](int index_value) const;
+const Protocols& operator[](const INTEGER& index_value) const;
+
+ProtocolList operator<<=(int rotate_count) const;
+ProtocolList operator<<=(const INTEGER& rotate_count) const;
+ProtocolList operator>>=(int rotate_count) const;
+ProtocolList operator>>=(const INTEGER& rotate_count) const;
+
+ProtocolList operator+(const ProtocolList& other_value) const;
+
+ProtocolList substr(int index, int returncount) const;
+
+ProtocolList replace(int index, int len, const ProtocolList& repl) const;
+
+ProtocolList replace(int index, int len, const ProtocolList_template& repl) const;
+
+void set_size(int new_size);
+inline boolean is_bound() const {return val_ptr != NULL; }
+inline boolean is_present() const { return is_bound(); }
+boolean is_value() const;
+int size_of() const;
+int n_elem() const { return size_of(); }
+int lengthof() const;
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class ProtocolList_template : public Record_Of_Template {
+union {
+struct {
+int n_elements;
+Protocols_template **value_elements;
+} single_value;
+struct {
+unsigned int n_values;
+ProtocolList_template *list_value;
+} value_list;
+};
+void copy_value(const ProtocolList& other_value);
+void copy_template(const ProtocolList_template& other_value);
+static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);
+
+public:
+ProtocolList_template();
+ProtocolList_template(template_sel other_value);
+ProtocolList_template(null_type other_value);
+ProtocolList_template(const ProtocolList& other_value);
+ProtocolList_template(const OPTIONAL<ProtocolList>& other_value);
+ProtocolList_template(const ProtocolList_template& other_value);
+~ProtocolList_template();
+
+void clean_up();
+ProtocolList_template& operator=(template_sel other_value);
+ProtocolList_template& operator=(null_type other_value);
+ProtocolList_template& operator=(const ProtocolList& other_value);
+ProtocolList_template& operator=(const OPTIONAL<ProtocolList>& other_value);
+ProtocolList_template& operator=(const ProtocolList_template& other_value);
+
+Protocols_template& operator[](int index_value);
+Protocols_template& operator[](const INTEGER& index_value);
+const Protocols_template& operator[](int index_value) const;
+const Protocols_template& operator[](const INTEGER& index_value) const;
+
+void set_size(int new_size);
+int n_elem() const;
+int size_of(boolean is_size) const;
+inline int size_of() const { return size_of(TRUE); }
+inline int lengthof() const { return size_of(FALSE); }
+boolean match(const ProtocolList& other_value, boolean legacy = FALSE) const;
+inline boolean is_bound() const
+ {return template_selection != UNINITIALIZED_TEMPLATE; }
+boolean is_value() const;
+ProtocolList valueof() const;
+ProtocolList substr(int index, int returncount) const;
+
+ProtocolList replace(int index, int len, const ProtocolList_template& repl) const;
+
+ProtocolList replace(int index, int len, const ProtocolList& repl) const;
+
+void set_type(template_sel template_type, unsigned int list_length);
+ProtocolList_template& list_item(unsigned int list_index);
+void log() const;
+void log_match(const ProtocolList& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean get_istemplate_kind(const char* type) const;
+};
+
+
+/* Function prototypes */
+
+extern boolean operator==(null_type null_value, const Integer__array& other_value);
+inline boolean operator!=(null_type null_value, const Integer__array& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const Verdicttypes& other_value);
+inline boolean operator!=(null_type null_value, const Verdicttypes& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const VerdicttypeSet& other_value);
+inline boolean operator!=(null_type null_value, const VerdicttypeSet& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const Anytypes& other_value);
+inline boolean operator!=(null_type null_value, const Anytypes& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const AnytypeSet& other_value);
+inline boolean operator!=(null_type null_value, const AnytypeSet& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const ListOfDummy__comptype& other_value);
+inline boolean operator!=(null_type null_value, const ListOfDummy__comptype& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const ListOfDummy__CT& other_value);
+inline boolean operator!=(null_type null_value, const ListOfDummy__CT& other_value) { return !(null_value == other_value); }
+extern boolean operator==(null_type null_value, const ProtocolList& other_value);
+inline boolean operator!=(null_type null_value, const ProtocolList& other_value) { return !(null_value == other_value); }
+
+/* Global variable declarations */
+
+extern const TTCN_RAWdescriptor_t BIT1n_raw_;
+extern const XERdescriptor_t BIT1n_xer_;
+extern const TTCN_OERdescriptor_t BIT1n_oer_;
+extern const TTCN_Typedescriptor_t BIT1n_descr_;
+extern const TTCN_RAWdescriptor_t BIT2n_raw_;
+extern const XERdescriptor_t BIT2n_xer_;
+extern const TTCN_OERdescriptor_t BIT2n_oer_;
+extern const TTCN_Typedescriptor_t BIT2n_descr_;
+extern const TTCN_RAWdescriptor_t BIT3n_raw_;
+extern const XERdescriptor_t BIT3n_xer_;
+extern const TTCN_OERdescriptor_t BIT3n_oer_;
+extern const TTCN_Typedescriptor_t BIT3n_descr_;
+extern const TTCN_RAWdescriptor_t BIT4n_raw_;
+extern const XERdescriptor_t BIT4n_xer_;
+extern const TTCN_OERdescriptor_t BIT4n_oer_;
+extern const TTCN_Typedescriptor_t BIT4n_descr_;
+extern const TTCN_RAWdescriptor_t BIT5n_raw_;
+extern const XERdescriptor_t BIT5n_xer_;
+extern const TTCN_OERdescriptor_t BIT5n_oer_;
+extern const TTCN_Typedescriptor_t BIT5n_descr_;
+extern const TTCN_RAWdescriptor_t BIT6n_raw_;
+extern const XERdescriptor_t BIT6n_xer_;
+extern const TTCN_OERdescriptor_t BIT6n_oer_;
+extern const TTCN_Typedescriptor_t BIT6n_descr_;
+extern const TTCN_RAWdescriptor_t BIT7n_raw_;
+extern const XERdescriptor_t BIT7n_xer_;
+extern const TTCN_OERdescriptor_t BIT7n_oer_;
+extern const TTCN_Typedescriptor_t BIT7n_descr_;
+extern const TTCN_RAWdescriptor_t BIT8n_raw_;
+extern const XERdescriptor_t BIT8n_xer_;
+extern const TTCN_OERdescriptor_t BIT8n_oer_;
+extern const TTCN_Typedescriptor_t BIT8n_descr_;
+extern const TTCN_RAWdescriptor_t BIT9n_raw_;
+extern const XERdescriptor_t BIT9n_xer_;
+extern const TTCN_OERdescriptor_t BIT9n_oer_;
+extern const TTCN_Typedescriptor_t BIT9n_descr_;
+extern const TTCN_RAWdescriptor_t BIT12n_raw_;
+extern const XERdescriptor_t BIT12n_xer_;
+extern const TTCN_OERdescriptor_t BIT12n_oer_;
+extern const TTCN_Typedescriptor_t BIT12n_descr_;
+extern const TTCN_RAWdescriptor_t BIT14n_raw_;
+extern const XERdescriptor_t BIT14n_xer_;
+extern const TTCN_OERdescriptor_t BIT14n_oer_;
+extern const TTCN_Typedescriptor_t BIT14n_descr_;
+extern const TTCN_RAWdescriptor_t BIT15n_raw_;
+extern const XERdescriptor_t BIT15n_xer_;
+extern const TTCN_OERdescriptor_t BIT15n_oer_;
+extern const TTCN_Typedescriptor_t BIT15n_descr_;
+extern const TTCN_RAWdescriptor_t BIT16n_raw_;
+extern const XERdescriptor_t BIT16n_xer_;
+extern const TTCN_OERdescriptor_t BIT16n_oer_;
+extern const TTCN_Typedescriptor_t BIT16n_descr_;
+extern const TTCN_RAWdescriptor_t BIT56n_raw_;
+extern const XERdescriptor_t BIT56n_xer_;
+extern const TTCN_OERdescriptor_t BIT56n_oer_;
+extern const TTCN_Typedescriptor_t BIT56n_descr_;
+extern const TTCN_RAWdescriptor_t BIT14__24n_raw_;
+extern const XERdescriptor_t BIT14__24n_xer_;
+extern const TTCN_OERdescriptor_t BIT14__24n_oer_;
+extern const TTCN_Typedescriptor_t BIT14__24n_descr_;
+extern const TTCN_RAWdescriptor_t BIT1np_raw_;
+extern const XERdescriptor_t BIT1np_xer_;
+extern const TTCN_OERdescriptor_t BIT1np_oer_;
+extern const TTCN_Typedescriptor_t BIT1np_descr_;
+extern const TTCN_RAWdescriptor_t BIT2np_raw_;
+extern const XERdescriptor_t BIT2np_xer_;
+extern const TTCN_OERdescriptor_t BIT2np_oer_;
+extern const TTCN_Typedescriptor_t BIT2np_descr_;
+extern const TTCN_RAWdescriptor_t BIT3np_raw_;
+extern const XERdescriptor_t BIT3np_xer_;
+extern const TTCN_OERdescriptor_t BIT3np_oer_;
+extern const TTCN_Typedescriptor_t BIT3np_descr_;
+extern const TTCN_RAWdescriptor_t BIT4np_raw_;
+extern const XERdescriptor_t BIT4np_xer_;
+extern const TTCN_OERdescriptor_t BIT4np_oer_;
+extern const TTCN_Typedescriptor_t BIT4np_descr_;
+extern const TTCN_RAWdescriptor_t BIT5np_raw_;
+extern const XERdescriptor_t BIT5np_xer_;
+extern const TTCN_OERdescriptor_t BIT5np_oer_;
+extern const TTCN_Typedescriptor_t BIT5np_descr_;
+extern const TTCN_RAWdescriptor_t BIT6np_raw_;
+extern const XERdescriptor_t BIT6np_xer_;
+extern const TTCN_OERdescriptor_t BIT6np_oer_;
+extern const TTCN_Typedescriptor_t BIT6np_descr_;
+extern const TTCN_RAWdescriptor_t BIT7np_raw_;
+extern const XERdescriptor_t BIT7np_xer_;
+extern const TTCN_OERdescriptor_t BIT7np_oer_;
+extern const TTCN_Typedescriptor_t BIT7np_descr_;
+extern const TTCN_RAWdescriptor_t BIT15np_raw_;
+extern const XERdescriptor_t BIT15np_xer_;
+extern const TTCN_OERdescriptor_t BIT15np_oer_;
+extern const TTCN_Typedescriptor_t BIT15np_descr_;
+extern const TTCN_RAWdescriptor_t BIT1_raw_;
+extern const XERdescriptor_t BIT1_xer_;
+extern const TTCN_OERdescriptor_t BIT1_oer_;
+extern const TTCN_Typedescriptor_t BIT1_descr_;
+extern const TTCN_RAWdescriptor_t BIT2_raw_;
+extern const XERdescriptor_t BIT2_xer_;
+extern const TTCN_OERdescriptor_t BIT2_oer_;
+extern const TTCN_Typedescriptor_t BIT2_descr_;
+extern const TTCN_RAWdescriptor_t BIT3_raw_;
+extern const XERdescriptor_t BIT3_xer_;
+extern const TTCN_OERdescriptor_t BIT3_oer_;
+extern const TTCN_Typedescriptor_t BIT3_descr_;
+extern const TTCN_RAWdescriptor_t BIT4_raw_;
+extern const XERdescriptor_t BIT4_xer_;
+extern const TTCN_OERdescriptor_t BIT4_oer_;
+extern const TTCN_Typedescriptor_t BIT4_descr_;
+extern const TTCN_RAWdescriptor_t BIT5_raw_;
+extern const XERdescriptor_t BIT5_xer_;
+extern const TTCN_OERdescriptor_t BIT5_oer_;
+extern const TTCN_Typedescriptor_t BIT5_descr_;
+extern const TTCN_RAWdescriptor_t BIT6_raw_;
+extern const XERdescriptor_t BIT6_xer_;
+extern const TTCN_OERdescriptor_t BIT6_oer_;
+extern const TTCN_Typedescriptor_t BIT6_descr_;
+extern const TTCN_RAWdescriptor_t BIT7_raw_;
+extern const XERdescriptor_t BIT7_xer_;
+extern const TTCN_OERdescriptor_t BIT7_oer_;
+extern const TTCN_Typedescriptor_t BIT7_descr_;
+extern const TTCN_RAWdescriptor_t BIT8_raw_;
+extern const XERdescriptor_t BIT8_xer_;
+extern const TTCN_OERdescriptor_t BIT8_oer_;
+extern const TTCN_Typedescriptor_t BIT8_descr_;
+extern const TTCN_RAWdescriptor_t BIT9_raw_;
+extern const XERdescriptor_t BIT9_xer_;
+extern const TTCN_OERdescriptor_t BIT9_oer_;
+extern const TTCN_Typedescriptor_t BIT9_descr_;
+extern const TTCN_RAWdescriptor_t BIT10_raw_;
+extern const XERdescriptor_t BIT10_xer_;
+extern const TTCN_OERdescriptor_t BIT10_oer_;
+extern const TTCN_Typedescriptor_t BIT10_descr_;
+extern const TTCN_RAWdescriptor_t BIT11_raw_;
+extern const XERdescriptor_t BIT11_xer_;
+extern const TTCN_OERdescriptor_t BIT11_oer_;
+extern const TTCN_Typedescriptor_t BIT11_descr_;
+extern const TTCN_RAWdescriptor_t BIT12_raw_;
+extern const XERdescriptor_t BIT12_xer_;
+extern const TTCN_OERdescriptor_t BIT12_oer_;
+extern const TTCN_Typedescriptor_t BIT12_descr_;
+extern const TTCN_RAWdescriptor_t BIT14_raw_;
+extern const XERdescriptor_t BIT14_xer_;
+extern const TTCN_OERdescriptor_t BIT14_oer_;
+extern const TTCN_Typedescriptor_t BIT14_descr_;
+extern const TTCN_RAWdescriptor_t BIT15_raw_;
+extern const XERdescriptor_t BIT15_xer_;
+extern const TTCN_OERdescriptor_t BIT15_oer_;
+extern const TTCN_Typedescriptor_t BIT15_descr_;
+extern const TTCN_RAWdescriptor_t BIT16_raw_;
+extern const XERdescriptor_t BIT16_xer_;
+extern const TTCN_OERdescriptor_t BIT16_oer_;
+extern const TTCN_Typedescriptor_t BIT16_descr_;
+extern const TTCN_RAWdescriptor_t BIT24_raw_;
+extern const XERdescriptor_t BIT24_xer_;
+extern const TTCN_OERdescriptor_t BIT24_oer_;
+extern const TTCN_Typedescriptor_t BIT24_descr_;
+extern const TTCN_RAWdescriptor_t BIT31_raw_;
+extern const XERdescriptor_t BIT31_xer_;
+extern const TTCN_OERdescriptor_t BIT31_oer_;
+extern const TTCN_Typedescriptor_t BIT31_descr_;
+extern const TTCN_RAWdescriptor_t BIT56_raw_;
+extern const XERdescriptor_t BIT56_xer_;
+extern const TTCN_OERdescriptor_t BIT56_oer_;
+extern const TTCN_Typedescriptor_t BIT56_descr_;
+extern const TTCN_RAWdescriptor_t Bitstrings_raw_;
+extern const TTCN_Typedescriptor_t Bitstrings_descr_;
+extern const XERdescriptor_t Bitstrings_0_xer_;
+extern const TTCN_OERdescriptor_t Bitstrings_0_oer_;
+extern const TTCN_Typedescriptor_t Bitstrings_0_descr_;
+extern const TTCN_Typedescriptor_t& BitstringList_descr_;
+extern const TTCN_RAWdescriptor_t BitstringSet_raw_;
+extern const TTCN_Typedescriptor_t BitstringSet_descr_;
+extern const XERdescriptor_t BitstringSet_0_xer_;
+extern const TTCN_OERdescriptor_t BitstringSet_0_oer_;
+extern const TTCN_Typedescriptor_t BitstringSet_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT0n_raw_;
+extern const XERdescriptor_t OCT0n_xer_;
+extern const TTCN_OERdescriptor_t OCT0n_oer_;
+extern const TTCN_Typedescriptor_t OCT0n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1n_raw_;
+extern const XERdescriptor_t OCT1n_xer_;
+extern const TTCN_OERdescriptor_t OCT1n_oer_;
+extern const TTCN_Typedescriptor_t OCT1n_descr_;
+extern const TTCN_RAWdescriptor_t OCT2n_raw_;
+extern const XERdescriptor_t OCT2n_xer_;
+extern const TTCN_OERdescriptor_t OCT2n_oer_;
+extern const TTCN_Typedescriptor_t OCT2n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3n_raw_;
+extern const XERdescriptor_t OCT3n_xer_;
+extern const TTCN_OERdescriptor_t OCT3n_oer_;
+extern const TTCN_Typedescriptor_t OCT3n_descr_;
+extern const TTCN_RAWdescriptor_t OCT4n_raw_;
+extern const XERdescriptor_t OCT4n_xer_;
+extern const TTCN_OERdescriptor_t OCT4n_oer_;
+extern const TTCN_Typedescriptor_t OCT4n_descr_;
+extern const TTCN_RAWdescriptor_t OCT5n_raw_;
+extern const XERdescriptor_t OCT5n_xer_;
+extern const TTCN_OERdescriptor_t OCT5n_oer_;
+extern const TTCN_Typedescriptor_t OCT5n_descr_;
+extern const TTCN_RAWdescriptor_t OCT6n_raw_;
+extern const XERdescriptor_t OCT6n_xer_;
+extern const TTCN_OERdescriptor_t OCT6n_oer_;
+extern const TTCN_Typedescriptor_t OCT6n_descr_;
+extern const TTCN_RAWdescriptor_t OCT7n_raw_;
+extern const XERdescriptor_t OCT7n_xer_;
+extern const TTCN_OERdescriptor_t OCT7n_oer_;
+extern const TTCN_Typedescriptor_t OCT7n_descr_;
+extern const TTCN_RAWdescriptor_t OCT8n_raw_;
+extern const XERdescriptor_t OCT8n_xer_;
+extern const TTCN_OERdescriptor_t OCT8n_oer_;
+extern const TTCN_Typedescriptor_t OCT8n_descr_;
+extern const TTCN_RAWdescriptor_t OCT9n_raw_;
+extern const XERdescriptor_t OCT9n_xer_;
+extern const TTCN_OERdescriptor_t OCT9n_oer_;
+extern const TTCN_Typedescriptor_t OCT9n_descr_;
+extern const TTCN_RAWdescriptor_t OCT10n_raw_;
+extern const XERdescriptor_t OCT10n_xer_;
+extern const TTCN_OERdescriptor_t OCT10n_oer_;
+extern const TTCN_Typedescriptor_t OCT10n_descr_;
+extern const TTCN_RAWdescriptor_t OCT11n_raw_;
+extern const XERdescriptor_t OCT11n_xer_;
+extern const TTCN_OERdescriptor_t OCT11n_oer_;
+extern const TTCN_Typedescriptor_t OCT11n_descr_;
+extern const TTCN_RAWdescriptor_t OCT12n_raw_;
+extern const XERdescriptor_t OCT12n_xer_;
+extern const TTCN_OERdescriptor_t OCT12n_oer_;
+extern const TTCN_Typedescriptor_t OCT12n_descr_;
+extern const TTCN_RAWdescriptor_t OCT13n_raw_;
+extern const XERdescriptor_t OCT13n_xer_;
+extern const TTCN_OERdescriptor_t OCT13n_oer_;
+extern const TTCN_Typedescriptor_t OCT13n_descr_;
+extern const TTCN_RAWdescriptor_t OCT14n_raw_;
+extern const XERdescriptor_t OCT14n_xer_;
+extern const TTCN_OERdescriptor_t OCT14n_oer_;
+extern const TTCN_Typedescriptor_t OCT14n_descr_;
+extern const TTCN_RAWdescriptor_t OCT15n_raw_;
+extern const XERdescriptor_t OCT15n_xer_;
+extern const TTCN_OERdescriptor_t OCT15n_oer_;
+extern const TTCN_Typedescriptor_t OCT15n_descr_;
+extern const TTCN_RAWdescriptor_t OCT16n_raw_;
+extern const XERdescriptor_t OCT16n_xer_;
+extern const TTCN_OERdescriptor_t OCT16n_oer_;
+extern const TTCN_Typedescriptor_t OCT16n_descr_;
+extern const TTCN_RAWdescriptor_t OCT17n_raw_;
+extern const XERdescriptor_t OCT17n_xer_;
+extern const TTCN_OERdescriptor_t OCT17n_oer_;
+extern const TTCN_Typedescriptor_t OCT17n_descr_;
+extern const TTCN_RAWdescriptor_t OCT18n_raw_;
+extern const XERdescriptor_t OCT18n_xer_;
+extern const TTCN_OERdescriptor_t OCT18n_oer_;
+extern const TTCN_Typedescriptor_t OCT18n_descr_;
+extern const TTCN_RAWdescriptor_t OCT19n_raw_;
+extern const XERdescriptor_t OCT19n_xer_;
+extern const TTCN_OERdescriptor_t OCT19n_oer_;
+extern const TTCN_Typedescriptor_t OCT19n_descr_;
+extern const TTCN_RAWdescriptor_t OCT20n_raw_;
+extern const XERdescriptor_t OCT20n_xer_;
+extern const TTCN_OERdescriptor_t OCT20n_oer_;
+extern const TTCN_Typedescriptor_t OCT20n_descr_;
+extern const TTCN_RAWdescriptor_t OCT28n_raw_;
+extern const XERdescriptor_t OCT28n_xer_;
+extern const TTCN_OERdescriptor_t OCT28n_oer_;
+extern const TTCN_Typedescriptor_t OCT28n_descr_;
+extern const TTCN_RAWdescriptor_t OCT32n_raw_;
+extern const XERdescriptor_t OCT32n_xer_;
+extern const TTCN_OERdescriptor_t OCT32n_oer_;
+extern const TTCN_Typedescriptor_t OCT32n_descr_;
+extern const TTCN_RAWdescriptor_t OCT34n_raw_;
+extern const XERdescriptor_t OCT34n_xer_;
+extern const TTCN_OERdescriptor_t OCT34n_oer_;
+extern const TTCN_Typedescriptor_t OCT34n_descr_;
+extern const TTCN_RAWdescriptor_t OCT46n_raw_;
+extern const XERdescriptor_t OCT46n_xer_;
+extern const TTCN_OERdescriptor_t OCT46n_oer_;
+extern const TTCN_Typedescriptor_t OCT46n_descr_;
+extern const TTCN_RAWdescriptor_t OCT50n_raw_;
+extern const XERdescriptor_t OCT50n_xer_;
+extern const TTCN_OERdescriptor_t OCT50n_oer_;
+extern const TTCN_Typedescriptor_t OCT50n_descr_;
+extern const TTCN_RAWdescriptor_t OCT69n_raw_;
+extern const XERdescriptor_t OCT69n_xer_;
+extern const TTCN_OERdescriptor_t OCT69n_oer_;
+extern const TTCN_Typedescriptor_t OCT69n_descr_;
+extern const TTCN_RAWdescriptor_t OCT100n_raw_;
+extern const XERdescriptor_t OCT100n_xer_;
+extern const TTCN_OERdescriptor_t OCT100n_oer_;
+extern const TTCN_Typedescriptor_t OCT100n_descr_;
+extern const TTCN_RAWdescriptor_t OCT128n_raw_;
+extern const XERdescriptor_t OCT128n_xer_;
+extern const TTCN_OERdescriptor_t OCT128n_oer_;
+extern const TTCN_Typedescriptor_t OCT128n_descr_;
+extern const TTCN_RAWdescriptor_t OCT500n_raw_;
+extern const XERdescriptor_t OCT500n_xer_;
+extern const TTCN_OERdescriptor_t OCT500n_oer_;
+extern const TTCN_Typedescriptor_t OCT500n_descr_;
+extern const TTCN_RAWdescriptor_t OCTNn_raw_;
+extern const XERdescriptor_t OCTNn_xer_;
+extern const TTCN_OERdescriptor_t OCTNn_oer_;
+extern const TTCN_Typedescriptor_t OCTNn_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__3n_raw_;
+extern const XERdescriptor_t OCT1__3n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__3n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__3n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__4n_raw_;
+extern const XERdescriptor_t OCT1__4n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__4n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__4n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__5n_raw_;
+extern const XERdescriptor_t OCT1__5n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__5n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__5n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__6n_raw_;
+extern const XERdescriptor_t OCT1__6n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__6n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__6n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__7n_raw_;
+extern const XERdescriptor_t OCT1__7n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__7n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__7n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__8n_raw_;
+extern const XERdescriptor_t OCT1__8n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__8n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__8n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__12n_raw_;
+extern const XERdescriptor_t OCT1__12n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__12n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__12n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__15n_raw_;
+extern const XERdescriptor_t OCT1__15n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__15n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__15n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__16n_raw_;
+extern const XERdescriptor_t OCT1__16n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__16n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__16n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__18n_raw_;
+extern const XERdescriptor_t OCT1__18n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__18n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__18n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__20n_raw_;
+extern const XERdescriptor_t OCT1__20n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__20n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__20n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__24n_raw_;
+extern const XERdescriptor_t OCT1__24n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__24n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__24n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__32n_raw_;
+extern const XERdescriptor_t OCT1__32n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__32n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__32n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__34n_raw_;
+extern const XERdescriptor_t OCT1__34n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__34n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__34n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__46n_raw_;
+extern const XERdescriptor_t OCT1__46n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__46n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__46n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__50n_raw_;
+extern const XERdescriptor_t OCT1__50n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__50n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__50n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__112n_raw_;
+extern const XERdescriptor_t OCT1__112n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__112n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__112n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__127n_raw_;
+extern const XERdescriptor_t OCT1__127n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__127n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__127n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__128n_raw_;
+extern const XERdescriptor_t OCT1__128n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__128n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__128n_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__172n_raw_;
+extern const XERdescriptor_t OCT1__172n_xer_;
+extern const TTCN_OERdescriptor_t OCT1__172n_oer_;
+extern const TTCN_Typedescriptor_t OCT1__172n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__5n_raw_;
+extern const XERdescriptor_t OCT3__5n_xer_;
+extern const TTCN_OERdescriptor_t OCT3__5n_oer_;
+extern const TTCN_Typedescriptor_t OCT3__5n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__7n_raw_;
+extern const XERdescriptor_t OCT3__7n_xer_;
+extern const TTCN_OERdescriptor_t OCT3__7n_oer_;
+extern const TTCN_Typedescriptor_t OCT3__7n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__8n_raw_;
+extern const XERdescriptor_t OCT3__8n_xer_;
+extern const TTCN_OERdescriptor_t OCT3__8n_oer_;
+extern const TTCN_Typedescriptor_t OCT3__8n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__14n_raw_;
+extern const XERdescriptor_t OCT3__14n_xer_;
+extern const TTCN_OERdescriptor_t OCT3__14n_oer_;
+extern const TTCN_Typedescriptor_t OCT3__14n_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__17n_raw_;
+extern const XERdescriptor_t OCT3__17n_xer_;
+extern const TTCN_OERdescriptor_t OCT3__17n_oer_;
+extern const TTCN_Typedescriptor_t OCT3__17n_descr_;
+extern const TTCN_RAWdescriptor_t OCT4__8n_raw_;
+extern const XERdescriptor_t OCT4__8n_xer_;
+extern const TTCN_OERdescriptor_t OCT4__8n_oer_;
+extern const TTCN_Typedescriptor_t OCT4__8n_descr_;
+extern const TTCN_RAWdescriptor_t Octetstrings_raw_;
+extern const TTCN_Typedescriptor_t Octetstrings_descr_;
+extern const XERdescriptor_t Octetstrings_0_xer_;
+extern const TTCN_OERdescriptor_t Octetstrings_0_oer_;
+extern const TTCN_Typedescriptor_t Octetstrings_0_descr_;
+extern const TTCN_Typedescriptor_t& OctetstringList_descr_;
+extern const TTCN_RAWdescriptor_t OctetstringSet_raw_;
+extern const TTCN_Typedescriptor_t OctetstringSet_descr_;
+extern const XERdescriptor_t OctetstringSet_0_xer_;
+extern const TTCN_OERdescriptor_t OctetstringSet_0_oer_;
+extern const TTCN_Typedescriptor_t OctetstringSet_0_descr_;
+extern const TTCN_RAWdescriptor_t CHAR4_raw_;
+extern const XERdescriptor_t CHAR4_xer_;
+extern const TTCN_Typedescriptor_t CHAR4_descr_;
+extern const TTCN_RAWdescriptor_t Charstrings_raw_;
+extern const TTCN_Typedescriptor_t Charstrings_descr_;
+extern const XERdescriptor_t Charstrings_0_xer_;
+extern const TTCN_Typedescriptor_t Charstrings_0_descr_;
+extern const TTCN_Typedescriptor_t& CharstringList_descr_;
+extern const TTCN_RAWdescriptor_t CharstringSet_raw_;
+extern const TTCN_Typedescriptor_t CharstringSet_descr_;
+extern const XERdescriptor_t CharstringSet_0_xer_;
+extern const TTCN_Typedescriptor_t CharstringSet_0_descr_;
+extern const TTCN_RAWdescriptor_t HEX4n_raw_;
+extern const XERdescriptor_t HEX4n_xer_;
+extern const TTCN_Typedescriptor_t HEX4n_descr_;
+extern const TTCN_RAWdescriptor_t HEX6n_raw_;
+extern const XERdescriptor_t HEX6n_xer_;
+extern const TTCN_Typedescriptor_t HEX6n_descr_;
+extern const TTCN_RAWdescriptor_t HEX8n_raw_;
+extern const XERdescriptor_t HEX8n_xer_;
+extern const TTCN_Typedescriptor_t HEX8n_descr_;
+extern const TTCN_RAWdescriptor_t HEX15n_raw_;
+extern const XERdescriptor_t HEX15n_xer_;
+extern const TTCN_Typedescriptor_t HEX15n_descr_;
+extern const TTCN_RAWdescriptor_t HEX16n_raw_;
+extern const XERdescriptor_t HEX16n_xer_;
+extern const TTCN_Typedescriptor_t HEX16n_descr_;
+extern const TTCN_RAWdescriptor_t HEX24n_raw_;
+extern const XERdescriptor_t HEX24n_xer_;
+extern const TTCN_Typedescriptor_t HEX24n_descr_;
+extern const TTCN_RAWdescriptor_t HEX0__18n_raw_;
+extern const XERdescriptor_t HEX0__18n_xer_;
+extern const TTCN_Typedescriptor_t HEX0__18n_descr_;
+extern const TTCN_RAWdescriptor_t HEX1__20n_raw_;
+extern const XERdescriptor_t HEX1__20n_xer_;
+extern const TTCN_Typedescriptor_t HEX1__20n_descr_;
+extern const TTCN_RAWdescriptor_t HEX1__34n_raw_;
+extern const XERdescriptor_t HEX1__34n_xer_;
+extern const TTCN_Typedescriptor_t HEX1__34n_descr_;
+extern const TTCN_RAWdescriptor_t Hexstrings_raw_;
+extern const TTCN_Typedescriptor_t Hexstrings_descr_;
+extern const XERdescriptor_t Hexstrings_0_xer_;
+extern const TTCN_Typedescriptor_t Hexstrings_0_descr_;
+extern const TTCN_Typedescriptor_t& HexstringList_descr_;
+extern const TTCN_RAWdescriptor_t HexstringSet_raw_;
+extern const TTCN_Typedescriptor_t HexstringSet_descr_;
+extern const XERdescriptor_t HexstringSet_0_xer_;
+extern const TTCN_Typedescriptor_t HexstringSet_0_descr_;
+extern const TTCN_RAWdescriptor_t INT3nb_raw_;
+extern const XERdescriptor_t INT3nb_xer_;
+extern const TTCN_OERdescriptor_t INT3nb_oer_;
+extern const TTCN_Typedescriptor_t INT3nb_descr_;
+extern const TTCN_RAWdescriptor_t INT4nb_raw_;
+extern const XERdescriptor_t INT4nb_xer_;
+extern const TTCN_OERdescriptor_t INT4nb_oer_;
+extern const TTCN_Typedescriptor_t INT4nb_descr_;
+extern const TTCN_RAWdescriptor_t INT5nb_raw_;
+extern const XERdescriptor_t INT5nb_xer_;
+extern const TTCN_OERdescriptor_t INT5nb_oer_;
+extern const TTCN_Typedescriptor_t INT5nb_descr_;
+extern const TTCN_RAWdescriptor_t INT8nb_raw_;
+extern const XERdescriptor_t INT8nb_xer_;
+extern const TTCN_OERdescriptor_t INT8nb_oer_;
+extern const TTCN_Typedescriptor_t INT8nb_descr_;
+extern const TTCN_RAWdescriptor_t INT2nbp_raw_;
+extern const XERdescriptor_t INT2nbp_xer_;
+extern const TTCN_OERdescriptor_t INT2nbp_oer_;
+extern const TTCN_Typedescriptor_t INT2nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT1nbp_raw_;
+extern const XERdescriptor_t INT1nbp_xer_;
+extern const TTCN_OERdescriptor_t INT1nbp_oer_;
+extern const TTCN_Typedescriptor_t INT1nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT3nbp_raw_;
+extern const XERdescriptor_t INT3nbp_xer_;
+extern const TTCN_OERdescriptor_t INT3nbp_oer_;
+extern const TTCN_Typedescriptor_t INT3nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT5nbp_raw_;
+extern const XERdescriptor_t INT5nbp_xer_;
+extern const TTCN_OERdescriptor_t INT5nbp_oer_;
+extern const TTCN_Typedescriptor_t INT5nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT9nbp_raw_;
+extern const XERdescriptor_t INT9nbp_xer_;
+extern const TTCN_OERdescriptor_t INT9nbp_oer_;
+extern const TTCN_Typedescriptor_t INT9nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT13nbp_raw_;
+extern const XERdescriptor_t INT13nbp_xer_;
+extern const TTCN_OERdescriptor_t INT13nbp_oer_;
+extern const TTCN_Typedescriptor_t INT13nbp_descr_;
+extern const TTCN_RAWdescriptor_t INT15nbp_raw_;
+extern const XERdescriptor_t INT15nbp_xer_;
+extern const TTCN_OERdescriptor_t INT15nbp_oer_;
+extern const TTCN_Typedescriptor_t INT15nbp_descr_;
+extern const TTCN_RAWdescriptor_t Integers_raw_;
+extern const TTCN_Typedescriptor_t Integers_descr_;
+extern const XERdescriptor_t Integers_0_xer_;
+extern const TTCN_OERdescriptor_t Integers_0_oer_;
+extern const TTCN_Typedescriptor_t Integers_0_descr_;
+extern const TTCN_Typedescriptor_t& IntegerList_descr_;
+extern const TTCN_RAWdescriptor_t Integer__array_raw_;
+extern const TTCN_Typedescriptor_t Integer__array_descr_;
+extern const TTCN_RAWdescriptor_t IntegerSet_raw_;
+extern const TTCN_Typedescriptor_t IntegerSet_descr_;
+extern const XERdescriptor_t IntegerSet_0_xer_;
+extern const TTCN_OERdescriptor_t IntegerSet_0_oer_;
+extern const TTCN_Typedescriptor_t IntegerSet_0_descr_;
+extern const TTCN_RAWdescriptor_t Floats_raw_;
+extern const TTCN_Typedescriptor_t Floats_descr_;
+extern const XERdescriptor_t Floats_0_xer_;
+extern const TTCN_OERdescriptor_t Floats_0_oer_;
+extern const TTCN_Typedescriptor_t Floats_0_descr_;
+extern const TTCN_Typedescriptor_t& FloatList_descr_;
+extern const TTCN_RAWdescriptor_t FloatSet_raw_;
+extern const TTCN_Typedescriptor_t FloatSet_descr_;
+extern const XERdescriptor_t FloatSet_0_xer_;
+extern const TTCN_OERdescriptor_t FloatSet_0_oer_;
+extern const TTCN_Typedescriptor_t FloatSet_0_descr_;
+extern const TTCN_RAWdescriptor_t UniversalCharstrings_raw_;
+extern const TTCN_Typedescriptor_t UniversalCharstrings_descr_;
+extern const XERdescriptor_t UniversalCharstrings_0_xer_;
+extern const TTCN_Typedescriptor_t UniversalCharstrings_0_descr_;
+extern const TTCN_Typedescriptor_t& UniversalCharstringList_descr_;
+extern const TTCN_RAWdescriptor_t UniversalCharstringSet_raw_;
+extern const TTCN_Typedescriptor_t UniversalCharstringSet_descr_;
+extern const XERdescriptor_t UniversalCharstringSet_0_xer_;
+extern const TTCN_Typedescriptor_t UniversalCharstringSet_0_descr_;
+extern const TTCN_RAWdescriptor_t Booleans_raw_;
+extern const TTCN_Typedescriptor_t Booleans_descr_;
+extern const XERdescriptor_t Booleans_0_xer_;
+extern const TTCN_OERdescriptor_t Booleans_0_oer_;
+extern const TTCN_Typedescriptor_t Booleans_0_descr_;
+extern const TTCN_Typedescriptor_t& BooleanList_descr_;
+extern const TTCN_RAWdescriptor_t BooleanSet_raw_;
+extern const TTCN_Typedescriptor_t BooleanSet_descr_;
+extern const XERdescriptor_t BooleanSet_0_xer_;
+extern const TTCN_OERdescriptor_t BooleanSet_0_oer_;
+extern const TTCN_Typedescriptor_t BooleanSet_0_descr_;
+extern const TTCN_RAWdescriptor_t Verdicttypes_raw_;
+extern const TTCN_Typedescriptor_t Verdicttypes_descr_;
+extern const XERdescriptor_t Verdicttypes_0_xer_;
+extern const TTCN_Typedescriptor_t Verdicttypes_0_descr_;
+extern const TTCN_Typedescriptor_t& VerdicttypeList_descr_;
+extern const TTCN_RAWdescriptor_t VerdicttypeSet_raw_;
+extern const TTCN_Typedescriptor_t VerdicttypeSet_descr_;
+extern const XERdescriptor_t VerdicttypeSet_0_xer_;
+extern const TTCN_Typedescriptor_t VerdicttypeSet_0_descr_;
+extern const TTCN_RAWdescriptor_t Anytypes_raw_;
+extern const TTCN_Typedescriptor_t Anytypes_descr_;
+extern const TTCN_Typedescriptor_t anytype_descr_;
+extern const TTCN_Typedescriptor_t Anytypes_0_descr_;
+extern const TTCN_Typedescriptor_t& AnytypeList_descr_;
+extern const TTCN_RAWdescriptor_t AnytypeSet_raw_;
+extern const TTCN_Typedescriptor_t AnytypeSet_descr_;
+extern const TTCN_Typedescriptor_t AnytypeSet_0_descr_;
+extern const TTCN_RAWdescriptor_t BIT6__BO__LAST_raw_;
+extern const XERdescriptor_t BIT6__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t BIT6__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t BIT6__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t BIT16__BO__LAST_raw_;
+extern const XERdescriptor_t BIT16__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t BIT16__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t BIT16__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t BIT32__BO__LAST_raw_;
+extern const XERdescriptor_t BIT32__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t BIT32__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t BIT32__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t Dummy_raw_;
+extern const XERdescriptor_t Dummy_xer_;
+extern const TTCN_OERdescriptor_t Dummy_oer_;
+extern const TTCN_Typedescriptor_t Dummy_descr_;
+extern const TTCN_RAWdescriptor_t OCT0_raw_;
+extern const XERdescriptor_t OCT0_xer_;
+extern const TTCN_OERdescriptor_t OCT0_oer_;
+extern const TTCN_Typedescriptor_t OCT0_descr_;
+extern const TTCN_RAWdescriptor_t OCT1_raw_;
+extern const XERdescriptor_t OCT1_xer_;
+extern const TTCN_OERdescriptor_t OCT1_oer_;
+extern const TTCN_Typedescriptor_t OCT1_descr_;
+extern const TTCN_RAWdescriptor_t OCT2_raw_;
+extern const XERdescriptor_t OCT2_xer_;
+extern const TTCN_OERdescriptor_t OCT2_oer_;
+extern const TTCN_Typedescriptor_t OCT2_descr_;
+extern const TTCN_RAWdescriptor_t OCT3_raw_;
+extern const XERdescriptor_t OCT3_xer_;
+extern const TTCN_OERdescriptor_t OCT3_oer_;
+extern const TTCN_Typedescriptor_t OCT3_descr_;
+extern const TTCN_RAWdescriptor_t OCT4_raw_;
+extern const XERdescriptor_t OCT4_xer_;
+extern const TTCN_OERdescriptor_t OCT4_oer_;
+extern const TTCN_Typedescriptor_t OCT4_descr_;
+extern const TTCN_RAWdescriptor_t OCT5_raw_;
+extern const XERdescriptor_t OCT5_xer_;
+extern const TTCN_OERdescriptor_t OCT5_oer_;
+extern const TTCN_Typedescriptor_t OCT5_descr_;
+extern const TTCN_RAWdescriptor_t OCT6_raw_;
+extern const XERdescriptor_t OCT6_xer_;
+extern const TTCN_OERdescriptor_t OCT6_oer_;
+extern const TTCN_Typedescriptor_t OCT6_descr_;
+extern const TTCN_RAWdescriptor_t OCT7_raw_;
+extern const XERdescriptor_t OCT7_xer_;
+extern const TTCN_OERdescriptor_t OCT7_oer_;
+extern const TTCN_Typedescriptor_t OCT7_descr_;
+extern const TTCN_RAWdescriptor_t OCT8_raw_;
+extern const XERdescriptor_t OCT8_xer_;
+extern const TTCN_OERdescriptor_t OCT8_oer_;
+extern const TTCN_Typedescriptor_t OCT8_descr_;
+extern const TTCN_RAWdescriptor_t OCT9_raw_;
+extern const XERdescriptor_t OCT9_xer_;
+extern const TTCN_OERdescriptor_t OCT9_oer_;
+extern const TTCN_Typedescriptor_t OCT9_descr_;
+extern const TTCN_RAWdescriptor_t OCT10_raw_;
+extern const XERdescriptor_t OCT10_xer_;
+extern const TTCN_OERdescriptor_t OCT10_oer_;
+extern const TTCN_Typedescriptor_t OCT10_descr_;
+extern const TTCN_RAWdescriptor_t OCT11_raw_;
+extern const XERdescriptor_t OCT11_xer_;
+extern const TTCN_OERdescriptor_t OCT11_oer_;
+extern const TTCN_Typedescriptor_t OCT11_descr_;
+extern const TTCN_RAWdescriptor_t OCT12_raw_;
+extern const XERdescriptor_t OCT12_xer_;
+extern const TTCN_OERdescriptor_t OCT12_oer_;
+extern const TTCN_Typedescriptor_t OCT12_descr_;
+extern const TTCN_RAWdescriptor_t OCT13_raw_;
+extern const XERdescriptor_t OCT13_xer_;
+extern const TTCN_OERdescriptor_t OCT13_oer_;
+extern const TTCN_Typedescriptor_t OCT13_descr_;
+extern const TTCN_RAWdescriptor_t OCT14_raw_;
+extern const XERdescriptor_t OCT14_xer_;
+extern const TTCN_OERdescriptor_t OCT14_oer_;
+extern const TTCN_Typedescriptor_t OCT14_descr_;
+extern const TTCN_RAWdescriptor_t OCT15_raw_;
+extern const XERdescriptor_t OCT15_xer_;
+extern const TTCN_OERdescriptor_t OCT15_oer_;
+extern const TTCN_Typedescriptor_t OCT15_descr_;
+extern const TTCN_RAWdescriptor_t OCT16_raw_;
+extern const XERdescriptor_t OCT16_xer_;
+extern const TTCN_OERdescriptor_t OCT16_oer_;
+extern const TTCN_Typedescriptor_t OCT16_descr_;
+extern const TTCN_RAWdescriptor_t OCT17_raw_;
+extern const XERdescriptor_t OCT17_xer_;
+extern const TTCN_OERdescriptor_t OCT17_oer_;
+extern const TTCN_Typedescriptor_t OCT17_descr_;
+extern const TTCN_RAWdescriptor_t OCT18_raw_;
+extern const XERdescriptor_t OCT18_xer_;
+extern const TTCN_OERdescriptor_t OCT18_oer_;
+extern const TTCN_Typedescriptor_t OCT18_descr_;
+extern const TTCN_RAWdescriptor_t OCT19_raw_;
+extern const XERdescriptor_t OCT19_xer_;
+extern const TTCN_OERdescriptor_t OCT19_oer_;
+extern const TTCN_Typedescriptor_t OCT19_descr_;
+extern const TTCN_RAWdescriptor_t OCT20_raw_;
+extern const XERdescriptor_t OCT20_xer_;
+extern const TTCN_OERdescriptor_t OCT20_oer_;
+extern const TTCN_Typedescriptor_t OCT20_descr_;
+extern const TTCN_RAWdescriptor_t OCT32_raw_;
+extern const XERdescriptor_t OCT32_xer_;
+extern const TTCN_OERdescriptor_t OCT32_oer_;
+extern const TTCN_Typedescriptor_t OCT32_descr_;
+extern const TTCN_RAWdescriptor_t OCT34_raw_;
+extern const XERdescriptor_t OCT34_xer_;
+extern const TTCN_OERdescriptor_t OCT34_oer_;
+extern const TTCN_Typedescriptor_t OCT34_descr_;
+extern const TTCN_RAWdescriptor_t OCT46_raw_;
+extern const XERdescriptor_t OCT46_xer_;
+extern const TTCN_OERdescriptor_t OCT46_oer_;
+extern const TTCN_Typedescriptor_t OCT46_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__260_raw_;
+extern const XERdescriptor_t OCT1__260_xer_;
+extern const TTCN_OERdescriptor_t OCT1__260_oer_;
+extern const TTCN_Typedescriptor_t OCT1__260_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__8_raw_;
+extern const XERdescriptor_t OCT1__8_xer_;
+extern const TTCN_OERdescriptor_t OCT1__8_oer_;
+extern const TTCN_Typedescriptor_t OCT1__8_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__12_raw_;
+extern const XERdescriptor_t OCT1__12_xer_;
+extern const TTCN_OERdescriptor_t OCT1__12_oer_;
+extern const TTCN_Typedescriptor_t OCT1__12_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__32_raw_;
+extern const XERdescriptor_t OCT1__32_xer_;
+extern const TTCN_OERdescriptor_t OCT1__32_oer_;
+extern const TTCN_Typedescriptor_t OCT1__32_descr_;
+extern const TTCN_RAWdescriptor_t OCT1__50_raw_;
+extern const XERdescriptor_t OCT1__50_xer_;
+extern const TTCN_OERdescriptor_t OCT1__50_oer_;
+extern const TTCN_Typedescriptor_t OCT1__50_descr_;
+extern const TTCN_RAWdescriptor_t OCT3__8_raw_;
+extern const XERdescriptor_t OCT3__8_xer_;
+extern const TTCN_OERdescriptor_t OCT3__8_oer_;
+extern const TTCN_Typedescriptor_t OCT3__8_descr_;
+extern const TTCN_RAWdescriptor_t OCTN_raw_;
+extern const XERdescriptor_t OCTN_xer_;
+extern const TTCN_OERdescriptor_t OCTN_oer_;
+extern const TTCN_Typedescriptor_t OCTN_descr_;
+extern const TTCN_RAWdescriptor_t HEX1_raw_;
+extern const XERdescriptor_t HEX1_xer_;
+extern const TTCN_Typedescriptor_t HEX1_descr_;
+extern const TTCN_RAWdescriptor_t HEX0__16_raw_;
+extern const XERdescriptor_t HEX0__16_xer_;
+extern const TTCN_Typedescriptor_t HEX0__16_descr_;
+extern const TTCN_RAWdescriptor_t HEX5__16_raw_;
+extern const XERdescriptor_t HEX5__16_xer_;
+extern const TTCN_Typedescriptor_t HEX5__16_descr_;
+extern const TTCN_RAWdescriptor_t HEX1__32_raw_;
+extern const XERdescriptor_t HEX1__32_xer_;
+extern const TTCN_Typedescriptor_t HEX1__32_descr_;
+extern const TTCN_RAWdescriptor_t INT1_raw_;
+extern const XERdescriptor_t INT1_xer_;
+extern const TTCN_OERdescriptor_t INT1_oer_;
+extern const TTCN_Typedescriptor_t INT1_descr_;
+extern const TTCN_RAWdescriptor_t LIN1_raw_;
+extern const XERdescriptor_t LIN1_xer_;
+extern const TTCN_OERdescriptor_t LIN1_oer_;
+extern const TTCN_Typedescriptor_t LIN1_descr_;
+extern const TTCN_RAWdescriptor_t LIN2_raw_;
+extern const XERdescriptor_t LIN2_xer_;
+extern const TTCN_OERdescriptor_t LIN2_oer_;
+extern const TTCN_Typedescriptor_t LIN2_descr_;
+extern const TTCN_RAWdescriptor_t LIN2__BO__LAST_raw_;
+extern const XERdescriptor_t LIN2__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t LIN2__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t LIN2__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t LIN3__BO__LAST_raw_;
+extern const XERdescriptor_t LIN3__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t LIN3__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t LIN3__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t LIN4__BO__LAST_raw_;
+extern const XERdescriptor_t LIN4__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t LIN4__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t LIN4__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT1b_raw_;
+extern const XERdescriptor_t INT1b_xer_;
+extern const TTCN_OERdescriptor_t INT1b_oer_;
+extern const TTCN_Typedescriptor_t INT1b_descr_;
+extern const TTCN_RAWdescriptor_t INT2b_raw_;
+extern const XERdescriptor_t INT2b_xer_;
+extern const TTCN_OERdescriptor_t INT2b_oer_;
+extern const TTCN_Typedescriptor_t INT2b_descr_;
+extern const TTCN_RAWdescriptor_t INT3b_raw_;
+extern const XERdescriptor_t INT3b_xer_;
+extern const TTCN_OERdescriptor_t INT3b_oer_;
+extern const TTCN_Typedescriptor_t INT3b_descr_;
+extern const TTCN_RAWdescriptor_t INT4b_raw_;
+extern const XERdescriptor_t INT4b_xer_;
+extern const TTCN_OERdescriptor_t INT4b_oer_;
+extern const TTCN_Typedescriptor_t INT4b_descr_;
+extern const TTCN_RAWdescriptor_t INT5b_raw_;
+extern const XERdescriptor_t INT5b_xer_;
+extern const TTCN_OERdescriptor_t INT5b_oer_;
+extern const TTCN_Typedescriptor_t INT5b_descr_;
+extern const TTCN_RAWdescriptor_t INT6b_raw_;
+extern const XERdescriptor_t INT6b_xer_;
+extern const TTCN_OERdescriptor_t INT6b_oer_;
+extern const TTCN_Typedescriptor_t INT6b_descr_;
+extern const TTCN_RAWdescriptor_t INT7b_raw_;
+extern const XERdescriptor_t INT7b_xer_;
+extern const TTCN_OERdescriptor_t INT7b_oer_;
+extern const TTCN_Typedescriptor_t INT7b_descr_;
+extern const TTCN_RAWdescriptor_t INT11b__BO__LAST_raw_;
+extern const XERdescriptor_t INT11b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT11b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT11b__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT12b__BO__LAST_raw_;
+extern const XERdescriptor_t INT12b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT12b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT12b__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT13b__BO__LAST_raw_;
+extern const XERdescriptor_t INT13b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT13b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT13b__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT14b__BO__LAST_raw_;
+extern const XERdescriptor_t INT14b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT14b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT14b__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT20b__BO__LAST_raw_;
+extern const XERdescriptor_t INT20b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT20b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT20b__BO__LAST_descr_;
+extern const TTCN_RAWdescriptor_t INT31b__BO__LAST_raw_;
+extern const XERdescriptor_t INT31b__BO__LAST_xer_;
+extern const TTCN_OERdescriptor_t INT31b__BO__LAST_oer_;
+extern const TTCN_Typedescriptor_t INT31b__BO__LAST_descr_;
+extern const TTCN_Typedescriptor_t& Dummy__comptype_descr_;
+extern const TTCN_Typedescriptor_t& Dummy__CT_descr_;
+extern const TTCN_RAWdescriptor_t Protocols_raw_;
+extern const TTCN_Typedescriptor_t Protocols_descr_;
+extern const TTCN_RAWdescriptor_t OCT1List_raw_;
+extern const TTCN_Typedescriptor_t OCT1List_descr_;
+extern const XERdescriptor_t OCT1List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT1List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT1List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT2List_raw_;
+extern const TTCN_Typedescriptor_t OCT2List_descr_;
+extern const XERdescriptor_t OCT2List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT2List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT2List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT3List_raw_;
+extern const TTCN_Typedescriptor_t OCT3List_descr_;
+extern const XERdescriptor_t OCT3List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT3List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT3List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT4List_raw_;
+extern const TTCN_Typedescriptor_t OCT4List_descr_;
+extern const XERdescriptor_t OCT4List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT4List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT4List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT5List_raw_;
+extern const TTCN_Typedescriptor_t OCT5List_descr_;
+extern const XERdescriptor_t OCT5List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT5List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT5List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT6List_raw_;
+extern const TTCN_Typedescriptor_t OCT6List_descr_;
+extern const XERdescriptor_t OCT6List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT6List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT6List_0_descr_;
+extern const TTCN_RAWdescriptor_t OCT7List_raw_;
+extern const TTCN_Typedescriptor_t OCT7List_descr_;
+extern const XERdescriptor_t OCT7List_0_xer_;
+extern const TTCN_OERdescriptor_t OCT7List_0_oer_;
+extern const TTCN_Typedescriptor_t OCT7List_0_descr_;
+extern const TTCN_RAWdescriptor_t ListOfDummy__comptype_raw_;
+extern const TTCN_Typedescriptor_t ListOfDummy__comptype_descr_;
+extern const TTCN_RAWdescriptor_t ListOfDummy__CT_raw_;
+extern const TTCN_Typedescriptor_t ListOfDummy__CT_descr_;
+extern const TTCN_RAWdescriptor_t ProtocolList_raw_;
+extern const TTCN_Typedescriptor_t ProtocolList_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/General_Types.o b/demo/General_Types.o
new file mode 100644
index 0000000..6137e30
--- /dev/null
+++ b/demo/General_Types.o
Binary files differ
diff --git a/demo/Isobus.cc b/demo/Isobus.cc
new file mode 100644
index 0000000..000679d
--- /dev/null
+++ b/demo/Isobus.cc
@@ -0,0 +1,7087 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "Isobus.hh"
+
+namespace Isobus {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_19_octets[] = { 0 },
+os_23_octets[] = { 0, 0 },
+os_16_octets[] = { 0, 0, 0, 255 },
+os_15_octets[] = { 0, 0, 255, 0 },
+os_14_octets[] = { 0, 255, 0, 0 },
+os_13_octets[] = { 1, 0, 0, 0 },
+os_12_octets[] = { 2, 0, 0, 0 },
+os_11_octets[] = { 28, 0, 0, 0 },
+os_0_octets[] = { 199, 0, 0 },
+os_1_octets[] = { 200, 0, 0 },
+os_18_octets[] = { 216 },
+os_2_octets[] = { 230, 0, 0 },
+os_3_octets[] = { 231, 0, 0 },
+os_4_octets[] = { 234, 0, 0 },
+os_5_octets[] = { 235, 0, 0 },
+os_6_octets[] = { 236, 0, 0 },
+os_7_octets[] = { 237, 0, 0 },
+os_20_octets[] = { 238 },
+os_9_octets[] = { 238, 255, 0 },
+os_8_octets[] = { 238, 255, 254 },
+os_17_octets[] = { 254 },
+os_10_octets[] = { 254, 216, 0 },
+os_21_octets[] = { 255 };
+static const OCTETSTRING os_22(0, NULL),
+os_19(1, os_19_octets),
+os_23(2, os_23_octets),
+os_16(4, os_16_octets),
+os_15(4, os_15_octets),
+os_14(4, os_14_octets),
+os_13(4, os_13_octets),
+os_12(4, os_12_octets),
+os_11(4, os_11_octets),
+os_0(3, os_0_octets),
+os_1(3, os_1_octets),
+os_18(1, os_18_octets),
+os_2(3, os_2_octets),
+os_3(3, os_3_octets),
+os_4(3, os_4_octets),
+os_5(3, os_5_octets),
+os_6(3, os_6_octets),
+os_7(3, os_7_octets),
+os_20(1, os_20_octets),
+os_9(3, os_9_octets),
+os_8(3, os_8_octets),
+os_17(1, os_17_octets),
+os_10(3, os_10_octets),
+os_21(1, os_21_octets);
+static const unsigned char module_checksum[] = { 0xf6, 0x9c, 0xa1, 0xef, 0xcb, 0xb0, 0x54, 0x87, 0x7c, 0x99, 0xc2, 0x03, 0x00, 0xfe, 0xf8, 0x32 };
+
+/* Global variable definitions */
+
+static OCTETSTRING const_ISOBUS__PRIORITY__MASK;
+const OCTETSTRING& ISOBUS__PRIORITY__MASK = const_ISOBUS__PRIORITY__MASK;
+static OCTETSTRING const_ISOBUS__RESERVED__MASK;
+const OCTETSTRING& ISOBUS__RESERVED__MASK = const_ISOBUS__RESERVED__MASK;
+static OCTETSTRING const_ISOBUS__DATAPAGE__MASK;
+const OCTETSTRING& ISOBUS__DATAPAGE__MASK = const_ISOBUS__DATAPAGE__MASK;
+static OCTETSTRING const_ISOBUS__PDUFORMAT__MASK;
+const OCTETSTRING& ISOBUS__PDUFORMAT__MASK = const_ISOBUS__PDUFORMAT__MASK;
+static OCTETSTRING const_ISOBUS__PDUSPECIFIC__MASK;
+const OCTETSTRING& ISOBUS__PDUSPECIFIC__MASK = const_ISOBUS__PDUSPECIFIC__MASK;
+static OCTETSTRING const_ISOBUS__SOURCEADDRESS__MASK;
+const OCTETSTRING& ISOBUS__SOURCEADDRESS__MASK = const_ISOBUS__SOURCEADDRESS__MASK;
+const TTCN_RAWdescriptor_t Priority_raw_ = {6,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t Priority_xer_ = { {"Priority>\n", "Priority>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t Priority_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t Priority_descr_ = { "@Isobus.Priority", &BITSTRING_ber_, &Priority_raw_, NULL, &Priority_xer_, &BITSTRING_json_, &Priority_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_prio_raw_ = {6,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_prio_xer_ = { {"prio>\n", "prio>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939_prio_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939_prio_descr_ = { "@Isobus.J1939.prio", &BITSTRING_ber_, &J1939_prio_raw_, NULL, &J1939_prio_xer_, &BITSTRING_json_, &J1939_prio_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_res_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_res_xer_ = { {"res>\n", "res>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939_res_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939_res_descr_ = { "@Isobus.J1939.res", &BITSTRING_ber_, &J1939_res_raw_, NULL, &J1939_res_xer_, &BITSTRING_json_, &J1939_res_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_dp_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_dp_xer_ = { {"dp>\n", "dp>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939_dp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939_dp_descr_ = { "@Isobus.J1939.dp", &BITSTRING_ber_, &J1939_dp_raw_, NULL, &J1939_dp_xer_, &BITSTRING_json_, &J1939_dp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_pf_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_pf_xer_ = { {"pf>\n", "pf>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939_pf_oer_ext_arr_[0] = {};
+const int J1939_pf_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939_pf_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939_pf_oer_ext_arr_, 0, J1939_pf_oer_p_};
+const TTCN_Typedescriptor_t J1939_pf_descr_ = { "@Isobus.J1939.pf", &OCTETSTRING_ber_, &J1939_pf_raw_, &OCTETSTRING_text_, &J1939_pf_xer_, &OCTETSTRING_json_, &J1939_pf_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_ps_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_ps_xer_ = { {"ps>\n", "ps>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939_ps_oer_ext_arr_[0] = {};
+const int J1939_ps_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939_ps_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939_ps_oer_ext_arr_, 0, J1939_ps_oer_p_};
+const TTCN_Typedescriptor_t J1939_ps_descr_ = { "@Isobus.J1939.ps", &OCTETSTRING_ber_, &J1939_ps_raw_, &OCTETSTRING_text_, &J1939_ps_xer_, &OCTETSTRING_json_, &J1939_ps_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_sa_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939_sa_xer_ = { {"sa>\n", "sa>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939_sa_oer_ext_arr_[0] = {};
+const int J1939_sa_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939_sa_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939_sa_oer_ext_arr_, 0, J1939_sa_oer_p_};
+const TTCN_Typedescriptor_t J1939_sa_descr_ = { "@Isobus.J1939.sa", &OCTETSTRING_ber_, &J1939_sa_raw_, &OCTETSTRING_text_, &J1939_sa_xer_, &OCTETSTRING_json_, &J1939_sa_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for J1939
+const TTCN_Typedescriptor_t J1939_descr_ = { "@Isobus.J1939", NULL, &J1939_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_prio_raw_ = {6,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_prio_xer_ = { {"prio>\n", "prio>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939mod_prio_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939mod_prio_descr_ = { "@Isobus.J1939mod.prio", &BITSTRING_ber_, &J1939mod_prio_raw_, NULL, &J1939mod_prio_xer_, &BITSTRING_json_, &J1939mod_prio_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_res_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_res_xer_ = { {"res>\n", "res>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939mod_res_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939mod_res_descr_ = { "@Isobus.J1939mod.res", &BITSTRING_ber_, &J1939mod_res_raw_, NULL, &J1939mod_res_xer_, &BITSTRING_json_, &J1939mod_res_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_dp_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_dp_xer_ = { {"dp>\n", "dp>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t J1939mod_dp_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t J1939mod_dp_descr_ = { "@Isobus.J1939mod.dp", &BITSTRING_ber_, &J1939mod_dp_raw_, NULL, &J1939mod_dp_xer_, &BITSTRING_json_, &J1939mod_dp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_pf_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_pf_xer_ = { {"pf>\n", "pf>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939mod_pf_oer_ext_arr_[0] = {};
+const int J1939mod_pf_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939mod_pf_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939mod_pf_oer_ext_arr_, 0, J1939mod_pf_oer_p_};
+const TTCN_Typedescriptor_t J1939mod_pf_descr_ = { "@Isobus.J1939mod.pf", &OCTETSTRING_ber_, &J1939mod_pf_raw_, &OCTETSTRING_text_, &J1939mod_pf_xer_, &OCTETSTRING_json_, &J1939mod_pf_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_ps_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_ps_xer_ = { {"ps>\n", "ps>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939mod_ps_oer_ext_arr_[0] = {};
+const int J1939mod_ps_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939mod_ps_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939mod_ps_oer_ext_arr_, 0, J1939mod_ps_oer_p_};
+const TTCN_Typedescriptor_t J1939mod_ps_descr_ = { "@Isobus.J1939mod.ps", &OCTETSTRING_ber_, &J1939mod_ps_raw_, &OCTETSTRING_text_, &J1939mod_ps_xer_, &OCTETSTRING_json_, &J1939mod_ps_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_sa_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_sa_xer_ = { {"sa>\n", "sa>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939mod_sa_oer_ext_arr_[0] = {};
+const int J1939mod_sa_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939mod_sa_oer_ = { -1, TRUE, 1, FALSE, 0, 0, J1939mod_sa_oer_ext_arr_, 0, J1939mod_sa_oer_p_};
+const TTCN_Typedescriptor_t J1939mod_sa_descr_ = { "@Isobus.J1939mod.sa", &OCTETSTRING_ber_, &J1939mod_sa_raw_, &OCTETSTRING_text_, &J1939mod_sa_xer_, &OCTETSTRING_json_, &J1939mod_sa_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_comp_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t J1939mod_comp_xer_ = { {"comp>\n", "comp>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int J1939mod_comp_oer_ext_arr_[0] = {};
+const int J1939mod_comp_oer_p_[0] = {};
+const TTCN_OERdescriptor_t J1939mod_comp_oer_ = { -1, TRUE, 3, FALSE, 0, 0, J1939mod_comp_oer_ext_arr_, 0, J1939mod_comp_oer_p_};
+const TTCN_Typedescriptor_t J1939mod_comp_descr_ = { "@Isobus.J1939mod.comp", &OCTETSTRING_ber_, &J1939mod_comp_raw_, &OCTETSTRING_text_, &J1939mod_comp_xer_, &OCTETSTRING_json_, &J1939mod_comp_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t J1939mod_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for J1939mod
+const TTCN_Typedescriptor_t J1939mod_descr_ = { "@Isobus.J1939mod", NULL, &J1939mod_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t AnyIsoBusPdu_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for AnyIsoBusPdu
+const TTCN_Typedescriptor_t AnyIsoBusPdu_descr_ = { "@Isobus.AnyIsoBusPdu", NULL, &AnyIsoBusPdu_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__frame__j1939_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__frame__j1939
+const TTCN_Typedescriptor_t CAN__frame__j1939_descr_ = { "@Isobus.CAN_frame_j1939", NULL, &CAN__frame__j1939_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__frame__j1939mod_can__pdu_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__frame__j1939mod_can__pdu
+const TTCN_Typedescriptor_t CAN__frame__j1939mod_can__pdu_descr_ = { "@Isobus.CAN_frame_j1939mod.can_pdu", NULL, &CAN__frame__j1939mod_can__pdu_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t CAN__frame__j1939mod_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for CAN__frame__j1939mod
+const TTCN_Typedescriptor_t CAN__frame__j1939mod_descr_ = { "@Isobus.CAN_frame_j1939mod", NULL, &CAN__frame__j1939mod_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("Isobus", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+J1939::J1939()
+{
+}
+
+J1939::J1939(const BITSTRING& par_prio,
+ const BITSTRING& par_res,
+ const BITSTRING& par_dp,
+ const OCTETSTRING& par_pf,
+ const OCTETSTRING& par_ps,
+ const OCTETSTRING& par_sa)
+ : field_prio(par_prio),
+ field_res(par_res),
+ field_dp(par_dp),
+ field_pf(par_pf),
+ field_ps(par_ps),
+ field_sa(par_sa)
+{
+}
+
+J1939::J1939(const J1939& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Isobus.J1939.");
+if (other_value.prio().is_bound()) field_prio = other_value.prio();
+else field_prio.clean_up();
+if (other_value.res().is_bound()) field_res = other_value.res();
+else field_res.clean_up();
+if (other_value.dp().is_bound()) field_dp = other_value.dp();
+else field_dp.clean_up();
+if (other_value.pf().is_bound()) field_pf = other_value.pf();
+else field_pf.clean_up();
+if (other_value.ps().is_bound()) field_ps = other_value.ps();
+else field_ps.clean_up();
+if (other_value.sa().is_bound()) field_sa = other_value.sa();
+else field_sa.clean_up();
+}
+
+void J1939::clean_up()
+{
+field_prio.clean_up();
+field_res.clean_up();
+field_dp.clean_up();
+field_pf.clean_up();
+field_ps.clean_up();
+field_sa.clean_up();
+}
+
+const TTCN_Typedescriptor_t* J1939::get_descriptor() const { return &J1939_descr_; }
+J1939& J1939::operator=(const J1939& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Isobus.J1939.");
+ if (other_value.prio().is_bound()) field_prio = other_value.prio();
+ else field_prio.clean_up();
+ if (other_value.res().is_bound()) field_res = other_value.res();
+ else field_res.clean_up();
+ if (other_value.dp().is_bound()) field_dp = other_value.dp();
+ else field_dp.clean_up();
+ if (other_value.pf().is_bound()) field_pf = other_value.pf();
+ else field_pf.clean_up();
+ if (other_value.ps().is_bound()) field_ps = other_value.ps();
+ else field_ps.clean_up();
+ if (other_value.sa().is_bound()) field_sa = other_value.sa();
+ else field_sa.clean_up();
+}
+return *this;
+}
+
+boolean J1939::operator==(const J1939& other_value) const
+{
+return field_prio==other_value.field_prio
+ && field_res==other_value.field_res
+ && field_dp==other_value.field_dp
+ && field_pf==other_value.field_pf
+ && field_ps==other_value.field_ps
+ && field_sa==other_value.field_sa;
+}
+
+boolean J1939::is_bound() const
+{
+return (field_prio.is_bound())
+ || (field_res.is_bound())
+ || (field_dp.is_bound())
+ || (field_pf.is_bound())
+ || (field_ps.is_bound())
+ || (field_sa.is_bound());
+}
+boolean J1939::is_value() const
+{
+return field_prio.is_value()
+ && field_res.is_value()
+ && field_dp.is_value()
+ && field_pf.is_value()
+ && field_ps.is_value()
+ && field_sa.is_value();
+}
+void J1939::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ prio := ");
+field_prio.log();
+TTCN_Logger::log_event_str(", res := ");
+field_res.log();
+TTCN_Logger::log_event_str(", dp := ");
+field_dp.log();
+TTCN_Logger::log_event_str(", pf := ");
+field_pf.log();
+TTCN_Logger::log_event_str(", ps := ");
+field_ps.log();
+TTCN_Logger::log_event_str(", sa := ");
+field_sa.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void J1939::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 (6<param.get_size()) {
+ param.error("record value of type @Isobus.J1939 has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) prio().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) res().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dp().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pf().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ps().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sa().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "prio")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ prio().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "res")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ res().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "dp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ dp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pf")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pf().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ps")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ps().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "sa")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ sa().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.J1939: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Isobus.J1939");
+ }
+}
+
+void J1939::set_implicit_omit()
+{
+if (prio().is_bound()) prio().set_implicit_omit();
+if (res().is_bound()) res().set_implicit_omit();
+if (dp().is_bound()) dp().set_implicit_omit();
+if (pf().is_bound()) pf().set_implicit_omit();
+if (ps().is_bound()) ps().set_implicit_omit();
+if (sa().is_bound()) sa().set_implicit_omit();
+}
+
+void J1939::encode_text(Text_Buf& text_buf) const
+{
+field_prio.encode_text(text_buf);
+field_res.encode_text(text_buf);
+field_dp.encode_text(text_buf);
+field_pf.encode_text(text_buf);
+field_ps.encode_text(text_buf);
+field_sa.encode_text(text_buf);
+}
+
+void J1939::decode_text(Text_Buf& text_buf)
+{
+field_prio.decode_text(text_buf);
+field_res.decode_text(text_buf);
+field_dp.decode_text(text_buf);
+field_pf.decode_text(text_buf);
+field_ps.decode_text(text_buf);
+field_sa.decode_text(text_buf);
+}
+
+void J1939::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 J1939::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int J1939::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, J1939_prio_descr_.raw->forceomit);
+ decoded_field_length = field_prio.RAW_decode(J1939_prio_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, J1939_res_descr_.raw->forceomit);
+ decoded_field_length = field_res.RAW_decode(J1939_res_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, J1939_dp_descr_.raw->forceomit);
+ decoded_field_length = field_dp.RAW_decode(J1939_dp_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, J1939_pf_descr_.raw->forceomit);
+ decoded_field_length = field_pf.RAW_decode(J1939_pf_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, J1939_ps_descr_.raw->forceomit);
+ decoded_field_length = field_ps.RAW_decode(J1939_ps_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_5_force_omit(5, force_omit, J1939_sa_descr_.raw->forceomit);
+ decoded_field_length = field_sa.RAW_decode(J1939_sa_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int J1939::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 6;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, J1939_prio_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, J1939_res_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, J1939_dp_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, J1939_pf_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, J1939_ps_descr_.raw);
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, J1939_sa_descr_.raw);
+ encoded_length += field_prio.RAW_encode(J1939_prio_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_res.RAW_encode(J1939_res_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_dp.RAW_encode(J1939_dp_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_pf.RAW_encode(J1939_pf_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_ps.RAW_encode(J1939_ps_descr_, *myleaf.body.node.nodes[4]);
+ encoded_length += field_sa.RAW_encode(J1939_sa_descr_, *myleaf.body.node.nodes[5]);
+ return myleaf.length = encoded_length;
+}
+
+struct J1939_template::single_value_struct {
+BITSTRING_template field_prio;
+BITSTRING_template field_res;
+BITSTRING_template field_dp;
+OCTETSTRING_template field_pf;
+OCTETSTRING_template field_ps;
+OCTETSTRING_template field_sa;
+};
+
+void J1939_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_prio = ANY_VALUE;
+single_value->field_res = ANY_VALUE;
+single_value->field_dp = ANY_VALUE;
+single_value->field_pf = ANY_VALUE;
+single_value->field_ps = ANY_VALUE;
+single_value->field_sa = ANY_VALUE;
+}
+}
+}
+
+void J1939_template::copy_value(const J1939& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.prio().is_bound()) {
+ single_value->field_prio = other_value.prio();
+} else {
+ single_value->field_prio.clean_up();
+}
+if (other_value.res().is_bound()) {
+ single_value->field_res = other_value.res();
+} else {
+ single_value->field_res.clean_up();
+}
+if (other_value.dp().is_bound()) {
+ single_value->field_dp = other_value.dp();
+} else {
+ single_value->field_dp.clean_up();
+}
+if (other_value.pf().is_bound()) {
+ single_value->field_pf = other_value.pf();
+} else {
+ single_value->field_pf.clean_up();
+}
+if (other_value.ps().is_bound()) {
+ single_value->field_ps = other_value.ps();
+} else {
+ single_value->field_ps.clean_up();
+}
+if (other_value.sa().is_bound()) {
+ single_value->field_sa = other_value.sa();
+} else {
+ single_value->field_sa.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void J1939_template::copy_template(const J1939_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.prio().get_selection()) {
+single_value->field_prio = other_value.prio();
+} else {
+single_value->field_prio.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.res().get_selection()) {
+single_value->field_res = other_value.res();
+} else {
+single_value->field_res.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.dp().get_selection()) {
+single_value->field_dp = other_value.dp();
+} else {
+single_value->field_dp.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pf().get_selection()) {
+single_value->field_pf = other_value.pf();
+} else {
+single_value->field_pf.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.ps().get_selection()) {
+single_value->field_ps = other_value.ps();
+} else {
+single_value->field_ps.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.sa().get_selection()) {
+single_value->field_sa = other_value.sa();
+} else {
+single_value->field_sa.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new J1939_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Isobus.J1939.");
+break;
+}
+set_selection(other_value);
+}
+
+J1939_template::J1939_template()
+{
+}
+
+J1939_template::J1939_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+J1939_template::J1939_template(const J1939& other_value)
+{
+copy_value(other_value);
+}
+
+J1939_template::J1939_template(const OPTIONAL<J1939>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const J1939&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Isobus.J1939 from an unbound optional field.");
+}
+}
+
+J1939_template::J1939_template(const J1939_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+J1939_template::~J1939_template()
+{
+clean_up();
+}
+
+J1939_template& J1939_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+J1939_template& J1939_template::operator=(const J1939& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+J1939_template& J1939_template::operator=(const OPTIONAL<J1939>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const J1939&)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 @Isobus.J1939.");
+}
+return *this;
+}
+
+J1939_template& J1939_template::operator=(const J1939_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean J1939_template::match(const J1939& 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.prio().is_bound()) return FALSE;
+if(!single_value->field_prio.match(other_value.prio(), legacy))return FALSE;
+if(!other_value.res().is_bound()) return FALSE;
+if(!single_value->field_res.match(other_value.res(), legacy))return FALSE;
+if(!other_value.dp().is_bound()) return FALSE;
+if(!single_value->field_dp.match(other_value.dp(), legacy))return FALSE;
+if(!other_value.pf().is_bound()) return FALSE;
+if(!single_value->field_pf.match(other_value.pf(), legacy))return FALSE;
+if(!other_value.ps().is_bound()) return FALSE;
+if(!single_value->field_ps.match(other_value.ps(), legacy))return FALSE;
+if(!other_value.sa().is_bound()) return FALSE;
+if(!single_value->field_sa.match(other_value.sa(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Isobus.J1939.");
+}
+return FALSE;
+}
+
+boolean J1939_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_prio.is_bound()
+
+ ||single_value->field_res.is_bound()
+
+ ||single_value->field_dp.is_bound()
+
+ ||single_value->field_pf.is_bound()
+
+ ||single_value->field_ps.is_bound()
+
+ ||single_value->field_sa.is_bound()
+;
+}
+
+boolean J1939_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_prio.is_value()
+ &&single_value->field_res.is_value()
+ &&single_value->field_dp.is_value()
+ &&single_value->field_pf.is_value()
+ &&single_value->field_ps.is_value()
+ &&single_value->field_sa.is_value();
+}
+
+void J1939_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+J1939 J1939_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 @Isobus.J1939.");
+J1939 ret_val;
+if (single_value->field_prio.is_bound()) {
+ret_val.prio() = single_value->field_prio.valueof();
+}
+if (single_value->field_res.is_bound()) {
+ret_val.res() = single_value->field_res.valueof();
+}
+if (single_value->field_dp.is_bound()) {
+ret_val.dp() = single_value->field_dp.valueof();
+}
+if (single_value->field_pf.is_bound()) {
+ret_val.pf() = single_value->field_pf.valueof();
+}
+if (single_value->field_ps.is_bound()) {
+ret_val.ps() = single_value->field_ps.valueof();
+}
+if (single_value->field_sa.is_bound()) {
+ret_val.sa() = single_value->field_sa.valueof();
+}
+return ret_val;
+}
+
+void J1939_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Isobus.J1939.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new J1939_template[list_length];
+}
+
+J1939_template& J1939_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Isobus.J1939.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Isobus.J1939.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& J1939_template::prio()
+{
+set_specific();
+return single_value->field_prio;
+}
+
+const BITSTRING_template& J1939_template::prio() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field prio of a non-specific template of type @Isobus.J1939.");
+return single_value->field_prio;
+}
+
+BITSTRING_template& J1939_template::res()
+{
+set_specific();
+return single_value->field_res;
+}
+
+const BITSTRING_template& J1939_template::res() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field res of a non-specific template of type @Isobus.J1939.");
+return single_value->field_res;
+}
+
+BITSTRING_template& J1939_template::dp()
+{
+set_specific();
+return single_value->field_dp;
+}
+
+const BITSTRING_template& J1939_template::dp() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field dp of a non-specific template of type @Isobus.J1939.");
+return single_value->field_dp;
+}
+
+OCTETSTRING_template& J1939_template::pf()
+{
+set_specific();
+return single_value->field_pf;
+}
+
+const OCTETSTRING_template& J1939_template::pf() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pf of a non-specific template of type @Isobus.J1939.");
+return single_value->field_pf;
+}
+
+OCTETSTRING_template& J1939_template::ps()
+{
+set_specific();
+return single_value->field_ps;
+}
+
+const OCTETSTRING_template& J1939_template::ps() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ps of a non-specific template of type @Isobus.J1939.");
+return single_value->field_ps;
+}
+
+OCTETSTRING_template& J1939_template::sa()
+{
+set_specific();
+return single_value->field_sa;
+}
+
+const OCTETSTRING_template& J1939_template::sa() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field sa of a non-specific template of type @Isobus.J1939.");
+return single_value->field_sa;
+}
+
+int J1939_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939 which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 6;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Isobus.J1939 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 @Isobus.J1939 containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939 containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939 containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939 containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Isobus.J1939.");
+ }
+ return 0;
+}
+
+void J1939_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ prio := ");
+single_value->field_prio.log();
+TTCN_Logger::log_event_str(", res := ");
+single_value->field_res.log();
+TTCN_Logger::log_event_str(", dp := ");
+single_value->field_dp.log();
+TTCN_Logger::log_event_str(", pf := ");
+single_value->field_pf.log();
+TTCN_Logger::log_event_str(", ps := ");
+single_value->field_ps.log();
+TTCN_Logger::log_event_str(", sa := ");
+single_value->field_sa.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void J1939_template::log_match(const J1939& 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_prio.match(match_value.prio(), legacy)){
+TTCN_Logger::log_logmatch_info(".prio");
+single_value->field_prio.log_match(match_value.prio(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_res.match(match_value.res(), legacy)){
+TTCN_Logger::log_logmatch_info(".res");
+single_value->field_res.log_match(match_value.res(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_dp.match(match_value.dp(), legacy)){
+TTCN_Logger::log_logmatch_info(".dp");
+single_value->field_dp.log_match(match_value.dp(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pf.match(match_value.pf(), legacy)){
+TTCN_Logger::log_logmatch_info(".pf");
+single_value->field_pf.log_match(match_value.pf(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_ps.match(match_value.ps(), legacy)){
+TTCN_Logger::log_logmatch_info(".ps");
+single_value->field_ps.log_match(match_value.ps(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_sa.match(match_value.sa(), legacy)){
+TTCN_Logger::log_logmatch_info(".sa");
+single_value->field_sa.log_match(match_value.sa(), legacy);
+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("{ prio := ");
+single_value->field_prio.log_match(match_value.prio(), legacy);
+TTCN_Logger::log_event_str(", res := ");
+single_value->field_res.log_match(match_value.res(), legacy);
+TTCN_Logger::log_event_str(", dp := ");
+single_value->field_dp.log_match(match_value.dp(), legacy);
+TTCN_Logger::log_event_str(", pf := ");
+single_value->field_pf.log_match(match_value.pf(), legacy);
+TTCN_Logger::log_event_str(", ps := ");
+single_value->field_ps.log_match(match_value.ps(), legacy);
+TTCN_Logger::log_event_str(", sa := ");
+single_value->field_sa.log_match(match_value.sa(), legacy);
+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 J1939_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_prio.encode_text(text_buf);
+single_value->field_res.encode_text(text_buf);
+single_value->field_dp.encode_text(text_buf);
+single_value->field_pf.encode_text(text_buf);
+single_value->field_ps.encode_text(text_buf);
+single_value->field_sa.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 @Isobus.J1939.");
+}
+}
+
+void J1939_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_prio.decode_text(text_buf);
+single_value->field_res.decode_text(text_buf);
+single_value->field_dp.decode_text(text_buf);
+single_value->field_pf.decode_text(text_buf);
+single_value->field_ps.decode_text(text_buf);
+single_value->field_sa.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 J1939_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 @Isobus.J1939.");
+}
+}
+
+void J1939_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: {
+ J1939_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (6<param.get_size()) {
+ param.error("record template of type @Isobus.J1939 has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) prio().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) res().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dp().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pf().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ps().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sa().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "prio")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ prio().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "res")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ res().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "dp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ dp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pf")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pf().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ps")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ps().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "sa")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ sa().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.J1939: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Isobus.J1939");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void J1939_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_prio.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+single_value->field_res.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+single_value->field_dp.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+single_value->field_pf.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+single_value->field_ps.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+single_value->field_sa.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939");
+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 : "@Isobus.J1939");
+}
+
+boolean J1939_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean J1939_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+J1939mod::J1939mod()
+{
+}
+
+J1939mod::J1939mod(const BITSTRING& par_prio,
+ const BITSTRING& par_res,
+ const BITSTRING& par_dp,
+ const OCTETSTRING& par_pf,
+ const OCTETSTRING& par_ps,
+ const OCTETSTRING& par_sa,
+ const OCTETSTRING& par_comp)
+ : field_prio(par_prio),
+ field_res(par_res),
+ field_dp(par_dp),
+ field_pf(par_pf),
+ field_ps(par_ps),
+ field_sa(par_sa),
+ field_comp(par_comp)
+{
+}
+
+J1939mod::J1939mod(const J1939mod& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Isobus.J1939mod.");
+if (other_value.prio().is_bound()) field_prio = other_value.prio();
+else field_prio.clean_up();
+if (other_value.res().is_bound()) field_res = other_value.res();
+else field_res.clean_up();
+if (other_value.dp().is_bound()) field_dp = other_value.dp();
+else field_dp.clean_up();
+if (other_value.pf().is_bound()) field_pf = other_value.pf();
+else field_pf.clean_up();
+if (other_value.ps().is_bound()) field_ps = other_value.ps();
+else field_ps.clean_up();
+if (other_value.sa().is_bound()) field_sa = other_value.sa();
+else field_sa.clean_up();
+if (other_value.comp().is_bound()) field_comp = other_value.comp();
+else field_comp.clean_up();
+}
+
+void J1939mod::clean_up()
+{
+field_prio.clean_up();
+field_res.clean_up();
+field_dp.clean_up();
+field_pf.clean_up();
+field_ps.clean_up();
+field_sa.clean_up();
+field_comp.clean_up();
+}
+
+const TTCN_Typedescriptor_t* J1939mod::get_descriptor() const { return &J1939mod_descr_; }
+J1939mod& J1939mod::operator=(const J1939mod& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Isobus.J1939mod.");
+ if (other_value.prio().is_bound()) field_prio = other_value.prio();
+ else field_prio.clean_up();
+ if (other_value.res().is_bound()) field_res = other_value.res();
+ else field_res.clean_up();
+ if (other_value.dp().is_bound()) field_dp = other_value.dp();
+ else field_dp.clean_up();
+ if (other_value.pf().is_bound()) field_pf = other_value.pf();
+ else field_pf.clean_up();
+ if (other_value.ps().is_bound()) field_ps = other_value.ps();
+ else field_ps.clean_up();
+ if (other_value.sa().is_bound()) field_sa = other_value.sa();
+ else field_sa.clean_up();
+ if (other_value.comp().is_bound()) field_comp = other_value.comp();
+ else field_comp.clean_up();
+}
+return *this;
+}
+
+boolean J1939mod::operator==(const J1939mod& other_value) const
+{
+return field_prio==other_value.field_prio
+ && field_res==other_value.field_res
+ && field_dp==other_value.field_dp
+ && field_pf==other_value.field_pf
+ && field_ps==other_value.field_ps
+ && field_sa==other_value.field_sa
+ && field_comp==other_value.field_comp;
+}
+
+boolean J1939mod::is_bound() const
+{
+return (field_prio.is_bound())
+ || (field_res.is_bound())
+ || (field_dp.is_bound())
+ || (field_pf.is_bound())
+ || (field_ps.is_bound())
+ || (field_sa.is_bound())
+ || (field_comp.is_bound());
+}
+boolean J1939mod::is_value() const
+{
+return field_prio.is_value()
+ && field_res.is_value()
+ && field_dp.is_value()
+ && field_pf.is_value()
+ && field_ps.is_value()
+ && field_sa.is_value()
+ && field_comp.is_value();
+}
+void J1939mod::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ prio := ");
+field_prio.log();
+TTCN_Logger::log_event_str(", res := ");
+field_res.log();
+TTCN_Logger::log_event_str(", dp := ");
+field_dp.log();
+TTCN_Logger::log_event_str(", pf := ");
+field_pf.log();
+TTCN_Logger::log_event_str(", ps := ");
+field_ps.log();
+TTCN_Logger::log_event_str(", sa := ");
+field_sa.log();
+TTCN_Logger::log_event_str(", comp := ");
+field_comp.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void J1939mod::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 (7<param.get_size()) {
+ param.error("record value of type @Isobus.J1939mod has 7 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) prio().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) res().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dp().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pf().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ps().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sa().set_param(*param.get_elem(5));
+ if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) comp().set_param(*param.get_elem(6));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "prio")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ prio().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "res")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ res().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "dp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ dp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pf")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pf().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ps")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ps().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "sa")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ sa().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "comp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ comp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.J1939mod: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Isobus.J1939mod");
+ }
+}
+
+void J1939mod::set_implicit_omit()
+{
+if (prio().is_bound()) prio().set_implicit_omit();
+if (res().is_bound()) res().set_implicit_omit();
+if (dp().is_bound()) dp().set_implicit_omit();
+if (pf().is_bound()) pf().set_implicit_omit();
+if (ps().is_bound()) ps().set_implicit_omit();
+if (sa().is_bound()) sa().set_implicit_omit();
+if (comp().is_bound()) comp().set_implicit_omit();
+}
+
+void J1939mod::encode_text(Text_Buf& text_buf) const
+{
+field_prio.encode_text(text_buf);
+field_res.encode_text(text_buf);
+field_dp.encode_text(text_buf);
+field_pf.encode_text(text_buf);
+field_ps.encode_text(text_buf);
+field_sa.encode_text(text_buf);
+field_comp.encode_text(text_buf);
+}
+
+void J1939mod::decode_text(Text_Buf& text_buf)
+{
+field_prio.decode_text(text_buf);
+field_res.decode_text(text_buf);
+field_dp.decode_text(text_buf);
+field_pf.decode_text(text_buf);
+field_ps.decode_text(text_buf);
+field_sa.decode_text(text_buf);
+field_comp.decode_text(text_buf);
+}
+
+void J1939mod::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 J1939mod::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int J1939mod::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, J1939mod_prio_descr_.raw->forceomit);
+ decoded_field_length = field_prio.RAW_decode(J1939mod_prio_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, J1939mod_res_descr_.raw->forceomit);
+ decoded_field_length = field_res.RAW_decode(J1939mod_res_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, J1939mod_dp_descr_.raw->forceomit);
+ decoded_field_length = field_dp.RAW_decode(J1939mod_dp_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, J1939mod_pf_descr_.raw->forceomit);
+ decoded_field_length = field_pf.RAW_decode(J1939mod_pf_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, J1939mod_ps_descr_.raw->forceomit);
+ decoded_field_length = field_ps.RAW_decode(J1939mod_ps_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_5_force_omit(5, force_omit, J1939mod_sa_descr_.raw->forceomit);
+ decoded_field_length = field_sa.RAW_decode(J1939mod_sa_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_6_force_omit(6, force_omit, J1939mod_comp_descr_.raw->forceomit);
+ decoded_field_length = field_comp.RAW_decode(J1939mod_comp_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int J1939mod::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 7;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(7);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, J1939mod_prio_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, J1939mod_res_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, J1939mod_dp_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, J1939mod_pf_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, J1939mod_ps_descr_.raw);
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, J1939mod_sa_descr_.raw);
+ myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, J1939mod_comp_descr_.raw);
+ encoded_length += field_prio.RAW_encode(J1939mod_prio_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_res.RAW_encode(J1939mod_res_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_dp.RAW_encode(J1939mod_dp_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_pf.RAW_encode(J1939mod_pf_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_ps.RAW_encode(J1939mod_ps_descr_, *myleaf.body.node.nodes[4]);
+ encoded_length += field_sa.RAW_encode(J1939mod_sa_descr_, *myleaf.body.node.nodes[5]);
+ encoded_length += field_comp.RAW_encode(J1939mod_comp_descr_, *myleaf.body.node.nodes[6]);
+ return myleaf.length = encoded_length;
+}
+
+struct J1939mod_template::single_value_struct {
+BITSTRING_template field_prio;
+BITSTRING_template field_res;
+BITSTRING_template field_dp;
+OCTETSTRING_template field_pf;
+OCTETSTRING_template field_ps;
+OCTETSTRING_template field_sa;
+OCTETSTRING_template field_comp;
+};
+
+void J1939mod_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_prio = ANY_VALUE;
+single_value->field_res = ANY_VALUE;
+single_value->field_dp = ANY_VALUE;
+single_value->field_pf = ANY_VALUE;
+single_value->field_ps = ANY_VALUE;
+single_value->field_sa = ANY_VALUE;
+single_value->field_comp = ANY_VALUE;
+}
+}
+}
+
+void J1939mod_template::copy_value(const J1939mod& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.prio().is_bound()) {
+ single_value->field_prio = other_value.prio();
+} else {
+ single_value->field_prio.clean_up();
+}
+if (other_value.res().is_bound()) {
+ single_value->field_res = other_value.res();
+} else {
+ single_value->field_res.clean_up();
+}
+if (other_value.dp().is_bound()) {
+ single_value->field_dp = other_value.dp();
+} else {
+ single_value->field_dp.clean_up();
+}
+if (other_value.pf().is_bound()) {
+ single_value->field_pf = other_value.pf();
+} else {
+ single_value->field_pf.clean_up();
+}
+if (other_value.ps().is_bound()) {
+ single_value->field_ps = other_value.ps();
+} else {
+ single_value->field_ps.clean_up();
+}
+if (other_value.sa().is_bound()) {
+ single_value->field_sa = other_value.sa();
+} else {
+ single_value->field_sa.clean_up();
+}
+if (other_value.comp().is_bound()) {
+ single_value->field_comp = other_value.comp();
+} else {
+ single_value->field_comp.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void J1939mod_template::copy_template(const J1939mod_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.prio().get_selection()) {
+single_value->field_prio = other_value.prio();
+} else {
+single_value->field_prio.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.res().get_selection()) {
+single_value->field_res = other_value.res();
+} else {
+single_value->field_res.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.dp().get_selection()) {
+single_value->field_dp = other_value.dp();
+} else {
+single_value->field_dp.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pf().get_selection()) {
+single_value->field_pf = other_value.pf();
+} else {
+single_value->field_pf.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.ps().get_selection()) {
+single_value->field_ps = other_value.ps();
+} else {
+single_value->field_ps.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.sa().get_selection()) {
+single_value->field_sa = other_value.sa();
+} else {
+single_value->field_sa.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.comp().get_selection()) {
+single_value->field_comp = other_value.comp();
+} else {
+single_value->field_comp.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new J1939mod_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Isobus.J1939mod.");
+break;
+}
+set_selection(other_value);
+}
+
+J1939mod_template::J1939mod_template()
+{
+}
+
+J1939mod_template::J1939mod_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+J1939mod_template::J1939mod_template(const J1939mod& other_value)
+{
+copy_value(other_value);
+}
+
+J1939mod_template::J1939mod_template(const OPTIONAL<J1939mod>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const J1939mod&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Isobus.J1939mod from an unbound optional field.");
+}
+}
+
+J1939mod_template::J1939mod_template(const J1939mod_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+J1939mod_template::~J1939mod_template()
+{
+clean_up();
+}
+
+J1939mod_template& J1939mod_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+J1939mod_template& J1939mod_template::operator=(const J1939mod& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+J1939mod_template& J1939mod_template::operator=(const OPTIONAL<J1939mod>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const J1939mod&)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 @Isobus.J1939mod.");
+}
+return *this;
+}
+
+J1939mod_template& J1939mod_template::operator=(const J1939mod_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean J1939mod_template::match(const J1939mod& 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.prio().is_bound()) return FALSE;
+if(!single_value->field_prio.match(other_value.prio(), legacy))return FALSE;
+if(!other_value.res().is_bound()) return FALSE;
+if(!single_value->field_res.match(other_value.res(), legacy))return FALSE;
+if(!other_value.dp().is_bound()) return FALSE;
+if(!single_value->field_dp.match(other_value.dp(), legacy))return FALSE;
+if(!other_value.pf().is_bound()) return FALSE;
+if(!single_value->field_pf.match(other_value.pf(), legacy))return FALSE;
+if(!other_value.ps().is_bound()) return FALSE;
+if(!single_value->field_ps.match(other_value.ps(), legacy))return FALSE;
+if(!other_value.sa().is_bound()) return FALSE;
+if(!single_value->field_sa.match(other_value.sa(), legacy))return FALSE;
+if(!other_value.comp().is_bound()) return FALSE;
+if(!single_value->field_comp.match(other_value.comp(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Isobus.J1939mod.");
+}
+return FALSE;
+}
+
+boolean J1939mod_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_prio.is_bound()
+
+ ||single_value->field_res.is_bound()
+
+ ||single_value->field_dp.is_bound()
+
+ ||single_value->field_pf.is_bound()
+
+ ||single_value->field_ps.is_bound()
+
+ ||single_value->field_sa.is_bound()
+
+ ||single_value->field_comp.is_bound()
+;
+}
+
+boolean J1939mod_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_prio.is_value()
+ &&single_value->field_res.is_value()
+ &&single_value->field_dp.is_value()
+ &&single_value->field_pf.is_value()
+ &&single_value->field_ps.is_value()
+ &&single_value->field_sa.is_value()
+ &&single_value->field_comp.is_value();
+}
+
+void J1939mod_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+J1939mod J1939mod_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 @Isobus.J1939mod.");
+J1939mod ret_val;
+if (single_value->field_prio.is_bound()) {
+ret_val.prio() = single_value->field_prio.valueof();
+}
+if (single_value->field_res.is_bound()) {
+ret_val.res() = single_value->field_res.valueof();
+}
+if (single_value->field_dp.is_bound()) {
+ret_val.dp() = single_value->field_dp.valueof();
+}
+if (single_value->field_pf.is_bound()) {
+ret_val.pf() = single_value->field_pf.valueof();
+}
+if (single_value->field_ps.is_bound()) {
+ret_val.ps() = single_value->field_ps.valueof();
+}
+if (single_value->field_sa.is_bound()) {
+ret_val.sa() = single_value->field_sa.valueof();
+}
+if (single_value->field_comp.is_bound()) {
+ret_val.comp() = single_value->field_comp.valueof();
+}
+return ret_val;
+}
+
+void J1939mod_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Isobus.J1939mod.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new J1939mod_template[list_length];
+}
+
+J1939mod_template& J1939mod_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Isobus.J1939mod.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Isobus.J1939mod.");
+return value_list.list_value[list_index];
+}
+
+BITSTRING_template& J1939mod_template::prio()
+{
+set_specific();
+return single_value->field_prio;
+}
+
+const BITSTRING_template& J1939mod_template::prio() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field prio of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_prio;
+}
+
+BITSTRING_template& J1939mod_template::res()
+{
+set_specific();
+return single_value->field_res;
+}
+
+const BITSTRING_template& J1939mod_template::res() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field res of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_res;
+}
+
+BITSTRING_template& J1939mod_template::dp()
+{
+set_specific();
+return single_value->field_dp;
+}
+
+const BITSTRING_template& J1939mod_template::dp() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field dp of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_dp;
+}
+
+OCTETSTRING_template& J1939mod_template::pf()
+{
+set_specific();
+return single_value->field_pf;
+}
+
+const OCTETSTRING_template& J1939mod_template::pf() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pf of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_pf;
+}
+
+OCTETSTRING_template& J1939mod_template::ps()
+{
+set_specific();
+return single_value->field_ps;
+}
+
+const OCTETSTRING_template& J1939mod_template::ps() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ps of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_ps;
+}
+
+OCTETSTRING_template& J1939mod_template::sa()
+{
+set_specific();
+return single_value->field_sa;
+}
+
+const OCTETSTRING_template& J1939mod_template::sa() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field sa of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_sa;
+}
+
+OCTETSTRING_template& J1939mod_template::comp()
+{
+set_specific();
+return single_value->field_comp;
+}
+
+const OCTETSTRING_template& J1939mod_template::comp() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field comp of a non-specific template of type @Isobus.J1939mod.");
+return single_value->field_comp;
+}
+
+int J1939mod_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939mod which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 7;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Isobus.J1939mod 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 @Isobus.J1939mod containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939mod containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939mod containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.J1939mod containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Isobus.J1939mod.");
+ }
+ return 0;
+}
+
+void J1939mod_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ prio := ");
+single_value->field_prio.log();
+TTCN_Logger::log_event_str(", res := ");
+single_value->field_res.log();
+TTCN_Logger::log_event_str(", dp := ");
+single_value->field_dp.log();
+TTCN_Logger::log_event_str(", pf := ");
+single_value->field_pf.log();
+TTCN_Logger::log_event_str(", ps := ");
+single_value->field_ps.log();
+TTCN_Logger::log_event_str(", sa := ");
+single_value->field_sa.log();
+TTCN_Logger::log_event_str(", comp := ");
+single_value->field_comp.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void J1939mod_template::log_match(const J1939mod& 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_prio.match(match_value.prio(), legacy)){
+TTCN_Logger::log_logmatch_info(".prio");
+single_value->field_prio.log_match(match_value.prio(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_res.match(match_value.res(), legacy)){
+TTCN_Logger::log_logmatch_info(".res");
+single_value->field_res.log_match(match_value.res(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_dp.match(match_value.dp(), legacy)){
+TTCN_Logger::log_logmatch_info(".dp");
+single_value->field_dp.log_match(match_value.dp(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pf.match(match_value.pf(), legacy)){
+TTCN_Logger::log_logmatch_info(".pf");
+single_value->field_pf.log_match(match_value.pf(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_ps.match(match_value.ps(), legacy)){
+TTCN_Logger::log_logmatch_info(".ps");
+single_value->field_ps.log_match(match_value.ps(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_sa.match(match_value.sa(), legacy)){
+TTCN_Logger::log_logmatch_info(".sa");
+single_value->field_sa.log_match(match_value.sa(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_comp.match(match_value.comp(), legacy)){
+TTCN_Logger::log_logmatch_info(".comp");
+single_value->field_comp.log_match(match_value.comp(), legacy);
+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("{ prio := ");
+single_value->field_prio.log_match(match_value.prio(), legacy);
+TTCN_Logger::log_event_str(", res := ");
+single_value->field_res.log_match(match_value.res(), legacy);
+TTCN_Logger::log_event_str(", dp := ");
+single_value->field_dp.log_match(match_value.dp(), legacy);
+TTCN_Logger::log_event_str(", pf := ");
+single_value->field_pf.log_match(match_value.pf(), legacy);
+TTCN_Logger::log_event_str(", ps := ");
+single_value->field_ps.log_match(match_value.ps(), legacy);
+TTCN_Logger::log_event_str(", sa := ");
+single_value->field_sa.log_match(match_value.sa(), legacy);
+TTCN_Logger::log_event_str(", comp := ");
+single_value->field_comp.log_match(match_value.comp(), legacy);
+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 J1939mod_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_prio.encode_text(text_buf);
+single_value->field_res.encode_text(text_buf);
+single_value->field_dp.encode_text(text_buf);
+single_value->field_pf.encode_text(text_buf);
+single_value->field_ps.encode_text(text_buf);
+single_value->field_sa.encode_text(text_buf);
+single_value->field_comp.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 @Isobus.J1939mod.");
+}
+}
+
+void J1939mod_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_prio.decode_text(text_buf);
+single_value->field_res.decode_text(text_buf);
+single_value->field_dp.decode_text(text_buf);
+single_value->field_pf.decode_text(text_buf);
+single_value->field_ps.decode_text(text_buf);
+single_value->field_sa.decode_text(text_buf);
+single_value->field_comp.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 J1939mod_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 @Isobus.J1939mod.");
+}
+}
+
+void J1939mod_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: {
+ J1939mod_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (7<param.get_size()) {
+ param.error("record template of type @Isobus.J1939mod has 7 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) prio().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) res().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dp().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pf().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ps().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sa().set_param(*param.get_elem(5));
+ if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) comp().set_param(*param.get_elem(6));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "prio")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ prio().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "res")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ res().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "dp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ dp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pf")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pf().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ps")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ps().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "sa")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ sa().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "comp")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ comp().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.J1939mod: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Isobus.J1939mod");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void J1939mod_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_prio.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_res.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_dp.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_pf.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_ps.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_sa.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+single_value->field_comp.check_restriction(t_res, t_name ? t_name : "@Isobus.J1939mod");
+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 : "@Isobus.J1939mod");
+}
+
+boolean J1939mod_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean J1939mod_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void AnyIsoBusPdu::copy_value(const AnyIsoBusPdu& other_value)
+{
+switch (other_value.union_selection) {
+case ALT_etp__dt:
+field_etp__dt = new IsobusCMMessageTypes::ETP__DT(*other_value.field_etp__dt);
+break;
+case ALT_etp__cm:
+field_etp__cm = new IsobusCMMessageTypes::ETP__CM(*other_value.field_etp__cm);
+break;
+case ALT_vt2ecu:
+field_vt2ecu = new IsobusVTMessageTypes::VT2ECU(*other_value.field_vt2ecu);
+break;
+case ALT_ecu2vt:
+field_ecu2vt = new IsobusVTMessageTypes::ECU2VT(*other_value.field_ecu2vt);
+break;
+case ALT_requestForAddressClaimed:
+field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed(*other_value.field_requestForAddressClaimed);
+break;
+case ALT_tp__dt:
+field_tp__dt = new IsobusCMMessageTypes::TP__DT(*other_value.field_tp__dt);
+break;
+case ALT_tp__cm:
+field_tp__cm = new IsobusCMMessageTypes::TP__CM(*other_value.field_tp__cm);
+break;
+case ALT_networkMessage:
+field_networkMessage = new IsobusNMMessageTypes::NetworkMessage(*other_value.field_networkMessage);
+break;
+case ALT_cannotClaimSourceAddress:
+field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress(*other_value.field_cannotClaimSourceAddress);
+break;
+case ALT_addressClaimed:
+field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed(*other_value.field_addressClaimed);
+break;
+case ALT_commandedAddress:
+field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress(*other_value.field_commandedAddress);
+break;
+default:
+TTCN_error("Assignment of an unbound union value of type @Isobus.AnyIsoBusPdu.");
+}
+union_selection = other_value.union_selection;
+}
+
+AnyIsoBusPdu::AnyIsoBusPdu()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+AnyIsoBusPdu::AnyIsoBusPdu(const AnyIsoBusPdu& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+AnyIsoBusPdu::~AnyIsoBusPdu()
+{
+clean_up();
+}
+
+AnyIsoBusPdu& AnyIsoBusPdu::operator=(const AnyIsoBusPdu& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean AnyIsoBusPdu::operator==(const AnyIsoBusPdu& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @Isobus.AnyIsoBusPdu.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @Isobus.AnyIsoBusPdu.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+case ALT_etp__dt:
+return *field_etp__dt == *other_value.field_etp__dt;
+case ALT_etp__cm:
+return *field_etp__cm == *other_value.field_etp__cm;
+case ALT_vt2ecu:
+return *field_vt2ecu == *other_value.field_vt2ecu;
+case ALT_ecu2vt:
+return *field_ecu2vt == *other_value.field_ecu2vt;
+case ALT_requestForAddressClaimed:
+return *field_requestForAddressClaimed == *other_value.field_requestForAddressClaimed;
+case ALT_tp__dt:
+return *field_tp__dt == *other_value.field_tp__dt;
+case ALT_tp__cm:
+return *field_tp__cm == *other_value.field_tp__cm;
+case ALT_networkMessage:
+return *field_networkMessage == *other_value.field_networkMessage;
+case ALT_cannotClaimSourceAddress:
+return *field_cannotClaimSourceAddress == *other_value.field_cannotClaimSourceAddress;
+case ALT_addressClaimed:
+return *field_addressClaimed == *other_value.field_addressClaimed;
+case ALT_commandedAddress:
+return *field_commandedAddress == *other_value.field_commandedAddress;
+default:
+return FALSE;
+}
+}
+
+IsobusCMMessageTypes::ETP__DT& AnyIsoBusPdu::etp__dt()
+{
+if (union_selection != ALT_etp__dt) {
+clean_up();
+field_etp__dt = new IsobusCMMessageTypes::ETP__DT;
+union_selection = ALT_etp__dt;
+}
+return *field_etp__dt;
+}
+
+const IsobusCMMessageTypes::ETP__DT& AnyIsoBusPdu::etp__dt() const
+{
+if (union_selection != ALT_etp__dt) TTCN_error("Using non-selected field etp_dt in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_etp__dt;
+}
+
+IsobusCMMessageTypes::ETP__CM& AnyIsoBusPdu::etp__cm()
+{
+if (union_selection != ALT_etp__cm) {
+clean_up();
+field_etp__cm = new IsobusCMMessageTypes::ETP__CM;
+union_selection = ALT_etp__cm;
+}
+return *field_etp__cm;
+}
+
+const IsobusCMMessageTypes::ETP__CM& AnyIsoBusPdu::etp__cm() const
+{
+if (union_selection != ALT_etp__cm) TTCN_error("Using non-selected field etp_cm in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_etp__cm;
+}
+
+IsobusVTMessageTypes::VT2ECU& AnyIsoBusPdu::vt2ecu()
+{
+if (union_selection != ALT_vt2ecu) {
+clean_up();
+field_vt2ecu = new IsobusVTMessageTypes::VT2ECU;
+union_selection = ALT_vt2ecu;
+}
+return *field_vt2ecu;
+}
+
+const IsobusVTMessageTypes::VT2ECU& AnyIsoBusPdu::vt2ecu() const
+{
+if (union_selection != ALT_vt2ecu) TTCN_error("Using non-selected field vt2ecu in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_vt2ecu;
+}
+
+IsobusVTMessageTypes::ECU2VT& AnyIsoBusPdu::ecu2vt()
+{
+if (union_selection != ALT_ecu2vt) {
+clean_up();
+field_ecu2vt = new IsobusVTMessageTypes::ECU2VT;
+union_selection = ALT_ecu2vt;
+}
+return *field_ecu2vt;
+}
+
+const IsobusVTMessageTypes::ECU2VT& AnyIsoBusPdu::ecu2vt() const
+{
+if (union_selection != ALT_ecu2vt) TTCN_error("Using non-selected field ecu2vt in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_ecu2vt;
+}
+
+IsobusNMMessageTypes::RequestForAddressClaimed& AnyIsoBusPdu::requestForAddressClaimed()
+{
+if (union_selection != ALT_requestForAddressClaimed) {
+clean_up();
+field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed;
+union_selection = ALT_requestForAddressClaimed;
+}
+return *field_requestForAddressClaimed;
+}
+
+const IsobusNMMessageTypes::RequestForAddressClaimed& AnyIsoBusPdu::requestForAddressClaimed() const
+{
+if (union_selection != ALT_requestForAddressClaimed) TTCN_error("Using non-selected field requestForAddressClaimed in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_requestForAddressClaimed;
+}
+
+IsobusCMMessageTypes::TP__DT& AnyIsoBusPdu::tp__dt()
+{
+if (union_selection != ALT_tp__dt) {
+clean_up();
+field_tp__dt = new IsobusCMMessageTypes::TP__DT;
+union_selection = ALT_tp__dt;
+}
+return *field_tp__dt;
+}
+
+const IsobusCMMessageTypes::TP__DT& AnyIsoBusPdu::tp__dt() const
+{
+if (union_selection != ALT_tp__dt) TTCN_error("Using non-selected field tp_dt in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_tp__dt;
+}
+
+IsobusCMMessageTypes::TP__CM& AnyIsoBusPdu::tp__cm()
+{
+if (union_selection != ALT_tp__cm) {
+clean_up();
+field_tp__cm = new IsobusCMMessageTypes::TP__CM;
+union_selection = ALT_tp__cm;
+}
+return *field_tp__cm;
+}
+
+const IsobusCMMessageTypes::TP__CM& AnyIsoBusPdu::tp__cm() const
+{
+if (union_selection != ALT_tp__cm) TTCN_error("Using non-selected field tp_cm in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_tp__cm;
+}
+
+IsobusNMMessageTypes::NetworkMessage& AnyIsoBusPdu::networkMessage()
+{
+if (union_selection != ALT_networkMessage) {
+clean_up();
+field_networkMessage = new IsobusNMMessageTypes::NetworkMessage;
+union_selection = ALT_networkMessage;
+}
+return *field_networkMessage;
+}
+
+const IsobusNMMessageTypes::NetworkMessage& AnyIsoBusPdu::networkMessage() const
+{
+if (union_selection != ALT_networkMessage) TTCN_error("Using non-selected field networkMessage in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_networkMessage;
+}
+
+IsobusNMMessageTypes::CannotClaimSourceAddress& AnyIsoBusPdu::cannotClaimSourceAddress()
+{
+if (union_selection != ALT_cannotClaimSourceAddress) {
+clean_up();
+field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress;
+union_selection = ALT_cannotClaimSourceAddress;
+}
+return *field_cannotClaimSourceAddress;
+}
+
+const IsobusNMMessageTypes::CannotClaimSourceAddress& AnyIsoBusPdu::cannotClaimSourceAddress() const
+{
+if (union_selection != ALT_cannotClaimSourceAddress) TTCN_error("Using non-selected field cannotClaimSourceAddress in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_cannotClaimSourceAddress;
+}
+
+IsobusNMMessageTypes::AddressClaimed& AnyIsoBusPdu::addressClaimed()
+{
+if (union_selection != ALT_addressClaimed) {
+clean_up();
+field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed;
+union_selection = ALT_addressClaimed;
+}
+return *field_addressClaimed;
+}
+
+const IsobusNMMessageTypes::AddressClaimed& AnyIsoBusPdu::addressClaimed() const
+{
+if (union_selection != ALT_addressClaimed) TTCN_error("Using non-selected field addressClaimed in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_addressClaimed;
+}
+
+IsobusNMMessageTypes::CommandedAddress& AnyIsoBusPdu::commandedAddress()
+{
+if (union_selection != ALT_commandedAddress) {
+clean_up();
+field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress;
+union_selection = ALT_commandedAddress;
+}
+return *field_commandedAddress;
+}
+
+const IsobusNMMessageTypes::CommandedAddress& AnyIsoBusPdu::commandedAddress() const
+{
+if (union_selection != ALT_commandedAddress) TTCN_error("Using non-selected field commandedAddress in a value of union type @Isobus.AnyIsoBusPdu.");
+return *field_commandedAddress;
+}
+
+boolean AnyIsoBusPdu::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @Isobus.AnyIsoBusPdu.");
+return union_selection == checked_selection;
+}
+
+boolean AnyIsoBusPdu::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean AnyIsoBusPdu::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+case ALT_etp__dt: return field_etp__dt->is_value();
+case ALT_etp__cm: return field_etp__cm->is_value();
+case ALT_vt2ecu: return field_vt2ecu->is_value();
+case ALT_ecu2vt: return field_ecu2vt->is_value();
+case ALT_requestForAddressClaimed: return field_requestForAddressClaimed->is_value();
+case ALT_tp__dt: return field_tp__dt->is_value();
+case ALT_tp__cm: return field_tp__cm->is_value();
+case ALT_networkMessage: return field_networkMessage->is_value();
+case ALT_cannotClaimSourceAddress: return field_cannotClaimSourceAddress->is_value();
+case ALT_addressClaimed: return field_addressClaimed->is_value();
+case ALT_commandedAddress: return field_commandedAddress->is_value();
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void AnyIsoBusPdu::clean_up()
+{
+switch (union_selection) {
+case ALT_etp__dt:
+ delete field_etp__dt;
+ break;
+case ALT_etp__cm:
+ delete field_etp__cm;
+ break;
+case ALT_vt2ecu:
+ delete field_vt2ecu;
+ break;
+case ALT_ecu2vt:
+ delete field_ecu2vt;
+ break;
+case ALT_requestForAddressClaimed:
+ delete field_requestForAddressClaimed;
+ break;
+case ALT_tp__dt:
+ delete field_tp__dt;
+ break;
+case ALT_tp__cm:
+ delete field_tp__cm;
+ break;
+case ALT_networkMessage:
+ delete field_networkMessage;
+ break;
+case ALT_cannotClaimSourceAddress:
+ delete field_cannotClaimSourceAddress;
+ break;
+case ALT_addressClaimed:
+ delete field_addressClaimed;
+ break;
+case ALT_commandedAddress:
+ delete field_commandedAddress;
+ break;
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void AnyIsoBusPdu::log() const
+{
+switch (union_selection) {
+case ALT_etp__dt:
+TTCN_Logger::log_event_str("{ etp_dt := ");
+field_etp__dt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_etp__cm:
+TTCN_Logger::log_event_str("{ etp_cm := ");
+field_etp__cm->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_vt2ecu:
+TTCN_Logger::log_event_str("{ vt2ecu := ");
+field_vt2ecu->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_ecu2vt:
+TTCN_Logger::log_event_str("{ ecu2vt := ");
+field_ecu2vt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_requestForAddressClaimed:
+TTCN_Logger::log_event_str("{ requestForAddressClaimed := ");
+field_requestForAddressClaimed->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_tp__dt:
+TTCN_Logger::log_event_str("{ tp_dt := ");
+field_tp__dt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_tp__cm:
+TTCN_Logger::log_event_str("{ tp_cm := ");
+field_tp__cm->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_networkMessage:
+TTCN_Logger::log_event_str("{ networkMessage := ");
+field_networkMessage->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_cannotClaimSourceAddress:
+TTCN_Logger::log_event_str("{ cannotClaimSourceAddress := ");
+field_cannotClaimSourceAddress->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_addressClaimed:
+TTCN_Logger::log_event_str("{ addressClaimed := ");
+field_addressClaimed->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_commandedAddress:
+TTCN_Logger::log_event_str("{ commandedAddress := ");
+field_commandedAddress->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void AnyIsoBusPdu::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, "etp_dt")) {
+ etp__dt().set_param(*mp_last);
+ if (!etp__dt().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "etp_cm")) {
+ etp__cm().set_param(*mp_last);
+ if (!etp__cm().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "vt2ecu")) {
+ vt2ecu().set_param(*mp_last);
+ if (!vt2ecu().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "ecu2vt")) {
+ ecu2vt().set_param(*mp_last);
+ if (!ecu2vt().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "requestForAddressClaimed")) {
+ requestForAddressClaimed().set_param(*mp_last);
+ if (!requestForAddressClaimed().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "tp_dt")) {
+ tp__dt().set_param(*mp_last);
+ if (!tp__dt().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "tp_cm")) {
+ tp__cm().set_param(*mp_last);
+ if (!tp__cm().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "networkMessage")) {
+ networkMessage().set_param(*mp_last);
+ if (!networkMessage().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "cannotClaimSourceAddress")) {
+ cannotClaimSourceAddress().set_param(*mp_last);
+ if (!cannotClaimSourceAddress().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "addressClaimed")) {
+ addressClaimed().set_param(*mp_last);
+ if (!addressClaimed().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "commandedAddress")) {
+ commandedAddress().set_param(*mp_last);
+ if (!commandedAddress().is_bound()) clean_up();
+ return;
+ }
+ mp_last->error("Field %s does not exist in type @Isobus.AnyIsoBusPdu.", last_name);
+}
+
+void AnyIsoBusPdu::set_implicit_omit()
+{
+switch (union_selection) {
+case ALT_etp__dt:
+field_etp__dt->set_implicit_omit(); break;
+case ALT_etp__cm:
+field_etp__cm->set_implicit_omit(); break;
+case ALT_vt2ecu:
+field_vt2ecu->set_implicit_omit(); break;
+case ALT_ecu2vt:
+field_ecu2vt->set_implicit_omit(); break;
+case ALT_requestForAddressClaimed:
+field_requestForAddressClaimed->set_implicit_omit(); break;
+case ALT_tp__dt:
+field_tp__dt->set_implicit_omit(); break;
+case ALT_tp__cm:
+field_tp__cm->set_implicit_omit(); break;
+case ALT_networkMessage:
+field_networkMessage->set_implicit_omit(); break;
+case ALT_cannotClaimSourceAddress:
+field_cannotClaimSourceAddress->set_implicit_omit(); break;
+case ALT_addressClaimed:
+field_addressClaimed->set_implicit_omit(); break;
+case ALT_commandedAddress:
+field_commandedAddress->set_implicit_omit(); break;
+default: break;
+}
+}
+
+void AnyIsoBusPdu::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+case ALT_etp__dt:
+field_etp__dt->encode_text(text_buf);
+break;
+case ALT_etp__cm:
+field_etp__cm->encode_text(text_buf);
+break;
+case ALT_vt2ecu:
+field_vt2ecu->encode_text(text_buf);
+break;
+case ALT_ecu2vt:
+field_ecu2vt->encode_text(text_buf);
+break;
+case ALT_requestForAddressClaimed:
+field_requestForAddressClaimed->encode_text(text_buf);
+break;
+case ALT_tp__dt:
+field_tp__dt->encode_text(text_buf);
+break;
+case ALT_tp__cm:
+field_tp__cm->encode_text(text_buf);
+break;
+case ALT_networkMessage:
+field_networkMessage->encode_text(text_buf);
+break;
+case ALT_cannotClaimSourceAddress:
+field_cannotClaimSourceAddress->encode_text(text_buf);
+break;
+case ALT_addressClaimed:
+field_addressClaimed->encode_text(text_buf);
+break;
+case ALT_commandedAddress:
+field_commandedAddress->encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @Isobus.AnyIsoBusPdu.");
+}
+}
+
+void AnyIsoBusPdu::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+case ALT_etp__dt:
+etp__dt().decode_text(text_buf);
+break;
+case ALT_etp__cm:
+etp__cm().decode_text(text_buf);
+break;
+case ALT_vt2ecu:
+vt2ecu().decode_text(text_buf);
+break;
+case ALT_ecu2vt:
+ecu2vt().decode_text(text_buf);
+break;
+case ALT_requestForAddressClaimed:
+requestForAddressClaimed().decode_text(text_buf);
+break;
+case ALT_tp__dt:
+tp__dt().decode_text(text_buf);
+break;
+case ALT_tp__cm:
+tp__cm().decode_text(text_buf);
+break;
+case ALT_networkMessage:
+networkMessage().decode_text(text_buf);
+break;
+case ALT_cannotClaimSourceAddress:
+cannotClaimSourceAddress().decode_text(text_buf);
+break;
+case ALT_addressClaimed:
+addressClaimed().decode_text(text_buf);
+break;
+case ALT_commandedAddress:
+commandedAddress().decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @Isobus.AnyIsoBusPdu.");
+}
+}
+
+void AnyIsoBusPdu::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 AnyIsoBusPdu::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int AnyIsoBusPdu::RAW_decode(
+const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit,
+raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
+{
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int starting_pos=p_buf.get_pos_bit();
+ if(sel_field!=-1){
+ switch(sel_field){
+ case 0: {
+ RAW_Force_Omit field_force_omit(0, force_omit, IsobusCMMessageTypes::ETP__DT_descr_.raw->forceomit);
+ decoded_length = etp__dt().RAW_decode(IsobusCMMessageTypes::ETP__DT_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 1: {
+ RAW_Force_Omit field_force_omit(1, force_omit, IsobusCMMessageTypes::ETP__CM_descr_.raw->forceomit);
+ decoded_length = etp__cm().RAW_decode(IsobusCMMessageTypes::ETP__CM_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 2: {
+ RAW_Force_Omit field_force_omit(2, force_omit, IsobusVTMessageTypes::VT2ECU_descr_.raw->forceomit);
+ decoded_length = vt2ecu().RAW_decode(IsobusVTMessageTypes::VT2ECU_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 3: {
+ RAW_Force_Omit field_force_omit(3, force_omit, IsobusVTMessageTypes::ECU2VT_descr_.raw->forceomit);
+ decoded_length = ecu2vt().RAW_decode(IsobusVTMessageTypes::ECU2VT_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 4: {
+ RAW_Force_Omit field_force_omit(4, force_omit, IsobusNMMessageTypes::RequestForAddressClaimed_descr_.raw->forceomit);
+ decoded_length = requestForAddressClaimed().RAW_decode(IsobusNMMessageTypes::RequestForAddressClaimed_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 5: {
+ RAW_Force_Omit field_force_omit(5, force_omit, IsobusCMMessageTypes::TP__DT_descr_.raw->forceomit);
+ decoded_length = tp__dt().RAW_decode(IsobusCMMessageTypes::TP__DT_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 6: {
+ RAW_Force_Omit field_force_omit(6, force_omit, IsobusCMMessageTypes::TP__CM_descr_.raw->forceomit);
+ decoded_length = tp__cm().RAW_decode(IsobusCMMessageTypes::TP__CM_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 7: {
+ RAW_Force_Omit field_force_omit(7, force_omit, IsobusNMMessageTypes::NetworkMessage_descr_.raw->forceomit);
+ decoded_length = networkMessage().RAW_decode(IsobusNMMessageTypes::NetworkMessage_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 8: {
+ RAW_Force_Omit field_force_omit(8, force_omit, IsobusNMMessageTypes::CannotClaimSourceAddress_descr_.raw->forceomit);
+ decoded_length = cannotClaimSourceAddress().RAW_decode(IsobusNMMessageTypes::CannotClaimSourceAddress_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 9: {
+ RAW_Force_Omit field_force_omit(9, force_omit, IsobusNMMessageTypes::AddressClaimed_descr_.raw->forceomit);
+ decoded_length = addressClaimed().RAW_decode(IsobusNMMessageTypes::AddressClaimed_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 10: {
+ RAW_Force_Omit field_force_omit(10, force_omit, IsobusNMMessageTypes::CommandedAddress_descr_.raw->forceomit);
+ decoded_length = commandedAddress().RAW_decode(IsobusNMMessageTypes::CommandedAddress_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ default: break;
+ }
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ } else {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_0_force_omit(0, force_omit, IsobusCMMessageTypes::ETP__DT_descr_.raw->forceomit);
+ decoded_length = etp__dt().RAW_decode(IsobusCMMessageTypes::ETP__DT_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_1_force_omit(1, force_omit, IsobusCMMessageTypes::ETP__CM_descr_.raw->forceomit);
+ decoded_length = etp__cm().RAW_decode(IsobusCMMessageTypes::ETP__CM_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_2_force_omit(2, force_omit, IsobusVTMessageTypes::VT2ECU_descr_.raw->forceomit);
+ decoded_length = vt2ecu().RAW_decode(IsobusVTMessageTypes::VT2ECU_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_3_force_omit(3, force_omit, IsobusVTMessageTypes::ECU2VT_descr_.raw->forceomit);
+ decoded_length = ecu2vt().RAW_decode(IsobusVTMessageTypes::ECU2VT_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_4_force_omit(4, force_omit, IsobusNMMessageTypes::RequestForAddressClaimed_descr_.raw->forceomit);
+ decoded_length = requestForAddressClaimed().RAW_decode(IsobusNMMessageTypes::RequestForAddressClaimed_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_5_force_omit(5, force_omit, IsobusCMMessageTypes::TP__DT_descr_.raw->forceomit);
+ decoded_length = tp__dt().RAW_decode(IsobusCMMessageTypes::TP__DT_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_6_force_omit(6, force_omit, IsobusCMMessageTypes::TP__CM_descr_.raw->forceomit);
+ decoded_length = tp__cm().RAW_decode(IsobusCMMessageTypes::TP__CM_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_7_force_omit(7, force_omit, IsobusNMMessageTypes::NetworkMessage_descr_.raw->forceomit);
+ decoded_length = networkMessage().RAW_decode(IsobusNMMessageTypes::NetworkMessage_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_8_force_omit(8, force_omit, IsobusNMMessageTypes::CannotClaimSourceAddress_descr_.raw->forceomit);
+ decoded_length = cannotClaimSourceAddress().RAW_decode(IsobusNMMessageTypes::CannotClaimSourceAddress_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_9_force_omit(9, force_omit, IsobusNMMessageTypes::AddressClaimed_descr_.raw->forceomit);
+ decoded_length = addressClaimed().RAW_decode(IsobusNMMessageTypes::AddressClaimed_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_10_force_omit(10, force_omit, IsobusNMMessageTypes::CommandedAddress_descr_.raw->forceomit);
+ decoded_length = commandedAddress().RAW_decode(IsobusNMMessageTypes::CommandedAddress_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
+ if (decoded_length >= 0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }
+ }
+ clean_up();
+ return -1;
+}
+
+int AnyIsoBusPdu::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
+{
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 11; myleaf.body.node.nodes = init_nodes_of_enc_tree(11);
+ memset(myleaf.body.node.nodes, 0, 11 * sizeof(RAW_enc_tree *));
+ switch (union_selection) {
+ case ALT_etp__dt:
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, IsobusCMMessageTypes::ETP__DT_descr_.raw);
+ encoded_length = field_etp__dt->RAW_encode(IsobusCMMessageTypes::ETP__DT_descr_, *myleaf.body.node.nodes[0]);
+ myleaf.body.node.nodes[0]->coding_descr = &IsobusCMMessageTypes::ETP__DT_descr_;
+ break;
+ case ALT_etp__cm:
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, IsobusCMMessageTypes::ETP__CM_descr_.raw);
+ encoded_length = field_etp__cm->RAW_encode(IsobusCMMessageTypes::ETP__CM_descr_, *myleaf.body.node.nodes[1]);
+ myleaf.body.node.nodes[1]->coding_descr = &IsobusCMMessageTypes::ETP__CM_descr_;
+ break;
+ case ALT_vt2ecu:
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, IsobusVTMessageTypes::VT2ECU_descr_.raw);
+ encoded_length = field_vt2ecu->RAW_encode(IsobusVTMessageTypes::VT2ECU_descr_, *myleaf.body.node.nodes[2]);
+ myleaf.body.node.nodes[2]->coding_descr = &IsobusVTMessageTypes::VT2ECU_descr_;
+ break;
+ case ALT_ecu2vt:
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, IsobusVTMessageTypes::ECU2VT_descr_.raw);
+ encoded_length = field_ecu2vt->RAW_encode(IsobusVTMessageTypes::ECU2VT_descr_, *myleaf.body.node.nodes[3]);
+ myleaf.body.node.nodes[3]->coding_descr = &IsobusVTMessageTypes::ECU2VT_descr_;
+ break;
+ case ALT_requestForAddressClaimed:
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, IsobusNMMessageTypes::RequestForAddressClaimed_descr_.raw);
+ encoded_length = field_requestForAddressClaimed->RAW_encode(IsobusNMMessageTypes::RequestForAddressClaimed_descr_, *myleaf.body.node.nodes[4]);
+ myleaf.body.node.nodes[4]->coding_descr = &IsobusNMMessageTypes::RequestForAddressClaimed_descr_;
+ break;
+ case ALT_tp__dt:
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, IsobusCMMessageTypes::TP__DT_descr_.raw);
+ encoded_length = field_tp__dt->RAW_encode(IsobusCMMessageTypes::TP__DT_descr_, *myleaf.body.node.nodes[5]);
+ myleaf.body.node.nodes[5]->coding_descr = &IsobusCMMessageTypes::TP__DT_descr_;
+ break;
+ case ALT_tp__cm:
+ myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, IsobusCMMessageTypes::TP__CM_descr_.raw);
+ encoded_length = field_tp__cm->RAW_encode(IsobusCMMessageTypes::TP__CM_descr_, *myleaf.body.node.nodes[6]);
+ myleaf.body.node.nodes[6]->coding_descr = &IsobusCMMessageTypes::TP__CM_descr_;
+ break;
+ case ALT_networkMessage:
+ myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, IsobusNMMessageTypes::NetworkMessage_descr_.raw);
+ encoded_length = field_networkMessage->RAW_encode(IsobusNMMessageTypes::NetworkMessage_descr_, *myleaf.body.node.nodes[7]);
+ myleaf.body.node.nodes[7]->coding_descr = &IsobusNMMessageTypes::NetworkMessage_descr_;
+ break;
+ case ALT_cannotClaimSourceAddress:
+ myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, IsobusNMMessageTypes::CannotClaimSourceAddress_descr_.raw);
+ encoded_length = field_cannotClaimSourceAddress->RAW_encode(IsobusNMMessageTypes::CannotClaimSourceAddress_descr_, *myleaf.body.node.nodes[8]);
+ myleaf.body.node.nodes[8]->coding_descr = &IsobusNMMessageTypes::CannotClaimSourceAddress_descr_;
+ break;
+ case ALT_addressClaimed:
+ myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, IsobusNMMessageTypes::AddressClaimed_descr_.raw);
+ encoded_length = field_addressClaimed->RAW_encode(IsobusNMMessageTypes::AddressClaimed_descr_, *myleaf.body.node.nodes[9]);
+ myleaf.body.node.nodes[9]->coding_descr = &IsobusNMMessageTypes::AddressClaimed_descr_;
+ break;
+ case ALT_commandedAddress:
+ myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, IsobusNMMessageTypes::CommandedAddress_descr_.raw);
+ encoded_length = field_commandedAddress->RAW_encode(IsobusNMMessageTypes::CommandedAddress_descr_, *myleaf.body.node.nodes[10]);
+ myleaf.body.node.nodes[10]->coding_descr = &IsobusNMMessageTypes::CommandedAddress_descr_;
+ break;
+ default:
+ TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ }
+ return encoded_length;
+}
+
+void AnyIsoBusPdu_template::copy_value(const AnyIsoBusPdu& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+single_value.field_etp__dt = new IsobusCMMessageTypes::ETP__DT_template(other_value.etp__dt());
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+single_value.field_etp__cm = new IsobusCMMessageTypes::ETP__CM_template(other_value.etp__cm());
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+single_value.field_vt2ecu = new IsobusVTMessageTypes::VT2ECU_template(other_value.vt2ecu());
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+single_value.field_ecu2vt = new IsobusVTMessageTypes::ECU2VT_template(other_value.ecu2vt());
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+single_value.field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed_template(other_value.requestForAddressClaimed());
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+single_value.field_tp__dt = new IsobusCMMessageTypes::TP__DT_template(other_value.tp__dt());
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+single_value.field_tp__cm = new IsobusCMMessageTypes::TP__CM_template(other_value.tp__cm());
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+single_value.field_networkMessage = new IsobusNMMessageTypes::NetworkMessage_template(other_value.networkMessage());
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+single_value.field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress_template(other_value.cannotClaimSourceAddress());
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+single_value.field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed_template(other_value.addressClaimed());
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+single_value.field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress_template(other_value.commandedAddress());
+break;
+default:
+TTCN_error("Initializing a template with an unbound value of type @Isobus.AnyIsoBusPdu.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void AnyIsoBusPdu_template::copy_template(const AnyIsoBusPdu_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 AnyIsoBusPdu::ALT_etp__dt:
+single_value.field_etp__dt = new IsobusCMMessageTypes::ETP__DT_template(*other_value.single_value.field_etp__dt);
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+single_value.field_etp__cm = new IsobusCMMessageTypes::ETP__CM_template(*other_value.single_value.field_etp__cm);
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+single_value.field_vt2ecu = new IsobusVTMessageTypes::VT2ECU_template(*other_value.single_value.field_vt2ecu);
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+single_value.field_ecu2vt = new IsobusVTMessageTypes::ECU2VT_template(*other_value.single_value.field_ecu2vt);
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+single_value.field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed_template(*other_value.single_value.field_requestForAddressClaimed);
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+single_value.field_tp__dt = new IsobusCMMessageTypes::TP__DT_template(*other_value.single_value.field_tp__dt);
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+single_value.field_tp__cm = new IsobusCMMessageTypes::TP__CM_template(*other_value.single_value.field_tp__cm);
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+single_value.field_networkMessage = new IsobusNMMessageTypes::NetworkMessage_template(*other_value.single_value.field_networkMessage);
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+single_value.field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress_template(*other_value.single_value.field_cannotClaimSourceAddress);
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+single_value.field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed_template(*other_value.single_value.field_addressClaimed);
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+single_value.field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress_template(*other_value.single_value.field_commandedAddress);
+break;
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @Isobus.AnyIsoBusPdu.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new AnyIsoBusPdu_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @Isobus.AnyIsoBusPdu.");
+}
+set_selection(other_value);
+}
+
+AnyIsoBusPdu_template::AnyIsoBusPdu_template()
+{
+}
+
+AnyIsoBusPdu_template::AnyIsoBusPdu_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+AnyIsoBusPdu_template::AnyIsoBusPdu_template(const AnyIsoBusPdu& other_value)
+{
+copy_value(other_value);
+}
+
+AnyIsoBusPdu_template::AnyIsoBusPdu_template(const OPTIONAL<AnyIsoBusPdu>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const AnyIsoBusPdu&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @Isobus.AnyIsoBusPdu from an unbound optional field.");
+}
+}
+
+AnyIsoBusPdu_template::AnyIsoBusPdu_template(const AnyIsoBusPdu_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+AnyIsoBusPdu_template::~AnyIsoBusPdu_template()
+{
+clean_up();
+}
+
+void AnyIsoBusPdu_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+delete single_value.field_etp__dt;
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+delete single_value.field_etp__cm;
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+delete single_value.field_vt2ecu;
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+delete single_value.field_ecu2vt;
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+delete single_value.field_requestForAddressClaimed;
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+delete single_value.field_tp__dt;
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+delete single_value.field_tp__cm;
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+delete single_value.field_networkMessage;
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+delete single_value.field_cannotClaimSourceAddress;
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+delete single_value.field_addressClaimed;
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+delete single_value.field_commandedAddress;
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+AnyIsoBusPdu_template& AnyIsoBusPdu_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+AnyIsoBusPdu_template& AnyIsoBusPdu_template::operator=(const AnyIsoBusPdu& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+AnyIsoBusPdu_template& AnyIsoBusPdu_template::operator=(const OPTIONAL<AnyIsoBusPdu>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const AnyIsoBusPdu&)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 @Isobus.AnyIsoBusPdu.");
+}
+return *this;
+}
+
+AnyIsoBusPdu_template& AnyIsoBusPdu_template::operator=(const AnyIsoBusPdu_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean AnyIsoBusPdu_template::match(const AnyIsoBusPdu& 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:
+{
+AnyIsoBusPdu::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == AnyIsoBusPdu::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+return single_value.field_etp__dt->match(other_value.etp__dt(), legacy);
+case AnyIsoBusPdu::ALT_etp__cm:
+return single_value.field_etp__cm->match(other_value.etp__cm(), legacy);
+case AnyIsoBusPdu::ALT_vt2ecu:
+return single_value.field_vt2ecu->match(other_value.vt2ecu(), legacy);
+case AnyIsoBusPdu::ALT_ecu2vt:
+return single_value.field_ecu2vt->match(other_value.ecu2vt(), legacy);
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+return single_value.field_requestForAddressClaimed->match(other_value.requestForAddressClaimed(), legacy);
+case AnyIsoBusPdu::ALT_tp__dt:
+return single_value.field_tp__dt->match(other_value.tp__dt(), legacy);
+case AnyIsoBusPdu::ALT_tp__cm:
+return single_value.field_tp__cm->match(other_value.tp__cm(), legacy);
+case AnyIsoBusPdu::ALT_networkMessage:
+return single_value.field_networkMessage->match(other_value.networkMessage(), legacy);
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+return single_value.field_cannotClaimSourceAddress->match(other_value.cannotClaimSourceAddress(), legacy);
+case AnyIsoBusPdu::ALT_addressClaimed:
+return single_value.field_addressClaimed->match(other_value.addressClaimed(), legacy);
+case AnyIsoBusPdu::ALT_commandedAddress:
+return single_value.field_commandedAddress->match(other_value.commandedAddress(), legacy);
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @Isobus.AnyIsoBusPdu.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @Isobus.AnyIsoBusPdu.");
+}
+return FALSE;
+}
+
+boolean AnyIsoBusPdu_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+return single_value.field_etp__dt->is_value();
+case AnyIsoBusPdu::ALT_etp__cm:
+return single_value.field_etp__cm->is_value();
+case AnyIsoBusPdu::ALT_vt2ecu:
+return single_value.field_vt2ecu->is_value();
+case AnyIsoBusPdu::ALT_ecu2vt:
+return single_value.field_ecu2vt->is_value();
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+return single_value.field_requestForAddressClaimed->is_value();
+case AnyIsoBusPdu::ALT_tp__dt:
+return single_value.field_tp__dt->is_value();
+case AnyIsoBusPdu::ALT_tp__cm:
+return single_value.field_tp__cm->is_value();
+case AnyIsoBusPdu::ALT_networkMessage:
+return single_value.field_networkMessage->is_value();
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+return single_value.field_cannotClaimSourceAddress->is_value();
+case AnyIsoBusPdu::ALT_addressClaimed:
+return single_value.field_addressClaimed->is_value();
+case AnyIsoBusPdu::ALT_commandedAddress:
+return single_value.field_commandedAddress->is_value();
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @Isobus.AnyIsoBusPdu.");
+}
+}
+
+AnyIsoBusPdu AnyIsoBusPdu_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 @Isobus.AnyIsoBusPdu.");
+AnyIsoBusPdu ret_val;
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+ret_val.etp__dt() = single_value.field_etp__dt->valueof();
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+ret_val.etp__cm() = single_value.field_etp__cm->valueof();
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+ret_val.vt2ecu() = single_value.field_vt2ecu->valueof();
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+ret_val.ecu2vt() = single_value.field_ecu2vt->valueof();
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+ret_val.requestForAddressClaimed() = single_value.field_requestForAddressClaimed->valueof();
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+ret_val.tp__dt() = single_value.field_tp__dt->valueof();
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+ret_val.tp__cm() = single_value.field_tp__cm->valueof();
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+ret_val.networkMessage() = single_value.field_networkMessage->valueof();
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+ret_val.cannotClaimSourceAddress() = single_value.field_cannotClaimSourceAddress->valueof();
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+ret_val.addressClaimed() = single_value.field_addressClaimed->valueof();
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+ret_val.commandedAddress() = single_value.field_commandedAddress->valueof();
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @Isobus.AnyIsoBusPdu.");
+}
+return ret_val;
+}
+
+AnyIsoBusPdu_template& AnyIsoBusPdu_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @Isobus.AnyIsoBusPdu.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @Isobus.AnyIsoBusPdu.");
+return value_list.list_value[list_index];
+}
+void AnyIsoBusPdu_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @Isobus.AnyIsoBusPdu.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new AnyIsoBusPdu_template[list_length];
+}
+
+IsobusCMMessageTypes::ETP__DT_template& AnyIsoBusPdu_template::etp__dt()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_etp__dt) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_etp__dt = new IsobusCMMessageTypes::ETP__DT_template(ANY_VALUE);
+else single_value.field_etp__dt = new IsobusCMMessageTypes::ETP__DT_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_etp__dt;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_etp__dt;
+}
+
+const IsobusCMMessageTypes::ETP__DT_template& AnyIsoBusPdu_template::etp__dt() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field etp_dt in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_etp__dt) TTCN_error("Accessing non-selected field etp_dt in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_etp__dt;
+}
+
+IsobusCMMessageTypes::ETP__CM_template& AnyIsoBusPdu_template::etp__cm()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_etp__cm) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_etp__cm = new IsobusCMMessageTypes::ETP__CM_template(ANY_VALUE);
+else single_value.field_etp__cm = new IsobusCMMessageTypes::ETP__CM_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_etp__cm;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_etp__cm;
+}
+
+const IsobusCMMessageTypes::ETP__CM_template& AnyIsoBusPdu_template::etp__cm() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field etp_cm in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_etp__cm) TTCN_error("Accessing non-selected field etp_cm in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_etp__cm;
+}
+
+IsobusVTMessageTypes::VT2ECU_template& AnyIsoBusPdu_template::vt2ecu()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_vt2ecu) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_vt2ecu = new IsobusVTMessageTypes::VT2ECU_template(ANY_VALUE);
+else single_value.field_vt2ecu = new IsobusVTMessageTypes::VT2ECU_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_vt2ecu;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_vt2ecu;
+}
+
+const IsobusVTMessageTypes::VT2ECU_template& AnyIsoBusPdu_template::vt2ecu() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field vt2ecu in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_vt2ecu) TTCN_error("Accessing non-selected field vt2ecu in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_vt2ecu;
+}
+
+IsobusVTMessageTypes::ECU2VT_template& AnyIsoBusPdu_template::ecu2vt()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_ecu2vt) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ecu2vt = new IsobusVTMessageTypes::ECU2VT_template(ANY_VALUE);
+else single_value.field_ecu2vt = new IsobusVTMessageTypes::ECU2VT_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_ecu2vt;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_ecu2vt;
+}
+
+const IsobusVTMessageTypes::ECU2VT_template& AnyIsoBusPdu_template::ecu2vt() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ecu2vt in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_ecu2vt) TTCN_error("Accessing non-selected field ecu2vt in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_ecu2vt;
+}
+
+IsobusNMMessageTypes::RequestForAddressClaimed_template& AnyIsoBusPdu_template::requestForAddressClaimed()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_requestForAddressClaimed) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed_template(ANY_VALUE);
+else single_value.field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_requestForAddressClaimed;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_requestForAddressClaimed;
+}
+
+const IsobusNMMessageTypes::RequestForAddressClaimed_template& AnyIsoBusPdu_template::requestForAddressClaimed() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestForAddressClaimed in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_requestForAddressClaimed) TTCN_error("Accessing non-selected field requestForAddressClaimed in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_requestForAddressClaimed;
+}
+
+IsobusCMMessageTypes::TP__DT_template& AnyIsoBusPdu_template::tp__dt()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_tp__dt) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_tp__dt = new IsobusCMMessageTypes::TP__DT_template(ANY_VALUE);
+else single_value.field_tp__dt = new IsobusCMMessageTypes::TP__DT_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_tp__dt;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_tp__dt;
+}
+
+const IsobusCMMessageTypes::TP__DT_template& AnyIsoBusPdu_template::tp__dt() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field tp_dt in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_tp__dt) TTCN_error("Accessing non-selected field tp_dt in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_tp__dt;
+}
+
+IsobusCMMessageTypes::TP__CM_template& AnyIsoBusPdu_template::tp__cm()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_tp__cm) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_tp__cm = new IsobusCMMessageTypes::TP__CM_template(ANY_VALUE);
+else single_value.field_tp__cm = new IsobusCMMessageTypes::TP__CM_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_tp__cm;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_tp__cm;
+}
+
+const IsobusCMMessageTypes::TP__CM_template& AnyIsoBusPdu_template::tp__cm() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field tp_cm in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_tp__cm) TTCN_error("Accessing non-selected field tp_cm in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_tp__cm;
+}
+
+IsobusNMMessageTypes::NetworkMessage_template& AnyIsoBusPdu_template::networkMessage()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_networkMessage) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_networkMessage = new IsobusNMMessageTypes::NetworkMessage_template(ANY_VALUE);
+else single_value.field_networkMessage = new IsobusNMMessageTypes::NetworkMessage_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_networkMessage;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_networkMessage;
+}
+
+const IsobusNMMessageTypes::NetworkMessage_template& AnyIsoBusPdu_template::networkMessage() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field networkMessage in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_networkMessage) TTCN_error("Accessing non-selected field networkMessage in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_networkMessage;
+}
+
+IsobusNMMessageTypes::CannotClaimSourceAddress_template& AnyIsoBusPdu_template::cannotClaimSourceAddress()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_cannotClaimSourceAddress) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress_template(ANY_VALUE);
+else single_value.field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_cannotClaimSourceAddress;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_cannotClaimSourceAddress;
+}
+
+const IsobusNMMessageTypes::CannotClaimSourceAddress_template& AnyIsoBusPdu_template::cannotClaimSourceAddress() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cannotClaimSourceAddress in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_cannotClaimSourceAddress) TTCN_error("Accessing non-selected field cannotClaimSourceAddress in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_cannotClaimSourceAddress;
+}
+
+IsobusNMMessageTypes::AddressClaimed_template& AnyIsoBusPdu_template::addressClaimed()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_addressClaimed) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed_template(ANY_VALUE);
+else single_value.field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_addressClaimed;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_addressClaimed;
+}
+
+const IsobusNMMessageTypes::AddressClaimed_template& AnyIsoBusPdu_template::addressClaimed() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field addressClaimed in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_addressClaimed) TTCN_error("Accessing non-selected field addressClaimed in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_addressClaimed;
+}
+
+IsobusNMMessageTypes::CommandedAddress_template& AnyIsoBusPdu_template::commandedAddress()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != AnyIsoBusPdu::ALT_commandedAddress) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress_template(ANY_VALUE);
+else single_value.field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress_template;
+single_value.union_selection = AnyIsoBusPdu::ALT_commandedAddress;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_commandedAddress;
+}
+
+const IsobusNMMessageTypes::CommandedAddress_template& AnyIsoBusPdu_template::commandedAddress() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field commandedAddress in a non-specific template of union type @Isobus.AnyIsoBusPdu.");
+if (single_value.union_selection != AnyIsoBusPdu::ALT_commandedAddress) TTCN_error("Accessing non-selected field commandedAddress in a template of union type @Isobus.AnyIsoBusPdu.");
+return *single_value.field_commandedAddress;
+}
+
+boolean AnyIsoBusPdu_template::ischosen(AnyIsoBusPdu::union_selection_type checked_selection) const
+{
+if (checked_selection == AnyIsoBusPdu::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @Isobus.AnyIsoBusPdu.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == AnyIsoBusPdu::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @Isobus.AnyIsoBusPdu.");
+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 @Isobus.AnyIsoBusPdu 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 AnyIsoBusPdu_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+TTCN_Logger::log_event_str("{ etp_dt := ");
+single_value.field_etp__dt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+TTCN_Logger::log_event_str("{ etp_cm := ");
+single_value.field_etp__cm->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+TTCN_Logger::log_event_str("{ vt2ecu := ");
+single_value.field_vt2ecu->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+TTCN_Logger::log_event_str("{ ecu2vt := ");
+single_value.field_ecu2vt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+TTCN_Logger::log_event_str("{ requestForAddressClaimed := ");
+single_value.field_requestForAddressClaimed->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+TTCN_Logger::log_event_str("{ tp_dt := ");
+single_value.field_tp__dt->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+TTCN_Logger::log_event_str("{ tp_cm := ");
+single_value.field_tp__cm->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+TTCN_Logger::log_event_str("{ networkMessage := ");
+single_value.field_networkMessage->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+TTCN_Logger::log_event_str("{ cannotClaimSourceAddress := ");
+single_value.field_cannotClaimSourceAddress->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+TTCN_Logger::log_event_str("{ addressClaimed := ");
+single_value.field_addressClaimed->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+TTCN_Logger::log_event_str("{ commandedAddress := ");
+single_value.field_commandedAddress->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void AnyIsoBusPdu_template::log_match(const AnyIsoBusPdu& 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()) {
+switch (single_value.union_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".etp_dt");
+single_value.field_etp__dt->log_match(match_value.etp__dt(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ etp_dt := ");
+single_value.field_etp__dt->log_match(match_value.etp__dt(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".etp_cm");
+single_value.field_etp__cm->log_match(match_value.etp__cm(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ etp_cm := ");
+single_value.field_etp__cm->log_match(match_value.etp__cm(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".vt2ecu");
+single_value.field_vt2ecu->log_match(match_value.vt2ecu(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ vt2ecu := ");
+single_value.field_vt2ecu->log_match(match_value.vt2ecu(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".ecu2vt");
+single_value.field_ecu2vt->log_match(match_value.ecu2vt(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ ecu2vt := ");
+single_value.field_ecu2vt->log_match(match_value.ecu2vt(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".requestForAddressClaimed");
+single_value.field_requestForAddressClaimed->log_match(match_value.requestForAddressClaimed(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ requestForAddressClaimed := ");
+single_value.field_requestForAddressClaimed->log_match(match_value.requestForAddressClaimed(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".tp_dt");
+single_value.field_tp__dt->log_match(match_value.tp__dt(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ tp_dt := ");
+single_value.field_tp__dt->log_match(match_value.tp__dt(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".tp_cm");
+single_value.field_tp__cm->log_match(match_value.tp__cm(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ tp_cm := ");
+single_value.field_tp__cm->log_match(match_value.tp__cm(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".networkMessage");
+single_value.field_networkMessage->log_match(match_value.networkMessage(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ networkMessage := ");
+single_value.field_networkMessage->log_match(match_value.networkMessage(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".cannotClaimSourceAddress");
+single_value.field_cannotClaimSourceAddress->log_match(match_value.cannotClaimSourceAddress(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ cannotClaimSourceAddress := ");
+single_value.field_cannotClaimSourceAddress->log_match(match_value.cannotClaimSourceAddress(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".addressClaimed");
+single_value.field_addressClaimed->log_match(match_value.addressClaimed(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ addressClaimed := ");
+single_value.field_addressClaimed->log_match(match_value.addressClaimed(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".commandedAddress");
+single_value.field_commandedAddress->log_match(match_value.commandedAddress(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ commandedAddress := ");
+single_value.field_commandedAddress->log_match(match_value.commandedAddress(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 AnyIsoBusPdu_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 AnyIsoBusPdu::ALT_etp__dt:
+single_value.field_etp__dt->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+single_value.field_etp__cm->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+single_value.field_vt2ecu->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+single_value.field_ecu2vt->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+single_value.field_requestForAddressClaimed->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+single_value.field_tp__dt->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+single_value.field_tp__cm->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+single_value.field_networkMessage->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+single_value.field_cannotClaimSourceAddress->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+single_value.field_addressClaimed->encode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+single_value.field_commandedAddress->encode_text(text_buf);
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @Isobus.AnyIsoBusPdu.");
+}
+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 @Isobus.AnyIsoBusPdu.");
+}
+}
+
+void AnyIsoBusPdu_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+{
+single_value.union_selection = AnyIsoBusPdu::UNBOUND_VALUE;
+AnyIsoBusPdu::union_selection_type new_selection = (AnyIsoBusPdu::union_selection_type)text_buf.pull_int().get_val();
+switch (new_selection) {
+case AnyIsoBusPdu::ALT_etp__dt:
+single_value.field_etp__dt = new IsobusCMMessageTypes::ETP__DT_template;
+single_value.field_etp__dt->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_etp__cm:
+single_value.field_etp__cm = new IsobusCMMessageTypes::ETP__CM_template;
+single_value.field_etp__cm->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_vt2ecu:
+single_value.field_vt2ecu = new IsobusVTMessageTypes::VT2ECU_template;
+single_value.field_vt2ecu->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_ecu2vt:
+single_value.field_ecu2vt = new IsobusVTMessageTypes::ECU2VT_template;
+single_value.field_ecu2vt->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+single_value.field_requestForAddressClaimed = new IsobusNMMessageTypes::RequestForAddressClaimed_template;
+single_value.field_requestForAddressClaimed->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_tp__dt:
+single_value.field_tp__dt = new IsobusCMMessageTypes::TP__DT_template;
+single_value.field_tp__dt->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_tp__cm:
+single_value.field_tp__cm = new IsobusCMMessageTypes::TP__CM_template;
+single_value.field_tp__cm->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_networkMessage:
+single_value.field_networkMessage = new IsobusNMMessageTypes::NetworkMessage_template;
+single_value.field_networkMessage->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+single_value.field_cannotClaimSourceAddress = new IsobusNMMessageTypes::CannotClaimSourceAddress_template;
+single_value.field_cannotClaimSourceAddress->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_addressClaimed:
+single_value.field_addressClaimed = new IsobusNMMessageTypes::AddressClaimed_template;
+single_value.field_addressClaimed->decode_text(text_buf);
+break;
+case AnyIsoBusPdu::ALT_commandedAddress:
+single_value.field_commandedAddress = new IsobusNMMessageTypes::CommandedAddress_template;
+single_value.field_commandedAddress->decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @Isobus.AnyIsoBusPdu.");
+}
+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 AnyIsoBusPdu_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 @Isobus.AnyIsoBusPdu.");
+}
+}
+
+boolean AnyIsoBusPdu_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean AnyIsoBusPdu_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
+if (value_list.list_value[v_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void AnyIsoBusPdu_template::set_param(Module_Param& param)
+{
+ if (dynamic_cast<Module_Param_Name*>(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 `@Isobus.AnyIsoBusPdu'");
+ }
+ if (strcmp("etp_dt", param_field) == 0) {
+ etp__dt().set_param(param);
+ return;
+ } else if (strcmp("etp_cm", param_field) == 0) {
+ etp__cm().set_param(param);
+ return;
+ } else if (strcmp("vt2ecu", param_field) == 0) {
+ vt2ecu().set_param(param);
+ return;
+ } else if (strcmp("ecu2vt", param_field) == 0) {
+ ecu2vt().set_param(param);
+ return;
+ } else if (strcmp("requestForAddressClaimed", param_field) == 0) {
+ requestForAddressClaimed().set_param(param);
+ return;
+ } else if (strcmp("tp_dt", param_field) == 0) {
+ tp__dt().set_param(param);
+ return;
+ } else if (strcmp("tp_cm", param_field) == 0) {
+ tp__cm().set_param(param);
+ return;
+ } else if (strcmp("networkMessage", param_field) == 0) {
+ networkMessage().set_param(param);
+ return;
+ } else if (strcmp("cannotClaimSourceAddress", param_field) == 0) {
+ cannotClaimSourceAddress().set_param(param);
+ return;
+ } else if (strcmp("addressClaimed", param_field) == 0) {
+ addressClaimed().set_param(param);
+ return;
+ } else if (strcmp("commandedAddress", param_field) == 0) {
+ commandedAddress().set_param(param);
+ return;
+ } else param.error("Field `%s' not found in union template type `@Isobus.AnyIsoBusPdu'", 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: {
+ AnyIsoBusPdu_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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", "@Isobus.AnyIsoBusPdu");
+ 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, "etp_dt")) {
+ etp__dt().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "etp_cm")) {
+ etp__cm().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "vt2ecu")) {
+ vt2ecu().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "ecu2vt")) {
+ ecu2vt().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "requestForAddressClaimed")) {
+ requestForAddressClaimed().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "tp_dt")) {
+ tp__dt().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "tp_cm")) {
+ tp__cm().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "networkMessage")) {
+ networkMessage().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "cannotClaimSourceAddress")) {
+ cannotClaimSourceAddress().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "addressClaimed")) {
+ addressClaimed().set_param(*mp_last);
+ break;
+ }
+ if (!strcmp(last_name, "commandedAddress")) {
+ commandedAddress().set_param(*mp_last);
+ break;
+ }
+ mp_last->error("Field %s does not exist in type @Isobus.AnyIsoBusPdu.", last_name);
+ } break;
+ default:
+ param.type_error("union template", "@Isobus.AnyIsoBusPdu");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void AnyIsoBusPdu_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 AnyIsoBusPdu::ALT_etp__dt:
+single_value.field_etp__dt->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_etp__cm:
+single_value.field_etp__cm->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_vt2ecu:
+single_value.field_vt2ecu->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_ecu2vt:
+single_value.field_ecu2vt->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+single_value.field_requestForAddressClaimed->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_tp__dt:
+single_value.field_tp__dt->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_tp__cm:
+single_value.field_tp__cm->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_networkMessage:
+single_value.field_networkMessage->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+single_value.field_cannotClaimSourceAddress->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_addressClaimed:
+single_value.field_addressClaimed->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+case AnyIsoBusPdu::ALT_commandedAddress:
+single_value.field_commandedAddress->check_restriction(t_res, t_name ? t_name : "@Isobus.AnyIsoBusPdu");
+return;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @Isobus.AnyIsoBusPdu.");
+}
+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 : "@Isobus.AnyIsoBusPdu");
+}
+
+CAN__frame__j1939::CAN__frame__j1939()
+{
+}
+
+CAN__frame__j1939::CAN__frame__j1939(const J1939& par_can__j1939,
+ const AnyIsoBusPdu& par_can__pdu)
+ : field_can__j1939(par_can__j1939),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CAN__frame__j1939::CAN__frame__j1939(const CAN__frame__j1939& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Isobus.CAN_frame_j1939.");
+if (other_value.can__j1939().is_bound()) field_can__j1939 = other_value.can__j1939();
+else field_can__j1939.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CAN__frame__j1939::clean_up()
+{
+field_can__j1939.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__frame__j1939::get_descriptor() const { return &CAN__frame__j1939_descr_; }
+CAN__frame__j1939& CAN__frame__j1939::operator=(const CAN__frame__j1939& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Isobus.CAN_frame_j1939.");
+ if (other_value.can__j1939().is_bound()) field_can__j1939 = other_value.can__j1939();
+ else field_can__j1939.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CAN__frame__j1939::operator==(const CAN__frame__j1939& other_value) const
+{
+return field_can__j1939==other_value.field_can__j1939
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CAN__frame__j1939::is_bound() const
+{
+return (field_can__j1939.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CAN__frame__j1939::is_value() const
+{
+return field_can__j1939.is_value()
+ && field_can__pdu.is_value();
+}
+void CAN__frame__j1939::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_j1939 := ");
+field_can__j1939.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__frame__j1939::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 (2<param.get_size()) {
+ param.error("record value of type @Isobus.CAN_frame_j1939 has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__j1939().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_j1939")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__j1939().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.CAN_frame_j1939: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Isobus.CAN_frame_j1939");
+ }
+}
+
+void CAN__frame__j1939::set_implicit_omit()
+{
+if (can__j1939().is_bound()) can__j1939().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CAN__frame__j1939::encode_text(Text_Buf& text_buf) const
+{
+field_can__j1939.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CAN__frame__j1939::decode_text(Text_Buf& text_buf)
+{
+field_can__j1939.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+void CAN__frame__j1939::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__frame__j1939::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__frame__j1939::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, J1939_descr_.raw->forceomit);
+ decoded_field_length = field_can__j1939.RAW_decode(J1939_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, AnyIsoBusPdu_descr_.raw->forceomit);
+ decoded_field_length = field_can__pdu.RAW_decode(AnyIsoBusPdu_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__frame__j1939::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, J1939_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, AnyIsoBusPdu_descr_.raw);
+ encoded_length += field_can__j1939.RAW_encode(J1939_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_can__pdu.RAW_encode(AnyIsoBusPdu_descr_, *myleaf.body.node.nodes[1]);
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__frame__j1939_template::single_value_struct {
+J1939_template field_can__j1939;
+AnyIsoBusPdu_template field_can__pdu;
+};
+
+void CAN__frame__j1939_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_can__j1939 = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CAN__frame__j1939_template::copy_value(const CAN__frame__j1939& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__j1939().is_bound()) {
+ single_value->field_can__j1939 = other_value.can__j1939();
+} else {
+ single_value->field_can__j1939.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__frame__j1939_template::copy_template(const CAN__frame__j1939_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__j1939().get_selection()) {
+single_value->field_can__j1939 = other_value.can__j1939();
+} else {
+single_value->field_can__j1939.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__frame__j1939_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__frame__j1939_template::CAN__frame__j1939_template()
+{
+}
+
+CAN__frame__j1939_template::CAN__frame__j1939_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__frame__j1939_template::CAN__frame__j1939_template(const CAN__frame__j1939& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__frame__j1939_template::CAN__frame__j1939_template(const OPTIONAL<CAN__frame__j1939>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame__j1939&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Isobus.CAN_frame_j1939 from an unbound optional field.");
+}
+}
+
+CAN__frame__j1939_template::CAN__frame__j1939_template(const CAN__frame__j1939_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__frame__j1939_template::~CAN__frame__j1939_template()
+{
+clean_up();
+}
+
+CAN__frame__j1939_template& CAN__frame__j1939_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__frame__j1939_template& CAN__frame__j1939_template::operator=(const CAN__frame__j1939& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__frame__j1939_template& CAN__frame__j1939_template::operator=(const OPTIONAL<CAN__frame__j1939>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame__j1939&)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 @Isobus.CAN_frame_j1939.");
+}
+return *this;
+}
+
+CAN__frame__j1939_template& CAN__frame__j1939_template::operator=(const CAN__frame__j1939_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__frame__j1939_template::match(const CAN__frame__j1939& 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.can__j1939().is_bound()) return FALSE;
+if(!single_value->field_can__j1939.match(other_value.can__j1939(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939.");
+}
+return FALSE;
+}
+
+boolean CAN__frame__j1939_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__j1939.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CAN__frame__j1939_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__j1939.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CAN__frame__j1939_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__frame__j1939 CAN__frame__j1939_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 @Isobus.CAN_frame_j1939.");
+CAN__frame__j1939 ret_val;
+if (single_value->field_can__j1939.is_bound()) {
+ret_val.can__j1939() = single_value->field_can__j1939.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CAN__frame__j1939_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Isobus.CAN_frame_j1939.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__frame__j1939_template[list_length];
+}
+
+CAN__frame__j1939_template& CAN__frame__j1939_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Isobus.CAN_frame_j1939.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Isobus.CAN_frame_j1939.");
+return value_list.list_value[list_index];
+}
+
+J1939_template& CAN__frame__j1939_template::can__j1939()
+{
+set_specific();
+return single_value->field_can__j1939;
+}
+
+const J1939_template& CAN__frame__j1939_template::can__j1939() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_j1939 of a non-specific template of type @Isobus.CAN_frame_j1939.");
+return single_value->field_can__j1939;
+}
+
+AnyIsoBusPdu_template& CAN__frame__j1939_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const AnyIsoBusPdu_template& CAN__frame__j1939_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @Isobus.CAN_frame_j1939.");
+return single_value->field_can__pdu;
+}
+
+int CAN__frame__j1939_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939 which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939 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 @Isobus.CAN_frame_j1939 containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939 containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939 containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939 containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939.");
+ }
+ return 0;
+}
+
+void CAN__frame__j1939_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_j1939 := ");
+single_value->field_can__j1939.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__frame__j1939_template::log_match(const CAN__frame__j1939& 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_can__j1939.match(match_value.can__j1939(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_j1939");
+single_value->field_can__j1939.log_match(match_value.can__j1939(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_j1939 := ");
+single_value->field_can__j1939.log_match(match_value.can__j1939(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CAN__frame__j1939_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__j1939.encode_text(text_buf);
+single_value->field_can__pdu.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 @Isobus.CAN_frame_j1939.");
+}
+}
+
+void CAN__frame__j1939_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_can__j1939.decode_text(text_buf);
+single_value->field_can__pdu.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 CAN__frame__j1939_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 @Isobus.CAN_frame_j1939.");
+}
+}
+
+void CAN__frame__j1939_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: {
+ CAN__frame__j1939_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @Isobus.CAN_frame_j1939 has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__j1939().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_j1939")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__j1939().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.CAN_frame_j1939: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Isobus.CAN_frame_j1939");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__frame__j1939_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_can__j1939.check_restriction(t_res, t_name ? t_name : "@Isobus.CAN_frame_j1939");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@Isobus.CAN_frame_j1939");
+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 : "@Isobus.CAN_frame_j1939");
+}
+
+boolean CAN__frame__j1939_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__frame__j1939_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+CAN__frame__j1939mod::CAN__frame__j1939mod()
+{
+}
+
+CAN__frame__j1939mod::CAN__frame__j1939mod(const J1939mod& par_can__j1939,
+ const AnyIsoBusPdu& par_can__pdu)
+ : field_can__j1939(par_can__j1939),
+ field_can__pdu(par_can__pdu)
+{
+}
+
+CAN__frame__j1939mod::CAN__frame__j1939mod(const CAN__frame__j1939mod& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Isobus.CAN_frame_j1939mod.");
+if (other_value.can__j1939().is_bound()) field_can__j1939 = other_value.can__j1939();
+else field_can__j1939.clean_up();
+if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+else field_can__pdu.clean_up();
+}
+
+void CAN__frame__j1939mod::clean_up()
+{
+field_can__j1939.clean_up();
+field_can__pdu.clean_up();
+}
+
+const TTCN_Typedescriptor_t* CAN__frame__j1939mod::get_descriptor() const { return &CAN__frame__j1939mod_descr_; }
+CAN__frame__j1939mod& CAN__frame__j1939mod::operator=(const CAN__frame__j1939mod& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Isobus.CAN_frame_j1939mod.");
+ if (other_value.can__j1939().is_bound()) field_can__j1939 = other_value.can__j1939();
+ else field_can__j1939.clean_up();
+ if (other_value.can__pdu().is_bound()) field_can__pdu = other_value.can__pdu();
+ else field_can__pdu.clean_up();
+}
+return *this;
+}
+
+boolean CAN__frame__j1939mod::operator==(const CAN__frame__j1939mod& other_value) const
+{
+return field_can__j1939==other_value.field_can__j1939
+ && field_can__pdu==other_value.field_can__pdu;
+}
+
+boolean CAN__frame__j1939mod::is_bound() const
+{
+return (field_can__j1939.is_bound())
+ || (field_can__pdu.is_bound());
+}
+boolean CAN__frame__j1939mod::is_value() const
+{
+return field_can__j1939.is_value()
+ && field_can__pdu.is_value();
+}
+void CAN__frame__j1939mod::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ can_j1939 := ");
+field_can__j1939.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void CAN__frame__j1939mod::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 (2<param.get_size()) {
+ param.error("record value of type @Isobus.CAN_frame_j1939mod has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__j1939().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_j1939")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__j1939().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.CAN_frame_j1939mod: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@Isobus.CAN_frame_j1939mod");
+ }
+}
+
+void CAN__frame__j1939mod::set_implicit_omit()
+{
+if (can__j1939().is_bound()) can__j1939().set_implicit_omit();
+if (can__pdu().is_bound()) can__pdu().set_implicit_omit();
+}
+
+void CAN__frame__j1939mod::encode_text(Text_Buf& text_buf) const
+{
+field_can__j1939.encode_text(text_buf);
+field_can__pdu.encode_text(text_buf);
+}
+
+void CAN__frame__j1939mod::decode_text(Text_Buf& text_buf)
+{
+field_can__j1939.decode_text(text_buf);
+field_can__pdu.decode_text(text_buf);
+}
+
+void CAN__frame__j1939mod::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 CAN__frame__j1939mod::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int CAN__frame__j1939mod::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ int selected_field = -1;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, J1939mod_descr_.raw->forceomit);
+ decoded_field_length = field_can__j1939.RAW_decode(J1939mod_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ if (field_can__j1939.comp() == os_0) selected_field = 0;
+ else if (field_can__j1939.comp() == os_1) selected_field = 1;
+ else if (field_can__j1939.comp() == os_2) selected_field = 2;
+ else if (field_can__j1939.comp() == os_3) selected_field = 3;
+ else if (field_can__j1939.comp() == os_4) selected_field = 4;
+ else if (field_can__j1939.comp() == os_5) selected_field = 5;
+ else if (field_can__j1939.comp() == os_6) selected_field = 6;
+ else if (field_can__j1939.comp() == os_7) selected_field = 7;
+ else if (field_can__j1939.comp() == os_8) selected_field = 8;
+ else if (field_can__j1939.comp() == os_9) selected_field = 9;
+ else if (field_can__j1939.comp() == os_10) selected_field = 10;
+ else selected_field = -1;
+ RAW_Force_Omit field_1_force_omit(1, force_omit, CAN__frame__j1939mod_can__pdu_descr_.raw->forceomit);
+ decoded_field_length = field_can__pdu.RAW_decode(CAN__frame__j1939mod_can__pdu_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int CAN__frame__j1939mod::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 2;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, J1939mod_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CAN__frame__j1939mod_can__pdu_descr_.raw);
+ encoded_length += field_can__j1939.RAW_encode(J1939mod_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_can__pdu.RAW_encode(CAN__frame__j1939mod_can__pdu_descr_, *myleaf.body.node.nodes[1]);
+ switch (field_can__pdu.get_selection()) {
+ case AnyIsoBusPdu::ALT_etp__dt:
+ if (field_can__j1939.comp() != os_0) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_0.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_etp__cm:
+ if (field_can__j1939.comp() != os_1) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_1.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_vt2ecu:
+ if (field_can__j1939.comp() != os_2) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_2.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_ecu2vt:
+ if (field_can__j1939.comp() != os_3) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_3.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_requestForAddressClaimed:
+ if (field_can__j1939.comp() != os_4) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_4.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_tp__dt:
+ if (field_can__j1939.comp() != os_5) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_5.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_tp__cm:
+ if (field_can__j1939.comp() != os_6) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_6.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_networkMessage:
+ if (field_can__j1939.comp() != os_7) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_7.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_cannotClaimSourceAddress:
+ if (field_can__j1939.comp() != os_8) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_8.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_addressClaimed:
+ if (field_can__j1939.comp() != os_9) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_9.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ case AnyIsoBusPdu::ALT_commandedAddress:
+ if (field_can__j1939.comp() != os_10) {
+ RAW_enc_tr_pos pr_pos;
+ pr_pos.level = myleaf.curr_pos.level + 2;
+ int new_pos[] = { 0, 6 };
+ pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
+ RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
+ if (temp_leaf != NULL)
+ os_10.RAW_encode(J1939mod_comp_descr_,*temp_leaf);
+ else
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ free_tree_pos(pr_pos.pos);
+ }
+ break;
+ default:;
+ }
+ return myleaf.length = encoded_length;
+}
+
+struct CAN__frame__j1939mod_template::single_value_struct {
+J1939mod_template field_can__j1939;
+AnyIsoBusPdu_template field_can__pdu;
+};
+
+void CAN__frame__j1939mod_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_can__j1939 = ANY_VALUE;
+single_value->field_can__pdu = ANY_VALUE;
+}
+}
+}
+
+void CAN__frame__j1939mod_template::copy_value(const CAN__frame__j1939mod& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.can__j1939().is_bound()) {
+ single_value->field_can__j1939 = other_value.can__j1939();
+} else {
+ single_value->field_can__j1939.clean_up();
+}
+if (other_value.can__pdu().is_bound()) {
+ single_value->field_can__pdu = other_value.can__pdu();
+} else {
+ single_value->field_can__pdu.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void CAN__frame__j1939mod_template::copy_template(const CAN__frame__j1939mod_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.can__j1939().get_selection()) {
+single_value->field_can__j1939 = other_value.can__j1939();
+} else {
+single_value->field_can__j1939.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.can__pdu().get_selection()) {
+single_value->field_can__pdu = other_value.can__pdu();
+} else {
+single_value->field_can__pdu.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new CAN__frame__j1939mod_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939mod.");
+break;
+}
+set_selection(other_value);
+}
+
+CAN__frame__j1939mod_template::CAN__frame__j1939mod_template()
+{
+}
+
+CAN__frame__j1939mod_template::CAN__frame__j1939mod_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+CAN__frame__j1939mod_template::CAN__frame__j1939mod_template(const CAN__frame__j1939mod& other_value)
+{
+copy_value(other_value);
+}
+
+CAN__frame__j1939mod_template::CAN__frame__j1939mod_template(const OPTIONAL<CAN__frame__j1939mod>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame__j1939mod&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @Isobus.CAN_frame_j1939mod from an unbound optional field.");
+}
+}
+
+CAN__frame__j1939mod_template::CAN__frame__j1939mod_template(const CAN__frame__j1939mod_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+CAN__frame__j1939mod_template::~CAN__frame__j1939mod_template()
+{
+clean_up();
+}
+
+CAN__frame__j1939mod_template& CAN__frame__j1939mod_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+CAN__frame__j1939mod_template& CAN__frame__j1939mod_template::operator=(const CAN__frame__j1939mod& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+CAN__frame__j1939mod_template& CAN__frame__j1939mod_template::operator=(const OPTIONAL<CAN__frame__j1939mod>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const CAN__frame__j1939mod&)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 @Isobus.CAN_frame_j1939mod.");
+}
+return *this;
+}
+
+CAN__frame__j1939mod_template& CAN__frame__j1939mod_template::operator=(const CAN__frame__j1939mod_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean CAN__frame__j1939mod_template::match(const CAN__frame__j1939mod& 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.can__j1939().is_bound()) return FALSE;
+if(!single_value->field_can__j1939.match(other_value.can__j1939(), legacy))return FALSE;
+if(!other_value.can__pdu().is_bound()) return FALSE;
+if(!single_value->field_can__pdu.match(other_value.can__pdu(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939mod.");
+}
+return FALSE;
+}
+
+boolean CAN__frame__j1939mod_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_can__j1939.is_bound()
+
+ ||single_value->field_can__pdu.is_bound()
+;
+}
+
+boolean CAN__frame__j1939mod_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_can__j1939.is_value()
+ &&single_value->field_can__pdu.is_value();
+}
+
+void CAN__frame__j1939mod_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+CAN__frame__j1939mod CAN__frame__j1939mod_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 @Isobus.CAN_frame_j1939mod.");
+CAN__frame__j1939mod ret_val;
+if (single_value->field_can__j1939.is_bound()) {
+ret_val.can__j1939() = single_value->field_can__j1939.valueof();
+}
+if (single_value->field_can__pdu.is_bound()) {
+ret_val.can__pdu() = single_value->field_can__pdu.valueof();
+}
+return ret_val;
+}
+
+void CAN__frame__j1939mod_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @Isobus.CAN_frame_j1939mod.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new CAN__frame__j1939mod_template[list_length];
+}
+
+CAN__frame__j1939mod_template& CAN__frame__j1939mod_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @Isobus.CAN_frame_j1939mod.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @Isobus.CAN_frame_j1939mod.");
+return value_list.list_value[list_index];
+}
+
+J1939mod_template& CAN__frame__j1939mod_template::can__j1939()
+{
+set_specific();
+return single_value->field_can__j1939;
+}
+
+const J1939mod_template& CAN__frame__j1939mod_template::can__j1939() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_j1939 of a non-specific template of type @Isobus.CAN_frame_j1939mod.");
+return single_value->field_can__j1939;
+}
+
+AnyIsoBusPdu_template& CAN__frame__j1939mod_template::can__pdu()
+{
+set_specific();
+return single_value->field_can__pdu;
+}
+
+const AnyIsoBusPdu_template& CAN__frame__j1939mod_template::can__pdu() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field can_pdu of a non-specific template of type @Isobus.CAN_frame_j1939mod.");
+return single_value->field_can__pdu;
+}
+
+int CAN__frame__j1939mod_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939mod which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 2;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939mod 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 @Isobus.CAN_frame_j1939mod containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939mod containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939mod containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @Isobus.CAN_frame_j1939mod containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Isobus.CAN_frame_j1939mod.");
+ }
+ return 0;
+}
+
+void CAN__frame__j1939mod_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ can_j1939 := ");
+single_value->field_can__j1939.log();
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void CAN__frame__j1939mod_template::log_match(const CAN__frame__j1939mod& 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_can__j1939.match(match_value.can__j1939(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_j1939");
+single_value->field_can__j1939.log_match(match_value.can__j1939(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_can__pdu.match(match_value.can__pdu(), legacy)){
+TTCN_Logger::log_logmatch_info(".can_pdu");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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("{ can_j1939 := ");
+single_value->field_can__j1939.log_match(match_value.can__j1939(), legacy);
+TTCN_Logger::log_event_str(", can_pdu := ");
+single_value->field_can__pdu.log_match(match_value.can__pdu(), legacy);
+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 CAN__frame__j1939mod_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_can__j1939.encode_text(text_buf);
+single_value->field_can__pdu.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 @Isobus.CAN_frame_j1939mod.");
+}
+}
+
+void CAN__frame__j1939mod_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_can__j1939.decode_text(text_buf);
+single_value->field_can__pdu.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 CAN__frame__j1939mod_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 @Isobus.CAN_frame_j1939mod.");
+}
+}
+
+void CAN__frame__j1939mod_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: {
+ CAN__frame__j1939mod_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (2<param.get_size()) {
+ param.error("record template of type @Isobus.CAN_frame_j1939mod has 2 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) can__j1939().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) can__pdu().set_param(*param.get_elem(1));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_j1939")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__j1939().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "can_pdu")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ can__pdu().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @Isobus.CAN_frame_j1939mod: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@Isobus.CAN_frame_j1939mod");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void CAN__frame__j1939mod_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_can__j1939.check_restriction(t_res, t_name ? t_name : "@Isobus.CAN_frame_j1939mod");
+single_value->field_can__pdu.check_restriction(t_res, t_name ? t_name : "@Isobus.CAN_frame_j1939mod");
+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 : "@Isobus.CAN_frame_j1939mod");
+}
+
+boolean CAN__frame__j1939mod_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean CAN__frame__j1939mod_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+
+/* Bodies of functions, altsteps and testcases */
+
+OCTETSTRING encode__CAN__frame__j1939mod(const CAN__frame__j1939mod& pdu)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("encode_CAN_frame_j1939mod(): Encoding @Isobus.CAN_frame_j1939mod: ");
+pdu.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_Buffer ttcn_buffer;
+pdu.encode(CAN__frame__j1939mod_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW, 0);
+OCTETSTRING ret_val;
+ttcn_buffer.get_string(ret_val);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("encode_CAN_frame_j1939mod(): Stream after encoding: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+return ret_val;
+}
+
+CAN__frame__j1939mod decode__CAN__frame__j1939mod(const OCTETSTRING& data)
+{
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("decode_CAN_frame_j1939mod(): Stream before decoding: ");
+data.log();
+TTCN_Logger::end_event();
+}
+TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
+TTCN_EncDec::clear_error();
+TTCN_Buffer ttcn_buffer(data);
+CAN__frame__j1939mod ret_val;
+ret_val.decode(CAN__frame__j1939mod_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
+if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
+TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
+TTCN_Logger::log_event_str("decode_CAN_frame_j1939mod(): Decoded @Isobus.CAN_frame_j1939mod: ");
+ret_val.log();
+TTCN_Logger::end_event();
+}
+if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
+if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()) {
+ttcn_buffer.cut();
+OCTETSTRING tmp_os;
+ttcn_buffer.get_string(tmp_os);
+TTCN_Logger::begin_event_log2str();
+tmp_os.log();
+CHARSTRING remaining_stream = TTCN_Logger::end_event_log2str();
+TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_EXTRA_DATA, "decode_CAN_frame_j1939mod(): Data remained at the end of the stream after successful decoding: %s", (const char*) remaining_stream);
+}
+}
+return ret_val;
+}
+
+Can::CAN__frame j1939frame2can(const CAN__frame__j1939& p__can__frame__j1939, const BITSTRING& p__priority, const OCTETSTRING& p__da, const OCTETSTRING& p__sa)
+{
+TTCN_Location current_location("Isobus.ttcn", 116, TTCN_Location::LOCATION_FUNCTION, "j1939frame2can");
+current_location.update_lineno(117);
+#line 117 "Isobus.ttcn"
+Can::CAN__frame v__can__frame;
+current_location.update_lineno(118);
+#line 118 "Isobus.ttcn"
+v__can__frame.can__id() = pdu1__j1939id2canid(const_cast< const CAN__frame__j1939&>(p__can__frame__j1939).can__j1939(), p__priority, p__da, p__sa);
+current_location.update_lineno(120);
+#line 120 "Isobus.ttcn"
+v__can__frame.can__pdu() = substr(f__encode__CAN__frame__j1939(p__can__frame__j1939), 0, 3);
+current_location.update_lineno(121);
+#line 121 "Isobus.ttcn"
+return v__can__frame;
+}
+
+OCTETSTRING pdu1__j1939id2canid(const J1939& p__j1939, const BITSTRING& p__priority, const OCTETSTRING& p__da, const OCTETSTRING& p__sa)
+{
+TTCN_Location current_location("Isobus.ttcn", 124, TTCN_Location::LOCATION_FUNCTION, "pdu1_j1939id2canid");
+current_location.update_lineno(125);
+#line 125 "Isobus.ttcn"
+OCTETSTRING v__can__id;
+current_location.update_lineno(126);
+#line 126 "Isobus.ttcn"
+v__can__id = bit2oct((((((oct2bit(p__sa) | (oct2bit(p__da) << 8)) | (oct2bit(const_cast< const J1939&>(p__j1939).pf()) << 16)) | (const_cast< const J1939&>(p__j1939).dp() << 24)) | (const_cast< const J1939&>(p__j1939).res() << 25)) | (int2bit(bit2int(p__priority), 32) << 26)));
+current_location.update_lineno(128);
+#line 128 "Isobus.ttcn"
+return v__can__id;
+}
+
+OCTETSTRING j1939id2canid(const J1939& p__j1939)
+{
+TTCN_Location current_location("Isobus.ttcn", 140, TTCN_Location::LOCATION_FUNCTION, "j1939id2canid");
+current_location.update_lineno(141);
+#line 141 "Isobus.ttcn"
+OCTETSTRING v__can__id;
+current_location.update_lineno(142);
+#line 142 "Isobus.ttcn"
+v__can__id = int2oct((((((oct2int(const_cast< const J1939&>(p__j1939).sa()) + (oct2int(const_cast< const J1939&>(p__j1939).ps()) * 256)) + ((oct2int(const_cast< const J1939&>(p__j1939).pf()) * 256) * 256)) + (((bit2int(const_cast< const J1939&>(p__j1939).dp()) * 256) * 256) * 256)) + ((((bit2int(const_cast< const J1939&>(p__j1939).res()) * 256) * 256) * 256) * 2)) + (((((bit2int(const_cast< const J1939&>(p__j1939).prio()) * 256) * 256) * 256) * 2) * 2)), 4);
+current_location.update_lineno(147);
+#line 147 "Isobus.ttcn"
+return v__can__id;
+}
+
+CAN__frame__j1939 can2j1939frame(const Can::CAN__frame& p__can__frame)
+{
+TTCN_Location current_location("Isobus.ttcn", 151, TTCN_Location::LOCATION_FUNCTION, "can2j1939frame");
+current_location.update_lineno(153);
+#line 153 "Isobus.ttcn"
+CAN__frame__j1939 v__can__frame__j1939;
+current_location.update_lineno(158);
+#line 158 "Isobus.ttcn"
+v__can__frame__j1939 = f__decode__CAN__frame__j1939((const_cast< const Can::CAN__frame&>(p__can__frame).can__id() + const_cast< const Can::CAN__frame&>(p__can__frame).can__pdu()));
+current_location.update_lineno(161);
+#line 161 "Isobus.ttcn"
+return v__can__frame__j1939;
+}
+
+J1939 canid2j1939(const OCTETSTRING& p__can__id)
+{
+TTCN_Location current_location("Isobus.ttcn", 164, TTCN_Location::LOCATION_FUNCTION, "canid2j1939");
+current_location.update_lineno(167);
+#line 167 "Isobus.ttcn"
+BITSTRING v__can__id__bitstring(oct2bit(p__can__id));
+current_location.update_lineno(168);
+#line 168 "Isobus.ttcn"
+J1939 v__j1939;
+current_location.update_lineno(170);
+#line 170 "Isobus.ttcn"
+v__j1939.prio() = substr(v__can__id__bitstring, 0, 6);
+current_location.update_lineno(171);
+#line 171 "Isobus.ttcn"
+v__j1939.res() = const_cast< const BITSTRING&>(v__can__id__bitstring)[6];
+current_location.update_lineno(172);
+#line 172 "Isobus.ttcn"
+v__j1939.dp() = const_cast< const BITSTRING&>(v__can__id__bitstring)[7];
+current_location.update_lineno(173);
+#line 173 "Isobus.ttcn"
+v__j1939.pf() = const_cast< const OCTETSTRING&>(p__can__id)[1];
+current_location.update_lineno(174);
+#line 174 "Isobus.ttcn"
+v__j1939.ps() = const_cast< const OCTETSTRING&>(p__can__id)[2];
+current_location.update_lineno(175);
+#line 175 "Isobus.ttcn"
+v__j1939.sa() = const_cast< const OCTETSTRING&>(p__can__id)[3];
+current_location.update_lineno(177);
+#line 177 "Isobus.ttcn"
+return v__j1939;
+}
+
+OCTETSTRING f__insert__aux__hdr(const OCTETSTRING& p__os)
+{
+TTCN_Location current_location("Isobus.ttcn", 185, TTCN_Location::LOCATION_FUNCTION, "f_insert_aux_hdr");
+current_location.update_lineno(188);
+#line 188 "Isobus.ttcn"
+OCTETSTRING v__os;
+current_location.update_lineno(191);
+#line 191 "Isobus.ttcn"
+v__os[0] = const_cast< const OCTETSTRING&>(p__os)[1];
+current_location.update_lineno(192);
+#line 192 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os)[1] == os_17)) {
+current_location.update_lineno(194);
+#line 194 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os)[2] == os_18)) {
+current_location.update_lineno(194);
+#line 194 "Isobus.ttcn"
+v__os[1] = os_18;
+current_location.update_lineno(194);
+#line 194 "Isobus.ttcn"
+v__os[2] = os_19;
+}
+}
+else {
+current_location.update_lineno(197);
+#line 197 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os)[1] == os_20)) {
+current_location.update_lineno(199);
+#line 199 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os)[2] == os_21)) {
+current_location.update_lineno(200);
+#line 200 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os)[3] == os_17)) {
+current_location.update_lineno(200);
+#line 200 "Isobus.ttcn"
+v__os[1] = os_21;
+current_location.update_lineno(200);
+#line 200 "Isobus.ttcn"
+v__os[2] = os_17;
+}
+else {
+current_location.update_lineno(201);
+#line 201 "Isobus.ttcn"
+v__os[1] = os_21;
+current_location.update_lineno(201);
+#line 201 "Isobus.ttcn"
+v__os[2] = os_19;
+}
+}
+}
+else {
+current_location.update_lineno(207);
+#line 207 "Isobus.ttcn"
+v__os[1] = os_19;
+current_location.update_lineno(207);
+#line 207 "Isobus.ttcn"
+v__os[2] = os_19;
+}
+}
+current_location.update_lineno(212);
+#line 212 "Isobus.ttcn"
+return replace(p__os, 4, 0, v__os);
+}
+
+OCTETSTRING f__remove__aux__hdr(const OCTETSTRING& p__os)
+{
+TTCN_Location current_location("Isobus.ttcn", 216, TTCN_Location::LOCATION_FUNCTION, "f_remove_aux_hdr");
+OCTETSTRING p__os_shadow(p__os);
+current_location.update_lineno(222);
+#line 222 "Isobus.ttcn"
+{
+OCTETSTRING tmp_20;
+tmp_20 = const_cast< const OCTETSTRING&>(p__os_shadow)[4];
+p__os_shadow[1] = tmp_20;
+}
+current_location.update_lineno(223);
+#line 223 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os_shadow)[4] == os_20)) {
+current_location.update_lineno(225);
+#line 225 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os_shadow)[6] == os_17)) {
+current_location.update_lineno(226);
+#line 226 "Isobus.ttcn"
+{
+OCTETSTRING tmp_21;
+tmp_21 = const_cast< const OCTETSTRING&>(p__os_shadow)[5];
+p__os_shadow[2] = tmp_21;
+}
+current_location.update_lineno(227);
+#line 227 "Isobus.ttcn"
+{
+OCTETSTRING tmp_22;
+tmp_22 = const_cast< const OCTETSTRING&>(p__os_shadow)[6];
+p__os_shadow[3] = tmp_22;
+}
+}
+else {
+current_location.update_lineno(230);
+#line 230 "Isobus.ttcn"
+{
+OCTETSTRING tmp_23;
+tmp_23 = const_cast< const OCTETSTRING&>(p__os_shadow)[5];
+p__os_shadow[2] = tmp_23;
+}
+}
+}
+else {
+current_location.update_lineno(233);
+#line 233 "Isobus.ttcn"
+if ((const_cast< const OCTETSTRING&>(p__os_shadow)[4] == os_17)) {
+current_location.update_lineno(235);
+#line 235 "Isobus.ttcn"
+{
+OCTETSTRING tmp_24;
+tmp_24 = const_cast< const OCTETSTRING&>(p__os_shadow)[5];
+p__os_shadow[2] = tmp_24;
+}
+}
+}
+current_location.update_lineno(242);
+#line 242 "Isobus.ttcn"
+return replace(p__os_shadow, 4, 3, os_22);
+}
+
+CAN__frame__j1939 f__map__mod2frame(const CAN__frame__j1939mod& p__frame)
+{
+TTCN_Location current_location("Isobus.ttcn", 246, TTCN_Location::LOCATION_FUNCTION, "f_map_mod2frame");
+current_location.update_lineno(249);
+#line 249 "Isobus.ttcn"
+CAN__frame__j1939 v__CAN__frame__j1939;
+current_location.update_lineno(251);
+#line 251 "Isobus.ttcn"
+v__CAN__frame__j1939.can__pdu() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__pdu();
+current_location.update_lineno(252);
+#line 252 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().prio() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().prio();
+current_location.update_lineno(253);
+#line 253 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().res() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().res();
+current_location.update_lineno(254);
+#line 254 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().dp() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().dp();
+current_location.update_lineno(255);
+#line 255 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().pf() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().pf();
+current_location.update_lineno(256);
+#line 256 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().ps() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().ps();
+current_location.update_lineno(257);
+#line 257 "Isobus.ttcn"
+v__CAN__frame__j1939.can__j1939().sa() = const_cast< const CAN__frame__j1939mod&>(p__frame).can__j1939().sa();
+current_location.update_lineno(261);
+#line 261 "Isobus.ttcn"
+return v__CAN__frame__j1939;
+}
+
+CAN__frame__j1939mod f__map__frame2mod(const CAN__frame__j1939& p__frame)
+{
+TTCN_Location current_location("Isobus.ttcn", 267, TTCN_Location::LOCATION_FUNCTION, "f_map_frame2mod");
+current_location.update_lineno(270);
+#line 270 "Isobus.ttcn"
+CAN__frame__j1939mod v__CAN__frame__j1939mod;
+current_location.update_lineno(273);
+#line 273 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__pdu() = const_cast< const CAN__frame__j1939&>(p__frame).can__pdu();
+current_location.update_lineno(274);
+#line 274 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().prio() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().prio();
+current_location.update_lineno(275);
+#line 275 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().res() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().res();
+current_location.update_lineno(276);
+#line 276 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().dp() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().dp();
+current_location.update_lineno(277);
+#line 277 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().pf() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf();
+current_location.update_lineno(278);
+#line 278 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().ps() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().ps();
+current_location.update_lineno(279);
+#line 279 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().sa() = const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().sa();
+current_location.update_lineno(280);
+#line 280 "Isobus.ttcn"
+if ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() == os_20)) {
+current_location.update_lineno(282);
+#line 282 "Isobus.ttcn"
+if ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().ps() == os_18)) {
+current_location.update_lineno(283);
+#line 283 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().comp() = ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() + const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().ps()) + os_19);
+}
+else {
+current_location.update_lineno(284);
+#line 284 "Isobus.ttcn"
+if ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().ps() == os_21)) {
+current_location.update_lineno(285);
+#line 285 "Isobus.ttcn"
+if ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().sa() == os_17)) {
+current_location.update_lineno(286);
+#line 286 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().comp() = ((const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() + const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().ps()) + const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().sa());
+}
+else {
+current_location.update_lineno(288);
+#line 288 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().comp() = (const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() + os_23);
+}
+}
+else {
+current_location.update_lineno(291);
+#line 291 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().comp() = (const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() + os_23);
+}
+}
+}
+else {
+current_location.update_lineno(294);
+#line 294 "Isobus.ttcn"
+v__CAN__frame__j1939mod.can__j1939().comp() = (const_cast< const CAN__frame__j1939&>(p__frame).can__j1939().pf() + os_23);
+}
+current_location.update_lineno(297);
+#line 297 "Isobus.ttcn"
+return v__CAN__frame__j1939mod;
+}
+
+OCTETSTRING f__encode__CAN__frame__j1939(const CAN__frame__j1939& pdu)
+{
+TTCN_Location current_location("Isobus.ttcn", 303, TTCN_Location::LOCATION_FUNCTION, "f_encode_CAN_frame_j1939");
+current_location.update_lineno(307);
+#line 307 "Isobus.ttcn"
+return f__remove__aux__hdr(encode__CAN__frame__j1939mod(f__map__frame2mod(pdu)));
+}
+
+CAN__frame__j1939 f__decode__CAN__frame__j1939(const OCTETSTRING& data)
+{
+TTCN_Location current_location("Isobus.ttcn", 312, TTCN_Location::LOCATION_FUNCTION, "f_decode_CAN_frame_j1939");
+current_location.update_lineno(315);
+#line 315 "Isobus.ttcn"
+try {
+TTCN_Logger::begin_event(TTCN_USER);
+TTCN_Logger::log_event_str("f_insert_aux_hdr(data)");
+f__insert__aux__hdr(data).log();
+TTCN_Logger::end_event();
+} catch (...) {
+TTCN_Logger::finish_event();
+throw;
+}
+current_location.update_lineno(316);
+#line 316 "Isobus.ttcn"
+return f__map__mod2frame(decode__CAN__frame__j1939mod(f__insert__aux__hdr(data)));
+}
+
+
+/* Bodies of static functions */
+
+static void pre_init_module()
+{
+TTCN_Location current_location("Isobus.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Isobus");
+Can::module_object.pre_init_module();
+IsobusCMMessageTypes::module_object.pre_init_module();
+IsobusNMMessageTypes::module_object.pre_init_module();
+IsobusVTMessageTypes::module_object.pre_init_module();
+module_object.add_function("encode_CAN_frame_j1939mod", (genericfunc_t)&encode__CAN__frame__j1939mod, NULL);
+module_object.add_function("decode_CAN_frame_j1939mod", (genericfunc_t)&decode__CAN__frame__j1939mod, NULL);
+current_location.update_lineno(33);
+#line 33 "Isobus.ttcn"
+const_ISOBUS__PRIORITY__MASK = os_11;
+current_location.update_lineno(34);
+#line 34 "Isobus.ttcn"
+const_ISOBUS__RESERVED__MASK = os_12;
+current_location.update_lineno(35);
+#line 35 "Isobus.ttcn"
+const_ISOBUS__DATAPAGE__MASK = os_13;
+current_location.update_lineno(36);
+#line 36 "Isobus.ttcn"
+const_ISOBUS__PDUFORMAT__MASK = os_14;
+current_location.update_lineno(37);
+#line 37 "Isobus.ttcn"
+const_ISOBUS__PDUSPECIFIC__MASK = os_15;
+current_location.update_lineno(38);
+#line 38 "Isobus.ttcn"
+const_ISOBUS__SOURCEADDRESS__MASK = os_16;
+module_object.add_function("j1939frame2can", (genericfunc_t)&j1939frame2can, NULL);
+module_object.add_function("pdu1_j1939id2canid", (genericfunc_t)&pdu1__j1939id2canid, NULL);
+module_object.add_function("j1939id2canid", (genericfunc_t)&j1939id2canid, NULL);
+module_object.add_function("can2j1939frame", (genericfunc_t)&can2j1939frame, NULL);
+module_object.add_function("canid2j1939", (genericfunc_t)&canid2j1939, NULL);
+module_object.add_function("f_insert_aux_hdr", (genericfunc_t)&f__insert__aux__hdr, NULL);
+module_object.add_function("f_remove_aux_hdr", (genericfunc_t)&f__remove__aux__hdr, NULL);
+module_object.add_function("f_map_mod2frame", (genericfunc_t)&f__map__mod2frame, NULL);
+module_object.add_function("f_map_frame2mod", (genericfunc_t)&f__map__frame2mod, NULL);
+module_object.add_function("f_encode_CAN_frame_j1939", (genericfunc_t)&f__encode__CAN__frame__j1939, NULL);
+module_object.add_function("f_decode_CAN_frame_j1939", (genericfunc_t)&f__decode__CAN__frame__j1939, NULL);
+}
+
+static void post_init_module()
+{
+TTCN_Location current_location("Isobus.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Isobus");
+Can::module_object.post_init_module();
+IsobusCMMessageTypes::module_object.post_init_module();
+IsobusNMMessageTypes::module_object.post_init_module();
+IsobusVTMessageTypes::module_object.post_init_module();
+}
+
+
+} /* end of namespace */
diff --git a/demo/Isobus.d b/demo/Isobus.d
new file mode 100644
index 0000000..0e887e5
--- /dev/null
+++ b/demo/Isobus.d
@@ -0,0 +1,60 @@
+Isobus.o Isobus.d : Isobus.cc Isobus.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TTCN3.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/version.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/cversion.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Types.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Vector.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Error.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Basetype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Encdec.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RInt.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/JSON_Tokenizer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Logger.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Template.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Integer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ttcn3float.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Boolean.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Null.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Optional.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Param_Types.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/memory.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/BER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Textbuf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Parameters.h \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/XmlReader.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Objid.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Verdicttype.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Component.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Bitstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RAW.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/CharCoding.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Hexstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Octetstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_Any.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Universal_charstring.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Struct_of.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Array.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_CharacterString.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_External.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/TEXT.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ASN_EmbeddedPDV.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Addfunc.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Timer.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Port.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Event_Handler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/TitanLoggerApiSimple.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/RT1/PreGenRecordOf.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Module_list.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Snapshot.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Default.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Runtime.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/OER.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Profiler.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/ProfilerTools.hh \
+ /home/elnrnag/Ericsson/git/titan.core/Install/include/Debugger.hh Can.hh \
+ General_Types.hh IsobusCMMessageTypes.hh IsobusMessageTypes.hh \
+ IsobusNMMessageTypes.hh IsobusVTMessageTypes.hh
diff --git a/demo/Isobus.hh b/demo/Isobus.hh
new file mode 100644
index 0000000..a66e0f1
--- /dev/null
+++ b/demo/Isobus.hh
@@ -0,0 +1,734 @@
+// This C++ header file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+#ifndef Isobus_HH
+#define Isobus_HH
+
+#ifdef TITAN_RUNTIME_2
+#error Generated code does not match with used runtime.\
+ Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
+#endif
+
+/* Header file includes */
+
+#include <TTCN3.hh>
+#include "Can.hh"
+#include "IsobusCMMessageTypes.hh"
+#include "IsobusNMMessageTypes.hh"
+#include "IsobusVTMessageTypes.hh"
+
+#if TTCN3_VERSION != 60600
+#error Version mismatch detected.\
+ Please check the version of the TTCN-3 compiler and the base library.\
+ Run make clean and rebuild the project if the version of the compiler changed recently.
+#endif
+
+#ifndef LINUX
+#error This file should be compiled on LINUX
+#endif
+
+#undef Isobus_HH
+#endif
+
+namespace Isobus {
+
+/* Forward declarations of classes */
+
+class J1939;
+class J1939_template;
+class J1939mod;
+class J1939mod_template;
+class AnyIsoBusPdu;
+class AnyIsoBusPdu_template;
+class CAN__frame__j1939;
+class CAN__frame__j1939_template;
+class CAN__frame__j1939mod;
+class CAN__frame__j1939mod_template;
+
+} /* end of namespace */
+
+#ifndef Isobus_HH
+#define Isobus_HH
+
+namespace Isobus {
+
+/* Type definitions */
+
+typedef BITSTRING Priority;
+typedef BITSTRING_template Priority_template;
+
+/* Class definitions */
+
+class J1939 : public Base_Type {
+ BITSTRING field_prio;
+ BITSTRING field_res;
+ BITSTRING field_dp;
+ OCTETSTRING field_pf;
+ OCTETSTRING field_ps;
+ OCTETSTRING field_sa;
+public:
+ J1939();
+ J1939(const BITSTRING& par_prio,
+ const BITSTRING& par_res,
+ const BITSTRING& par_dp,
+ const OCTETSTRING& par_pf,
+ const OCTETSTRING& par_ps,
+ const OCTETSTRING& par_sa);
+ J1939(const J1939& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ J1939& operator=(const J1939& other_value);
+ boolean operator==(const J1939& other_value) const;
+ inline boolean operator!=(const J1939& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& prio()
+ {return field_prio;}
+ inline const BITSTRING& prio() const
+ {return field_prio;}
+ inline BITSTRING& res()
+ {return field_res;}
+ inline const BITSTRING& res() const
+ {return field_res;}
+ inline BITSTRING& dp()
+ {return field_dp;}
+ inline const BITSTRING& dp() const
+ {return field_dp;}
+ inline OCTETSTRING& pf()
+ {return field_pf;}
+ inline const OCTETSTRING& pf() const
+ {return field_pf;}
+ inline OCTETSTRING& ps()
+ {return field_ps;}
+ inline const OCTETSTRING& ps() const
+ {return field_ps;}
+ inline OCTETSTRING& sa()
+ {return field_sa;}
+ inline const OCTETSTRING& sa() const
+ {return field_sa;}
+ inline int size_of() const
+ {return 6;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class J1939_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+J1939_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const J1939& other_value);
+void copy_template(const J1939_template& other_value);
+
+public:
+J1939_template();
+J1939_template(template_sel other_value);
+J1939_template(const J1939& other_value);
+J1939_template(const OPTIONAL<J1939>& other_value);
+J1939_template(const J1939_template& other_value);
+~J1939_template();
+J1939_template& operator=(template_sel other_value);
+J1939_template& operator=(const J1939& other_value);
+J1939_template& operator=(const OPTIONAL<J1939>& other_value);
+J1939_template& operator=(const J1939_template& other_value);
+boolean match(const J1939& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+J1939 valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+J1939_template& list_item(unsigned int list_index) const;
+BITSTRING_template& prio();
+const BITSTRING_template& prio() const;
+BITSTRING_template& res();
+const BITSTRING_template& res() const;
+BITSTRING_template& dp();
+const BITSTRING_template& dp() const;
+OCTETSTRING_template& pf();
+const OCTETSTRING_template& pf() const;
+OCTETSTRING_template& ps();
+const OCTETSTRING_template& ps() const;
+OCTETSTRING_template& sa();
+const OCTETSTRING_template& sa() const;
+int size_of() const;
+void log() const;
+void log_match(const J1939& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class J1939mod : public Base_Type {
+ BITSTRING field_prio;
+ BITSTRING field_res;
+ BITSTRING field_dp;
+ OCTETSTRING field_pf;
+ OCTETSTRING field_ps;
+ OCTETSTRING field_sa;
+ OCTETSTRING field_comp;
+public:
+ J1939mod();
+ J1939mod(const BITSTRING& par_prio,
+ const BITSTRING& par_res,
+ const BITSTRING& par_dp,
+ const OCTETSTRING& par_pf,
+ const OCTETSTRING& par_ps,
+ const OCTETSTRING& par_sa,
+ const OCTETSTRING& par_comp);
+ J1939mod(const J1939mod& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ J1939mod& operator=(const J1939mod& other_value);
+ boolean operator==(const J1939mod& other_value) const;
+ inline boolean operator!=(const J1939mod& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline BITSTRING& prio()
+ {return field_prio;}
+ inline const BITSTRING& prio() const
+ {return field_prio;}
+ inline BITSTRING& res()
+ {return field_res;}
+ inline const BITSTRING& res() const
+ {return field_res;}
+ inline BITSTRING& dp()
+ {return field_dp;}
+ inline const BITSTRING& dp() const
+ {return field_dp;}
+ inline OCTETSTRING& pf()
+ {return field_pf;}
+ inline const OCTETSTRING& pf() const
+ {return field_pf;}
+ inline OCTETSTRING& ps()
+ {return field_ps;}
+ inline const OCTETSTRING& ps() const
+ {return field_ps;}
+ inline OCTETSTRING& sa()
+ {return field_sa;}
+ inline const OCTETSTRING& sa() const
+ {return field_sa;}
+ inline OCTETSTRING& comp()
+ {return field_comp;}
+ inline const OCTETSTRING& comp() const
+ {return field_comp;}
+ inline int size_of() const
+ {return 7;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class J1939mod_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+J1939mod_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const J1939mod& other_value);
+void copy_template(const J1939mod_template& other_value);
+
+public:
+J1939mod_template();
+J1939mod_template(template_sel other_value);
+J1939mod_template(const J1939mod& other_value);
+J1939mod_template(const OPTIONAL<J1939mod>& other_value);
+J1939mod_template(const J1939mod_template& other_value);
+~J1939mod_template();
+J1939mod_template& operator=(template_sel other_value);
+J1939mod_template& operator=(const J1939mod& other_value);
+J1939mod_template& operator=(const OPTIONAL<J1939mod>& other_value);
+J1939mod_template& operator=(const J1939mod_template& other_value);
+boolean match(const J1939mod& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+J1939mod valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+J1939mod_template& list_item(unsigned int list_index) const;
+BITSTRING_template& prio();
+const BITSTRING_template& prio() const;
+BITSTRING_template& res();
+const BITSTRING_template& res() const;
+BITSTRING_template& dp();
+const BITSTRING_template& dp() const;
+OCTETSTRING_template& pf();
+const OCTETSTRING_template& pf() const;
+OCTETSTRING_template& ps();
+const OCTETSTRING_template& ps() const;
+OCTETSTRING_template& sa();
+const OCTETSTRING_template& sa() const;
+OCTETSTRING_template& comp();
+const OCTETSTRING_template& comp() const;
+int size_of() const;
+void log() const;
+void log_match(const J1939mod& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class AnyIsoBusPdu : public Base_Type {
+public:
+enum union_selection_type { UNBOUND_VALUE = 0, ALT_etp__dt = 1, ALT_etp__cm = 2, ALT_vt2ecu = 3, ALT_ecu2vt = 4, ALT_requestForAddressClaimed = 5, ALT_tp__dt = 6, ALT_tp__cm = 7, ALT_networkMessage = 8, ALT_cannotClaimSourceAddress = 9, ALT_addressClaimed = 10, ALT_commandedAddress = 11 };
+private:
+union_selection_type union_selection;
+union {
+IsobusCMMessageTypes::ETP__DT *field_etp__dt;
+IsobusCMMessageTypes::ETP__CM *field_etp__cm;
+IsobusVTMessageTypes::VT2ECU *field_vt2ecu;
+IsobusVTMessageTypes::ECU2VT *field_ecu2vt;
+IsobusNMMessageTypes::RequestForAddressClaimed *field_requestForAddressClaimed;
+IsobusCMMessageTypes::TP__DT *field_tp__dt;
+IsobusCMMessageTypes::TP__CM *field_tp__cm;
+IsobusNMMessageTypes::NetworkMessage *field_networkMessage;
+IsobusNMMessageTypes::CannotClaimSourceAddress *field_cannotClaimSourceAddress;
+IsobusNMMessageTypes::AddressClaimed *field_addressClaimed;
+IsobusNMMessageTypes::CommandedAddress *field_commandedAddress;
+};
+void copy_value(const AnyIsoBusPdu& other_value);
+
+public:
+AnyIsoBusPdu();
+AnyIsoBusPdu(const AnyIsoBusPdu& other_value);
+~AnyIsoBusPdu();
+AnyIsoBusPdu& operator=(const AnyIsoBusPdu& other_value);
+boolean operator==(const AnyIsoBusPdu& other_value) const;
+inline boolean operator!=(const AnyIsoBusPdu& other_value) const { return !(*this == other_value); }
+IsobusCMMessageTypes::ETP__DT& etp__dt();
+const IsobusCMMessageTypes::ETP__DT& etp__dt() const;
+IsobusCMMessageTypes::ETP__CM& etp__cm();
+const IsobusCMMessageTypes::ETP__CM& etp__cm() const;
+IsobusVTMessageTypes::VT2ECU& vt2ecu();
+const IsobusVTMessageTypes::VT2ECU& vt2ecu() const;
+IsobusVTMessageTypes::ECU2VT& ecu2vt();
+const IsobusVTMessageTypes::ECU2VT& ecu2vt() const;
+IsobusNMMessageTypes::RequestForAddressClaimed& requestForAddressClaimed();
+const IsobusNMMessageTypes::RequestForAddressClaimed& requestForAddressClaimed() const;
+IsobusCMMessageTypes::TP__DT& tp__dt();
+const IsobusCMMessageTypes::TP__DT& tp__dt() const;
+IsobusCMMessageTypes::TP__CM& tp__cm();
+const IsobusCMMessageTypes::TP__CM& tp__cm() const;
+IsobusNMMessageTypes::NetworkMessage& networkMessage();
+const IsobusNMMessageTypes::NetworkMessage& networkMessage() const;
+IsobusNMMessageTypes::CannotClaimSourceAddress& cannotClaimSourceAddress();
+const IsobusNMMessageTypes::CannotClaimSourceAddress& cannotClaimSourceAddress() const;
+IsobusNMMessageTypes::AddressClaimed& addressClaimed();
+const IsobusNMMessageTypes::AddressClaimed& addressClaimed() const;
+IsobusNMMessageTypes::CommandedAddress& commandedAddress();
+const IsobusNMMessageTypes::CommandedAddress& commandedAddress() const;
+inline union_selection_type get_selection() const { return union_selection; }
+boolean ischosen(union_selection_type checked_selection) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+inline boolean is_present() const { return is_bound(); }
+void log() const;
+void set_param(Module_Param& param);
+ void set_implicit_omit();
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class AnyIsoBusPdu_template : public Base_Template {
+union {
+struct {
+AnyIsoBusPdu::union_selection_type union_selection;
+union {
+IsobusCMMessageTypes::ETP__DT_template *field_etp__dt;
+IsobusCMMessageTypes::ETP__CM_template *field_etp__cm;
+IsobusVTMessageTypes::VT2ECU_template *field_vt2ecu;
+IsobusVTMessageTypes::ECU2VT_template *field_ecu2vt;
+IsobusNMMessageTypes::RequestForAddressClaimed_template *field_requestForAddressClaimed;
+IsobusCMMessageTypes::TP__DT_template *field_tp__dt;
+IsobusCMMessageTypes::TP__CM_template *field_tp__cm;
+IsobusNMMessageTypes::NetworkMessage_template *field_networkMessage;
+IsobusNMMessageTypes::CannotClaimSourceAddress_template *field_cannotClaimSourceAddress;
+IsobusNMMessageTypes::AddressClaimed_template *field_addressClaimed;
+IsobusNMMessageTypes::CommandedAddress_template *field_commandedAddress;
+};
+} single_value;
+struct {
+unsigned int n_values;
+AnyIsoBusPdu_template *list_value;
+} value_list;
+};
+void copy_value(const AnyIsoBusPdu& other_value);
+
+void copy_template(const AnyIsoBusPdu_template& other_value);
+
+public:
+AnyIsoBusPdu_template();
+AnyIsoBusPdu_template(template_sel other_value);
+AnyIsoBusPdu_template(const AnyIsoBusPdu& other_value);
+AnyIsoBusPdu_template(const OPTIONAL<AnyIsoBusPdu>& other_value);
+AnyIsoBusPdu_template(const AnyIsoBusPdu_template& other_value);
+~AnyIsoBusPdu_template();
+void clean_up();
+AnyIsoBusPdu_template& operator=(template_sel other_value);
+AnyIsoBusPdu_template& operator=(const AnyIsoBusPdu& other_value);
+AnyIsoBusPdu_template& operator=(const OPTIONAL<AnyIsoBusPdu>& other_value);
+AnyIsoBusPdu_template& operator=(const AnyIsoBusPdu_template& other_value);
+boolean match(const AnyIsoBusPdu& other_value, boolean legacy = FALSE) const;
+boolean is_value() const;AnyIsoBusPdu valueof() const;
+AnyIsoBusPdu_template& list_item(unsigned int list_index) const;
+void set_type(template_sel template_type, unsigned int list_length);
+IsobusCMMessageTypes::ETP__DT_template& etp__dt();
+const IsobusCMMessageTypes::ETP__DT_template& etp__dt() const;
+IsobusCMMessageTypes::ETP__CM_template& etp__cm();
+const IsobusCMMessageTypes::ETP__CM_template& etp__cm() const;
+IsobusVTMessageTypes::VT2ECU_template& vt2ecu();
+const IsobusVTMessageTypes::VT2ECU_template& vt2ecu() const;
+IsobusVTMessageTypes::ECU2VT_template& ecu2vt();
+const IsobusVTMessageTypes::ECU2VT_template& ecu2vt() const;
+IsobusNMMessageTypes::RequestForAddressClaimed_template& requestForAddressClaimed();
+const IsobusNMMessageTypes::RequestForAddressClaimed_template& requestForAddressClaimed() const;
+IsobusCMMessageTypes::TP__DT_template& tp__dt();
+const IsobusCMMessageTypes::TP__DT_template& tp__dt() const;
+IsobusCMMessageTypes::TP__CM_template& tp__cm();
+const IsobusCMMessageTypes::TP__CM_template& tp__cm() const;
+IsobusNMMessageTypes::NetworkMessage_template& networkMessage();
+const IsobusNMMessageTypes::NetworkMessage_template& networkMessage() const;
+IsobusNMMessageTypes::CannotClaimSourceAddress_template& cannotClaimSourceAddress();
+const IsobusNMMessageTypes::CannotClaimSourceAddress_template& cannotClaimSourceAddress() const;
+IsobusNMMessageTypes::AddressClaimed_template& addressClaimed();
+const IsobusNMMessageTypes::AddressClaimed_template& addressClaimed() const;
+IsobusNMMessageTypes::CommandedAddress_template& commandedAddress();
+const IsobusNMMessageTypes::CommandedAddress_template& commandedAddress() const;
+boolean ischosen(AnyIsoBusPdu::union_selection_type checked_selection) const;
+void log() const;
+void log_match(const AnyIsoBusPdu& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+};
+
+class CAN__frame__j1939 : public Base_Type {
+ J1939 field_can__j1939;
+ AnyIsoBusPdu field_can__pdu;
+public:
+ CAN__frame__j1939();
+ CAN__frame__j1939(const J1939& par_can__j1939,
+ const AnyIsoBusPdu& par_can__pdu);
+ CAN__frame__j1939(const CAN__frame__j1939& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__frame__j1939& operator=(const CAN__frame__j1939& other_value);
+ boolean operator==(const CAN__frame__j1939& other_value) const;
+ inline boolean operator!=(const CAN__frame__j1939& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline J1939& can__j1939()
+ {return field_can__j1939;}
+ inline const J1939& can__j1939() const
+ {return field_can__j1939;}
+ inline AnyIsoBusPdu& can__pdu()
+ {return field_can__pdu;}
+ inline const AnyIsoBusPdu& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__frame__j1939_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__frame__j1939_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__frame__j1939& other_value);
+void copy_template(const CAN__frame__j1939_template& other_value);
+
+public:
+CAN__frame__j1939_template();
+CAN__frame__j1939_template(template_sel other_value);
+CAN__frame__j1939_template(const CAN__frame__j1939& other_value);
+CAN__frame__j1939_template(const OPTIONAL<CAN__frame__j1939>& other_value);
+CAN__frame__j1939_template(const CAN__frame__j1939_template& other_value);
+~CAN__frame__j1939_template();
+CAN__frame__j1939_template& operator=(template_sel other_value);
+CAN__frame__j1939_template& operator=(const CAN__frame__j1939& other_value);
+CAN__frame__j1939_template& operator=(const OPTIONAL<CAN__frame__j1939>& other_value);
+CAN__frame__j1939_template& operator=(const CAN__frame__j1939_template& other_value);
+boolean match(const CAN__frame__j1939& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__frame__j1939 valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__frame__j1939_template& list_item(unsigned int list_index) const;
+J1939_template& can__j1939();
+const J1939_template& can__j1939() const;
+AnyIsoBusPdu_template& can__pdu();
+const AnyIsoBusPdu_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__frame__j1939& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+class CAN__frame__j1939mod : public Base_Type {
+ J1939mod field_can__j1939;
+ AnyIsoBusPdu field_can__pdu;
+public:
+ CAN__frame__j1939mod();
+ CAN__frame__j1939mod(const J1939mod& par_can__j1939,
+ const AnyIsoBusPdu& par_can__pdu);
+ CAN__frame__j1939mod(const CAN__frame__j1939mod& other_value);
+ inline boolean is_component() { return FALSE; }
+ void clean_up();
+const TTCN_Typedescriptor_t* get_descriptor() const;
+ CAN__frame__j1939mod& operator=(const CAN__frame__j1939mod& other_value);
+ boolean operator==(const CAN__frame__j1939mod& other_value) const;
+ inline boolean operator!=(const CAN__frame__j1939mod& other_value) const
+ { return !(*this == other_value); }
+
+ boolean is_bound() const;
+
+inline boolean is_present() const { return is_bound(); }
+ boolean is_value() const;
+
+ inline J1939mod& can__j1939()
+ {return field_can__j1939;}
+ inline const J1939mod& can__j1939() const
+ {return field_can__j1939;}
+ inline AnyIsoBusPdu& can__pdu()
+ {return field_can__pdu;}
+ inline const AnyIsoBusPdu& can__pdu() const
+ {return field_can__pdu;}
+ inline int size_of() const
+ {return 2;}
+ void log() const;
+ void set_param(Module_Param& param);
+ void set_implicit_omit();
+ void encode_text(Text_Buf& text_buf) const;
+ void decode_text(Text_Buf& text_buf);
+void encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...) const;
+void decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...);
+int RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree&) const;
+int RAW_decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int, raw_order_t, boolean no_err=FALSE,int sel_field=-1, boolean first_call=TRUE, const RAW_Force_Omit* force_omit = NULL);
+};
+
+class CAN__frame__j1939mod_template : public Base_Template {
+struct single_value_struct;
+union {
+single_value_struct *single_value;
+struct {
+unsigned int n_values;
+CAN__frame__j1939mod_template *list_value;
+} value_list;
+};
+
+void set_specific();
+void copy_value(const CAN__frame__j1939mod& other_value);
+void copy_template(const CAN__frame__j1939mod_template& other_value);
+
+public:
+CAN__frame__j1939mod_template();
+CAN__frame__j1939mod_template(template_sel other_value);
+CAN__frame__j1939mod_template(const CAN__frame__j1939mod& other_value);
+CAN__frame__j1939mod_template(const OPTIONAL<CAN__frame__j1939mod>& other_value);
+CAN__frame__j1939mod_template(const CAN__frame__j1939mod_template& other_value);
+~CAN__frame__j1939mod_template();
+CAN__frame__j1939mod_template& operator=(template_sel other_value);
+CAN__frame__j1939mod_template& operator=(const CAN__frame__j1939mod& other_value);
+CAN__frame__j1939mod_template& operator=(const OPTIONAL<CAN__frame__j1939mod>& other_value);
+CAN__frame__j1939mod_template& operator=(const CAN__frame__j1939mod_template& other_value);
+boolean match(const CAN__frame__j1939mod& other_value, boolean legacy = FALSE) const;
+boolean is_bound() const;
+boolean is_value() const;
+void clean_up();
+CAN__frame__j1939mod valueof() const;
+void set_type(template_sel template_type, unsigned int list_length);
+CAN__frame__j1939mod_template& list_item(unsigned int list_index) const;
+J1939mod_template& can__j1939();
+const J1939mod_template& can__j1939() const;
+AnyIsoBusPdu_template& can__pdu();
+const AnyIsoBusPdu_template& can__pdu() const;
+int size_of() const;
+void log() const;
+void log_match(const CAN__frame__j1939mod& match_value, boolean legacy = FALSE) const;
+void encode_text(Text_Buf& text_buf) const;
+void decode_text(Text_Buf& text_buf);
+void set_param(Module_Param& param);
+void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
+boolean is_present(boolean legacy = FALSE) const;
+boolean match_omit(boolean legacy = FALSE) const;
+};
+
+
+/* Function prototypes */
+
+extern OCTETSTRING encode__CAN__frame__j1939mod(const CAN__frame__j1939mod& pdu);
+extern CAN__frame__j1939mod decode__CAN__frame__j1939mod(const OCTETSTRING& data);
+extern Can::CAN__frame j1939frame2can(const CAN__frame__j1939& p__can__frame__j1939, const BITSTRING& p__priority, const OCTETSTRING& p__da, const OCTETSTRING& p__sa);
+extern OCTETSTRING pdu1__j1939id2canid(const J1939& p__j1939, const BITSTRING& p__priority, const OCTETSTRING& p__da, const OCTETSTRING& p__sa);
+extern OCTETSTRING j1939id2canid(const J1939& p__j1939);
+extern CAN__frame__j1939 can2j1939frame(const Can::CAN__frame& p__can__frame);
+extern J1939 canid2j1939(const OCTETSTRING& p__can__id);
+extern OCTETSTRING f__insert__aux__hdr(const OCTETSTRING& p__os);
+extern OCTETSTRING f__remove__aux__hdr(const OCTETSTRING& p__os);
+extern CAN__frame__j1939 f__map__mod2frame(const CAN__frame__j1939mod& p__frame);
+extern CAN__frame__j1939mod f__map__frame2mod(const CAN__frame__j1939& p__frame);
+extern OCTETSTRING f__encode__CAN__frame__j1939(const CAN__frame__j1939& pdu);
+extern CAN__frame__j1939 f__decode__CAN__frame__j1939(const OCTETSTRING& data);
+
+/* Global variable declarations */
+
+extern const OCTETSTRING& ISOBUS__PRIORITY__MASK;
+extern const OCTETSTRING& ISOBUS__RESERVED__MASK;
+extern const OCTETSTRING& ISOBUS__DATAPAGE__MASK;
+extern const OCTETSTRING& ISOBUS__PDUFORMAT__MASK;
+extern const OCTETSTRING& ISOBUS__PDUSPECIFIC__MASK;
+extern const OCTETSTRING& ISOBUS__SOURCEADDRESS__MASK;
+extern const TTCN_RAWdescriptor_t Priority_raw_;
+extern const XERdescriptor_t Priority_xer_;
+extern const TTCN_OERdescriptor_t Priority_oer_;
+extern const TTCN_Typedescriptor_t Priority_descr_;
+extern const TTCN_RAWdescriptor_t J1939_prio_raw_;
+extern const XERdescriptor_t J1939_prio_xer_;
+extern const TTCN_OERdescriptor_t J1939_prio_oer_;
+extern const TTCN_Typedescriptor_t J1939_prio_descr_;
+extern const TTCN_RAWdescriptor_t J1939_res_raw_;
+extern const XERdescriptor_t J1939_res_xer_;
+extern const TTCN_OERdescriptor_t J1939_res_oer_;
+extern const TTCN_Typedescriptor_t J1939_res_descr_;
+extern const TTCN_RAWdescriptor_t J1939_dp_raw_;
+extern const XERdescriptor_t J1939_dp_xer_;
+extern const TTCN_OERdescriptor_t J1939_dp_oer_;
+extern const TTCN_Typedescriptor_t J1939_dp_descr_;
+extern const TTCN_RAWdescriptor_t J1939_pf_raw_;
+extern const XERdescriptor_t J1939_pf_xer_;
+extern const TTCN_OERdescriptor_t J1939_pf_oer_;
+extern const TTCN_Typedescriptor_t J1939_pf_descr_;
+extern const TTCN_RAWdescriptor_t J1939_ps_raw_;
+extern const XERdescriptor_t J1939_ps_xer_;
+extern const TTCN_OERdescriptor_t J1939_ps_oer_;
+extern const TTCN_Typedescriptor_t J1939_ps_descr_;
+extern const TTCN_RAWdescriptor_t J1939_sa_raw_;
+extern const XERdescriptor_t J1939_sa_xer_;
+extern const TTCN_OERdescriptor_t J1939_sa_oer_;
+extern const TTCN_Typedescriptor_t J1939_sa_descr_;
+extern const TTCN_RAWdescriptor_t J1939_raw_;
+extern const TTCN_Typedescriptor_t J1939_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_prio_raw_;
+extern const XERdescriptor_t J1939mod_prio_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_prio_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_prio_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_res_raw_;
+extern const XERdescriptor_t J1939mod_res_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_res_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_res_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_dp_raw_;
+extern const XERdescriptor_t J1939mod_dp_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_dp_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_dp_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_pf_raw_;
+extern const XERdescriptor_t J1939mod_pf_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_pf_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_pf_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_ps_raw_;
+extern const XERdescriptor_t J1939mod_ps_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_ps_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_ps_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_sa_raw_;
+extern const XERdescriptor_t J1939mod_sa_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_sa_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_sa_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_comp_raw_;
+extern const XERdescriptor_t J1939mod_comp_xer_;
+extern const TTCN_OERdescriptor_t J1939mod_comp_oer_;
+extern const TTCN_Typedescriptor_t J1939mod_comp_descr_;
+extern const TTCN_RAWdescriptor_t J1939mod_raw_;
+extern const TTCN_Typedescriptor_t J1939mod_descr_;
+extern const TTCN_RAWdescriptor_t AnyIsoBusPdu_raw_;
+extern const TTCN_Typedescriptor_t AnyIsoBusPdu_descr_;
+extern const TTCN_RAWdescriptor_t CAN__frame__j1939_raw_;
+extern const TTCN_Typedescriptor_t CAN__frame__j1939_descr_;
+extern const TTCN_RAWdescriptor_t CAN__frame__j1939mod_can__pdu_raw_;
+extern const TTCN_Typedescriptor_t CAN__frame__j1939mod_can__pdu_descr_;
+extern const TTCN_RAWdescriptor_t CAN__frame__j1939mod_raw_;
+extern const TTCN_Typedescriptor_t CAN__frame__j1939mod_descr_;
+extern TTCN_Module module_object;
+
+} /* end of namespace */
+
+#endif
diff --git a/demo/Isobus.o b/demo/Isobus.o
new file mode 100644
index 0000000..9c1493b
--- /dev/null
+++ b/demo/Isobus.o
Binary files differ
diff --git a/demo/IsobusCMMessageTypes.cc b/demo/IsobusCMMessageTypes.cc
new file mode 100644
index 0000000..3608fa1
--- /dev/null
+++ b/demo/IsobusCMMessageTypes.cc
@@ -0,0 +1,17419 @@
+// This C++ source file was generated by the TTCN-3 compiler
+// of the TTCN-3 Test Executor version CRL 113 200/6 R6A
+// for Lénárd Nagy (elnrnag@elx78355y6x) on Thu Oct 24 10:29:40 2019
+
+// Copyright (c) 2000-2019 Ericsson Telecom AB
+
+// Do not edit this file unless you know what you are doing.
+
+/* Including header files */
+
+#include "IsobusCMMessageTypes.hh"
+
+namespace IsobusCMMessageTypes {
+
+/* Prototypes of static functions */
+
+static void pre_init_module();
+static void post_init_module();
+
+/* Literal string constants */
+
+static const unsigned char os_0_octets[] = { 16 },
+os_1_octets[] = { 17 },
+os_2_octets[] = { 19 },
+os_3_octets[] = { 32 },
+os_5_octets[] = { 33 },
+os_6_octets[] = { 34 },
+os_7_octets[] = { 35 },
+os_4_octets[] = { 255 };
+static const OCTETSTRING os_0(1, os_0_octets),
+os_1(1, os_1_octets),
+os_2(1, os_2_octets),
+os_3(1, os_3_octets),
+os_5(1, os_5_octets),
+os_6(1, os_6_octets),
+os_7(1, os_7_octets),
+os_4(1, os_4_octets);
+static const unsigned char module_checksum[] = { 0xf5, 0x67, 0x02, 0xbc, 0x33, 0x07, 0xbc, 0xd1, 0x80, 0xb3, 0xef, 0x1b, 0x59, 0x25, 0x7c, 0x3f };
+
+/* Global variable definitions */
+
+const TTCN_RAWdescriptor_t SEQ__NO_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t SEQ__NO_xer_ = { {"SEQ_NO>\n", "SEQ_NO>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t SEQ__NO_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t SEQ__NO_descr_ = { "@IsobusCMMessageTypes.SEQ_NO", &INTEGER_ber_, &SEQ__NO_raw_, &INTEGER_text_, &SEQ__NO_xer_, &INTEGER_json_, &SEQ__NO_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t NUMBER__OF__PACKETS_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t NUMBER__OF__PACKETS_xer_ = { {"NUMBER_OF_PACKETS>\n", "NUMBER_OF_PACKETS>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t NUMBER__OF__PACKETS_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t NUMBER__OF__PACKETS_descr_ = { "@IsobusCMMessageTypes.NUMBER_OF_PACKETS", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &NUMBER__OF__PACKETS_xer_, &INTEGER_json_, &NUMBER__OF__PACKETS_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t Ctrl_xer_ = { {"Ctrl>\n", "Ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int Ctrl_oer_ext_arr_[0] = {};
+const int Ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t Ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, Ctrl_oer_ext_arr_, 0, Ctrl_oer_p_};
+const TTCN_Typedescriptor_t Ctrl_descr_ = { "@IsobusCMMessageTypes.Ctrl", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &Ctrl_xer_, &OCTETSTRING_json_, &Ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t RequestToSend_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t RequestToSend_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int RequestToSend_ctrl_oer_ext_arr_[0] = {};
+const int RequestToSend_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t RequestToSend_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, RequestToSend_ctrl_oer_ext_arr_, 0, RequestToSend_ctrl_oer_p_};
+const TTCN_Typedescriptor_t RequestToSend_ctrl_descr_ = { "@IsobusCMMessageTypes.RequestToSend.ctrl", &OCTETSTRING_ber_, &RequestToSend_ctrl_raw_, &OCTETSTRING_text_, &RequestToSend_ctrl_xer_, &OCTETSTRING_json_, &RequestToSend_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t RequestToSend_msgSizeInBytes_xer_ = { {"msgSizeInBytes>\n", "msgSizeInBytes>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t RequestToSend_msgSizeInBytes_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t RequestToSend_msgSizeInBytes_descr_ = { "@IsobusCMMessageTypes.RequestToSend.msgSizeInBytes", &INTEGER_ber_, &IsobusMessageTypes::INT2_raw_, &INTEGER_text_, &RequestToSend_msgSizeInBytes_xer_, &INTEGER_json_, &RequestToSend_msgSizeInBytes_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t RequestToSend_totalNumberOfPackets_xer_ = { {"totalNumberOfPackets>\n", "totalNumberOfPackets>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t RequestToSend_totalNumberOfPackets_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t RequestToSend_totalNumberOfPackets_descr_ = { "@IsobusCMMessageTypes.RequestToSend.totalNumberOfPackets", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &RequestToSend_totalNumberOfPackets_xer_, &INTEGER_json_, &RequestToSend_totalNumberOfPackets_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t RequestToSend_maxNoOfPacketsInResponseToCTS_xer_ = { {"maxNoOfPacketsInResponseToCTS>\n", "maxNoOfPacketsInResponseToCTS>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t RequestToSend_maxNoOfPacketsInResponseToCTS_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t RequestToSend_maxNoOfPacketsInResponseToCTS_descr_ = { "@IsobusCMMessageTypes.RequestToSend.maxNoOfPacketsInResponseToCTS", &INTEGER_ber_, &General__Types::INT1_raw_, &INTEGER_text_, &RequestToSend_maxNoOfPacketsInResponseToCTS_xer_, &INTEGER_json_, &RequestToSend_maxNoOfPacketsInResponseToCTS_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t RequestToSend_pgnOfMultiPacketMessage_xer_ = { {"pgnOfMultiPacketMessage>\n", "pgnOfMultiPacketMessage>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t RequestToSend_pgnOfMultiPacketMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t RequestToSend_pgnOfMultiPacketMessage_descr_ = { "@IsobusCMMessageTypes.RequestToSend.pgnOfMultiPacketMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &RequestToSend_pgnOfMultiPacketMessage_xer_, &INTEGER_json_, &RequestToSend_pgnOfMultiPacketMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t RequestToSend_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for RequestToSend
+const TTCN_Typedescriptor_t RequestToSend_descr_ = { "@IsobusCMMessageTypes.RequestToSend", NULL, &RequestToSend_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ClearToSend_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ClearToSend_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ClearToSend_ctrl_oer_ext_arr_[0] = {};
+const int ClearToSend_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ClearToSend_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ClearToSend_ctrl_oer_ext_arr_, 0, ClearToSend_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ClearToSend_ctrl_descr_ = { "@IsobusCMMessageTypes.ClearToSend.ctrl", &OCTETSTRING_ber_, &ClearToSend_ctrl_raw_, &OCTETSTRING_text_, &ClearToSend_ctrl_xer_, &OCTETSTRING_json_, &ClearToSend_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ClearToSend_totalNumberOfPackets_xer_ = { {"totalNumberOfPackets>\n", "totalNumberOfPackets>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ClearToSend_totalNumberOfPackets_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ClearToSend_totalNumberOfPackets_descr_ = { "@IsobusCMMessageTypes.ClearToSend.totalNumberOfPackets", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &ClearToSend_totalNumberOfPackets_xer_, &INTEGER_json_, &ClearToSend_totalNumberOfPackets_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ClearToSend_nextPacketNumber_xer_ = { {"nextPacketNumber>\n", "nextPacketNumber>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ClearToSend_nextPacketNumber_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ClearToSend_nextPacketNumber_descr_ = { "@IsobusCMMessageTypes.ClearToSend.nextPacketNumber", &INTEGER_ber_, &General__Types::INT1_raw_, &INTEGER_text_, &ClearToSend_nextPacketNumber_xer_, &INTEGER_json_, &ClearToSend_nextPacketNumber_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ClearToSend_reserved4_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ClearToSend_reserved4_xer_ = { {"reserved4>\n", "reserved4>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ClearToSend_reserved4_oer_ext_arr_[0] = {};
+const int ClearToSend_reserved4_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ClearToSend_reserved4_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ClearToSend_reserved4_oer_ext_arr_, 0, ClearToSend_reserved4_oer_p_};
+const TTCN_Typedescriptor_t ClearToSend_reserved4_descr_ = { "@IsobusCMMessageTypes.ClearToSend.reserved4", &OCTETSTRING_ber_, &ClearToSend_reserved4_raw_, &OCTETSTRING_text_, &ClearToSend_reserved4_xer_, &OCTETSTRING_json_, &ClearToSend_reserved4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ClearToSend_reserved5_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ClearToSend_reserved5_xer_ = { {"reserved5>\n", "reserved5>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ClearToSend_reserved5_oer_ext_arr_[0] = {};
+const int ClearToSend_reserved5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ClearToSend_reserved5_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ClearToSend_reserved5_oer_ext_arr_, 0, ClearToSend_reserved5_oer_p_};
+const TTCN_Typedescriptor_t ClearToSend_reserved5_descr_ = { "@IsobusCMMessageTypes.ClearToSend.reserved5", &OCTETSTRING_ber_, &ClearToSend_reserved5_raw_, &OCTETSTRING_text_, &ClearToSend_reserved5_xer_, &OCTETSTRING_json_, &ClearToSend_reserved5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ClearToSend_pgnOfMultiPacketMessage_xer_ = { {"pgnOfMultiPacketMessage>\n", "pgnOfMultiPacketMessage>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ClearToSend_pgnOfMultiPacketMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ClearToSend_pgnOfMultiPacketMessage_descr_ = { "@IsobusCMMessageTypes.ClearToSend.pgnOfMultiPacketMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ClearToSend_pgnOfMultiPacketMessage_xer_, &INTEGER_json_, &ClearToSend_pgnOfMultiPacketMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ClearToSend_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ClearToSend
+const TTCN_Typedescriptor_t ClearToSend_descr_ = { "@IsobusCMMessageTypes.ClearToSend", NULL, &ClearToSend_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t EndOfMessageAcknowledgement_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t EndOfMessageAcknowledgement_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int EndOfMessageAcknowledgement_ctrl_oer_ext_arr_[0] = {};
+const int EndOfMessageAcknowledgement_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t EndOfMessageAcknowledgement_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, EndOfMessageAcknowledgement_ctrl_oer_ext_arr_, 0, EndOfMessageAcknowledgement_ctrl_oer_p_};
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_ctrl_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement.ctrl", &OCTETSTRING_ber_, &EndOfMessageAcknowledgement_ctrl_raw_, &OCTETSTRING_text_, &EndOfMessageAcknowledgement_ctrl_xer_, &OCTETSTRING_json_, &EndOfMessageAcknowledgement_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t EndOfMessageAcknowledgement_msgSizeInByte_xer_ = { {"msgSizeInByte>\n", "msgSizeInByte>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t EndOfMessageAcknowledgement_msgSizeInByte_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_msgSizeInByte_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement.msgSizeInByte", &INTEGER_ber_, &IsobusMessageTypes::INT2_raw_, &INTEGER_text_, &EndOfMessageAcknowledgement_msgSizeInByte_xer_, &INTEGER_json_, &EndOfMessageAcknowledgement_msgSizeInByte_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t EndOfMessageAcknowledgement_totalNumberOfPackets_xer_ = { {"totalNumberOfPackets>\n", "totalNumberOfPackets>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t EndOfMessageAcknowledgement_totalNumberOfPackets_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_totalNumberOfPackets_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement.totalNumberOfPackets", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &EndOfMessageAcknowledgement_totalNumberOfPackets_xer_, &INTEGER_json_, &EndOfMessageAcknowledgement_totalNumberOfPackets_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t EndOfMessageAcknowledgement_reserved5_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t EndOfMessageAcknowledgement_reserved5_xer_ = { {"reserved5>\n", "reserved5>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int EndOfMessageAcknowledgement_reserved5_oer_ext_arr_[0] = {};
+const int EndOfMessageAcknowledgement_reserved5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t EndOfMessageAcknowledgement_reserved5_oer_ = { -1, TRUE, 1, FALSE, 0, 0, EndOfMessageAcknowledgement_reserved5_oer_ext_arr_, 0, EndOfMessageAcknowledgement_reserved5_oer_p_};
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_reserved5_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement.reserved5", &OCTETSTRING_ber_, &EndOfMessageAcknowledgement_reserved5_raw_, &OCTETSTRING_text_, &EndOfMessageAcknowledgement_reserved5_xer_, &OCTETSTRING_json_, &EndOfMessageAcknowledgement_reserved5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t EndOfMessageAcknowledgement_pgnOfMultiPacketMessage_xer_ = { {"pgnOfMultiPacketMessage>\n", "pgnOfMultiPacketMessage>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t EndOfMessageAcknowledgement_pgnOfMultiPacketMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_pgnOfMultiPacketMessage_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement.pgnOfMultiPacketMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &EndOfMessageAcknowledgement_pgnOfMultiPacketMessage_xer_, &INTEGER_json_, &EndOfMessageAcknowledgement_pgnOfMultiPacketMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t EndOfMessageAcknowledgement_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for EndOfMessageAcknowledgement
+const TTCN_Typedescriptor_t EndOfMessageAcknowledgement_descr_ = { "@IsobusCMMessageTypes.EndOfMessageAcknowledgement", NULL, &EndOfMessageAcknowledgement_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t e__ConnectionAbort__AbortReason_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for e__ConnectionAbort__AbortReason
+const TTCN_Typedescriptor_t e__ConnectionAbort__AbortReason_descr_ = { "@IsobusCMMessageTypes.e_ConnectionAbort_AbortReason", NULL, &e__ConnectionAbort__AbortReason_raw_, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ConnectionAbort_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ConnectionAbort_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ConnectionAbort_ctrl_oer_ext_arr_[0] = {};
+const int ConnectionAbort_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ConnectionAbort_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectionAbort_ctrl_oer_ext_arr_, 0, ConnectionAbort_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ConnectionAbort_ctrl_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort.ctrl", &OCTETSTRING_ber_, &ConnectionAbort_ctrl_raw_, &OCTETSTRING_text_, &ConnectionAbort_ctrl_xer_, &OCTETSTRING_json_, &ConnectionAbort_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ConnectionAbort_reserved3_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ConnectionAbort_reserved3_xer_ = { {"reserved3>\n", "reserved3>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ConnectionAbort_reserved3_oer_ext_arr_[0] = {};
+const int ConnectionAbort_reserved3_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ConnectionAbort_reserved3_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectionAbort_reserved3_oer_ext_arr_, 0, ConnectionAbort_reserved3_oer_p_};
+const TTCN_Typedescriptor_t ConnectionAbort_reserved3_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort.reserved3", &OCTETSTRING_ber_, &ConnectionAbort_reserved3_raw_, &OCTETSTRING_text_, &ConnectionAbort_reserved3_xer_, &OCTETSTRING_json_, &ConnectionAbort_reserved3_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ConnectionAbort_reserved4_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ConnectionAbort_reserved4_xer_ = { {"reserved4>\n", "reserved4>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ConnectionAbort_reserved4_oer_ext_arr_[0] = {};
+const int ConnectionAbort_reserved4_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ConnectionAbort_reserved4_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectionAbort_reserved4_oer_ext_arr_, 0, ConnectionAbort_reserved4_oer_p_};
+const TTCN_Typedescriptor_t ConnectionAbort_reserved4_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort.reserved4", &OCTETSTRING_ber_, &ConnectionAbort_reserved4_raw_, &OCTETSTRING_text_, &ConnectionAbort_reserved4_xer_, &OCTETSTRING_json_, &ConnectionAbort_reserved4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ConnectionAbort_reserved5_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ConnectionAbort_reserved5_xer_ = { {"reserved5>\n", "reserved5>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ConnectionAbort_reserved5_oer_ext_arr_[0] = {};
+const int ConnectionAbort_reserved5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ConnectionAbort_reserved5_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectionAbort_reserved5_oer_ext_arr_, 0, ConnectionAbort_reserved5_oer_p_};
+const TTCN_Typedescriptor_t ConnectionAbort_reserved5_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort.reserved5", &OCTETSTRING_ber_, &ConnectionAbort_reserved5_raw_, &OCTETSTRING_text_, &ConnectionAbort_reserved5_xer_, &OCTETSTRING_json_, &ConnectionAbort_reserved5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ConnectionAbort_pgnOfMultiPacketMessage_xer_ = { {"pgnOfMultiPacketMessage>\n", "pgnOfMultiPacketMessage>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ConnectionAbort_pgnOfMultiPacketMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ConnectionAbort_pgnOfMultiPacketMessage_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort.pgnOfMultiPacketMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ConnectionAbort_pgnOfMultiPacketMessage_xer_, &INTEGER_json_, &ConnectionAbort_pgnOfMultiPacketMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ConnectionAbort_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ConnectionAbort
+const TTCN_Typedescriptor_t ConnectionAbort_descr_ = { "@IsobusCMMessageTypes.ConnectionAbort", NULL, &ConnectionAbort_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BroadcastAnnounce_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BroadcastAnnounce_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int BroadcastAnnounce_ctrl_oer_ext_arr_[0] = {};
+const int BroadcastAnnounce_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t BroadcastAnnounce_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, BroadcastAnnounce_ctrl_oer_ext_arr_, 0, BroadcastAnnounce_ctrl_oer_p_};
+const TTCN_Typedescriptor_t BroadcastAnnounce_ctrl_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce.ctrl", &OCTETSTRING_ber_, &BroadcastAnnounce_ctrl_raw_, &OCTETSTRING_text_, &BroadcastAnnounce_ctrl_xer_, &OCTETSTRING_json_, &BroadcastAnnounce_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t BroadcastAnnounce_msgSizeInByte_xer_ = { {"msgSizeInByte>\n", "msgSizeInByte>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BroadcastAnnounce_msgSizeInByte_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BroadcastAnnounce_msgSizeInByte_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce.msgSizeInByte", &INTEGER_ber_, &IsobusMessageTypes::INT2_raw_, &INTEGER_text_, &BroadcastAnnounce_msgSizeInByte_xer_, &INTEGER_json_, &BroadcastAnnounce_msgSizeInByte_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t BroadcastAnnounce_totalNumberOfPackets_xer_ = { {"totalNumberOfPackets>\n", "totalNumberOfPackets>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BroadcastAnnounce_totalNumberOfPackets_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BroadcastAnnounce_totalNumberOfPackets_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce.totalNumberOfPackets", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &BroadcastAnnounce_totalNumberOfPackets_xer_, &INTEGER_json_, &BroadcastAnnounce_totalNumberOfPackets_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BroadcastAnnounce_reserved5_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t BroadcastAnnounce_reserved5_xer_ = { {"reserved5>\n", "reserved5>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int BroadcastAnnounce_reserved5_oer_ext_arr_[0] = {};
+const int BroadcastAnnounce_reserved5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t BroadcastAnnounce_reserved5_oer_ = { -1, TRUE, 1, FALSE, 0, 0, BroadcastAnnounce_reserved5_oer_ext_arr_, 0, BroadcastAnnounce_reserved5_oer_p_};
+const TTCN_Typedescriptor_t BroadcastAnnounce_reserved5_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce.reserved5", &OCTETSTRING_ber_, &BroadcastAnnounce_reserved5_raw_, &OCTETSTRING_text_, &BroadcastAnnounce_reserved5_xer_, &OCTETSTRING_json_, &BroadcastAnnounce_reserved5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t BroadcastAnnounce_pgnOfMultiPacketMessage_xer_ = { {"pgnOfMultiPacketMessage>\n", "pgnOfMultiPacketMessage>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t BroadcastAnnounce_pgnOfMultiPacketMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t BroadcastAnnounce_pgnOfMultiPacketMessage_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce.pgnOfMultiPacketMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &BroadcastAnnounce_pgnOfMultiPacketMessage_xer_, &INTEGER_json_, &BroadcastAnnounce_pgnOfMultiPacketMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t BroadcastAnnounce_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for BroadcastAnnounce
+const TTCN_Typedescriptor_t BroadcastAnnounce_descr_ = { "@IsobusCMMessageTypes.BroadcastAnnounce", NULL, &BroadcastAnnounce_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t TP__CM_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for TP__CM
+const TTCN_Typedescriptor_t TP__CM_descr_ = { "@IsobusCMMessageTypes.TP_CM", NULL, &TP__CM_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ETP__MSG__SIZE_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ETP__MSG__SIZE_xer_ = { {"ETP_MSG_SIZE>\n", "ETP_MSG_SIZE>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ETP__MSG__SIZE_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ETP__MSG__SIZE_descr_ = { "@IsobusCMMessageTypes.ETP_MSG_SIZE", &INTEGER_ber_, &ETP__MSG__SIZE_raw_, &INTEGER_text_, &ETP__MSG__SIZE_xer_, &INTEGER_json_, &ETP__MSG__SIZE_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageRequestToSend_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageRequestToSend_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageRequestToSend_ctrl_oer_ext_arr_[0] = {};
+const int ExtendedMessageRequestToSend_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageRequestToSend_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageRequestToSend_ctrl_oer_ext_arr_, 0, ExtendedMessageRequestToSend_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageRequestToSend_ctrl_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageRequestToSend.ctrl", &OCTETSTRING_ber_, &ExtendedMessageRequestToSend_ctrl_raw_, &OCTETSTRING_text_, &ExtendedMessageRequestToSend_ctrl_xer_, &OCTETSTRING_json_, &ExtendedMessageRequestToSend_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageRequestToSend_msgSizeInBytes_xer_ = { {"msgSizeInBytes>\n", "msgSizeInBytes>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageRequestToSend_msgSizeInBytes_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageRequestToSend_msgSizeInBytes_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageRequestToSend.msgSizeInBytes", &INTEGER_ber_, &ETP__MSG__SIZE_raw_, &INTEGER_text_, &ExtendedMessageRequestToSend_msgSizeInBytes_xer_, &INTEGER_json_, &ExtendedMessageRequestToSend_msgSizeInBytes_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageRequestToSend_pgnOfExtendedPacketedMessage_xer_ = { {"pgnOfExtendedPacketedMessage>\n", "pgnOfExtendedPacketedMessage>\n"}, {30, 30}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageRequestToSend_pgnOfExtendedPacketedMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageRequestToSend_pgnOfExtendedPacketedMessage_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageRequestToSend.pgnOfExtendedPacketedMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ExtendedMessageRequestToSend_pgnOfExtendedPacketedMessage_xer_, &INTEGER_json_, &ExtendedMessageRequestToSend_pgnOfExtendedPacketedMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageRequestToSend_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ExtendedMessageRequestToSend
+const TTCN_Typedescriptor_t ExtendedMessageRequestToSend_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageRequestToSend", NULL, &ExtendedMessageRequestToSend_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ETP__NextPacketNumberToSend_raw_ = {32,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ETP__NextPacketNumberToSend_xer_ = { {"ETP_NextPacketNumberToSend>\n", "ETP_NextPacketNumberToSend>\n"}, {28, 28}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ETP__NextPacketNumberToSend_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ETP__NextPacketNumberToSend_descr_ = { "@IsobusCMMessageTypes.ETP_NextPacketNumberToSend", &INTEGER_ber_, &ETP__NextPacketNumberToSend_raw_, &INTEGER_text_, &ETP__NextPacketNumberToSend_xer_, &INTEGER_json_, &ETP__NextPacketNumberToSend_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageClearToSend_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageClearToSend_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageClearToSend_ctrl_oer_ext_arr_[0] = {};
+const int ExtendedMessageClearToSend_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageClearToSend_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageClearToSend_ctrl_oer_ext_arr_, 0, ExtendedMessageClearToSend_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageClearToSend_ctrl_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageClearToSend.ctrl", &OCTETSTRING_ber_, &ExtendedMessageClearToSend_ctrl_raw_, &OCTETSTRING_text_, &ExtendedMessageClearToSend_ctrl_xer_, &OCTETSTRING_json_, &ExtendedMessageClearToSend_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageClearToSend_NumberOfPacketsToSend_xer_ = { {"NumberOfPacketsToSend>\n", "NumberOfPacketsToSend>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageClearToSend_NumberOfPacketsToSend_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageClearToSend_NumberOfPacketsToSend_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageClearToSend.NumberOfPacketsToSend", &INTEGER_ber_, &General__Types::INT1_raw_, &INTEGER_text_, &ExtendedMessageClearToSend_NumberOfPacketsToSend_xer_, &INTEGER_json_, &ExtendedMessageClearToSend_NumberOfPacketsToSend_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageClearToSend_nextPacketNumberToSend_xer_ = { {"nextPacketNumberToSend>\n", "nextPacketNumberToSend>\n"}, {24, 24}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageClearToSend_nextPacketNumberToSend_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageClearToSend_nextPacketNumberToSend_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageClearToSend.nextPacketNumberToSend", &INTEGER_ber_, &ETP__NextPacketNumberToSend_raw_, &INTEGER_text_, &ExtendedMessageClearToSend_nextPacketNumberToSend_xer_, &INTEGER_json_, &ExtendedMessageClearToSend_nextPacketNumberToSend_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageClearToSend_pgnOfExtendedPacketedMessage_xer_ = { {"pgnOfExtendedPacketedMessage>\n", "pgnOfExtendedPacketedMessage>\n"}, {30, 30}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageClearToSend_pgnOfExtendedPacketedMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageClearToSend_pgnOfExtendedPacketedMessage_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageClearToSend.pgnOfExtendedPacketedMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ExtendedMessageClearToSend_pgnOfExtendedPacketedMessage_xer_, &INTEGER_json_, &ExtendedMessageClearToSend_pgnOfExtendedPacketedMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageClearToSend_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ExtendedMessageClearToSend
+const TTCN_Typedescriptor_t ExtendedMessageClearToSend_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageClearToSend", NULL, &ExtendedMessageClearToSend_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ETP__NoPacketForOffset_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ETP__NoPacketForOffset_xer_ = { {"ETP_NoPacketForOffset>\n", "ETP_NoPacketForOffset>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ETP__NoPacketForOffset_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ETP__NoPacketForOffset_descr_ = { "@IsobusCMMessageTypes.ETP_NoPacketForOffset", &INTEGER_ber_, &ETP__NoPacketForOffset_raw_, &INTEGER_text_, &ETP__NoPacketForOffset_xer_, &INTEGER_json_, &ETP__NoPacketForOffset_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageDataPacketOffset_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageDataPacketOffset_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageDataPacketOffset_ctrl_oer_ext_arr_[0] = {};
+const int ExtendedMessageDataPacketOffset_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageDataPacketOffset_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageDataPacketOffset_ctrl_oer_ext_arr_, 0, ExtendedMessageDataPacketOffset_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_ctrl_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset.ctrl", &OCTETSTRING_ber_, &ExtendedMessageDataPacketOffset_ctrl_raw_, &OCTETSTRING_text_, &ExtendedMessageDataPacketOffset_ctrl_xer_, &OCTETSTRING_json_, &ExtendedMessageDataPacketOffset_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageDataPacketOffset_numberOfPacketsToWhichToApplyTheOffset_xer_ = { {"numberOfPacketsToWhichToApplyTheOffset>\n", "numberOfPacketsToWhichToApplyTheOffset>\n"}, {40, 40}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageDataPacketOffset_numberOfPacketsToWhichToApplyTheOffset_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_numberOfPacketsToWhichToApplyTheOffset_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset.numberOfPacketsToWhichToApplyTheOffset", &INTEGER_ber_, &ETP__NoPacketForOffset_raw_, &INTEGER_text_, &ExtendedMessageDataPacketOffset_numberOfPacketsToWhichToApplyTheOffset_xer_, &INTEGER_json_, &ExtendedMessageDataPacketOffset_numberOfPacketsToWhichToApplyTheOffset_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageDataPacketOffset_totalNumberOfPackets_xer_ = { {"totalNumberOfPackets>\n", "totalNumberOfPackets>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageDataPacketOffset_totalNumberOfPackets_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_totalNumberOfPackets_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset.totalNumberOfPackets", &INTEGER_ber_, &NUMBER__OF__PACKETS_raw_, &INTEGER_text_, &ExtendedMessageDataPacketOffset_totalNumberOfPackets_xer_, &INTEGER_json_, &ExtendedMessageDataPacketOffset_totalNumberOfPackets_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageDataPacketOffset_dataPacketOffset_xer_ = { {"dataPacketOffset>\n", "dataPacketOffset>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageDataPacketOffset_dataPacketOffset_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_dataPacketOffset_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset.dataPacketOffset", &INTEGER_ber_, &ETP__NextPacketNumberToSend_raw_, &INTEGER_text_, &ExtendedMessageDataPacketOffset_dataPacketOffset_xer_, &INTEGER_json_, &ExtendedMessageDataPacketOffset_dataPacketOffset_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageDataPacketOffset_pgnOfExtendedPacketedMessage_xer_ = { {"pgnOfExtendedPacketedMessage>\n", "pgnOfExtendedPacketedMessage>\n"}, {30, 30}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageDataPacketOffset_pgnOfExtendedPacketedMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_pgnOfExtendedPacketedMessage_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset.pgnOfExtendedPacketedMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ExtendedMessageDataPacketOffset_pgnOfExtendedPacketedMessage_xer_, &INTEGER_json_, &ExtendedMessageDataPacketOffset_pgnOfExtendedPacketedMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageDataPacketOffset_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ExtendedMessageDataPacketOffset
+const TTCN_Typedescriptor_t ExtendedMessageDataPacketOffset_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageDataPacketOffset", NULL, &ExtendedMessageDataPacketOffset_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_ext_arr_[0] = {};
+const int ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_ext_arr_, 0, ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageEndOfMessageAcknowledgement_ctrl_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageEndOfMessageAcknowledgement.ctrl", &OCTETSTRING_ber_, &ExtendedMessageEndOfMessageAcknowledgement_ctrl_raw_, &OCTETSTRING_text_, &ExtendedMessageEndOfMessageAcknowledgement_ctrl_xer_, &OCTETSTRING_json_, &ExtendedMessageEndOfMessageAcknowledgement_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_numberOfBytesTransferred_xer_ = { {"numberOfBytesTransferred>\n", "numberOfBytesTransferred>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_numberOfBytesTransferred_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageEndOfMessageAcknowledgement_numberOfBytesTransferred_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageEndOfMessageAcknowledgement.numberOfBytesTransferred", &INTEGER_ber_, &ETP__MSG__SIZE_raw_, &INTEGER_text_, &ExtendedMessageEndOfMessageAcknowledgement_numberOfBytesTransferred_xer_, &INTEGER_json_, &ExtendedMessageEndOfMessageAcknowledgement_numberOfBytesTransferred_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_pgnOfExtendedPacketedMessage_xer_ = { {"pgnOfExtendedPacketedMessage>\n", "pgnOfExtendedPacketedMessage>\n"}, {30, 30}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_pgnOfExtendedPacketedMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageEndOfMessageAcknowledgement_pgnOfExtendedPacketedMessage_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageEndOfMessageAcknowledgement.pgnOfExtendedPacketedMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ExtendedMessageEndOfMessageAcknowledgement_pgnOfExtendedPacketedMessage_xer_, &INTEGER_json_, &ExtendedMessageEndOfMessageAcknowledgement_pgnOfExtendedPacketedMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageEndOfMessageAcknowledgement_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ExtendedMessageEndOfMessageAcknowledgement
+const TTCN_Typedescriptor_t ExtendedMessageEndOfMessageAcknowledgement_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageEndOfMessageAcknowledgement", NULL, &ExtendedMessageEndOfMessageAcknowledgement_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t e__ETP__ConnectionAbort__AbortReason_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for e__ETP__ConnectionAbort__AbortReason
+const TTCN_Typedescriptor_t e__ETP__ConnectionAbort__AbortReason_descr_ = { "@IsobusCMMessageTypes.e_ETP_ConnectionAbort_AbortReason", NULL, &e__ETP__ConnectionAbort__AbortReason_raw_, NULL, NULL, &ENUMERATED_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageConnectionAbort_ctrl_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageConnectionAbort_ctrl_xer_ = { {"ctrl>\n", "ctrl>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageConnectionAbort_ctrl_oer_ext_arr_[0] = {};
+const int ExtendedMessageConnectionAbort_ctrl_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageConnectionAbort_ctrl_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageConnectionAbort_ctrl_oer_ext_arr_, 0, ExtendedMessageConnectionAbort_ctrl_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_ctrl_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort.ctrl", &OCTETSTRING_ber_, &ExtendedMessageConnectionAbort_ctrl_raw_, &OCTETSTRING_text_, &ExtendedMessageConnectionAbort_ctrl_xer_, &OCTETSTRING_json_, &ExtendedMessageConnectionAbort_ctrl_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageConnectionAbort_reserved3_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageConnectionAbort_reserved3_xer_ = { {"reserved3>\n", "reserved3>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageConnectionAbort_reserved3_oer_ext_arr_[0] = {};
+const int ExtendedMessageConnectionAbort_reserved3_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageConnectionAbort_reserved3_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageConnectionAbort_reserved3_oer_ext_arr_, 0, ExtendedMessageConnectionAbort_reserved3_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_reserved3_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort.reserved3", &OCTETSTRING_ber_, &ExtendedMessageConnectionAbort_reserved3_raw_, &OCTETSTRING_text_, &ExtendedMessageConnectionAbort_reserved3_xer_, &OCTETSTRING_json_, &ExtendedMessageConnectionAbort_reserved3_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageConnectionAbort_reserved4_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageConnectionAbort_reserved4_xer_ = { {"reserved4>\n", "reserved4>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageConnectionAbort_reserved4_oer_ext_arr_[0] = {};
+const int ExtendedMessageConnectionAbort_reserved4_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageConnectionAbort_reserved4_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageConnectionAbort_reserved4_oer_ext_arr_, 0, ExtendedMessageConnectionAbort_reserved4_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_reserved4_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort.reserved4", &OCTETSTRING_ber_, &ExtendedMessageConnectionAbort_reserved4_raw_, &OCTETSTRING_text_, &ExtendedMessageConnectionAbort_reserved4_xer_, &OCTETSTRING_json_, &ExtendedMessageConnectionAbort_reserved4_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageConnectionAbort_reserved5_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+const XERdescriptor_t ExtendedMessageConnectionAbort_reserved5_xer_ = { {"reserved5>\n", "reserved5>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ExtendedMessageConnectionAbort_reserved5_oer_ext_arr_[0] = {};
+const int ExtendedMessageConnectionAbort_reserved5_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ExtendedMessageConnectionAbort_reserved5_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ExtendedMessageConnectionAbort_reserved5_oer_ext_arr_, 0, ExtendedMessageConnectionAbort_reserved5_oer_p_};
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_reserved5_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort.reserved5", &OCTETSTRING_ber_, &ExtendedMessageConnectionAbort_reserved5_raw_, &OCTETSTRING_text_, &ExtendedMessageConnectionAbort_reserved5_xer_, &OCTETSTRING_json_, &ExtendedMessageConnectionAbort_reserved5_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ExtendedMessageConnectionAbort_pgnOfExtendedPacketedMessage_xer_ = { {"pgnOfExtendedPacketedMessage>\n", "pgnOfExtendedPacketedMessage>\n"}, {30, 30}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ExtendedMessageConnectionAbort_pgnOfExtendedPacketedMessage_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_pgnOfExtendedPacketedMessage_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort.pgnOfExtendedPacketedMessage", &INTEGER_ber_, &IsobusMessageTypes::INT24nb_raw_, &INTEGER_text_, &ExtendedMessageConnectionAbort_pgnOfExtendedPacketedMessage_xer_, &INTEGER_json_, &ExtendedMessageConnectionAbort_pgnOfExtendedPacketedMessage_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ExtendedMessageConnectionAbort_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ExtendedMessageConnectionAbort
+const TTCN_Typedescriptor_t ExtendedMessageConnectionAbort_descr_ = { "@IsobusCMMessageTypes.ExtendedMessageConnectionAbort", NULL, &ExtendedMessageConnectionAbort_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ETP__CM_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ETP__CM
+const TTCN_Typedescriptor_t ETP__CM_descr_ = { "@IsobusCMMessageTypes.ETP_CM", NULL, &ETP__CM_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t TP__DT_seq__no_xer_ = { {"seq_no>\n", "seq_no>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t TP__DT_seq__no_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t TP__DT_seq__no_descr_ = { "@IsobusCMMessageTypes.TP_DT.seq_no", &INTEGER_ber_, &SEQ__NO_raw_, &INTEGER_text_, &TP__DT_seq__no_xer_, &INTEGER_json_, &TP__DT_seq__no_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t TP__DT_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int TP__DT_data_oer_ext_arr_[0] = {};
+const int TP__DT_data_oer_p_[0] = {};
+const TTCN_OERdescriptor_t TP__DT_data_oer_ = { -1, TRUE, 7, FALSE, 0, 0, TP__DT_data_oer_ext_arr_, 0, TP__DT_data_oer_p_};
+const TTCN_Typedescriptor_t TP__DT_data_descr_ = { "@IsobusCMMessageTypes.TP_DT.data", &OCTETSTRING_ber_, &General__Types::OCT7_raw_, &OCTETSTRING_text_, &TP__DT_data_xer_, &OCTETSTRING_json_, &TP__DT_data_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t TP__DT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for TP__DT
+const TTCN_Typedescriptor_t TP__DT_descr_ = { "@IsobusCMMessageTypes.TP_DT", NULL, &TP__DT_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ETP__DT_seq__no_xer_ = { {"seq_no>\n", "seq_no>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const TTCN_OERdescriptor_t ETP__DT_seq__no_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
+const TTCN_Typedescriptor_t ETP__DT_seq__no_descr_ = { "@IsobusCMMessageTypes.ETP_DT.seq_no", &INTEGER_ber_, &SEQ__NO_raw_, &INTEGER_text_, &ETP__DT_seq__no_xer_, &INTEGER_json_, &ETP__DT_seq__no_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const XERdescriptor_t ETP__DT_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
+const int ETP__DT_data_oer_ext_arr_[0] = {};
+const int ETP__DT_data_oer_p_[0] = {};
+const TTCN_OERdescriptor_t ETP__DT_data_oer_ = { -1, TRUE, 7, FALSE, 0, 0, ETP__DT_data_oer_ext_arr_, 0, ETP__DT_data_oer_p_};
+const TTCN_Typedescriptor_t ETP__DT_data_descr_ = { "@IsobusCMMessageTypes.ETP_DT.data", &OCTETSTRING_ber_, &General__Types::OCT7_raw_, &OCTETSTRING_text_, &ETP__DT_data_xer_, &OCTETSTRING_json_, &ETP__DT_data_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE };
+const TTCN_RAWdescriptor_t ETP__DT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL,false};
+// No XER for ETP__DT
+const TTCN_Typedescriptor_t ETP__DT_descr_ = { "@IsobusCMMessageTypes.ETP_DT", NULL, &ETP__DT_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
+TTCN_Module module_object("IsobusCMMessageTypes", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6,
+ current_runtime_version.requires_minor_version_6,
+ current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1);
+
+/* Member functions of C++ classes */
+
+RequestToSend::RequestToSend()
+{
+}
+
+RequestToSend::RequestToSend(const OCTETSTRING& par_ctrl,
+ const INTEGER& par_msgSizeInBytes,
+ const INTEGER& par_totalNumberOfPackets,
+ const INTEGER& par_maxNoOfPacketsInResponseToCTS,
+ const INTEGER& par_pgnOfMultiPacketMessage)
+ : field_ctrl(par_ctrl),
+ field_msgSizeInBytes(par_msgSizeInBytes),
+ field_totalNumberOfPackets(par_totalNumberOfPackets),
+ field_maxNoOfPacketsInResponseToCTS(par_maxNoOfPacketsInResponseToCTS),
+ field_pgnOfMultiPacketMessage(par_pgnOfMultiPacketMessage)
+{
+}
+
+RequestToSend::RequestToSend(const RequestToSend& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IsobusCMMessageTypes.RequestToSend.");
+if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+else field_ctrl.clean_up();
+if (other_value.msgSizeInBytes().is_bound()) field_msgSizeInBytes = other_value.msgSizeInBytes();
+else field_msgSizeInBytes.clean_up();
+if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+else field_totalNumberOfPackets.clean_up();
+if (other_value.maxNoOfPacketsInResponseToCTS().is_bound()) field_maxNoOfPacketsInResponseToCTS = other_value.maxNoOfPacketsInResponseToCTS();
+else field_maxNoOfPacketsInResponseToCTS.clean_up();
+if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+else field_pgnOfMultiPacketMessage.clean_up();
+}
+
+void RequestToSend::clean_up()
+{
+field_ctrl.clean_up();
+field_msgSizeInBytes.clean_up();
+field_totalNumberOfPackets.clean_up();
+field_maxNoOfPacketsInResponseToCTS.clean_up();
+field_pgnOfMultiPacketMessage.clean_up();
+}
+
+const TTCN_Typedescriptor_t* RequestToSend::get_descriptor() const { return &RequestToSend_descr_; }
+RequestToSend& RequestToSend::operator=(const RequestToSend& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IsobusCMMessageTypes.RequestToSend.");
+ if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+ else field_ctrl.clean_up();
+ if (other_value.msgSizeInBytes().is_bound()) field_msgSizeInBytes = other_value.msgSizeInBytes();
+ else field_msgSizeInBytes.clean_up();
+ if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+ else field_totalNumberOfPackets.clean_up();
+ if (other_value.maxNoOfPacketsInResponseToCTS().is_bound()) field_maxNoOfPacketsInResponseToCTS = other_value.maxNoOfPacketsInResponseToCTS();
+ else field_maxNoOfPacketsInResponseToCTS.clean_up();
+ if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+ else field_pgnOfMultiPacketMessage.clean_up();
+}
+return *this;
+}
+
+boolean RequestToSend::operator==(const RequestToSend& other_value) const
+{
+return field_ctrl==other_value.field_ctrl
+ && field_msgSizeInBytes==other_value.field_msgSizeInBytes
+ && field_totalNumberOfPackets==other_value.field_totalNumberOfPackets
+ && field_maxNoOfPacketsInResponseToCTS==other_value.field_maxNoOfPacketsInResponseToCTS
+ && field_pgnOfMultiPacketMessage==other_value.field_pgnOfMultiPacketMessage;
+}
+
+boolean RequestToSend::is_bound() const
+{
+return (field_ctrl.is_bound())
+ || (field_msgSizeInBytes.is_bound())
+ || (field_totalNumberOfPackets.is_bound())
+ || (field_maxNoOfPacketsInResponseToCTS.is_bound())
+ || (field_pgnOfMultiPacketMessage.is_bound());
+}
+boolean RequestToSend::is_value() const
+{
+return field_ctrl.is_value()
+ && field_msgSizeInBytes.is_value()
+ && field_totalNumberOfPackets.is_value()
+ && field_maxNoOfPacketsInResponseToCTS.is_value()
+ && field_pgnOfMultiPacketMessage.is_value();
+}
+void RequestToSend::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ ctrl := ");
+field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInBytes := ");
+field_msgSizeInBytes.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", maxNoOfPacketsInResponseToCTS := ");
+field_maxNoOfPacketsInResponseToCTS.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void RequestToSend::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 (5<param.get_size()) {
+ param.error("record value of type @IsobusCMMessageTypes.RequestToSend has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInBytes().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) maxNoOfPacketsInResponseToCTS().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInBytes")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInBytes().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "maxNoOfPacketsInResponseToCTS")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ maxNoOfPacketsInResponseToCTS().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.RequestToSend: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@IsobusCMMessageTypes.RequestToSend");
+ }
+}
+
+void RequestToSend::set_implicit_omit()
+{
+if (ctrl().is_bound()) ctrl().set_implicit_omit();
+if (msgSizeInBytes().is_bound()) msgSizeInBytes().set_implicit_omit();
+if (totalNumberOfPackets().is_bound()) totalNumberOfPackets().set_implicit_omit();
+if (maxNoOfPacketsInResponseToCTS().is_bound()) maxNoOfPacketsInResponseToCTS().set_implicit_omit();
+if (pgnOfMultiPacketMessage().is_bound()) pgnOfMultiPacketMessage().set_implicit_omit();
+}
+
+void RequestToSend::encode_text(Text_Buf& text_buf) const
+{
+field_ctrl.encode_text(text_buf);
+field_msgSizeInBytes.encode_text(text_buf);
+field_totalNumberOfPackets.encode_text(text_buf);
+field_maxNoOfPacketsInResponseToCTS.encode_text(text_buf);
+field_pgnOfMultiPacketMessage.encode_text(text_buf);
+}
+
+void RequestToSend::decode_text(Text_Buf& text_buf)
+{
+field_ctrl.decode_text(text_buf);
+field_msgSizeInBytes.decode_text(text_buf);
+field_totalNumberOfPackets.decode_text(text_buf);
+field_maxNoOfPacketsInResponseToCTS.decode_text(text_buf);
+field_pgnOfMultiPacketMessage.decode_text(text_buf);
+}
+
+void RequestToSend::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 RequestToSend::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int RequestToSend::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, RequestToSend_ctrl_descr_.raw->forceomit);
+ decoded_field_length = field_ctrl.RAW_decode(RequestToSend_ctrl_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, IsobusMessageTypes::INT2_descr_.raw->forceomit);
+ decoded_field_length = field_msgSizeInBytes.RAW_decode(IsobusMessageTypes::INT2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, NUMBER__OF__PACKETS_descr_.raw->forceomit);
+ decoded_field_length = field_totalNumberOfPackets.RAW_decode(NUMBER__OF__PACKETS_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::INT1_descr_.raw->forceomit);
+ decoded_field_length = field_maxNoOfPacketsInResponseToCTS.RAW_decode(General__Types::INT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, IsobusMessageTypes::PGN_descr_.raw->forceomit);
+ decoded_field_length = field_pgnOfMultiPacketMessage.RAW_decode(IsobusMessageTypes::PGN_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int RequestToSend::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 5;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, RequestToSend_ctrl_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IsobusMessageTypes::INT2_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, NUMBER__OF__PACKETS_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::INT1_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IsobusMessageTypes::PGN_descr_.raw);
+ encoded_length += field_ctrl.RAW_encode(RequestToSend_ctrl_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_msgSizeInBytes.RAW_encode(IsobusMessageTypes::INT2_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_totalNumberOfPackets.RAW_encode(NUMBER__OF__PACKETS_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_maxNoOfPacketsInResponseToCTS.RAW_encode(General__Types::INT1_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_pgnOfMultiPacketMessage.RAW_encode(IsobusMessageTypes::PGN_descr_, *myleaf.body.node.nodes[4]);
+ return myleaf.length = encoded_length;
+}
+
+struct RequestToSend_template::single_value_struct {
+OCTETSTRING_template field_ctrl;
+INTEGER_template field_msgSizeInBytes;
+INTEGER_template field_totalNumberOfPackets;
+INTEGER_template field_maxNoOfPacketsInResponseToCTS;
+INTEGER_template field_pgnOfMultiPacketMessage;
+};
+
+void RequestToSend_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_ctrl = ANY_VALUE;
+single_value->field_msgSizeInBytes = ANY_VALUE;
+single_value->field_totalNumberOfPackets = ANY_VALUE;
+single_value->field_maxNoOfPacketsInResponseToCTS = ANY_VALUE;
+single_value->field_pgnOfMultiPacketMessage = ANY_VALUE;
+}
+}
+}
+
+void RequestToSend_template::copy_value(const RequestToSend& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.ctrl().is_bound()) {
+ single_value->field_ctrl = other_value.ctrl();
+} else {
+ single_value->field_ctrl.clean_up();
+}
+if (other_value.msgSizeInBytes().is_bound()) {
+ single_value->field_msgSizeInBytes = other_value.msgSizeInBytes();
+} else {
+ single_value->field_msgSizeInBytes.clean_up();
+}
+if (other_value.totalNumberOfPackets().is_bound()) {
+ single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+ single_value->field_totalNumberOfPackets.clean_up();
+}
+if (other_value.maxNoOfPacketsInResponseToCTS().is_bound()) {
+ single_value->field_maxNoOfPacketsInResponseToCTS = other_value.maxNoOfPacketsInResponseToCTS();
+} else {
+ single_value->field_maxNoOfPacketsInResponseToCTS.clean_up();
+}
+if (other_value.pgnOfMultiPacketMessage().is_bound()) {
+ single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+ single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void RequestToSend_template::copy_template(const RequestToSend_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.ctrl().get_selection()) {
+single_value->field_ctrl = other_value.ctrl();
+} else {
+single_value->field_ctrl.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.msgSizeInBytes().get_selection()) {
+single_value->field_msgSizeInBytes = other_value.msgSizeInBytes();
+} else {
+single_value->field_msgSizeInBytes.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.totalNumberOfPackets().get_selection()) {
+single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+single_value->field_totalNumberOfPackets.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.maxNoOfPacketsInResponseToCTS().get_selection()) {
+single_value->field_maxNoOfPacketsInResponseToCTS = other_value.maxNoOfPacketsInResponseToCTS();
+} else {
+single_value->field_maxNoOfPacketsInResponseToCTS.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pgnOfMultiPacketMessage().get_selection()) {
+single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new RequestToSend_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @IsobusCMMessageTypes.RequestToSend.");
+break;
+}
+set_selection(other_value);
+}
+
+RequestToSend_template::RequestToSend_template()
+{
+}
+
+RequestToSend_template::RequestToSend_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+RequestToSend_template::RequestToSend_template(const RequestToSend& other_value)
+{
+copy_value(other_value);
+}
+
+RequestToSend_template::RequestToSend_template(const OPTIONAL<RequestToSend>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const RequestToSend&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @IsobusCMMessageTypes.RequestToSend from an unbound optional field.");
+}
+}
+
+RequestToSend_template::RequestToSend_template(const RequestToSend_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+RequestToSend_template::~RequestToSend_template()
+{
+clean_up();
+}
+
+RequestToSend_template& RequestToSend_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+RequestToSend_template& RequestToSend_template::operator=(const RequestToSend& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+RequestToSend_template& RequestToSend_template::operator=(const OPTIONAL<RequestToSend>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const RequestToSend&)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 @IsobusCMMessageTypes.RequestToSend.");
+}
+return *this;
+}
+
+RequestToSend_template& RequestToSend_template::operator=(const RequestToSend_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean RequestToSend_template::match(const RequestToSend& 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.ctrl().is_bound()) return FALSE;
+if(!single_value->field_ctrl.match(other_value.ctrl(), legacy))return FALSE;
+if(!other_value.msgSizeInBytes().is_bound()) return FALSE;
+if(!single_value->field_msgSizeInBytes.match(other_value.msgSizeInBytes(), legacy))return FALSE;
+if(!other_value.totalNumberOfPackets().is_bound()) return FALSE;
+if(!single_value->field_totalNumberOfPackets.match(other_value.totalNumberOfPackets(), legacy))return FALSE;
+if(!other_value.maxNoOfPacketsInResponseToCTS().is_bound()) return FALSE;
+if(!single_value->field_maxNoOfPacketsInResponseToCTS.match(other_value.maxNoOfPacketsInResponseToCTS(), legacy))return FALSE;
+if(!other_value.pgnOfMultiPacketMessage().is_bound()) return FALSE;
+if(!single_value->field_pgnOfMultiPacketMessage.match(other_value.pgnOfMultiPacketMessage(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @IsobusCMMessageTypes.RequestToSend.");
+}
+return FALSE;
+}
+
+boolean RequestToSend_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_ctrl.is_bound()
+
+ ||single_value->field_msgSizeInBytes.is_bound()
+
+ ||single_value->field_totalNumberOfPackets.is_bound()
+
+ ||single_value->field_maxNoOfPacketsInResponseToCTS.is_bound()
+
+ ||single_value->field_pgnOfMultiPacketMessage.is_bound()
+;
+}
+
+boolean RequestToSend_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_ctrl.is_value()
+ &&single_value->field_msgSizeInBytes.is_value()
+ &&single_value->field_totalNumberOfPackets.is_value()
+ &&single_value->field_maxNoOfPacketsInResponseToCTS.is_value()
+ &&single_value->field_pgnOfMultiPacketMessage.is_value();
+}
+
+void RequestToSend_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+RequestToSend RequestToSend_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 @IsobusCMMessageTypes.RequestToSend.");
+RequestToSend ret_val;
+if (single_value->field_ctrl.is_bound()) {
+ret_val.ctrl() = single_value->field_ctrl.valueof();
+}
+if (single_value->field_msgSizeInBytes.is_bound()) {
+ret_val.msgSizeInBytes() = single_value->field_msgSizeInBytes.valueof();
+}
+if (single_value->field_totalNumberOfPackets.is_bound()) {
+ret_val.totalNumberOfPackets() = single_value->field_totalNumberOfPackets.valueof();
+}
+if (single_value->field_maxNoOfPacketsInResponseToCTS.is_bound()) {
+ret_val.maxNoOfPacketsInResponseToCTS() = single_value->field_maxNoOfPacketsInResponseToCTS.valueof();
+}
+if (single_value->field_pgnOfMultiPacketMessage.is_bound()) {
+ret_val.pgnOfMultiPacketMessage() = single_value->field_pgnOfMultiPacketMessage.valueof();
+}
+return ret_val;
+}
+
+void RequestToSend_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @IsobusCMMessageTypes.RequestToSend.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new RequestToSend_template[list_length];
+}
+
+RequestToSend_template& RequestToSend_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @IsobusCMMessageTypes.RequestToSend.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @IsobusCMMessageTypes.RequestToSend.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& RequestToSend_template::ctrl()
+{
+set_specific();
+return single_value->field_ctrl;
+}
+
+const OCTETSTRING_template& RequestToSend_template::ctrl() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ctrl of a non-specific template of type @IsobusCMMessageTypes.RequestToSend.");
+return single_value->field_ctrl;
+}
+
+INTEGER_template& RequestToSend_template::msgSizeInBytes()
+{
+set_specific();
+return single_value->field_msgSizeInBytes;
+}
+
+const INTEGER_template& RequestToSend_template::msgSizeInBytes() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field msgSizeInBytes of a non-specific template of type @IsobusCMMessageTypes.RequestToSend.");
+return single_value->field_msgSizeInBytes;
+}
+
+INTEGER_template& RequestToSend_template::totalNumberOfPackets()
+{
+set_specific();
+return single_value->field_totalNumberOfPackets;
+}
+
+const INTEGER_template& RequestToSend_template::totalNumberOfPackets() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field totalNumberOfPackets of a non-specific template of type @IsobusCMMessageTypes.RequestToSend.");
+return single_value->field_totalNumberOfPackets;
+}
+
+INTEGER_template& RequestToSend_template::maxNoOfPacketsInResponseToCTS()
+{
+set_specific();
+return single_value->field_maxNoOfPacketsInResponseToCTS;
+}
+
+const INTEGER_template& RequestToSend_template::maxNoOfPacketsInResponseToCTS() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field maxNoOfPacketsInResponseToCTS of a non-specific template of type @IsobusCMMessageTypes.RequestToSend.");
+return single_value->field_maxNoOfPacketsInResponseToCTS;
+}
+
+INTEGER_template& RequestToSend_template::pgnOfMultiPacketMessage()
+{
+set_specific();
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+const INTEGER_template& RequestToSend_template::pgnOfMultiPacketMessage() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pgnOfMultiPacketMessage of a non-specific template of type @IsobusCMMessageTypes.RequestToSend.");
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+int RequestToSend_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.RequestToSend which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 5;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @IsobusCMMessageTypes.RequestToSend 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 @IsobusCMMessageTypes.RequestToSend containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.RequestToSend containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.RequestToSend containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.RequestToSend containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IsobusCMMessageTypes.RequestToSend.");
+ }
+ return 0;
+}
+
+void RequestToSend_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ ctrl := ");
+single_value->field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInBytes := ");
+single_value->field_msgSizeInBytes.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", maxNoOfPacketsInResponseToCTS := ");
+single_value->field_maxNoOfPacketsInResponseToCTS.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void RequestToSend_template::log_match(const RequestToSend& 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_ctrl.match(match_value.ctrl(), legacy)){
+TTCN_Logger::log_logmatch_info(".ctrl");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_msgSizeInBytes.match(match_value.msgSizeInBytes(), legacy)){
+TTCN_Logger::log_logmatch_info(".msgSizeInBytes");
+single_value->field_msgSizeInBytes.log_match(match_value.msgSizeInBytes(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_totalNumberOfPackets.match(match_value.totalNumberOfPackets(), legacy)){
+TTCN_Logger::log_logmatch_info(".totalNumberOfPackets");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_maxNoOfPacketsInResponseToCTS.match(match_value.maxNoOfPacketsInResponseToCTS(), legacy)){
+TTCN_Logger::log_logmatch_info(".maxNoOfPacketsInResponseToCTS");
+single_value->field_maxNoOfPacketsInResponseToCTS.log_match(match_value.maxNoOfPacketsInResponseToCTS(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pgnOfMultiPacketMessage.match(match_value.pgnOfMultiPacketMessage(), legacy)){
+TTCN_Logger::log_logmatch_info(".pgnOfMultiPacketMessage");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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("{ ctrl := ");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::log_event_str(", msgSizeInBytes := ");
+single_value->field_msgSizeInBytes.log_match(match_value.msgSizeInBytes(), legacy);
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::log_event_str(", maxNoOfPacketsInResponseToCTS := ");
+single_value->field_maxNoOfPacketsInResponseToCTS.log_match(match_value.maxNoOfPacketsInResponseToCTS(), legacy);
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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 RequestToSend_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_ctrl.encode_text(text_buf);
+single_value->field_msgSizeInBytes.encode_text(text_buf);
+single_value->field_totalNumberOfPackets.encode_text(text_buf);
+single_value->field_maxNoOfPacketsInResponseToCTS.encode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 @IsobusCMMessageTypes.RequestToSend.");
+}
+}
+
+void RequestToSend_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_ctrl.decode_text(text_buf);
+single_value->field_msgSizeInBytes.decode_text(text_buf);
+single_value->field_totalNumberOfPackets.decode_text(text_buf);
+single_value->field_maxNoOfPacketsInResponseToCTS.decode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 RequestToSend_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 @IsobusCMMessageTypes.RequestToSend.");
+}
+}
+
+void RequestToSend_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: {
+ RequestToSend_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (5<param.get_size()) {
+ param.error("record template of type @IsobusCMMessageTypes.RequestToSend has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInBytes().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) maxNoOfPacketsInResponseToCTS().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInBytes")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInBytes().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "maxNoOfPacketsInResponseToCTS")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ maxNoOfPacketsInResponseToCTS().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.RequestToSend: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@IsobusCMMessageTypes.RequestToSend");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void RequestToSend_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_ctrl.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.RequestToSend");
+single_value->field_msgSizeInBytes.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.RequestToSend");
+single_value->field_totalNumberOfPackets.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.RequestToSend");
+single_value->field_maxNoOfPacketsInResponseToCTS.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.RequestToSend");
+single_value->field_pgnOfMultiPacketMessage.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.RequestToSend");
+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 : "@IsobusCMMessageTypes.RequestToSend");
+}
+
+boolean RequestToSend_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean RequestToSend_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+ClearToSend::ClearToSend()
+{
+}
+
+ClearToSend::ClearToSend(const OCTETSTRING& par_ctrl,
+ const INTEGER& par_totalNumberOfPackets,
+ const INTEGER& par_nextPacketNumber,
+ const OCTETSTRING& par_reserved4,
+ const OCTETSTRING& par_reserved5,
+ const INTEGER& par_pgnOfMultiPacketMessage)
+ : field_ctrl(par_ctrl),
+ field_totalNumberOfPackets(par_totalNumberOfPackets),
+ field_nextPacketNumber(par_nextPacketNumber),
+ field_reserved4(par_reserved4),
+ field_reserved5(par_reserved5),
+ field_pgnOfMultiPacketMessage(par_pgnOfMultiPacketMessage)
+{
+}
+
+ClearToSend::ClearToSend(const ClearToSend& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IsobusCMMessageTypes.ClearToSend.");
+if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+else field_ctrl.clean_up();
+if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+else field_totalNumberOfPackets.clean_up();
+if (other_value.nextPacketNumber().is_bound()) field_nextPacketNumber = other_value.nextPacketNumber();
+else field_nextPacketNumber.clean_up();
+if (other_value.reserved4().is_bound()) field_reserved4 = other_value.reserved4();
+else field_reserved4.clean_up();
+if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+else field_reserved5.clean_up();
+if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+else field_pgnOfMultiPacketMessage.clean_up();
+}
+
+void ClearToSend::clean_up()
+{
+field_ctrl.clean_up();
+field_totalNumberOfPackets.clean_up();
+field_nextPacketNumber.clean_up();
+field_reserved4.clean_up();
+field_reserved5.clean_up();
+field_pgnOfMultiPacketMessage.clean_up();
+}
+
+const TTCN_Typedescriptor_t* ClearToSend::get_descriptor() const { return &ClearToSend_descr_; }
+ClearToSend& ClearToSend::operator=(const ClearToSend& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IsobusCMMessageTypes.ClearToSend.");
+ if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+ else field_ctrl.clean_up();
+ if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+ else field_totalNumberOfPackets.clean_up();
+ if (other_value.nextPacketNumber().is_bound()) field_nextPacketNumber = other_value.nextPacketNumber();
+ else field_nextPacketNumber.clean_up();
+ if (other_value.reserved4().is_bound()) field_reserved4 = other_value.reserved4();
+ else field_reserved4.clean_up();
+ if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+ else field_reserved5.clean_up();
+ if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+ else field_pgnOfMultiPacketMessage.clean_up();
+}
+return *this;
+}
+
+boolean ClearToSend::operator==(const ClearToSend& other_value) const
+{
+return field_ctrl==other_value.field_ctrl
+ && field_totalNumberOfPackets==other_value.field_totalNumberOfPackets
+ && field_nextPacketNumber==other_value.field_nextPacketNumber
+ && field_reserved4==other_value.field_reserved4
+ && field_reserved5==other_value.field_reserved5
+ && field_pgnOfMultiPacketMessage==other_value.field_pgnOfMultiPacketMessage;
+}
+
+boolean ClearToSend::is_bound() const
+{
+return (field_ctrl.is_bound())
+ || (field_totalNumberOfPackets.is_bound())
+ || (field_nextPacketNumber.is_bound())
+ || (field_reserved4.is_bound())
+ || (field_reserved5.is_bound())
+ || (field_pgnOfMultiPacketMessage.is_bound());
+}
+boolean ClearToSend::is_value() const
+{
+return field_ctrl.is_value()
+ && field_totalNumberOfPackets.is_value()
+ && field_nextPacketNumber.is_value()
+ && field_reserved4.is_value()
+ && field_reserved5.is_value()
+ && field_pgnOfMultiPacketMessage.is_value();
+}
+void ClearToSend::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ ctrl := ");
+field_ctrl.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", nextPacketNumber := ");
+field_nextPacketNumber.log();
+TTCN_Logger::log_event_str(", reserved4 := ");
+field_reserved4.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void ClearToSend::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 (6<param.get_size()) {
+ param.error("record value of type @IsobusCMMessageTypes.ClearToSend has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) nextPacketNumber().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved4().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "nextPacketNumber")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ nextPacketNumber().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved4")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved4().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.ClearToSend: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@IsobusCMMessageTypes.ClearToSend");
+ }
+}
+
+void ClearToSend::set_implicit_omit()
+{
+if (ctrl().is_bound()) ctrl().set_implicit_omit();
+if (totalNumberOfPackets().is_bound()) totalNumberOfPackets().set_implicit_omit();
+if (nextPacketNumber().is_bound()) nextPacketNumber().set_implicit_omit();
+if (reserved4().is_bound()) reserved4().set_implicit_omit();
+if (reserved5().is_bound()) reserved5().set_implicit_omit();
+if (pgnOfMultiPacketMessage().is_bound()) pgnOfMultiPacketMessage().set_implicit_omit();
+}
+
+void ClearToSend::encode_text(Text_Buf& text_buf) const
+{
+field_ctrl.encode_text(text_buf);
+field_totalNumberOfPackets.encode_text(text_buf);
+field_nextPacketNumber.encode_text(text_buf);
+field_reserved4.encode_text(text_buf);
+field_reserved5.encode_text(text_buf);
+field_pgnOfMultiPacketMessage.encode_text(text_buf);
+}
+
+void ClearToSend::decode_text(Text_Buf& text_buf)
+{
+field_ctrl.decode_text(text_buf);
+field_totalNumberOfPackets.decode_text(text_buf);
+field_nextPacketNumber.decode_text(text_buf);
+field_reserved4.decode_text(text_buf);
+field_reserved5.decode_text(text_buf);
+field_pgnOfMultiPacketMessage.decode_text(text_buf);
+}
+
+void ClearToSend::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 ClearToSend::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int ClearToSend::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, ClearToSend_ctrl_descr_.raw->forceomit);
+ decoded_field_length = field_ctrl.RAW_decode(ClearToSend_ctrl_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, NUMBER__OF__PACKETS_descr_.raw->forceomit);
+ decoded_field_length = field_totalNumberOfPackets.RAW_decode(NUMBER__OF__PACKETS_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::INT1_descr_.raw->forceomit);
+ decoded_field_length = field_nextPacketNumber.RAW_decode(General__Types::INT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, ClearToSend_reserved4_descr_.raw->forceomit);
+ decoded_field_length = field_reserved4.RAW_decode(ClearToSend_reserved4_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, ClearToSend_reserved5_descr_.raw->forceomit);
+ decoded_field_length = field_reserved5.RAW_decode(ClearToSend_reserved5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_5_force_omit(5, force_omit, IsobusMessageTypes::PGN_descr_.raw->forceomit);
+ decoded_field_length = field_pgnOfMultiPacketMessage.RAW_decode(IsobusMessageTypes::PGN_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int ClearToSend::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 6;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, ClearToSend_ctrl_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, NUMBER__OF__PACKETS_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::INT1_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ClearToSend_reserved4_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ClearToSend_reserved5_descr_.raw);
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IsobusMessageTypes::PGN_descr_.raw);
+ encoded_length += field_ctrl.RAW_encode(ClearToSend_ctrl_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_totalNumberOfPackets.RAW_encode(NUMBER__OF__PACKETS_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_nextPacketNumber.RAW_encode(General__Types::INT1_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_reserved4.RAW_encode(ClearToSend_reserved4_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_reserved5.RAW_encode(ClearToSend_reserved5_descr_, *myleaf.body.node.nodes[4]);
+ encoded_length += field_pgnOfMultiPacketMessage.RAW_encode(IsobusMessageTypes::PGN_descr_, *myleaf.body.node.nodes[5]);
+ return myleaf.length = encoded_length;
+}
+
+struct ClearToSend_template::single_value_struct {
+OCTETSTRING_template field_ctrl;
+INTEGER_template field_totalNumberOfPackets;
+INTEGER_template field_nextPacketNumber;
+OCTETSTRING_template field_reserved4;
+OCTETSTRING_template field_reserved5;
+INTEGER_template field_pgnOfMultiPacketMessage;
+};
+
+void ClearToSend_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_ctrl = ANY_VALUE;
+single_value->field_totalNumberOfPackets = ANY_VALUE;
+single_value->field_nextPacketNumber = ANY_VALUE;
+single_value->field_reserved4 = ANY_VALUE;
+single_value->field_reserved5 = ANY_VALUE;
+single_value->field_pgnOfMultiPacketMessage = ANY_VALUE;
+}
+}
+}
+
+void ClearToSend_template::copy_value(const ClearToSend& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.ctrl().is_bound()) {
+ single_value->field_ctrl = other_value.ctrl();
+} else {
+ single_value->field_ctrl.clean_up();
+}
+if (other_value.totalNumberOfPackets().is_bound()) {
+ single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+ single_value->field_totalNumberOfPackets.clean_up();
+}
+if (other_value.nextPacketNumber().is_bound()) {
+ single_value->field_nextPacketNumber = other_value.nextPacketNumber();
+} else {
+ single_value->field_nextPacketNumber.clean_up();
+}
+if (other_value.reserved4().is_bound()) {
+ single_value->field_reserved4 = other_value.reserved4();
+} else {
+ single_value->field_reserved4.clean_up();
+}
+if (other_value.reserved5().is_bound()) {
+ single_value->field_reserved5 = other_value.reserved5();
+} else {
+ single_value->field_reserved5.clean_up();
+}
+if (other_value.pgnOfMultiPacketMessage().is_bound()) {
+ single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+ single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void ClearToSend_template::copy_template(const ClearToSend_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.ctrl().get_selection()) {
+single_value->field_ctrl = other_value.ctrl();
+} else {
+single_value->field_ctrl.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.totalNumberOfPackets().get_selection()) {
+single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+single_value->field_totalNumberOfPackets.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.nextPacketNumber().get_selection()) {
+single_value->field_nextPacketNumber = other_value.nextPacketNumber();
+} else {
+single_value->field_nextPacketNumber.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved4().get_selection()) {
+single_value->field_reserved4 = other_value.reserved4();
+} else {
+single_value->field_reserved4.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved5().get_selection()) {
+single_value->field_reserved5 = other_value.reserved5();
+} else {
+single_value->field_reserved5.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pgnOfMultiPacketMessage().get_selection()) {
+single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ClearToSend_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @IsobusCMMessageTypes.ClearToSend.");
+break;
+}
+set_selection(other_value);
+}
+
+ClearToSend_template::ClearToSend_template()
+{
+}
+
+ClearToSend_template::ClearToSend_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ClearToSend_template::ClearToSend_template(const ClearToSend& other_value)
+{
+copy_value(other_value);
+}
+
+ClearToSend_template::ClearToSend_template(const OPTIONAL<ClearToSend>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ClearToSend&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @IsobusCMMessageTypes.ClearToSend from an unbound optional field.");
+}
+}
+
+ClearToSend_template::ClearToSend_template(const ClearToSend_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+ClearToSend_template::~ClearToSend_template()
+{
+clean_up();
+}
+
+ClearToSend_template& ClearToSend_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ClearToSend_template& ClearToSend_template::operator=(const ClearToSend& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+ClearToSend_template& ClearToSend_template::operator=(const OPTIONAL<ClearToSend>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ClearToSend&)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 @IsobusCMMessageTypes.ClearToSend.");
+}
+return *this;
+}
+
+ClearToSend_template& ClearToSend_template::operator=(const ClearToSend_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean ClearToSend_template::match(const ClearToSend& 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.ctrl().is_bound()) return FALSE;
+if(!single_value->field_ctrl.match(other_value.ctrl(), legacy))return FALSE;
+if(!other_value.totalNumberOfPackets().is_bound()) return FALSE;
+if(!single_value->field_totalNumberOfPackets.match(other_value.totalNumberOfPackets(), legacy))return FALSE;
+if(!other_value.nextPacketNumber().is_bound()) return FALSE;
+if(!single_value->field_nextPacketNumber.match(other_value.nextPacketNumber(), legacy))return FALSE;
+if(!other_value.reserved4().is_bound()) return FALSE;
+if(!single_value->field_reserved4.match(other_value.reserved4(), legacy))return FALSE;
+if(!other_value.reserved5().is_bound()) return FALSE;
+if(!single_value->field_reserved5.match(other_value.reserved5(), legacy))return FALSE;
+if(!other_value.pgnOfMultiPacketMessage().is_bound()) return FALSE;
+if(!single_value->field_pgnOfMultiPacketMessage.match(other_value.pgnOfMultiPacketMessage(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @IsobusCMMessageTypes.ClearToSend.");
+}
+return FALSE;
+}
+
+boolean ClearToSend_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_ctrl.is_bound()
+
+ ||single_value->field_totalNumberOfPackets.is_bound()
+
+ ||single_value->field_nextPacketNumber.is_bound()
+
+ ||single_value->field_reserved4.is_bound()
+
+ ||single_value->field_reserved5.is_bound()
+
+ ||single_value->field_pgnOfMultiPacketMessage.is_bound()
+;
+}
+
+boolean ClearToSend_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_ctrl.is_value()
+ &&single_value->field_totalNumberOfPackets.is_value()
+ &&single_value->field_nextPacketNumber.is_value()
+ &&single_value->field_reserved4.is_value()
+ &&single_value->field_reserved5.is_value()
+ &&single_value->field_pgnOfMultiPacketMessage.is_value();
+}
+
+void ClearToSend_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ClearToSend ClearToSend_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 @IsobusCMMessageTypes.ClearToSend.");
+ClearToSend ret_val;
+if (single_value->field_ctrl.is_bound()) {
+ret_val.ctrl() = single_value->field_ctrl.valueof();
+}
+if (single_value->field_totalNumberOfPackets.is_bound()) {
+ret_val.totalNumberOfPackets() = single_value->field_totalNumberOfPackets.valueof();
+}
+if (single_value->field_nextPacketNumber.is_bound()) {
+ret_val.nextPacketNumber() = single_value->field_nextPacketNumber.valueof();
+}
+if (single_value->field_reserved4.is_bound()) {
+ret_val.reserved4() = single_value->field_reserved4.valueof();
+}
+if (single_value->field_reserved5.is_bound()) {
+ret_val.reserved5() = single_value->field_reserved5.valueof();
+}
+if (single_value->field_pgnOfMultiPacketMessage.is_bound()) {
+ret_val.pgnOfMultiPacketMessage() = single_value->field_pgnOfMultiPacketMessage.valueof();
+}
+return ret_val;
+}
+
+void ClearToSend_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @IsobusCMMessageTypes.ClearToSend.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new ClearToSend_template[list_length];
+}
+
+ClearToSend_template& ClearToSend_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @IsobusCMMessageTypes.ClearToSend.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @IsobusCMMessageTypes.ClearToSend.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& ClearToSend_template::ctrl()
+{
+set_specific();
+return single_value->field_ctrl;
+}
+
+const OCTETSTRING_template& ClearToSend_template::ctrl() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ctrl of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_ctrl;
+}
+
+INTEGER_template& ClearToSend_template::totalNumberOfPackets()
+{
+set_specific();
+return single_value->field_totalNumberOfPackets;
+}
+
+const INTEGER_template& ClearToSend_template::totalNumberOfPackets() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field totalNumberOfPackets of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_totalNumberOfPackets;
+}
+
+INTEGER_template& ClearToSend_template::nextPacketNumber()
+{
+set_specific();
+return single_value->field_nextPacketNumber;
+}
+
+const INTEGER_template& ClearToSend_template::nextPacketNumber() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field nextPacketNumber of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_nextPacketNumber;
+}
+
+OCTETSTRING_template& ClearToSend_template::reserved4()
+{
+set_specific();
+return single_value->field_reserved4;
+}
+
+const OCTETSTRING_template& ClearToSend_template::reserved4() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved4 of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_reserved4;
+}
+
+OCTETSTRING_template& ClearToSend_template::reserved5()
+{
+set_specific();
+return single_value->field_reserved5;
+}
+
+const OCTETSTRING_template& ClearToSend_template::reserved5() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved5 of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_reserved5;
+}
+
+INTEGER_template& ClearToSend_template::pgnOfMultiPacketMessage()
+{
+set_specific();
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+const INTEGER_template& ClearToSend_template::pgnOfMultiPacketMessage() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pgnOfMultiPacketMessage of a non-specific template of type @IsobusCMMessageTypes.ClearToSend.");
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+int ClearToSend_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ClearToSend which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 6;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ClearToSend 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 @IsobusCMMessageTypes.ClearToSend containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ClearToSend containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ClearToSend containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ClearToSend containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IsobusCMMessageTypes.ClearToSend.");
+ }
+ return 0;
+}
+
+void ClearToSend_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ ctrl := ");
+single_value->field_ctrl.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", nextPacketNumber := ");
+single_value->field_nextPacketNumber.log();
+TTCN_Logger::log_event_str(", reserved4 := ");
+single_value->field_reserved4.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void ClearToSend_template::log_match(const ClearToSend& 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_ctrl.match(match_value.ctrl(), legacy)){
+TTCN_Logger::log_logmatch_info(".ctrl");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_totalNumberOfPackets.match(match_value.totalNumberOfPackets(), legacy)){
+TTCN_Logger::log_logmatch_info(".totalNumberOfPackets");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_nextPacketNumber.match(match_value.nextPacketNumber(), legacy)){
+TTCN_Logger::log_logmatch_info(".nextPacketNumber");
+single_value->field_nextPacketNumber.log_match(match_value.nextPacketNumber(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved4.match(match_value.reserved4(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved4");
+single_value->field_reserved4.log_match(match_value.reserved4(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved5.match(match_value.reserved5(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved5");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pgnOfMultiPacketMessage.match(match_value.pgnOfMultiPacketMessage(), legacy)){
+TTCN_Logger::log_logmatch_info(".pgnOfMultiPacketMessage");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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("{ ctrl := ");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::log_event_str(", nextPacketNumber := ");
+single_value->field_nextPacketNumber.log_match(match_value.nextPacketNumber(), legacy);
+TTCN_Logger::log_event_str(", reserved4 := ");
+single_value->field_reserved4.log_match(match_value.reserved4(), legacy);
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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 ClearToSend_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_ctrl.encode_text(text_buf);
+single_value->field_totalNumberOfPackets.encode_text(text_buf);
+single_value->field_nextPacketNumber.encode_text(text_buf);
+single_value->field_reserved4.encode_text(text_buf);
+single_value->field_reserved5.encode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 @IsobusCMMessageTypes.ClearToSend.");
+}
+}
+
+void ClearToSend_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_ctrl.decode_text(text_buf);
+single_value->field_totalNumberOfPackets.decode_text(text_buf);
+single_value->field_nextPacketNumber.decode_text(text_buf);
+single_value->field_reserved4.decode_text(text_buf);
+single_value->field_reserved5.decode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 ClearToSend_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 @IsobusCMMessageTypes.ClearToSend.");
+}
+}
+
+void ClearToSend_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: {
+ ClearToSend_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (6<param.get_size()) {
+ param.error("record template of type @IsobusCMMessageTypes.ClearToSend has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) nextPacketNumber().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved4().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "nextPacketNumber")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ nextPacketNumber().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved4")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved4().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.ClearToSend: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@IsobusCMMessageTypes.ClearToSend");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void ClearToSend_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_ctrl.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+single_value->field_totalNumberOfPackets.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+single_value->field_nextPacketNumber.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+single_value->field_reserved4.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+single_value->field_reserved5.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+single_value->field_pgnOfMultiPacketMessage.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ClearToSend");
+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 : "@IsobusCMMessageTypes.ClearToSend");
+}
+
+boolean ClearToSend_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ClearToSend_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+EndOfMessageAcknowledgement::EndOfMessageAcknowledgement()
+{
+}
+
+EndOfMessageAcknowledgement::EndOfMessageAcknowledgement(const OCTETSTRING& par_ctrl,
+ const INTEGER& par_msgSizeInByte,
+ const INTEGER& par_totalNumberOfPackets,
+ const OCTETSTRING& par_reserved5,
+ const INTEGER& par_pgnOfMultiPacketMessage)
+ : field_ctrl(par_ctrl),
+ field_msgSizeInByte(par_msgSizeInByte),
+ field_totalNumberOfPackets(par_totalNumberOfPackets),
+ field_reserved5(par_reserved5),
+ field_pgnOfMultiPacketMessage(par_pgnOfMultiPacketMessage)
+{
+}
+
+EndOfMessageAcknowledgement::EndOfMessageAcknowledgement(const EndOfMessageAcknowledgement& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+else field_ctrl.clean_up();
+if (other_value.msgSizeInByte().is_bound()) field_msgSizeInByte = other_value.msgSizeInByte();
+else field_msgSizeInByte.clean_up();
+if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+else field_totalNumberOfPackets.clean_up();
+if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+else field_reserved5.clean_up();
+if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+else field_pgnOfMultiPacketMessage.clean_up();
+}
+
+void EndOfMessageAcknowledgement::clean_up()
+{
+field_ctrl.clean_up();
+field_msgSizeInByte.clean_up();
+field_totalNumberOfPackets.clean_up();
+field_reserved5.clean_up();
+field_pgnOfMultiPacketMessage.clean_up();
+}
+
+const TTCN_Typedescriptor_t* EndOfMessageAcknowledgement::get_descriptor() const { return &EndOfMessageAcknowledgement_descr_; }
+EndOfMessageAcknowledgement& EndOfMessageAcknowledgement::operator=(const EndOfMessageAcknowledgement& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+ if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+ else field_ctrl.clean_up();
+ if (other_value.msgSizeInByte().is_bound()) field_msgSizeInByte = other_value.msgSizeInByte();
+ else field_msgSizeInByte.clean_up();
+ if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+ else field_totalNumberOfPackets.clean_up();
+ if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+ else field_reserved5.clean_up();
+ if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+ else field_pgnOfMultiPacketMessage.clean_up();
+}
+return *this;
+}
+
+boolean EndOfMessageAcknowledgement::operator==(const EndOfMessageAcknowledgement& other_value) const
+{
+return field_ctrl==other_value.field_ctrl
+ && field_msgSizeInByte==other_value.field_msgSizeInByte
+ && field_totalNumberOfPackets==other_value.field_totalNumberOfPackets
+ && field_reserved5==other_value.field_reserved5
+ && field_pgnOfMultiPacketMessage==other_value.field_pgnOfMultiPacketMessage;
+}
+
+boolean EndOfMessageAcknowledgement::is_bound() const
+{
+return (field_ctrl.is_bound())
+ || (field_msgSizeInByte.is_bound())
+ || (field_totalNumberOfPackets.is_bound())
+ || (field_reserved5.is_bound())
+ || (field_pgnOfMultiPacketMessage.is_bound());
+}
+boolean EndOfMessageAcknowledgement::is_value() const
+{
+return field_ctrl.is_value()
+ && field_msgSizeInByte.is_value()
+ && field_totalNumberOfPackets.is_value()
+ && field_reserved5.is_value()
+ && field_pgnOfMultiPacketMessage.is_value();
+}
+void EndOfMessageAcknowledgement::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ ctrl := ");
+field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+field_msgSizeInByte.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void EndOfMessageAcknowledgement::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 (5<param.get_size()) {
+ param.error("record value of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInByte().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInByte")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInByte().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.EndOfMessageAcknowledgement: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+ }
+}
+
+void EndOfMessageAcknowledgement::set_implicit_omit()
+{
+if (ctrl().is_bound()) ctrl().set_implicit_omit();
+if (msgSizeInByte().is_bound()) msgSizeInByte().set_implicit_omit();
+if (totalNumberOfPackets().is_bound()) totalNumberOfPackets().set_implicit_omit();
+if (reserved5().is_bound()) reserved5().set_implicit_omit();
+if (pgnOfMultiPacketMessage().is_bound()) pgnOfMultiPacketMessage().set_implicit_omit();
+}
+
+void EndOfMessageAcknowledgement::encode_text(Text_Buf& text_buf) const
+{
+field_ctrl.encode_text(text_buf);
+field_msgSizeInByte.encode_text(text_buf);
+field_totalNumberOfPackets.encode_text(text_buf);
+field_reserved5.encode_text(text_buf);
+field_pgnOfMultiPacketMessage.encode_text(text_buf);
+}
+
+void EndOfMessageAcknowledgement::decode_text(Text_Buf& text_buf)
+{
+field_ctrl.decode_text(text_buf);
+field_msgSizeInByte.decode_text(text_buf);
+field_totalNumberOfPackets.decode_text(text_buf);
+field_reserved5.decode_text(text_buf);
+field_pgnOfMultiPacketMessage.decode_text(text_buf);
+}
+
+void EndOfMessageAcknowledgement::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 EndOfMessageAcknowledgement::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int EndOfMessageAcknowledgement::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, EndOfMessageAcknowledgement_ctrl_descr_.raw->forceomit);
+ decoded_field_length = field_ctrl.RAW_decode(EndOfMessageAcknowledgement_ctrl_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, IsobusMessageTypes::INT2_descr_.raw->forceomit);
+ decoded_field_length = field_msgSizeInByte.RAW_decode(IsobusMessageTypes::INT2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, NUMBER__OF__PACKETS_descr_.raw->forceomit);
+ decoded_field_length = field_totalNumberOfPackets.RAW_decode(NUMBER__OF__PACKETS_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, EndOfMessageAcknowledgement_reserved5_descr_.raw->forceomit);
+ decoded_field_length = field_reserved5.RAW_decode(EndOfMessageAcknowledgement_reserved5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, IsobusMessageTypes::PGN_descr_.raw->forceomit);
+ decoded_field_length = field_pgnOfMultiPacketMessage.RAW_decode(IsobusMessageTypes::PGN_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int EndOfMessageAcknowledgement::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 5;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EndOfMessageAcknowledgement_ctrl_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IsobusMessageTypes::INT2_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, NUMBER__OF__PACKETS_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, EndOfMessageAcknowledgement_reserved5_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IsobusMessageTypes::PGN_descr_.raw);
+ encoded_length += field_ctrl.RAW_encode(EndOfMessageAcknowledgement_ctrl_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_msgSizeInByte.RAW_encode(IsobusMessageTypes::INT2_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_totalNumberOfPackets.RAW_encode(NUMBER__OF__PACKETS_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_reserved5.RAW_encode(EndOfMessageAcknowledgement_reserved5_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_pgnOfMultiPacketMessage.RAW_encode(IsobusMessageTypes::PGN_descr_, *myleaf.body.node.nodes[4]);
+ return myleaf.length = encoded_length;
+}
+
+struct EndOfMessageAcknowledgement_template::single_value_struct {
+OCTETSTRING_template field_ctrl;
+INTEGER_template field_msgSizeInByte;
+INTEGER_template field_totalNumberOfPackets;
+OCTETSTRING_template field_reserved5;
+INTEGER_template field_pgnOfMultiPacketMessage;
+};
+
+void EndOfMessageAcknowledgement_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_ctrl = ANY_VALUE;
+single_value->field_msgSizeInByte = ANY_VALUE;
+single_value->field_totalNumberOfPackets = ANY_VALUE;
+single_value->field_reserved5 = ANY_VALUE;
+single_value->field_pgnOfMultiPacketMessage = ANY_VALUE;
+}
+}
+}
+
+void EndOfMessageAcknowledgement_template::copy_value(const EndOfMessageAcknowledgement& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.ctrl().is_bound()) {
+ single_value->field_ctrl = other_value.ctrl();
+} else {
+ single_value->field_ctrl.clean_up();
+}
+if (other_value.msgSizeInByte().is_bound()) {
+ single_value->field_msgSizeInByte = other_value.msgSizeInByte();
+} else {
+ single_value->field_msgSizeInByte.clean_up();
+}
+if (other_value.totalNumberOfPackets().is_bound()) {
+ single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+ single_value->field_totalNumberOfPackets.clean_up();
+}
+if (other_value.reserved5().is_bound()) {
+ single_value->field_reserved5 = other_value.reserved5();
+} else {
+ single_value->field_reserved5.clean_up();
+}
+if (other_value.pgnOfMultiPacketMessage().is_bound()) {
+ single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+ single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void EndOfMessageAcknowledgement_template::copy_template(const EndOfMessageAcknowledgement_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.ctrl().get_selection()) {
+single_value->field_ctrl = other_value.ctrl();
+} else {
+single_value->field_ctrl.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.msgSizeInByte().get_selection()) {
+single_value->field_msgSizeInByte = other_value.msgSizeInByte();
+} else {
+single_value->field_msgSizeInByte.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.totalNumberOfPackets().get_selection()) {
+single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+single_value->field_totalNumberOfPackets.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved5().get_selection()) {
+single_value->field_reserved5 = other_value.reserved5();
+} else {
+single_value->field_reserved5.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pgnOfMultiPacketMessage().get_selection()) {
+single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new EndOfMessageAcknowledgement_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+break;
+}
+set_selection(other_value);
+}
+
+EndOfMessageAcknowledgement_template::EndOfMessageAcknowledgement_template()
+{
+}
+
+EndOfMessageAcknowledgement_template::EndOfMessageAcknowledgement_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+EndOfMessageAcknowledgement_template::EndOfMessageAcknowledgement_template(const EndOfMessageAcknowledgement& other_value)
+{
+copy_value(other_value);
+}
+
+EndOfMessageAcknowledgement_template::EndOfMessageAcknowledgement_template(const OPTIONAL<EndOfMessageAcknowledgement>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const EndOfMessageAcknowledgement&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement from an unbound optional field.");
+}
+}
+
+EndOfMessageAcknowledgement_template::EndOfMessageAcknowledgement_template(const EndOfMessageAcknowledgement_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+EndOfMessageAcknowledgement_template::~EndOfMessageAcknowledgement_template()
+{
+clean_up();
+}
+
+EndOfMessageAcknowledgement_template& EndOfMessageAcknowledgement_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+EndOfMessageAcknowledgement_template& EndOfMessageAcknowledgement_template::operator=(const EndOfMessageAcknowledgement& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+EndOfMessageAcknowledgement_template& EndOfMessageAcknowledgement_template::operator=(const OPTIONAL<EndOfMessageAcknowledgement>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const EndOfMessageAcknowledgement&)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 @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+}
+return *this;
+}
+
+EndOfMessageAcknowledgement_template& EndOfMessageAcknowledgement_template::operator=(const EndOfMessageAcknowledgement_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean EndOfMessageAcknowledgement_template::match(const EndOfMessageAcknowledgement& 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.ctrl().is_bound()) return FALSE;
+if(!single_value->field_ctrl.match(other_value.ctrl(), legacy))return FALSE;
+if(!other_value.msgSizeInByte().is_bound()) return FALSE;
+if(!single_value->field_msgSizeInByte.match(other_value.msgSizeInByte(), legacy))return FALSE;
+if(!other_value.totalNumberOfPackets().is_bound()) return FALSE;
+if(!single_value->field_totalNumberOfPackets.match(other_value.totalNumberOfPackets(), legacy))return FALSE;
+if(!other_value.reserved5().is_bound()) return FALSE;
+if(!single_value->field_reserved5.match(other_value.reserved5(), legacy))return FALSE;
+if(!other_value.pgnOfMultiPacketMessage().is_bound()) return FALSE;
+if(!single_value->field_pgnOfMultiPacketMessage.match(other_value.pgnOfMultiPacketMessage(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+}
+return FALSE;
+}
+
+boolean EndOfMessageAcknowledgement_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_ctrl.is_bound()
+
+ ||single_value->field_msgSizeInByte.is_bound()
+
+ ||single_value->field_totalNumberOfPackets.is_bound()
+
+ ||single_value->field_reserved5.is_bound()
+
+ ||single_value->field_pgnOfMultiPacketMessage.is_bound()
+;
+}
+
+boolean EndOfMessageAcknowledgement_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_ctrl.is_value()
+ &&single_value->field_msgSizeInByte.is_value()
+ &&single_value->field_totalNumberOfPackets.is_value()
+ &&single_value->field_reserved5.is_value()
+ &&single_value->field_pgnOfMultiPacketMessage.is_value();
+}
+
+void EndOfMessageAcknowledgement_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+EndOfMessageAcknowledgement EndOfMessageAcknowledgement_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 @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+EndOfMessageAcknowledgement ret_val;
+if (single_value->field_ctrl.is_bound()) {
+ret_val.ctrl() = single_value->field_ctrl.valueof();
+}
+if (single_value->field_msgSizeInByte.is_bound()) {
+ret_val.msgSizeInByte() = single_value->field_msgSizeInByte.valueof();
+}
+if (single_value->field_totalNumberOfPackets.is_bound()) {
+ret_val.totalNumberOfPackets() = single_value->field_totalNumberOfPackets.valueof();
+}
+if (single_value->field_reserved5.is_bound()) {
+ret_val.reserved5() = single_value->field_reserved5.valueof();
+}
+if (single_value->field_pgnOfMultiPacketMessage.is_bound()) {
+ret_val.pgnOfMultiPacketMessage() = single_value->field_pgnOfMultiPacketMessage.valueof();
+}
+return ret_val;
+}
+
+void EndOfMessageAcknowledgement_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new EndOfMessageAcknowledgement_template[list_length];
+}
+
+EndOfMessageAcknowledgement_template& EndOfMessageAcknowledgement_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& EndOfMessageAcknowledgement_template::ctrl()
+{
+set_specific();
+return single_value->field_ctrl;
+}
+
+const OCTETSTRING_template& EndOfMessageAcknowledgement_template::ctrl() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ctrl of a non-specific template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return single_value->field_ctrl;
+}
+
+INTEGER_template& EndOfMessageAcknowledgement_template::msgSizeInByte()
+{
+set_specific();
+return single_value->field_msgSizeInByte;
+}
+
+const INTEGER_template& EndOfMessageAcknowledgement_template::msgSizeInByte() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field msgSizeInByte of a non-specific template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return single_value->field_msgSizeInByte;
+}
+
+INTEGER_template& EndOfMessageAcknowledgement_template::totalNumberOfPackets()
+{
+set_specific();
+return single_value->field_totalNumberOfPackets;
+}
+
+const INTEGER_template& EndOfMessageAcknowledgement_template::totalNumberOfPackets() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field totalNumberOfPackets of a non-specific template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return single_value->field_totalNumberOfPackets;
+}
+
+OCTETSTRING_template& EndOfMessageAcknowledgement_template::reserved5()
+{
+set_specific();
+return single_value->field_reserved5;
+}
+
+const OCTETSTRING_template& EndOfMessageAcknowledgement_template::reserved5() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved5 of a non-specific template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return single_value->field_reserved5;
+}
+
+INTEGER_template& EndOfMessageAcknowledgement_template::pgnOfMultiPacketMessage()
+{
+set_specific();
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+const INTEGER_template& EndOfMessageAcknowledgement_template::pgnOfMultiPacketMessage() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pgnOfMultiPacketMessage of a non-specific template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+int EndOfMessageAcknowledgement_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 5;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement 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 @IsobusCMMessageTypes.EndOfMessageAcknowledgement containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+ }
+ return 0;
+}
+
+void EndOfMessageAcknowledgement_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ ctrl := ");
+single_value->field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+single_value->field_msgSizeInByte.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void EndOfMessageAcknowledgement_template::log_match(const EndOfMessageAcknowledgement& 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_ctrl.match(match_value.ctrl(), legacy)){
+TTCN_Logger::log_logmatch_info(".ctrl");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_msgSizeInByte.match(match_value.msgSizeInByte(), legacy)){
+TTCN_Logger::log_logmatch_info(".msgSizeInByte");
+single_value->field_msgSizeInByte.log_match(match_value.msgSizeInByte(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_totalNumberOfPackets.match(match_value.totalNumberOfPackets(), legacy)){
+TTCN_Logger::log_logmatch_info(".totalNumberOfPackets");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved5.match(match_value.reserved5(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved5");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pgnOfMultiPacketMessage.match(match_value.pgnOfMultiPacketMessage(), legacy)){
+TTCN_Logger::log_logmatch_info(".pgnOfMultiPacketMessage");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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("{ ctrl := ");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+single_value->field_msgSizeInByte.log_match(match_value.msgSizeInByte(), legacy);
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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 EndOfMessageAcknowledgement_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_ctrl.encode_text(text_buf);
+single_value->field_msgSizeInByte.encode_text(text_buf);
+single_value->field_totalNumberOfPackets.encode_text(text_buf);
+single_value->field_reserved5.encode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+}
+}
+
+void EndOfMessageAcknowledgement_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_ctrl.decode_text(text_buf);
+single_value->field_msgSizeInByte.decode_text(text_buf);
+single_value->field_totalNumberOfPackets.decode_text(text_buf);
+single_value->field_reserved5.decode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 EndOfMessageAcknowledgement_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 @IsobusCMMessageTypes.EndOfMessageAcknowledgement.");
+}
+}
+
+void EndOfMessageAcknowledgement_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: {
+ EndOfMessageAcknowledgement_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (5<param.get_size()) {
+ param.error("record template of type @IsobusCMMessageTypes.EndOfMessageAcknowledgement has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInByte().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInByte")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInByte().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.EndOfMessageAcknowledgement: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void EndOfMessageAcknowledgement_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_ctrl.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+single_value->field_msgSizeInByte.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+single_value->field_totalNumberOfPackets.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+single_value->field_reserved5.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+single_value->field_pgnOfMultiPacketMessage.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+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 : "@IsobusCMMessageTypes.EndOfMessageAcknowledgement");
+}
+
+boolean EndOfMessageAcknowledgement_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean EndOfMessageAcknowledgement_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+e__ConnectionAbort__AbortReason::e__ConnectionAbort__AbortReason()
+{
+enum_value = UNBOUND_VALUE;
+}
+
+e__ConnectionAbort__AbortReason::e__ConnectionAbort__AbortReason(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason with invalid numeric value %d.", other_value);
+enum_value = (enum_type)other_value;
+}
+
+e__ConnectionAbort__AbortReason::e__ConnectionAbort__AbortReason(enum_type other_value)
+{
+enum_value = other_value;
+}
+
+e__ConnectionAbort__AbortReason::e__ConnectionAbort__AbortReason(const e__ConnectionAbort__AbortReason& other_value)
+: Base_Type()
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+enum_value = other_value.enum_value;
+}
+
+e__ConnectionAbort__AbortReason& e__ConnectionAbort__AbortReason::operator=(int other_value)
+{
+if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", other_value);
+enum_value = (enum_type)other_value;
+return *this;
+}
+
+e__ConnectionAbort__AbortReason& e__ConnectionAbort__AbortReason::operator=(enum_type other_value)
+{
+enum_value = other_value;
+return *this;
+}
+
+e__ConnectionAbort__AbortReason& e__ConnectionAbort__AbortReason::operator=(const e__ConnectionAbort__AbortReason& other_value)
+{
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+enum_value = other_value.enum_value;
+return *this;
+}
+
+boolean e__ConnectionAbort__AbortReason::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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value == other_value;
+}
+
+boolean e__ConnectionAbort__AbortReason::operator==(const e__ConnectionAbort__AbortReason& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value == other_value.enum_value;
+}
+
+boolean e__ConnectionAbort__AbortReason::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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value < other_value;
+}
+
+boolean e__ConnectionAbort__AbortReason::operator<(const e__ConnectionAbort__AbortReason& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value < other_value.enum_value;
+}
+
+boolean e__ConnectionAbort__AbortReason::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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value > other_value;
+}
+
+boolean e__ConnectionAbort__AbortReason::operator>(const e__ConnectionAbort__AbortReason& other_value) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value > other_value.enum_value;
+}
+
+const char *e__ConnectionAbort__AbortReason::enum_to_str(enum_type enum_par)
+{
+switch (enum_par) {
+case alreadyInOneOrMoreConnectionManagedSessionsAndCannotSupportAnother: return "alreadyInOneOrMoreConnectionManagedSessionsAndCannotSupportAnother";
+case systemResourcesWereNeededForAnotherTaskSoThisConnectionManagedSessionWasTerminated: return "systemResourcesWereNeededForAnotherTaskSoThisConnectionManagedSessionWasTerminated";
+case aTimeoutOccurredAndThisIsTheConnectionAbortToCloseTheSession: return "aTimeoutOccurredAndThisIsTheConnectionAbortToCloseTheSession";
+case cts__MessagesReceivedWhenDataTransferIsInProgress: return "cts_MessagesReceivedWhenDataTransferIsInProgress";
+case maximumRetransmitRequestLimitReached: return "maximumRetransmitRequestLimitReached";
+case unexpectedDataTransferPacket: return "unexpectedDataTransferPacket";
+case badSequenceNumber: return "badSequenceNumber";
+case duplicateSequenceNumber: return "duplicateSequenceNumber";
+case iso__11783__7__error__code__251: return "iso_11783_7_error_code_251";
+case iso__11783__7__error__code__252: return "iso_11783_7_error_code_252";
+case iso__11783__7__error__code__253: return "iso_11783_7_error_code_253";
+case iso__11783__7__error__code__254: return "iso_11783_7_error_code_254";
+case iso__11783__7__error__code__255: return "iso_11783_7_error_code_255";
+default: return "<unknown>";
+}
+}
+
+e__ConnectionAbort__AbortReason::enum_type e__ConnectionAbort__AbortReason::str_to_enum(const char *str_par)
+{
+if (!strcmp(str_par, "alreadyInOneOrMoreConnectionManagedSessionsAndCannotSupportAnother")) return alreadyInOneOrMoreConnectionManagedSessionsAndCannotSupportAnother;
+else if (!strcmp(str_par, "systemResourcesWereNeededForAnotherTaskSoThisConnectionManagedSessionWasTerminated")) return systemResourcesWereNeededForAnotherTaskSoThisConnectionManagedSessionWasTerminated;
+else if (!strcmp(str_par, "aTimeoutOccurredAndThisIsTheConnectionAbortToCloseTheSession")) return aTimeoutOccurredAndThisIsTheConnectionAbortToCloseTheSession;
+else if (!strcmp(str_par, "cts_MessagesReceivedWhenDataTransferIsInProgress")) return cts__MessagesReceivedWhenDataTransferIsInProgress;
+else if (!strcmp(str_par, "maximumRetransmitRequestLimitReached")) return maximumRetransmitRequestLimitReached;
+else if (!strcmp(str_par, "unexpectedDataTransferPacket")) return unexpectedDataTransferPacket;
+else if (!strcmp(str_par, "badSequenceNumber")) return badSequenceNumber;
+else if (!strcmp(str_par, "duplicateSequenceNumber")) return duplicateSequenceNumber;
+else if (!strcmp(str_par, "iso_11783_7_error_code_251")) return iso__11783__7__error__code__251;
+else if (!strcmp(str_par, "iso_11783_7_error_code_252")) return iso__11783__7__error__code__252;
+else if (!strcmp(str_par, "iso_11783_7_error_code_253")) return iso__11783__7__error__code__253;
+else if (!strcmp(str_par, "iso_11783_7_error_code_254")) return iso__11783__7__error__code__254;
+else if (!strcmp(str_par, "iso_11783_7_error_code_255")) return iso__11783__7__error__code__255;
+else return UNKNOWN_VALUE;
+}
+
+boolean e__ConnectionAbort__AbortReason::is_valid_enum(int int_par)
+{
+switch (int_par) {
+case 1:
+case 2:
+case 3:
+case 4:
+case 5:
+case 6:
+case 7:
+case 8:
+case 251:
+case 252:
+case 253:
+case 254:
+case 255:
+return TRUE;
+default:
+return FALSE;
+}
+}
+
+int e__ConnectionAbort__AbortReason::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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par;
+}
+
+int e__ConnectionAbort__AbortReason::enum2int(const e__ConnectionAbort__AbortReason& 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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
+return enum_par.enum_value;
+}
+
+void e__ConnectionAbort__AbortReason::int2enum(int int_val)
+{
+if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", int_val);
+enum_value = (enum_type)int_val;
+}
+
+e__ConnectionAbort__AbortReason::operator e__ConnectionAbort__AbortReason::enum_type() const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return enum_value;
+}
+
+void e__ConnectionAbort__AbortReason::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 e__ConnectionAbort__AbortReason::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", "@IsobusCMMessageTypes.e_ConnectionAbort_AbortReason");
+ enum_value = str_to_enum(param.get_enumerated());
+ if (!is_valid_enum(enum_value)) {
+ param.error("Invalid enumerated value for type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+ }
+}
+
+void e__ConnectionAbort__AbortReason::encode_text(Text_Buf& text_buf) const
+{
+if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+text_buf.push_int(enum_value);
+}
+
+void e__ConnectionAbort__AbortReason::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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", enum_value);
+}
+
+void e__ConnectionAbort__AbortReason::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 e__ConnectionAbort__AbortReason::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int e__ConnectionAbort__AbortReason::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
+{
+ int decoded_value = 0;
+ int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
+ if (decoded_length < 0) return decoded_length;
+ if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
+ else {
+ if(no_err){
+ return -1;
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
+ enum_value = UNKNOWN_VALUE;
+ }
+ }
+ return decoded_length;
+}
+
+int e__ConnectionAbort__AbortReason::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
+{
+ return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 8);
+}
+
+void e__ConnectionAbort__AbortReason_template::copy_template(const e__ConnectionAbort__AbortReason_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:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new e__ConnectionAbort__AbortReason_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+}
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template()
+{
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(int other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (!e__ConnectionAbort__AbortReason::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason with unknown numeric value %d.", other_value);
+single_value = (e__ConnectionAbort__AbortReason::enum_type)other_value;
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(e__ConnectionAbort__AbortReason::enum_type other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+single_value = other_value;
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(const e__ConnectionAbort__AbortReason& other_value)
+ : Base_Template(SPECIFIC_VALUE)
+{
+if (other_value.enum_value == e__ConnectionAbort__AbortReason::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+single_value = other_value.enum_value;
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(const OPTIONAL<e__ConnectionAbort__AbortReason>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (e__ConnectionAbort__AbortReason::enum_type)(const e__ConnectionAbort__AbortReason&)other_value;
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason from an unbound optional field.");
+}
+}
+
+e__ConnectionAbort__AbortReason_template::e__ConnectionAbort__AbortReason_template(const e__ConnectionAbort__AbortReason_template& other_value)
+ : Base_Template()
+{
+copy_template(other_value);
+}
+
+e__ConnectionAbort__AbortReason_template::~e__ConnectionAbort__AbortReason_template()
+{
+clean_up();
+}
+
+boolean e__ConnectionAbort__AbortReason_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+return TRUE;
+}
+
+boolean e__ConnectionAbort__AbortReason_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value != e__ConnectionAbort__AbortReason::UNBOUND_VALUE;
+}
+
+void e__ConnectionAbort__AbortReason_template::clean_up()
+{
+if (template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete [] value_list.list_value;
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(int other_value)
+{
+if (!e__ConnectionAbort__AbortReason::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", other_value);
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = (e__ConnectionAbort__AbortReason::enum_type)other_value;
+return *this;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(e__ConnectionAbort__AbortReason::enum_type other_value)
+{
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value;
+return *this;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(const e__ConnectionAbort__AbortReason& other_value)
+{
+if (other_value.enum_value == e__ConnectionAbort__AbortReason::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason to a template.");
+clean_up();
+set_selection(SPECIFIC_VALUE);
+single_value = other_value.enum_value;
+return *this;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(const OPTIONAL<e__ConnectionAbort__AbortReason>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+set_selection(SPECIFIC_VALUE);
+single_value = (e__ConnectionAbort__AbortReason::enum_type)(const e__ConnectionAbort__AbortReason&)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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+}
+return *this;
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::operator=(const e__ConnectionAbort__AbortReason_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean e__ConnectionAbort__AbortReason_template::match(e__ConnectionAbort__AbortReason::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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+}
+return FALSE;
+}
+
+boolean e__ConnectionAbort__AbortReason_template::match(const e__ConnectionAbort__AbortReason& other_value, boolean) const
+{
+if (other_value.enum_value == e__ConnectionAbort__AbortReason::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason with an unbound value.");
+return match(other_value.enum_value);
+}
+
+e__ConnectionAbort__AbortReason::enum_type e__ConnectionAbort__AbortReason_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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return single_value;
+}
+
+void e__ConnectionAbort__AbortReason_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error("Setting an invalid list type for a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new e__ConnectionAbort__AbortReason_template[list_length];
+}
+
+e__ConnectionAbort__AbortReason_template& e__ConnectionAbort__AbortReason_template::list_item(unsigned int list_index)
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Accessing a list element in a non-list template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+return value_list.list_value[list_index];
+}
+
+void e__ConnectionAbort__AbortReason_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_enum(e__ConnectionAbort__AbortReason::enum_to_str(single_value), single_value);
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void e__ConnectionAbort__AbortReason_template::log_match(const e__ConnectionAbort__AbortReason& 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 e__ConnectionAbort__AbortReason_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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+}
+}
+
+void e__ConnectionAbort__AbortReason_template::decode_text(Text_Buf& text_buf)
+{
+clean_up();
+decode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value = (e__ConnectionAbort__AbortReason::enum_type)text_buf.pull_int().get_val();
+if (!e__ConnectionAbort__AbortReason::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.", 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 e__ConnectionAbort__AbortReason_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 @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+}
+}
+
+boolean e__ConnectionAbort__AbortReason_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean e__ConnectionAbort__AbortReason_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int i=0; i<value_list.n_values; i++)
+if (value_list.list_value[i].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void e__ConnectionAbort__AbortReason_template::set_param(Module_Param& param)
+{
+ param.basic_check(Module_Param::BC_TEMPLATE, "enumerated 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: {
+ e__ConnectionAbort__AbortReason_template new_temp;
+ new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, m_p->get_size());
+ for (size_t p_i=0; p_i<m_p->get_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: {
+ e__ConnectionAbort__AbortReason::enum_type enum_val = e__ConnectionAbort__AbortReason::str_to_enum(m_p->get_enumerated());
+ if (!e__ConnectionAbort__AbortReason::is_valid_enum(enum_val)) {
+ param.error("Invalid enumerated value for type @IsobusCMMessageTypes.e_ConnectionAbort_AbortReason.");
+ }
+ *this = enum_val;
+ } break;
+ default:
+ param.type_error("enumerated template", "@IsobusCMMessageTypes.e_ConnectionAbort_AbortReason");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void e__ConnectionAbort__AbortReason_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 : "@IsobusCMMessageTypes.e_ConnectionAbort_AbortReason");
+}
+
+ConnectionAbort::ConnectionAbort()
+{
+}
+
+ConnectionAbort::ConnectionAbort(const OCTETSTRING& par_ctrl,
+ const e__ConnectionAbort__AbortReason& par_connectionAbortReason,
+ const OCTETSTRING& par_reserved3,
+ const OCTETSTRING& par_reserved4,
+ const OCTETSTRING& par_reserved5,
+ const INTEGER& par_pgnOfMultiPacketMessage)
+ : field_ctrl(par_ctrl),
+ field_connectionAbortReason(par_connectionAbortReason),
+ field_reserved3(par_reserved3),
+ field_reserved4(par_reserved4),
+ field_reserved5(par_reserved5),
+ field_pgnOfMultiPacketMessage(par_pgnOfMultiPacketMessage)
+{
+}
+
+ConnectionAbort::ConnectionAbort(const ConnectionAbort& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IsobusCMMessageTypes.ConnectionAbort.");
+if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+else field_ctrl.clean_up();
+if (other_value.connectionAbortReason().is_bound()) field_connectionAbortReason = other_value.connectionAbortReason();
+else field_connectionAbortReason.clean_up();
+if (other_value.reserved3().is_bound()) field_reserved3 = other_value.reserved3();
+else field_reserved3.clean_up();
+if (other_value.reserved4().is_bound()) field_reserved4 = other_value.reserved4();
+else field_reserved4.clean_up();
+if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+else field_reserved5.clean_up();
+if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+else field_pgnOfMultiPacketMessage.clean_up();
+}
+
+void ConnectionAbort::clean_up()
+{
+field_ctrl.clean_up();
+field_connectionAbortReason.clean_up();
+field_reserved3.clean_up();
+field_reserved4.clean_up();
+field_reserved5.clean_up();
+field_pgnOfMultiPacketMessage.clean_up();
+}
+
+const TTCN_Typedescriptor_t* ConnectionAbort::get_descriptor() const { return &ConnectionAbort_descr_; }
+ConnectionAbort& ConnectionAbort::operator=(const ConnectionAbort& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IsobusCMMessageTypes.ConnectionAbort.");
+ if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+ else field_ctrl.clean_up();
+ if (other_value.connectionAbortReason().is_bound()) field_connectionAbortReason = other_value.connectionAbortReason();
+ else field_connectionAbortReason.clean_up();
+ if (other_value.reserved3().is_bound()) field_reserved3 = other_value.reserved3();
+ else field_reserved3.clean_up();
+ if (other_value.reserved4().is_bound()) field_reserved4 = other_value.reserved4();
+ else field_reserved4.clean_up();
+ if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+ else field_reserved5.clean_up();
+ if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+ else field_pgnOfMultiPacketMessage.clean_up();
+}
+return *this;
+}
+
+boolean ConnectionAbort::operator==(const ConnectionAbort& other_value) const
+{
+return field_ctrl==other_value.field_ctrl
+ && field_connectionAbortReason==other_value.field_connectionAbortReason
+ && field_reserved3==other_value.field_reserved3
+ && field_reserved4==other_value.field_reserved4
+ && field_reserved5==other_value.field_reserved5
+ && field_pgnOfMultiPacketMessage==other_value.field_pgnOfMultiPacketMessage;
+}
+
+boolean ConnectionAbort::is_bound() const
+{
+return (field_ctrl.is_bound())
+ || (field_connectionAbortReason.is_bound())
+ || (field_reserved3.is_bound())
+ || (field_reserved4.is_bound())
+ || (field_reserved5.is_bound())
+ || (field_pgnOfMultiPacketMessage.is_bound());
+}
+boolean ConnectionAbort::is_value() const
+{
+return field_ctrl.is_value()
+ && field_connectionAbortReason.is_value()
+ && field_reserved3.is_value()
+ && field_reserved4.is_value()
+ && field_reserved5.is_value()
+ && field_pgnOfMultiPacketMessage.is_value();
+}
+void ConnectionAbort::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ ctrl := ");
+field_ctrl.log();
+TTCN_Logger::log_event_str(", connectionAbortReason := ");
+field_connectionAbortReason.log();
+TTCN_Logger::log_event_str(", reserved3 := ");
+field_reserved3.log();
+TTCN_Logger::log_event_str(", reserved4 := ");
+field_reserved4.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void ConnectionAbort::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 (6<param.get_size()) {
+ param.error("record value of type @IsobusCMMessageTypes.ConnectionAbort has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) connectionAbortReason().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) reserved3().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved4().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "connectionAbortReason")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ connectionAbortReason().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved3")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved3().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved4")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved4().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.ConnectionAbort: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@IsobusCMMessageTypes.ConnectionAbort");
+ }
+}
+
+void ConnectionAbort::set_implicit_omit()
+{
+if (ctrl().is_bound()) ctrl().set_implicit_omit();
+if (connectionAbortReason().is_bound()) connectionAbortReason().set_implicit_omit();
+if (reserved3().is_bound()) reserved3().set_implicit_omit();
+if (reserved4().is_bound()) reserved4().set_implicit_omit();
+if (reserved5().is_bound()) reserved5().set_implicit_omit();
+if (pgnOfMultiPacketMessage().is_bound()) pgnOfMultiPacketMessage().set_implicit_omit();
+}
+
+void ConnectionAbort::encode_text(Text_Buf& text_buf) const
+{
+field_ctrl.encode_text(text_buf);
+field_connectionAbortReason.encode_text(text_buf);
+field_reserved3.encode_text(text_buf);
+field_reserved4.encode_text(text_buf);
+field_reserved5.encode_text(text_buf);
+field_pgnOfMultiPacketMessage.encode_text(text_buf);
+}
+
+void ConnectionAbort::decode_text(Text_Buf& text_buf)
+{
+field_ctrl.decode_text(text_buf);
+field_connectionAbortReason.decode_text(text_buf);
+field_reserved3.decode_text(text_buf);
+field_reserved4.decode_text(text_buf);
+field_reserved5.decode_text(text_buf);
+field_pgnOfMultiPacketMessage.decode_text(text_buf);
+}
+
+void ConnectionAbort::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 ConnectionAbort::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int ConnectionAbort::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, ConnectionAbort_ctrl_descr_.raw->forceomit);
+ decoded_field_length = field_ctrl.RAW_decode(ConnectionAbort_ctrl_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, e__ConnectionAbort__AbortReason_descr_.raw->forceomit);
+ decoded_field_length = field_connectionAbortReason.RAW_decode(e__ConnectionAbort__AbortReason_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, ConnectionAbort_reserved3_descr_.raw->forceomit);
+ decoded_field_length = field_reserved3.RAW_decode(ConnectionAbort_reserved3_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, ConnectionAbort_reserved4_descr_.raw->forceomit);
+ decoded_field_length = field_reserved4.RAW_decode(ConnectionAbort_reserved4_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, ConnectionAbort_reserved5_descr_.raw->forceomit);
+ decoded_field_length = field_reserved5.RAW_decode(ConnectionAbort_reserved5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_5_force_omit(5, force_omit, IsobusMessageTypes::PGN_descr_.raw->forceomit);
+ decoded_field_length = field_pgnOfMultiPacketMessage.RAW_decode(IsobusMessageTypes::PGN_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int ConnectionAbort::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 6;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, ConnectionAbort_ctrl_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, e__ConnectionAbort__AbortReason_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ConnectionAbort_reserved3_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ConnectionAbort_reserved4_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ConnectionAbort_reserved5_descr_.raw);
+ myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IsobusMessageTypes::PGN_descr_.raw);
+ encoded_length += field_ctrl.RAW_encode(ConnectionAbort_ctrl_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_connectionAbortReason.RAW_encode(e__ConnectionAbort__AbortReason_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_reserved3.RAW_encode(ConnectionAbort_reserved3_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_reserved4.RAW_encode(ConnectionAbort_reserved4_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_reserved5.RAW_encode(ConnectionAbort_reserved5_descr_, *myleaf.body.node.nodes[4]);
+ encoded_length += field_pgnOfMultiPacketMessage.RAW_encode(IsobusMessageTypes::PGN_descr_, *myleaf.body.node.nodes[5]);
+ return myleaf.length = encoded_length;
+}
+
+struct ConnectionAbort_template::single_value_struct {
+OCTETSTRING_template field_ctrl;
+e__ConnectionAbort__AbortReason_template field_connectionAbortReason;
+OCTETSTRING_template field_reserved3;
+OCTETSTRING_template field_reserved4;
+OCTETSTRING_template field_reserved5;
+INTEGER_template field_pgnOfMultiPacketMessage;
+};
+
+void ConnectionAbort_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_ctrl = ANY_VALUE;
+single_value->field_connectionAbortReason = ANY_VALUE;
+single_value->field_reserved3 = ANY_VALUE;
+single_value->field_reserved4 = ANY_VALUE;
+single_value->field_reserved5 = ANY_VALUE;
+single_value->field_pgnOfMultiPacketMessage = ANY_VALUE;
+}
+}
+}
+
+void ConnectionAbort_template::copy_value(const ConnectionAbort& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.ctrl().is_bound()) {
+ single_value->field_ctrl = other_value.ctrl();
+} else {
+ single_value->field_ctrl.clean_up();
+}
+if (other_value.connectionAbortReason().is_bound()) {
+ single_value->field_connectionAbortReason = other_value.connectionAbortReason();
+} else {
+ single_value->field_connectionAbortReason.clean_up();
+}
+if (other_value.reserved3().is_bound()) {
+ single_value->field_reserved3 = other_value.reserved3();
+} else {
+ single_value->field_reserved3.clean_up();
+}
+if (other_value.reserved4().is_bound()) {
+ single_value->field_reserved4 = other_value.reserved4();
+} else {
+ single_value->field_reserved4.clean_up();
+}
+if (other_value.reserved5().is_bound()) {
+ single_value->field_reserved5 = other_value.reserved5();
+} else {
+ single_value->field_reserved5.clean_up();
+}
+if (other_value.pgnOfMultiPacketMessage().is_bound()) {
+ single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+ single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void ConnectionAbort_template::copy_template(const ConnectionAbort_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.ctrl().get_selection()) {
+single_value->field_ctrl = other_value.ctrl();
+} else {
+single_value->field_ctrl.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.connectionAbortReason().get_selection()) {
+single_value->field_connectionAbortReason = other_value.connectionAbortReason();
+} else {
+single_value->field_connectionAbortReason.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved3().get_selection()) {
+single_value->field_reserved3 = other_value.reserved3();
+} else {
+single_value->field_reserved3.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved4().get_selection()) {
+single_value->field_reserved4 = other_value.reserved4();
+} else {
+single_value->field_reserved4.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved5().get_selection()) {
+single_value->field_reserved5 = other_value.reserved5();
+} else {
+single_value->field_reserved5.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pgnOfMultiPacketMessage().get_selection()) {
+single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new ConnectionAbort_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @IsobusCMMessageTypes.ConnectionAbort.");
+break;
+}
+set_selection(other_value);
+}
+
+ConnectionAbort_template::ConnectionAbort_template()
+{
+}
+
+ConnectionAbort_template::ConnectionAbort_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+ConnectionAbort_template::ConnectionAbort_template(const ConnectionAbort& other_value)
+{
+copy_value(other_value);
+}
+
+ConnectionAbort_template::ConnectionAbort_template(const OPTIONAL<ConnectionAbort>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ConnectionAbort&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @IsobusCMMessageTypes.ConnectionAbort from an unbound optional field.");
+}
+}
+
+ConnectionAbort_template::ConnectionAbort_template(const ConnectionAbort_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+ConnectionAbort_template::~ConnectionAbort_template()
+{
+clean_up();
+}
+
+ConnectionAbort_template& ConnectionAbort_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+ConnectionAbort_template& ConnectionAbort_template::operator=(const ConnectionAbort& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+ConnectionAbort_template& ConnectionAbort_template::operator=(const OPTIONAL<ConnectionAbort>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const ConnectionAbort&)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 @IsobusCMMessageTypes.ConnectionAbort.");
+}
+return *this;
+}
+
+ConnectionAbort_template& ConnectionAbort_template::operator=(const ConnectionAbort_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean ConnectionAbort_template::match(const ConnectionAbort& 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.ctrl().is_bound()) return FALSE;
+if(!single_value->field_ctrl.match(other_value.ctrl(), legacy))return FALSE;
+if(!other_value.connectionAbortReason().is_bound()) return FALSE;
+if(!single_value->field_connectionAbortReason.match(other_value.connectionAbortReason(), legacy))return FALSE;
+if(!other_value.reserved3().is_bound()) return FALSE;
+if(!single_value->field_reserved3.match(other_value.reserved3(), legacy))return FALSE;
+if(!other_value.reserved4().is_bound()) return FALSE;
+if(!single_value->field_reserved4.match(other_value.reserved4(), legacy))return FALSE;
+if(!other_value.reserved5().is_bound()) return FALSE;
+if(!single_value->field_reserved5.match(other_value.reserved5(), legacy))return FALSE;
+if(!other_value.pgnOfMultiPacketMessage().is_bound()) return FALSE;
+if(!single_value->field_pgnOfMultiPacketMessage.match(other_value.pgnOfMultiPacketMessage(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @IsobusCMMessageTypes.ConnectionAbort.");
+}
+return FALSE;
+}
+
+boolean ConnectionAbort_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_ctrl.is_bound()
+
+ ||single_value->field_connectionAbortReason.is_bound()
+
+ ||single_value->field_reserved3.is_bound()
+
+ ||single_value->field_reserved4.is_bound()
+
+ ||single_value->field_reserved5.is_bound()
+
+ ||single_value->field_pgnOfMultiPacketMessage.is_bound()
+;
+}
+
+boolean ConnectionAbort_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_ctrl.is_value()
+ &&single_value->field_connectionAbortReason.is_value()
+ &&single_value->field_reserved3.is_value()
+ &&single_value->field_reserved4.is_value()
+ &&single_value->field_reserved5.is_value()
+ &&single_value->field_pgnOfMultiPacketMessage.is_value();
+}
+
+void ConnectionAbort_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+ConnectionAbort ConnectionAbort_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 @IsobusCMMessageTypes.ConnectionAbort.");
+ConnectionAbort ret_val;
+if (single_value->field_ctrl.is_bound()) {
+ret_val.ctrl() = single_value->field_ctrl.valueof();
+}
+if (single_value->field_connectionAbortReason.is_bound()) {
+ret_val.connectionAbortReason() = single_value->field_connectionAbortReason.valueof();
+}
+if (single_value->field_reserved3.is_bound()) {
+ret_val.reserved3() = single_value->field_reserved3.valueof();
+}
+if (single_value->field_reserved4.is_bound()) {
+ret_val.reserved4() = single_value->field_reserved4.valueof();
+}
+if (single_value->field_reserved5.is_bound()) {
+ret_val.reserved5() = single_value->field_reserved5.valueof();
+}
+if (single_value->field_pgnOfMultiPacketMessage.is_bound()) {
+ret_val.pgnOfMultiPacketMessage() = single_value->field_pgnOfMultiPacketMessage.valueof();
+}
+return ret_val;
+}
+
+void ConnectionAbort_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @IsobusCMMessageTypes.ConnectionAbort.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new ConnectionAbort_template[list_length];
+}
+
+ConnectionAbort_template& ConnectionAbort_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @IsobusCMMessageTypes.ConnectionAbort.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& ConnectionAbort_template::ctrl()
+{
+set_specific();
+return single_value->field_ctrl;
+}
+
+const OCTETSTRING_template& ConnectionAbort_template::ctrl() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ctrl of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_ctrl;
+}
+
+e__ConnectionAbort__AbortReason_template& ConnectionAbort_template::connectionAbortReason()
+{
+set_specific();
+return single_value->field_connectionAbortReason;
+}
+
+const e__ConnectionAbort__AbortReason_template& ConnectionAbort_template::connectionAbortReason() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field connectionAbortReason of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_connectionAbortReason;
+}
+
+OCTETSTRING_template& ConnectionAbort_template::reserved3()
+{
+set_specific();
+return single_value->field_reserved3;
+}
+
+const OCTETSTRING_template& ConnectionAbort_template::reserved3() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved3 of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_reserved3;
+}
+
+OCTETSTRING_template& ConnectionAbort_template::reserved4()
+{
+set_specific();
+return single_value->field_reserved4;
+}
+
+const OCTETSTRING_template& ConnectionAbort_template::reserved4() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved4 of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_reserved4;
+}
+
+OCTETSTRING_template& ConnectionAbort_template::reserved5()
+{
+set_specific();
+return single_value->field_reserved5;
+}
+
+const OCTETSTRING_template& ConnectionAbort_template::reserved5() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved5 of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_reserved5;
+}
+
+INTEGER_template& ConnectionAbort_template::pgnOfMultiPacketMessage()
+{
+set_specific();
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+const INTEGER_template& ConnectionAbort_template::pgnOfMultiPacketMessage() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pgnOfMultiPacketMessage of a non-specific template of type @IsobusCMMessageTypes.ConnectionAbort.");
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+int ConnectionAbort_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ConnectionAbort which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 6;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ConnectionAbort 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 @IsobusCMMessageTypes.ConnectionAbort containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ConnectionAbort containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ConnectionAbort containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.ConnectionAbort containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IsobusCMMessageTypes.ConnectionAbort.");
+ }
+ return 0;
+}
+
+void ConnectionAbort_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ ctrl := ");
+single_value->field_ctrl.log();
+TTCN_Logger::log_event_str(", connectionAbortReason := ");
+single_value->field_connectionAbortReason.log();
+TTCN_Logger::log_event_str(", reserved3 := ");
+single_value->field_reserved3.log();
+TTCN_Logger::log_event_str(", reserved4 := ");
+single_value->field_reserved4.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void ConnectionAbort_template::log_match(const ConnectionAbort& 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_ctrl.match(match_value.ctrl(), legacy)){
+TTCN_Logger::log_logmatch_info(".ctrl");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_connectionAbortReason.match(match_value.connectionAbortReason(), legacy)){
+TTCN_Logger::log_logmatch_info(".connectionAbortReason");
+single_value->field_connectionAbortReason.log_match(match_value.connectionAbortReason(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved3.match(match_value.reserved3(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved3");
+single_value->field_reserved3.log_match(match_value.reserved3(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved4.match(match_value.reserved4(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved4");
+single_value->field_reserved4.log_match(match_value.reserved4(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved5.match(match_value.reserved5(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved5");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pgnOfMultiPacketMessage.match(match_value.pgnOfMultiPacketMessage(), legacy)){
+TTCN_Logger::log_logmatch_info(".pgnOfMultiPacketMessage");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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("{ ctrl := ");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::log_event_str(", connectionAbortReason := ");
+single_value->field_connectionAbortReason.log_match(match_value.connectionAbortReason(), legacy);
+TTCN_Logger::log_event_str(", reserved3 := ");
+single_value->field_reserved3.log_match(match_value.reserved3(), legacy);
+TTCN_Logger::log_event_str(", reserved4 := ");
+single_value->field_reserved4.log_match(match_value.reserved4(), legacy);
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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 ConnectionAbort_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_ctrl.encode_text(text_buf);
+single_value->field_connectionAbortReason.encode_text(text_buf);
+single_value->field_reserved3.encode_text(text_buf);
+single_value->field_reserved4.encode_text(text_buf);
+single_value->field_reserved5.encode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 @IsobusCMMessageTypes.ConnectionAbort.");
+}
+}
+
+void ConnectionAbort_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_ctrl.decode_text(text_buf);
+single_value->field_connectionAbortReason.decode_text(text_buf);
+single_value->field_reserved3.decode_text(text_buf);
+single_value->field_reserved4.decode_text(text_buf);
+single_value->field_reserved5.decode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 ConnectionAbort_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 @IsobusCMMessageTypes.ConnectionAbort.");
+}
+}
+
+void ConnectionAbort_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: {
+ ConnectionAbort_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (6<param.get_size()) {
+ param.error("record template of type @IsobusCMMessageTypes.ConnectionAbort has 6 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) connectionAbortReason().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) reserved3().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved4().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(4));
+ if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(5));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "connectionAbortReason")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ connectionAbortReason().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved3")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved3().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved4")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved4().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.ConnectionAbort: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@IsobusCMMessageTypes.ConnectionAbort");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void ConnectionAbort_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_ctrl.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+single_value->field_connectionAbortReason.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+single_value->field_reserved3.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+single_value->field_reserved4.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+single_value->field_reserved5.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+single_value->field_pgnOfMultiPacketMessage.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.ConnectionAbort");
+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 : "@IsobusCMMessageTypes.ConnectionAbort");
+}
+
+boolean ConnectionAbort_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean ConnectionAbort_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+BroadcastAnnounce::BroadcastAnnounce()
+{
+}
+
+BroadcastAnnounce::BroadcastAnnounce(const OCTETSTRING& par_ctrl,
+ const INTEGER& par_msgSizeInByte,
+ const INTEGER& par_totalNumberOfPackets,
+ const OCTETSTRING& par_reserved5,
+ const INTEGER& par_pgnOfMultiPacketMessage)
+ : field_ctrl(par_ctrl),
+ field_msgSizeInByte(par_msgSizeInByte),
+ field_totalNumberOfPackets(par_totalNumberOfPackets),
+ field_reserved5(par_reserved5),
+ field_pgnOfMultiPacketMessage(par_pgnOfMultiPacketMessage)
+{
+}
+
+BroadcastAnnounce::BroadcastAnnounce(const BroadcastAnnounce& other_value)
+{
+if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+else field_ctrl.clean_up();
+if (other_value.msgSizeInByte().is_bound()) field_msgSizeInByte = other_value.msgSizeInByte();
+else field_msgSizeInByte.clean_up();
+if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+else field_totalNumberOfPackets.clean_up();
+if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+else field_reserved5.clean_up();
+if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+else field_pgnOfMultiPacketMessage.clean_up();
+}
+
+void BroadcastAnnounce::clean_up()
+{
+field_ctrl.clean_up();
+field_msgSizeInByte.clean_up();
+field_totalNumberOfPackets.clean_up();
+field_reserved5.clean_up();
+field_pgnOfMultiPacketMessage.clean_up();
+}
+
+const TTCN_Typedescriptor_t* BroadcastAnnounce::get_descriptor() const { return &BroadcastAnnounce_descr_; }
+BroadcastAnnounce& BroadcastAnnounce::operator=(const BroadcastAnnounce& other_value)
+{
+if (this != &other_value) {
+ if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+ if (other_value.ctrl().is_bound()) field_ctrl = other_value.ctrl();
+ else field_ctrl.clean_up();
+ if (other_value.msgSizeInByte().is_bound()) field_msgSizeInByte = other_value.msgSizeInByte();
+ else field_msgSizeInByte.clean_up();
+ if (other_value.totalNumberOfPackets().is_bound()) field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+ else field_totalNumberOfPackets.clean_up();
+ if (other_value.reserved5().is_bound()) field_reserved5 = other_value.reserved5();
+ else field_reserved5.clean_up();
+ if (other_value.pgnOfMultiPacketMessage().is_bound()) field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+ else field_pgnOfMultiPacketMessage.clean_up();
+}
+return *this;
+}
+
+boolean BroadcastAnnounce::operator==(const BroadcastAnnounce& other_value) const
+{
+return field_ctrl==other_value.field_ctrl
+ && field_msgSizeInByte==other_value.field_msgSizeInByte
+ && field_totalNumberOfPackets==other_value.field_totalNumberOfPackets
+ && field_reserved5==other_value.field_reserved5
+ && field_pgnOfMultiPacketMessage==other_value.field_pgnOfMultiPacketMessage;
+}
+
+boolean BroadcastAnnounce::is_bound() const
+{
+return (field_ctrl.is_bound())
+ || (field_msgSizeInByte.is_bound())
+ || (field_totalNumberOfPackets.is_bound())
+ || (field_reserved5.is_bound())
+ || (field_pgnOfMultiPacketMessage.is_bound());
+}
+boolean BroadcastAnnounce::is_value() const
+{
+return field_ctrl.is_value()
+ && field_msgSizeInByte.is_value()
+ && field_totalNumberOfPackets.is_value()
+ && field_reserved5.is_value()
+ && field_pgnOfMultiPacketMessage.is_value();
+}
+void BroadcastAnnounce::log() const
+{
+if (!is_bound()) {
+TTCN_Logger::log_event_unbound();
+return;
+}
+TTCN_Logger::log_event_str("{ ctrl := ");
+field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+field_msgSizeInByte.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+}
+
+void BroadcastAnnounce::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 (5<param.get_size()) {
+ param.error("record value of type @IsobusCMMessageTypes.BroadcastAnnounce has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInByte().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInByte")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInByte().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.BroadcastAnnounce: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record value", "@IsobusCMMessageTypes.BroadcastAnnounce");
+ }
+}
+
+void BroadcastAnnounce::set_implicit_omit()
+{
+if (ctrl().is_bound()) ctrl().set_implicit_omit();
+if (msgSizeInByte().is_bound()) msgSizeInByte().set_implicit_omit();
+if (totalNumberOfPackets().is_bound()) totalNumberOfPackets().set_implicit_omit();
+if (reserved5().is_bound()) reserved5().set_implicit_omit();
+if (pgnOfMultiPacketMessage().is_bound()) pgnOfMultiPacketMessage().set_implicit_omit();
+}
+
+void BroadcastAnnounce::encode_text(Text_Buf& text_buf) const
+{
+field_ctrl.encode_text(text_buf);
+field_msgSizeInByte.encode_text(text_buf);
+field_totalNumberOfPackets.encode_text(text_buf);
+field_reserved5.encode_text(text_buf);
+field_pgnOfMultiPacketMessage.encode_text(text_buf);
+}
+
+void BroadcastAnnounce::decode_text(Text_Buf& text_buf)
+{
+field_ctrl.decode_text(text_buf);
+field_msgSizeInByte.decode_text(text_buf);
+field_totalNumberOfPackets.decode_text(text_buf);
+field_reserved5.decode_text(text_buf);
+field_pgnOfMultiPacketMessage.decode_text(text_buf);
+}
+
+void BroadcastAnnounce::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 BroadcastAnnounce::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int BroadcastAnnounce::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
+{ (void)no_err;
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ size_t last_decoded_pos = p_buf.get_pos_bit();
+ int decoded_length = 0;
+ int decoded_field_length = 0;
+ raw_order_t local_top_order;
+ if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
+ else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
+ else local_top_order=ORDER_LSB;
+ RAW_Force_Omit field_0_force_omit(0, force_omit, BroadcastAnnounce_ctrl_descr_.raw->forceomit);
+ decoded_field_length = field_ctrl.RAW_decode(BroadcastAnnounce_ctrl_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_1_force_omit(1, force_omit, IsobusMessageTypes::INT2_descr_.raw->forceomit);
+ decoded_field_length = field_msgSizeInByte.RAW_decode(IsobusMessageTypes::INT2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_2_force_omit(2, force_omit, NUMBER__OF__PACKETS_descr_.raw->forceomit);
+ decoded_field_length = field_totalNumberOfPackets.RAW_decode(NUMBER__OF__PACKETS_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_3_force_omit(3, force_omit, BroadcastAnnounce_reserved5_descr_.raw->forceomit);
+ decoded_field_length = field_reserved5.RAW_decode(BroadcastAnnounce_reserved5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ RAW_Force_Omit field_4_force_omit(4, force_omit, IsobusMessageTypes::PGN_descr_.raw->forceomit);
+ decoded_field_length = field_pgnOfMultiPacketMessage.RAW_decode(IsobusMessageTypes::PGN_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
+ if (decoded_field_length < 0) return decoded_field_length;
+ decoded_length+=decoded_field_length;
+ limit-=decoded_field_length;
+ last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
+ p_buf.set_pos_bit(last_decoded_pos);
+ return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
+}
+
+int BroadcastAnnounce::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
+ if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 5;
+ myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, BroadcastAnnounce_ctrl_descr_.raw);
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IsobusMessageTypes::INT2_descr_.raw);
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, NUMBER__OF__PACKETS_descr_.raw);
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, BroadcastAnnounce_reserved5_descr_.raw);
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IsobusMessageTypes::PGN_descr_.raw);
+ encoded_length += field_ctrl.RAW_encode(BroadcastAnnounce_ctrl_descr_, *myleaf.body.node.nodes[0]);
+ encoded_length += field_msgSizeInByte.RAW_encode(IsobusMessageTypes::INT2_descr_, *myleaf.body.node.nodes[1]);
+ encoded_length += field_totalNumberOfPackets.RAW_encode(NUMBER__OF__PACKETS_descr_, *myleaf.body.node.nodes[2]);
+ encoded_length += field_reserved5.RAW_encode(BroadcastAnnounce_reserved5_descr_, *myleaf.body.node.nodes[3]);
+ encoded_length += field_pgnOfMultiPacketMessage.RAW_encode(IsobusMessageTypes::PGN_descr_, *myleaf.body.node.nodes[4]);
+ return myleaf.length = encoded_length;
+}
+
+struct BroadcastAnnounce_template::single_value_struct {
+OCTETSTRING_template field_ctrl;
+INTEGER_template field_msgSizeInByte;
+INTEGER_template field_totalNumberOfPackets;
+OCTETSTRING_template field_reserved5;
+INTEGER_template field_pgnOfMultiPacketMessage;
+};
+
+void BroadcastAnnounce_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_ctrl = ANY_VALUE;
+single_value->field_msgSizeInByte = ANY_VALUE;
+single_value->field_totalNumberOfPackets = ANY_VALUE;
+single_value->field_reserved5 = ANY_VALUE;
+single_value->field_pgnOfMultiPacketMessage = ANY_VALUE;
+}
+}
+}
+
+void BroadcastAnnounce_template::copy_value(const BroadcastAnnounce& other_value)
+{
+single_value = new single_value_struct;
+if (other_value.ctrl().is_bound()) {
+ single_value->field_ctrl = other_value.ctrl();
+} else {
+ single_value->field_ctrl.clean_up();
+}
+if (other_value.msgSizeInByte().is_bound()) {
+ single_value->field_msgSizeInByte = other_value.msgSizeInByte();
+} else {
+ single_value->field_msgSizeInByte.clean_up();
+}
+if (other_value.totalNumberOfPackets().is_bound()) {
+ single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+ single_value->field_totalNumberOfPackets.clean_up();
+}
+if (other_value.reserved5().is_bound()) {
+ single_value->field_reserved5 = other_value.reserved5();
+} else {
+ single_value->field_reserved5.clean_up();
+}
+if (other_value.pgnOfMultiPacketMessage().is_bound()) {
+ single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+ single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void BroadcastAnnounce_template::copy_template(const BroadcastAnnounce_template& other_value)
+{
+switch (other_value.template_selection) {
+case SPECIFIC_VALUE:
+single_value = new single_value_struct;
+if (UNINITIALIZED_TEMPLATE != other_value.ctrl().get_selection()) {
+single_value->field_ctrl = other_value.ctrl();
+} else {
+single_value->field_ctrl.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.msgSizeInByte().get_selection()) {
+single_value->field_msgSizeInByte = other_value.msgSizeInByte();
+} else {
+single_value->field_msgSizeInByte.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.totalNumberOfPackets().get_selection()) {
+single_value->field_totalNumberOfPackets = other_value.totalNumberOfPackets();
+} else {
+single_value->field_totalNumberOfPackets.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.reserved5().get_selection()) {
+single_value->field_reserved5 = other_value.reserved5();
+} else {
+single_value->field_reserved5.clean_up();
+}
+if (UNINITIALIZED_TEMPLATE != other_value.pgnOfMultiPacketMessage().get_selection()) {
+single_value->field_pgnOfMultiPacketMessage = other_value.pgnOfMultiPacketMessage();
+} else {
+single_value->field_pgnOfMultiPacketMessage.clean_up();
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new BroadcastAnnounce_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;
+default:
+TTCN_error("Copying an uninitialized/unsupported template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+break;
+}
+set_selection(other_value);
+}
+
+BroadcastAnnounce_template::BroadcastAnnounce_template()
+{
+}
+
+BroadcastAnnounce_template::BroadcastAnnounce_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+BroadcastAnnounce_template::BroadcastAnnounce_template(const BroadcastAnnounce& other_value)
+{
+copy_value(other_value);
+}
+
+BroadcastAnnounce_template::BroadcastAnnounce_template(const OPTIONAL<BroadcastAnnounce>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const BroadcastAnnounce&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of type @IsobusCMMessageTypes.BroadcastAnnounce from an unbound optional field.");
+}
+}
+
+BroadcastAnnounce_template::BroadcastAnnounce_template(const BroadcastAnnounce_template& other_value)
+: Base_Template()
+{
+copy_template(other_value);
+}
+
+BroadcastAnnounce_template::~BroadcastAnnounce_template()
+{
+clean_up();
+}
+
+BroadcastAnnounce_template& BroadcastAnnounce_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+BroadcastAnnounce_template& BroadcastAnnounce_template::operator=(const BroadcastAnnounce& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+BroadcastAnnounce_template& BroadcastAnnounce_template::operator=(const OPTIONAL<BroadcastAnnounce>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const BroadcastAnnounce&)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 @IsobusCMMessageTypes.BroadcastAnnounce.");
+}
+return *this;
+}
+
+BroadcastAnnounce_template& BroadcastAnnounce_template::operator=(const BroadcastAnnounce_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean BroadcastAnnounce_template::match(const BroadcastAnnounce& 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.ctrl().is_bound()) return FALSE;
+if(!single_value->field_ctrl.match(other_value.ctrl(), legacy))return FALSE;
+if(!other_value.msgSizeInByte().is_bound()) return FALSE;
+if(!single_value->field_msgSizeInByte.match(other_value.msgSizeInByte(), legacy))return FALSE;
+if(!other_value.totalNumberOfPackets().is_bound()) return FALSE;
+if(!single_value->field_totalNumberOfPackets.match(other_value.totalNumberOfPackets(), legacy))return FALSE;
+if(!other_value.reserved5().is_bound()) return FALSE;
+if(!single_value->field_reserved5.match(other_value.reserved5(), legacy))return FALSE;
+if(!other_value.pgnOfMultiPacketMessage().is_bound()) return FALSE;
+if(!single_value->field_pgnOfMultiPacketMessage.match(other_value.pgnOfMultiPacketMessage(), 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;
+default:
+TTCN_error("Matching an uninitialized/unsupported template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+}
+return FALSE;
+}
+
+boolean BroadcastAnnounce_template::is_bound() const
+{
+if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
+if (template_selection != SPECIFIC_VALUE) return TRUE;
+return single_value->field_ctrl.is_bound()
+
+ ||single_value->field_msgSizeInByte.is_bound()
+
+ ||single_value->field_totalNumberOfPackets.is_bound()
+
+ ||single_value->field_reserved5.is_bound()
+
+ ||single_value->field_pgnOfMultiPacketMessage.is_bound()
+;
+}
+
+boolean BroadcastAnnounce_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+return single_value->field_ctrl.is_value()
+ &&single_value->field_msgSizeInByte.is_value()
+ &&single_value->field_totalNumberOfPackets.is_value()
+ &&single_value->field_reserved5.is_value()
+ &&single_value->field_pgnOfMultiPacketMessage.is_value();
+}
+
+void BroadcastAnnounce_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+delete single_value;
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+BroadcastAnnounce BroadcastAnnounce_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 @IsobusCMMessageTypes.BroadcastAnnounce.");
+BroadcastAnnounce ret_val;
+if (single_value->field_ctrl.is_bound()) {
+ret_val.ctrl() = single_value->field_ctrl.valueof();
+}
+if (single_value->field_msgSizeInByte.is_bound()) {
+ret_val.msgSizeInByte() = single_value->field_msgSizeInByte.valueof();
+}
+if (single_value->field_totalNumberOfPackets.is_bound()) {
+ret_val.totalNumberOfPackets() = single_value->field_totalNumberOfPackets.valueof();
+}
+if (single_value->field_reserved5.is_bound()) {
+ret_val.reserved5() = single_value->field_reserved5.valueof();
+}
+if (single_value->field_pgnOfMultiPacketMessage.is_bound()) {
+ret_val.pgnOfMultiPacketMessage() = single_value->field_pgnOfMultiPacketMessage.valueof();
+}
+return ret_val;
+}
+
+void BroadcastAnnounce_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
+TTCN_error("Setting an invalid list for a template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new BroadcastAnnounce_template[list_length];
+}
+
+BroadcastAnnounce_template& BroadcastAnnounce_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
+TTCN_error("Accessing a list element of a non-list template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+if (list_index >= value_list.n_values)
+TTCN_error("Index overflow in a value list template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return value_list.list_value[list_index];
+}
+
+OCTETSTRING_template& BroadcastAnnounce_template::ctrl()
+{
+set_specific();
+return single_value->field_ctrl;
+}
+
+const OCTETSTRING_template& BroadcastAnnounce_template::ctrl() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field ctrl of a non-specific template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return single_value->field_ctrl;
+}
+
+INTEGER_template& BroadcastAnnounce_template::msgSizeInByte()
+{
+set_specific();
+return single_value->field_msgSizeInByte;
+}
+
+const INTEGER_template& BroadcastAnnounce_template::msgSizeInByte() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field msgSizeInByte of a non-specific template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return single_value->field_msgSizeInByte;
+}
+
+INTEGER_template& BroadcastAnnounce_template::totalNumberOfPackets()
+{
+set_specific();
+return single_value->field_totalNumberOfPackets;
+}
+
+const INTEGER_template& BroadcastAnnounce_template::totalNumberOfPackets() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field totalNumberOfPackets of a non-specific template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return single_value->field_totalNumberOfPackets;
+}
+
+OCTETSTRING_template& BroadcastAnnounce_template::reserved5()
+{
+set_specific();
+return single_value->field_reserved5;
+}
+
+const OCTETSTRING_template& BroadcastAnnounce_template::reserved5() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field reserved5 of a non-specific template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return single_value->field_reserved5;
+}
+
+INTEGER_template& BroadcastAnnounce_template::pgnOfMultiPacketMessage()
+{
+set_specific();
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+const INTEGER_template& BroadcastAnnounce_template::pgnOfMultiPacketMessage() const
+{
+if (template_selection != SPECIFIC_VALUE)
+TTCN_error("Accessing field pgnOfMultiPacketMessage of a non-specific template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+return single_value->field_pgnOfMultiPacketMessage;
+}
+
+int BroadcastAnnounce_template::size_of() const
+{
+ if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.BroadcastAnnounce which has an ifpresent attribute.");
+ switch (template_selection)
+ {
+ case SPECIFIC_VALUE:
+ return 5;
+ case VALUE_LIST:
+ {
+ if (value_list.n_values<1)
+ TTCN_error("Internal error: Performing sizeof() operation on a template of type @IsobusCMMessageTypes.BroadcastAnnounce 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 @IsobusCMMessageTypes.BroadcastAnnounce containing a value list with different sizes.");
+ }
+ return item_size;
+ }
+ case OMIT_VALUE:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.BroadcastAnnounce containing omit value.");
+ case ANY_VALUE:
+ case ANY_OR_OMIT:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.BroadcastAnnounce containing */? value.");
+ case COMPLEMENTED_LIST:
+ TTCN_error("Performing sizeof() operation on a template of type @IsobusCMMessageTypes.BroadcastAnnounce containing complemented list.");
+ default:
+ TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IsobusCMMessageTypes.BroadcastAnnounce.");
+ }
+ return 0;
+}
+
+void BroadcastAnnounce_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+TTCN_Logger::log_event_str("{ ctrl := ");
+single_value->field_ctrl.log();
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+single_value->field_msgSizeInByte.log();
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log();
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log();
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log();
+TTCN_Logger::log_event_str(" }");
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void BroadcastAnnounce_template::log_match(const BroadcastAnnounce& 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_ctrl.match(match_value.ctrl(), legacy)){
+TTCN_Logger::log_logmatch_info(".ctrl");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_msgSizeInByte.match(match_value.msgSizeInByte(), legacy)){
+TTCN_Logger::log_logmatch_info(".msgSizeInByte");
+single_value->field_msgSizeInByte.log_match(match_value.msgSizeInByte(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_totalNumberOfPackets.match(match_value.totalNumberOfPackets(), legacy)){
+TTCN_Logger::log_logmatch_info(".totalNumberOfPackets");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_reserved5.match(match_value.reserved5(), legacy)){
+TTCN_Logger::log_logmatch_info(".reserved5");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::set_logmatch_buffer_len(previous_size);
+}
+if(!single_value->field_pgnOfMultiPacketMessage.match(match_value.pgnOfMultiPacketMessage(), legacy)){
+TTCN_Logger::log_logmatch_info(".pgnOfMultiPacketMessage");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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("{ ctrl := ");
+single_value->field_ctrl.log_match(match_value.ctrl(), legacy);
+TTCN_Logger::log_event_str(", msgSizeInByte := ");
+single_value->field_msgSizeInByte.log_match(match_value.msgSizeInByte(), legacy);
+TTCN_Logger::log_event_str(", totalNumberOfPackets := ");
+single_value->field_totalNumberOfPackets.log_match(match_value.totalNumberOfPackets(), legacy);
+TTCN_Logger::log_event_str(", reserved5 := ");
+single_value->field_reserved5.log_match(match_value.reserved5(), legacy);
+TTCN_Logger::log_event_str(", pgnOfMultiPacketMessage := ");
+single_value->field_pgnOfMultiPacketMessage.log_match(match_value.pgnOfMultiPacketMessage(), legacy);
+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 BroadcastAnnounce_template::encode_text(Text_Buf& text_buf) const
+{
+encode_text_base(text_buf);
+switch (template_selection) {
+case SPECIFIC_VALUE:
+single_value->field_ctrl.encode_text(text_buf);
+single_value->field_msgSizeInByte.encode_text(text_buf);
+single_value->field_totalNumberOfPackets.encode_text(text_buf);
+single_value->field_reserved5.encode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 @IsobusCMMessageTypes.BroadcastAnnounce.");
+}
+}
+
+void BroadcastAnnounce_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_ctrl.decode_text(text_buf);
+single_value->field_msgSizeInByte.decode_text(text_buf);
+single_value->field_totalNumberOfPackets.decode_text(text_buf);
+single_value->field_reserved5.decode_text(text_buf);
+single_value->field_pgnOfMultiPacketMessage.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 BroadcastAnnounce_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 @IsobusCMMessageTypes.BroadcastAnnounce.");
+}
+}
+
+void BroadcastAnnounce_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: {
+ BroadcastAnnounce_template new_temp;
+ new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size());
+ for (size_t p_i=0; p_i<param.get_size(); p_i++) {
+ new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
+ }
+ *this = new_temp;
+ break; }
+ case Module_Param::MP_Value_List:
+ if (5<param.get_size()) {
+ param.error("record template of type @IsobusCMMessageTypes.BroadcastAnnounce has 5 fields but list value has %d fields", (int)param.get_size());
+ }
+ if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ctrl().set_param(*param.get_elem(0));
+ if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) msgSizeInByte().set_param(*param.get_elem(1));
+ if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) totalNumberOfPackets().set_param(*param.get_elem(2));
+ if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) reserved5().set_param(*param.get_elem(3));
+ if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) pgnOfMultiPacketMessage().set_param(*param.get_elem(4));
+ break;
+ case Module_Param::MP_Assignment_List: {
+ Vector<bool> value_used(param.get_size());
+ value_used.resize(param.get_size(), FALSE);
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "ctrl")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ ctrl().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "msgSizeInByte")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ msgSizeInByte().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "totalNumberOfPackets")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ totalNumberOfPackets().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "reserved5")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ reserved5().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ if (!strcmp(curr_param->get_id()->get_name(), "pgnOfMultiPacketMessage")) {
+ if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
+ pgnOfMultiPacketMessage().set_param(*curr_param);
+ }
+ value_used[val_idx]=TRUE;
+ }
+ }
+ for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
+ Module_Param* const curr_param = param.get_elem(val_idx);
+ curr_param->error("Non existent field name in type @IsobusCMMessageTypes.BroadcastAnnounce: %s", curr_param->get_id()->get_name());
+ break;
+ }
+ } break;
+ default:
+ param.type_error("record template", "@IsobusCMMessageTypes.BroadcastAnnounce");
+ }
+ is_ifpresent = param.get_ifpresent();
+}
+
+void BroadcastAnnounce_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_ctrl.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.BroadcastAnnounce");
+single_value->field_msgSizeInByte.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.BroadcastAnnounce");
+single_value->field_totalNumberOfPackets.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.BroadcastAnnounce");
+single_value->field_reserved5.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.BroadcastAnnounce");
+single_value->field_pgnOfMultiPacketMessage.check_restriction(t_res, t_name ? t_name : "@IsobusCMMessageTypes.BroadcastAnnounce");
+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 : "@IsobusCMMessageTypes.BroadcastAnnounce");
+}
+
+boolean BroadcastAnnounce_template::is_present(boolean legacy) const
+{
+if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
+return !match_omit(legacy);
+}
+
+boolean BroadcastAnnounce_template::match_omit(boolean legacy) const
+{
+if (is_ifpresent) return TRUE;
+switch (template_selection) {
+case OMIT_VALUE:
+case ANY_OR_OMIT:
+return TRUE;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+if (legacy) {
+for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
+if (value_list.list_value[l_idx].match_omit())
+return template_selection==VALUE_LIST;
+return template_selection==COMPLEMENTED_LIST;
+} // else fall through
+default:
+return FALSE;
+}
+return FALSE;
+}
+
+void TP__CM::copy_value(const TP__CM& other_value)
+{
+switch (other_value.union_selection) {
+case ALT_requestToSend:
+field_requestToSend = new RequestToSend(*other_value.field_requestToSend);
+break;
+case ALT_clearToSend:
+field_clearToSend = new ClearToSend(*other_value.field_clearToSend);
+break;
+case ALT_endOfMessageAcknowledgement:
+field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement(*other_value.field_endOfMessageAcknowledgement);
+break;
+case ALT_broadcastAnnounce:
+field_broadcastAnnounce = new BroadcastAnnounce(*other_value.field_broadcastAnnounce);
+break;
+case ALT_connectionAbort:
+field_connectionAbort = new ConnectionAbort(*other_value.field_connectionAbort);
+break;
+default:
+TTCN_error("Assignment of an unbound union value of type @IsobusCMMessageTypes.TP_CM.");
+}
+union_selection = other_value.union_selection;
+}
+
+TP__CM::TP__CM()
+{
+union_selection = UNBOUND_VALUE;
+}
+
+TP__CM::TP__CM(const TP__CM& other_value)
+: Base_Type(){
+copy_value(other_value);
+}
+
+TP__CM::~TP__CM()
+{
+clean_up();
+}
+
+TP__CM& TP__CM::operator=(const TP__CM& other_value)
+{
+if (this != &other_value) {
+clean_up();
+copy_value(other_value);
+}
+return *this;
+}
+
+boolean TP__CM::operator==(const TP__CM& other_value) const
+{
+if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @IsobusCMMessageTypes.TP_CM.");
+if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @IsobusCMMessageTypes.TP_CM.");
+if (union_selection != other_value.union_selection) return FALSE;
+switch (union_selection) {
+case ALT_requestToSend:
+return *field_requestToSend == *other_value.field_requestToSend;
+case ALT_clearToSend:
+return *field_clearToSend == *other_value.field_clearToSend;
+case ALT_endOfMessageAcknowledgement:
+return *field_endOfMessageAcknowledgement == *other_value.field_endOfMessageAcknowledgement;
+case ALT_broadcastAnnounce:
+return *field_broadcastAnnounce == *other_value.field_broadcastAnnounce;
+case ALT_connectionAbort:
+return *field_connectionAbort == *other_value.field_connectionAbort;
+default:
+return FALSE;
+}
+}
+
+RequestToSend& TP__CM::requestToSend()
+{
+if (union_selection != ALT_requestToSend) {
+clean_up();
+field_requestToSend = new RequestToSend;
+union_selection = ALT_requestToSend;
+}
+return *field_requestToSend;
+}
+
+const RequestToSend& TP__CM::requestToSend() const
+{
+if (union_selection != ALT_requestToSend) TTCN_error("Using non-selected field requestToSend in a value of union type @IsobusCMMessageTypes.TP_CM.");
+return *field_requestToSend;
+}
+
+ClearToSend& TP__CM::clearToSend()
+{
+if (union_selection != ALT_clearToSend) {
+clean_up();
+field_clearToSend = new ClearToSend;
+union_selection = ALT_clearToSend;
+}
+return *field_clearToSend;
+}
+
+const ClearToSend& TP__CM::clearToSend() const
+{
+if (union_selection != ALT_clearToSend) TTCN_error("Using non-selected field clearToSend in a value of union type @IsobusCMMessageTypes.TP_CM.");
+return *field_clearToSend;
+}
+
+EndOfMessageAcknowledgement& TP__CM::endOfMessageAcknowledgement()
+{
+if (union_selection != ALT_endOfMessageAcknowledgement) {
+clean_up();
+field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement;
+union_selection = ALT_endOfMessageAcknowledgement;
+}
+return *field_endOfMessageAcknowledgement;
+}
+
+const EndOfMessageAcknowledgement& TP__CM::endOfMessageAcknowledgement() const
+{
+if (union_selection != ALT_endOfMessageAcknowledgement) TTCN_error("Using non-selected field endOfMessageAcknowledgement in a value of union type @IsobusCMMessageTypes.TP_CM.");
+return *field_endOfMessageAcknowledgement;
+}
+
+BroadcastAnnounce& TP__CM::broadcastAnnounce()
+{
+if (union_selection != ALT_broadcastAnnounce) {
+clean_up();
+field_broadcastAnnounce = new BroadcastAnnounce;
+union_selection = ALT_broadcastAnnounce;
+}
+return *field_broadcastAnnounce;
+}
+
+const BroadcastAnnounce& TP__CM::broadcastAnnounce() const
+{
+if (union_selection != ALT_broadcastAnnounce) TTCN_error("Using non-selected field broadcastAnnounce in a value of union type @IsobusCMMessageTypes.TP_CM.");
+return *field_broadcastAnnounce;
+}
+
+ConnectionAbort& TP__CM::connectionAbort()
+{
+if (union_selection != ALT_connectionAbort) {
+clean_up();
+field_connectionAbort = new ConnectionAbort;
+union_selection = ALT_connectionAbort;
+}
+return *field_connectionAbort;
+}
+
+const ConnectionAbort& TP__CM::connectionAbort() const
+{
+if (union_selection != ALT_connectionAbort) TTCN_error("Using non-selected field connectionAbort in a value of union type @IsobusCMMessageTypes.TP_CM.");
+return *field_connectionAbort;
+}
+
+boolean TP__CM::ischosen(union_selection_type checked_selection) const
+{
+if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IsobusCMMessageTypes.TP_CM.");
+return union_selection == checked_selection;
+}
+
+boolean TP__CM::is_bound() const
+{
+ return union_selection != UNBOUND_VALUE;
+}
+
+boolean TP__CM::is_value() const
+{
+switch (union_selection) {
+case UNBOUND_VALUE: return FALSE;
+case ALT_requestToSend: return field_requestToSend->is_value();
+case ALT_clearToSend: return field_clearToSend->is_value();
+case ALT_endOfMessageAcknowledgement: return field_endOfMessageAcknowledgement->is_value();
+case ALT_broadcastAnnounce: return field_broadcastAnnounce->is_value();
+case ALT_connectionAbort: return field_connectionAbort->is_value();
+default: TTCN_error("Invalid selection in union is_bound");}
+}
+
+void TP__CM::clean_up()
+{
+switch (union_selection) {
+case ALT_requestToSend:
+ delete field_requestToSend;
+ break;
+case ALT_clearToSend:
+ delete field_clearToSend;
+ break;
+case ALT_endOfMessageAcknowledgement:
+ delete field_endOfMessageAcknowledgement;
+ break;
+case ALT_broadcastAnnounce:
+ delete field_broadcastAnnounce;
+ break;
+case ALT_connectionAbort:
+ delete field_connectionAbort;
+ break;
+default:
+ break;
+}
+union_selection = UNBOUND_VALUE;
+}
+
+void TP__CM::log() const
+{
+switch (union_selection) {
+case ALT_requestToSend:
+TTCN_Logger::log_event_str("{ requestToSend := ");
+field_requestToSend->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_clearToSend:
+TTCN_Logger::log_event_str("{ clearToSend := ");
+field_clearToSend->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_endOfMessageAcknowledgement:
+TTCN_Logger::log_event_str("{ endOfMessageAcknowledgement := ");
+field_endOfMessageAcknowledgement->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_broadcastAnnounce:
+TTCN_Logger::log_event_str("{ broadcastAnnounce := ");
+field_broadcastAnnounce->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case ALT_connectionAbort:
+TTCN_Logger::log_event_str("{ connectionAbort := ");
+field_connectionAbort->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_unbound();
+}
+}
+
+void TP__CM::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, "requestToSend")) {
+ requestToSend().set_param(*mp_last);
+ if (!requestToSend().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "clearToSend")) {
+ clearToSend().set_param(*mp_last);
+ if (!clearToSend().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "endOfMessageAcknowledgement")) {
+ endOfMessageAcknowledgement().set_param(*mp_last);
+ if (!endOfMessageAcknowledgement().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "broadcastAnnounce")) {
+ broadcastAnnounce().set_param(*mp_last);
+ if (!broadcastAnnounce().is_bound()) clean_up();
+ return;
+ }
+ if (!strcmp(last_name, "connectionAbort")) {
+ connectionAbort().set_param(*mp_last);
+ if (!connectionAbort().is_bound()) clean_up();
+ return;
+ }
+ mp_last->error("Field %s does not exist in type @IsobusCMMessageTypes.TP_CM.", last_name);
+}
+
+void TP__CM::set_implicit_omit()
+{
+switch (union_selection) {
+case ALT_requestToSend:
+field_requestToSend->set_implicit_omit(); break;
+case ALT_clearToSend:
+field_clearToSend->set_implicit_omit(); break;
+case ALT_endOfMessageAcknowledgement:
+field_endOfMessageAcknowledgement->set_implicit_omit(); break;
+case ALT_broadcastAnnounce:
+field_broadcastAnnounce->set_implicit_omit(); break;
+case ALT_connectionAbort:
+field_connectionAbort->set_implicit_omit(); break;
+default: break;
+}
+}
+
+void TP__CM::encode_text(Text_Buf& text_buf) const
+{
+text_buf.push_int(union_selection);
+switch (union_selection) {
+case ALT_requestToSend:
+field_requestToSend->encode_text(text_buf);
+break;
+case ALT_clearToSend:
+field_clearToSend->encode_text(text_buf);
+break;
+case ALT_endOfMessageAcknowledgement:
+field_endOfMessageAcknowledgement->encode_text(text_buf);
+break;
+case ALT_broadcastAnnounce:
+field_broadcastAnnounce->encode_text(text_buf);
+break;
+case ALT_connectionAbort:
+field_connectionAbort->encode_text(text_buf);
+break;
+default:
+TTCN_error("Text encoder: Encoding an unbound value of union type @IsobusCMMessageTypes.TP_CM.");
+}
+}
+
+void TP__CM::decode_text(Text_Buf& text_buf)
+{
+switch ((union_selection_type)text_buf.pull_int().get_val()) {
+case ALT_requestToSend:
+requestToSend().decode_text(text_buf);
+break;
+case ALT_clearToSend:
+clearToSend().decode_text(text_buf);
+break;
+case ALT_endOfMessageAcknowledgement:
+endOfMessageAcknowledgement().decode_text(text_buf);
+break;
+case ALT_broadcastAnnounce:
+broadcastAnnounce().decode_text(text_buf);
+break;
+case ALT_connectionAbort:
+connectionAbort().decode_text(text_buf);
+break;
+default:
+TTCN_error("Text decoder: Unrecognized union selector was received for type @IsobusCMMessageTypes.TP_CM.");
+}
+}
+
+void TP__CM::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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);
+ 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 TP__CM::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t 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();
+ if(b_data[p_buf.get_len()-1]!='\0'){
+ 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);
+ 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)<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);
+}
+
+int TP__CM::RAW_decode(
+const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit,
+raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
+{
+ int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
+ limit-=prepaddlength;
+ int decoded_length=0;
+ int starting_pos=p_buf.get_pos_bit();
+ if(sel_field!=-1){
+ switch(sel_field){
+ case 0: {
+ RAW_Force_Omit field_force_omit(0, force_omit, RequestToSend_descr_.raw->forceomit);
+ decoded_length = requestToSend().RAW_decode(RequestToSend_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 1: {
+ RAW_Force_Omit field_force_omit(1, force_omit, ClearToSend_descr_.raw->forceomit);
+ decoded_length = clearToSend().RAW_decode(ClearToSend_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 2: {
+ RAW_Force_Omit field_force_omit(2, force_omit, EndOfMessageAcknowledgement_descr_.raw->forceomit);
+ decoded_length = endOfMessageAcknowledgement().RAW_decode(EndOfMessageAcknowledgement_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 3: {
+ RAW_Force_Omit field_force_omit(3, force_omit, BroadcastAnnounce_descr_.raw->forceomit);
+ decoded_length = broadcastAnnounce().RAW_decode(BroadcastAnnounce_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ case 4: {
+ RAW_Force_Omit field_force_omit(4, force_omit, ConnectionAbort_descr_.raw->forceomit);
+ decoded_length = connectionAbort().RAW_decode(ConnectionAbort_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
+ break; }
+ default: break;
+ }
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ } else {
+ boolean already_failed = FALSE;
+ already_failed = FALSE;
+ if (!already_failed) {
+ OCTETSTRING temporal_0;
+ int decoded_0_length;
+ p_buf.set_pos_bit(starting_pos + 0);
+ decoded_0_length = temporal_0.RAW_decode(RequestToSend_ctrl_descr_, p_buf, limit, top_bit_ord, TRUE);
+ if (decoded_0_length > 0) {
+ if (temporal_0 == os_0) {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_force_omit(0, force_omit, RequestToSend_descr_.raw->forceomit);
+ decoded_length = requestToSend().RAW_decode(RequestToSend_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
+ if (decoded_length > 0) {
+ if ((*field_requestToSend).ctrl() == os_0) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }else already_failed = TRUE;
+ }
+ }
+ }
+ }
+ already_failed = FALSE;
+ if (!already_failed) {
+ OCTETSTRING temporal_1;
+ int decoded_1_length;
+ p_buf.set_pos_bit(starting_pos + 0);
+ decoded_1_length = temporal_1.RAW_decode(ClearToSend_ctrl_descr_, p_buf, limit, top_bit_ord, TRUE);
+ if (decoded_1_length > 0) {
+ if (temporal_1 == os_1) {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_force_omit(1, force_omit, ClearToSend_descr_.raw->forceomit);
+ decoded_length = clearToSend().RAW_decode(ClearToSend_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
+ if (decoded_length > 0) {
+ if ((*field_clearToSend).ctrl() == os_1) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }else already_failed = TRUE;
+ }
+ }
+ }
+ }
+ already_failed = FALSE;
+ if (!already_failed) {
+ OCTETSTRING temporal_2;
+ int decoded_2_length;
+ p_buf.set_pos_bit(starting_pos + 0);
+ decoded_2_length = temporal_2.RAW_decode(EndOfMessageAcknowledgement_ctrl_descr_, p_buf, limit, top_bit_ord, TRUE);
+ if (decoded_2_length > 0) {
+ if (temporal_2 == os_2) {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_force_omit(2, force_omit, EndOfMessageAcknowledgement_descr_.raw->forceomit);
+ decoded_length = endOfMessageAcknowledgement().RAW_decode(EndOfMessageAcknowledgement_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
+ if (decoded_length > 0) {
+ if ((*field_endOfMessageAcknowledgement).ctrl() == os_2) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }else already_failed = TRUE;
+ }
+ }
+ }
+ }
+ already_failed = FALSE;
+ if (!already_failed) {
+ OCTETSTRING temporal_3;
+ int decoded_3_length;
+ p_buf.set_pos_bit(starting_pos + 0);
+ decoded_3_length = temporal_3.RAW_decode(BroadcastAnnounce_ctrl_descr_, p_buf, limit, top_bit_ord, TRUE);
+ if (decoded_3_length > 0) {
+ if (temporal_3 == os_3) {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_force_omit(3, force_omit, BroadcastAnnounce_descr_.raw->forceomit);
+ decoded_length = broadcastAnnounce().RAW_decode(BroadcastAnnounce_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
+ if (decoded_length > 0) {
+ if ((*field_broadcastAnnounce).ctrl() == os_3) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }else already_failed = TRUE;
+ }
+ }
+ }
+ }
+ already_failed = FALSE;
+ if (!already_failed) {
+ OCTETSTRING temporal_4;
+ int decoded_4_length;
+ p_buf.set_pos_bit(starting_pos + 0);
+ decoded_4_length = temporal_4.RAW_decode(ConnectionAbort_ctrl_descr_, p_buf, limit, top_bit_ord, TRUE);
+ if (decoded_4_length > 0) {
+ if (temporal_4 == os_4) {
+ p_buf.set_pos_bit(starting_pos);
+ RAW_Force_Omit field_force_omit(4, force_omit, ConnectionAbort_descr_.raw->forceomit);
+ decoded_length = connectionAbort().RAW_decode(ConnectionAbort_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
+ if (decoded_length > 0) {
+ if ((*field_connectionAbort).ctrl() == os_4) {
+ return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
+ }else already_failed = TRUE;
+ }
+ }
+ }
+ }
+ }
+ clean_up();
+ return -1;
+}
+
+int TP__CM::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
+{
+ int encoded_length = 0;
+ myleaf.isleaf = FALSE;
+ myleaf.body.node.num_of_nodes = 5; myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
+ memset(myleaf.body.node.nodes, 0, 5 * sizeof(RAW_enc_tree *));
+ switch (union_selection) {
+ case ALT_requestToSend:
+ myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, RequestToSend_descr_.raw);
+ encoded_length = field_requestToSend->RAW_encode(RequestToSend_descr_, *myleaf.body.node.nodes[0]);
+ myleaf.body.node.nodes[0]->coding_descr = &RequestToSend_descr_;
+ if ((*field_requestToSend).ctrl() != os_0) {
+ RAW_enc_tree* temp_leaf;
+ {
+ RAW_enc_tr_pos pr_pos0;
+ pr_pos0.level=myleaf.curr_pos.level+2;
+ int new_pos0[]={0,0};
+ pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
+ temp_leaf = myleaf.get_node(pr_pos0);
+ if(temp_leaf != NULL){
+ os_0.RAW_encode(RequestToSend_ctrl_descr_,*temp_leaf);
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ }
+ free_tree_pos(pr_pos0.pos);
+ }
+ }
+ break;
+ case ALT_clearToSend:
+ myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, ClearToSend_descr_.raw);
+ encoded_length = field_clearToSend->RAW_encode(ClearToSend_descr_, *myleaf.body.node.nodes[1]);
+ myleaf.body.node.nodes[1]->coding_descr = &ClearToSend_descr_;
+ if ((*field_clearToSend).ctrl() != os_1) {
+ RAW_enc_tree* temp_leaf;
+ {
+ RAW_enc_tr_pos pr_pos0;
+ pr_pos0.level=myleaf.curr_pos.level+2;
+ int new_pos0[]={1,0};
+ pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
+ temp_leaf = myleaf.get_node(pr_pos0);
+ if(temp_leaf != NULL){
+ os_1.RAW_encode(ClearToSend_ctrl_descr_,*temp_leaf);
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ }
+ free_tree_pos(pr_pos0.pos);
+ }
+ }
+ break;
+ case ALT_endOfMessageAcknowledgement:
+ myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, EndOfMessageAcknowledgement_descr_.raw);
+ encoded_length = field_endOfMessageAcknowledgement->RAW_encode(EndOfMessageAcknowledgement_descr_, *myleaf.body.node.nodes[2]);
+ myleaf.body.node.nodes[2]->coding_descr = &EndOfMessageAcknowledgement_descr_;
+ if ((*field_endOfMessageAcknowledgement).ctrl() != os_2) {
+ RAW_enc_tree* temp_leaf;
+ {
+ RAW_enc_tr_pos pr_pos0;
+ pr_pos0.level=myleaf.curr_pos.level+2;
+ int new_pos0[]={2,0};
+ pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
+ temp_leaf = myleaf.get_node(pr_pos0);
+ if(temp_leaf != NULL){
+ os_2.RAW_encode(EndOfMessageAcknowledgement_ctrl_descr_,*temp_leaf);
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ }
+ free_tree_pos(pr_pos0.pos);
+ }
+ }
+ break;
+ case ALT_broadcastAnnounce:
+ myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, BroadcastAnnounce_descr_.raw);
+ encoded_length = field_broadcastAnnounce->RAW_encode(BroadcastAnnounce_descr_, *myleaf.body.node.nodes[3]);
+ myleaf.body.node.nodes[3]->coding_descr = &BroadcastAnnounce_descr_;
+ if ((*field_broadcastAnnounce).ctrl() != os_3) {
+ RAW_enc_tree* temp_leaf;
+ {
+ RAW_enc_tr_pos pr_pos0;
+ pr_pos0.level=myleaf.curr_pos.level+2;
+ int new_pos0[]={3,0};
+ pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
+ temp_leaf = myleaf.get_node(pr_pos0);
+ if(temp_leaf != NULL){
+ os_3.RAW_encode(BroadcastAnnounce_ctrl_descr_,*temp_leaf);
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ }
+ free_tree_pos(pr_pos0.pos);
+ }
+ }
+ break;
+ case ALT_connectionAbort:
+ myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, ConnectionAbort_descr_.raw);
+ encoded_length = field_connectionAbort->RAW_encode(ConnectionAbort_descr_, *myleaf.body.node.nodes[4]);
+ myleaf.body.node.nodes[4]->coding_descr = &ConnectionAbort_descr_;
+ if ((*field_connectionAbort).ctrl() != os_4) {
+ RAW_enc_tree* temp_leaf;
+ {
+ RAW_enc_tr_pos pr_pos0;
+ pr_pos0.level=myleaf.curr_pos.level+2;
+ int new_pos0[]={4,0};
+ pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
+ temp_leaf = myleaf.get_node(pr_pos0);
+ if(temp_leaf != NULL){
+ os_4.RAW_encode(ConnectionAbort_ctrl_descr_,*temp_leaf);
+ } else {
+ TTCN_EncDec_ErrorContext::error
+ (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
+ }
+ free_tree_pos(pr_pos0.pos);
+ }
+ }
+ break;
+ default:
+ TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
+ }
+ return encoded_length;
+}
+
+void TP__CM_template::copy_value(const TP__CM& other_value)
+{
+single_value.union_selection = other_value.get_selection();
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+single_value.field_requestToSend = new RequestToSend_template(other_value.requestToSend());
+break;
+case TP__CM::ALT_clearToSend:
+single_value.field_clearToSend = new ClearToSend_template(other_value.clearToSend());
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+single_value.field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement_template(other_value.endOfMessageAcknowledgement());
+break;
+case TP__CM::ALT_broadcastAnnounce:
+single_value.field_broadcastAnnounce = new BroadcastAnnounce_template(other_value.broadcastAnnounce());
+break;
+case TP__CM::ALT_connectionAbort:
+single_value.field_connectionAbort = new ConnectionAbort_template(other_value.connectionAbort());
+break;
+default:
+TTCN_error("Initializing a template with an unbound value of type @IsobusCMMessageTypes.TP_CM.");
+}
+set_selection(SPECIFIC_VALUE);
+}
+
+void TP__CM_template::copy_template(const TP__CM_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 TP__CM::ALT_requestToSend:
+single_value.field_requestToSend = new RequestToSend_template(*other_value.single_value.field_requestToSend);
+break;
+case TP__CM::ALT_clearToSend:
+single_value.field_clearToSend = new ClearToSend_template(*other_value.single_value.field_clearToSend);
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+single_value.field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement_template(*other_value.single_value.field_endOfMessageAcknowledgement);
+break;
+case TP__CM::ALT_broadcastAnnounce:
+single_value.field_broadcastAnnounce = new BroadcastAnnounce_template(*other_value.single_value.field_broadcastAnnounce);
+break;
+case TP__CM::ALT_connectionAbort:
+single_value.field_connectionAbort = new ConnectionAbort_template(*other_value.single_value.field_connectionAbort);
+break;
+default:
+TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @IsobusCMMessageTypes.TP_CM.");
+}
+case OMIT_VALUE:
+case ANY_VALUE:
+case ANY_OR_OMIT:
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+value_list.n_values = other_value.value_list.n_values;
+value_list.list_value = new TP__CM_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;
+default:
+TTCN_error("Copying an uninitialized template of union type @IsobusCMMessageTypes.TP_CM.");
+}
+set_selection(other_value);
+}
+
+TP__CM_template::TP__CM_template()
+{
+}
+
+TP__CM_template::TP__CM_template(template_sel other_value)
+ : Base_Template(other_value)
+{
+check_single_selection(other_value);
+}
+
+TP__CM_template::TP__CM_template(const TP__CM& other_value)
+{
+copy_value(other_value);
+}
+
+TP__CM_template::TP__CM_template(const OPTIONAL<TP__CM>& other_value)
+{
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const TP__CM&)other_value);
+break;
+case OPTIONAL_OMIT:
+set_selection(OMIT_VALUE);
+break;
+default:
+TTCN_error("Creating a template of union type @IsobusCMMessageTypes.TP_CM from an unbound optional field.");
+}
+}
+
+TP__CM_template::TP__CM_template(const TP__CM_template& other_value)
+: Base_Template(){
+copy_template(other_value);
+}
+
+TP__CM_template::~TP__CM_template()
+{
+clean_up();
+}
+
+void TP__CM_template::clean_up()
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+delete single_value.field_requestToSend;
+break;
+case TP__CM::ALT_clearToSend:
+delete single_value.field_clearToSend;
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+delete single_value.field_endOfMessageAcknowledgement;
+break;
+case TP__CM::ALT_broadcastAnnounce:
+delete single_value.field_broadcastAnnounce;
+break;
+case TP__CM::ALT_connectionAbort:
+delete single_value.field_connectionAbort;
+default:
+break;
+}
+break;
+case VALUE_LIST:
+case COMPLEMENTED_LIST:
+delete [] value_list.list_value;
+default:
+break;
+}
+template_selection = UNINITIALIZED_TEMPLATE;
+}
+
+TP__CM_template& TP__CM_template::operator=(template_sel other_value)
+{
+check_single_selection(other_value);
+clean_up();
+set_selection(other_value);
+return *this;
+}
+
+TP__CM_template& TP__CM_template::operator=(const TP__CM& other_value)
+{
+clean_up();
+copy_value(other_value);
+return *this;
+}
+
+TP__CM_template& TP__CM_template::operator=(const OPTIONAL<TP__CM>& other_value)
+{
+clean_up();
+switch (other_value.get_selection()) {
+case OPTIONAL_PRESENT:
+copy_value((const TP__CM&)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 @IsobusCMMessageTypes.TP_CM.");
+}
+return *this;
+}
+
+TP__CM_template& TP__CM_template::operator=(const TP__CM_template& other_value)
+{
+if (&other_value != this) {
+clean_up();
+copy_template(other_value);
+}
+return *this;
+}
+
+boolean TP__CM_template::match(const TP__CM& 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:
+{
+TP__CM::union_selection_type value_selection = other_value.get_selection();
+if (value_selection == TP__CM::UNBOUND_VALUE) return FALSE;
+if (value_selection != single_value.union_selection) return FALSE;
+switch (value_selection) {
+case TP__CM::ALT_requestToSend:
+return single_value.field_requestToSend->match(other_value.requestToSend(), legacy);
+case TP__CM::ALT_clearToSend:
+return single_value.field_clearToSend->match(other_value.clearToSend(), legacy);
+case TP__CM::ALT_endOfMessageAcknowledgement:
+return single_value.field_endOfMessageAcknowledgement->match(other_value.endOfMessageAcknowledgement(), legacy);
+case TP__CM::ALT_broadcastAnnounce:
+return single_value.field_broadcastAnnounce->match(other_value.broadcastAnnounce(), legacy);
+case TP__CM::ALT_connectionAbort:
+return single_value.field_connectionAbort->match(other_value.connectionAbort(), legacy);
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @IsobusCMMessageTypes.TP_CM.");
+}
+}
+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;
+default:
+TTCN_error ("Matching an uninitialized template of union type @IsobusCMMessageTypes.TP_CM.");
+}
+return FALSE;
+}
+
+boolean TP__CM_template::is_value() const
+{
+if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+return single_value.field_requestToSend->is_value();
+case TP__CM::ALT_clearToSend:
+return single_value.field_clearToSend->is_value();
+case TP__CM::ALT_endOfMessageAcknowledgement:
+return single_value.field_endOfMessageAcknowledgement->is_value();
+case TP__CM::ALT_broadcastAnnounce:
+return single_value.field_broadcastAnnounce->is_value();
+case TP__CM::ALT_connectionAbort:
+return single_value.field_connectionAbort->is_value();
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @IsobusCMMessageTypes.TP_CM.");
+}
+}
+
+TP__CM TP__CM_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 @IsobusCMMessageTypes.TP_CM.");
+TP__CM ret_val;
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+ret_val.requestToSend() = single_value.field_requestToSend->valueof();
+break;
+case TP__CM::ALT_clearToSend:
+ret_val.clearToSend() = single_value.field_clearToSend->valueof();
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+ret_val.endOfMessageAcknowledgement() = single_value.field_endOfMessageAcknowledgement->valueof();
+break;
+case TP__CM::ALT_broadcastAnnounce:
+ret_val.broadcastAnnounce() = single_value.field_broadcastAnnounce->valueof();
+break;
+case TP__CM::ALT_connectionAbort:
+ret_val.connectionAbort() = single_value.field_connectionAbort->valueof();
+break;
+default:
+TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @IsobusCMMessageTypes.TP_CM.");
+}
+return ret_val;
+}
+
+TP__CM_template& TP__CM_template::list_item(unsigned int list_index) const
+{
+if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @IsobusCMMessageTypes.TP_CM.");
+if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @IsobusCMMessageTypes.TP_CM.");
+return value_list.list_value[list_index];
+}
+void TP__CM_template::set_type(template_sel template_type, unsigned int list_length)
+{
+if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST) TTCN_error ("Internal error: Setting an invalid list for a template of union type @IsobusCMMessageTypes.TP_CM.");
+clean_up();
+set_selection(template_type);
+value_list.n_values = list_length;
+value_list.list_value = new TP__CM_template[list_length];
+}
+
+RequestToSend_template& TP__CM_template::requestToSend()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != TP__CM::ALT_requestToSend) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestToSend = new RequestToSend_template(ANY_VALUE);
+else single_value.field_requestToSend = new RequestToSend_template;
+single_value.union_selection = TP__CM::ALT_requestToSend;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_requestToSend;
+}
+
+const RequestToSend_template& TP__CM_template::requestToSend() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestToSend in a non-specific template of union type @IsobusCMMessageTypes.TP_CM.");
+if (single_value.union_selection != TP__CM::ALT_requestToSend) TTCN_error("Accessing non-selected field requestToSend in a template of union type @IsobusCMMessageTypes.TP_CM.");
+return *single_value.field_requestToSend;
+}
+
+ClearToSend_template& TP__CM_template::clearToSend()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != TP__CM::ALT_clearToSend) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_clearToSend = new ClearToSend_template(ANY_VALUE);
+else single_value.field_clearToSend = new ClearToSend_template;
+single_value.union_selection = TP__CM::ALT_clearToSend;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_clearToSend;
+}
+
+const ClearToSend_template& TP__CM_template::clearToSend() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field clearToSend in a non-specific template of union type @IsobusCMMessageTypes.TP_CM.");
+if (single_value.union_selection != TP__CM::ALT_clearToSend) TTCN_error("Accessing non-selected field clearToSend in a template of union type @IsobusCMMessageTypes.TP_CM.");
+return *single_value.field_clearToSend;
+}
+
+EndOfMessageAcknowledgement_template& TP__CM_template::endOfMessageAcknowledgement()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != TP__CM::ALT_endOfMessageAcknowledgement) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement_template(ANY_VALUE);
+else single_value.field_endOfMessageAcknowledgement = new EndOfMessageAcknowledgement_template;
+single_value.union_selection = TP__CM::ALT_endOfMessageAcknowledgement;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_endOfMessageAcknowledgement;
+}
+
+const EndOfMessageAcknowledgement_template& TP__CM_template::endOfMessageAcknowledgement() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field endOfMessageAcknowledgement in a non-specific template of union type @IsobusCMMessageTypes.TP_CM.");
+if (single_value.union_selection != TP__CM::ALT_endOfMessageAcknowledgement) TTCN_error("Accessing non-selected field endOfMessageAcknowledgement in a template of union type @IsobusCMMessageTypes.TP_CM.");
+return *single_value.field_endOfMessageAcknowledgement;
+}
+
+BroadcastAnnounce_template& TP__CM_template::broadcastAnnounce()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != TP__CM::ALT_broadcastAnnounce) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_broadcastAnnounce = new BroadcastAnnounce_template(ANY_VALUE);
+else single_value.field_broadcastAnnounce = new BroadcastAnnounce_template;
+single_value.union_selection = TP__CM::ALT_broadcastAnnounce;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_broadcastAnnounce;
+}
+
+const BroadcastAnnounce_template& TP__CM_template::broadcastAnnounce() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field broadcastAnnounce in a non-specific template of union type @IsobusCMMessageTypes.TP_CM.");
+if (single_value.union_selection != TP__CM::ALT_broadcastAnnounce) TTCN_error("Accessing non-selected field broadcastAnnounce in a template of union type @IsobusCMMessageTypes.TP_CM.");
+return *single_value.field_broadcastAnnounce;
+}
+
+ConnectionAbort_template& TP__CM_template::connectionAbort()
+{
+if (template_selection != SPECIFIC_VALUE || single_value.union_selection != TP__CM::ALT_connectionAbort) {
+template_sel old_selection = template_selection;
+clean_up();
+if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_connectionAbort = new ConnectionAbort_template(ANY_VALUE);
+else single_value.field_connectionAbort = new ConnectionAbort_template;
+single_value.union_selection = TP__CM::ALT_connectionAbort;
+set_selection(SPECIFIC_VALUE);
+}
+return *single_value.field_connectionAbort;
+}
+
+const ConnectionAbort_template& TP__CM_template::connectionAbort() const
+{
+if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field connectionAbort in a non-specific template of union type @IsobusCMMessageTypes.TP_CM.");
+if (single_value.union_selection != TP__CM::ALT_connectionAbort) TTCN_error("Accessing non-selected field connectionAbort in a template of union type @IsobusCMMessageTypes.TP_CM.");
+return *single_value.field_connectionAbort;
+}
+
+boolean TP__CM_template::ischosen(TP__CM::union_selection_type checked_selection) const
+{
+if (checked_selection == TP__CM::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IsobusCMMessageTypes.TP_CM.");
+switch (template_selection) {
+case SPECIFIC_VALUE:
+if (single_value.union_selection == TP__CM::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @IsobusCMMessageTypes.TP_CM.");
+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 @IsobusCMMessageTypes.TP_CM 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 TP__CM_template::log() const
+{
+switch (template_selection) {
+case SPECIFIC_VALUE:
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+TTCN_Logger::log_event_str("{ requestToSend := ");
+single_value.field_requestToSend->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case TP__CM::ALT_clearToSend:
+TTCN_Logger::log_event_str("{ clearToSend := ");
+single_value.field_clearToSend->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+TTCN_Logger::log_event_str("{ endOfMessageAcknowledgement := ");
+single_value.field_endOfMessageAcknowledgement->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case TP__CM::ALT_broadcastAnnounce:
+TTCN_Logger::log_event_str("{ broadcastAnnounce := ");
+single_value.field_broadcastAnnounce->log();
+TTCN_Logger::log_event_str(" }");
+break;
+case TP__CM::ALT_connectionAbort:
+TTCN_Logger::log_event_str("{ connectionAbort := ");
+single_value.field_connectionAbort->log();
+TTCN_Logger::log_event_str(" }");
+break;
+default:
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+break;
+case COMPLEMENTED_LIST:
+TTCN_Logger::log_event_str("complement");
+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;
+default:
+log_generic();
+}
+log_ifpresent();
+}
+
+void TP__CM_template::log_match(const TP__CM& 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()) {
+switch (single_value.union_selection) {
+case TP__CM::ALT_requestToSend:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".requestToSend");
+single_value.field_requestToSend->log_match(match_value.requestToSend(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ requestToSend := ");
+single_value.field_requestToSend->log_match(match_value.requestToSend(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case TP__CM::ALT_clearToSend:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".clearToSend");
+single_value.field_clearToSend->log_match(match_value.clearToSend(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ clearToSend := ");
+single_value.field_clearToSend->log_match(match_value.clearToSend(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".endOfMessageAcknowledgement");
+single_value.field_endOfMessageAcknowledgement->log_match(match_value.endOfMessageAcknowledgement(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ endOfMessageAcknowledgement := ");
+single_value.field_endOfMessageAcknowledgement->log_match(match_value.endOfMessageAcknowledgement(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case TP__CM::ALT_broadcastAnnounce:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".broadcastAnnounce");
+single_value.field_broadcastAnnounce->log_match(match_value.broadcastAnnounce(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ broadcastAnnounce := ");
+single_value.field_broadcastAnnounce->log_match(match_value.broadcastAnnounce(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+case TP__CM::ALT_connectionAbort:
+if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
+TTCN_Logger::log_logmatch_info(".connectionAbort");
+single_value.field_connectionAbort->log_match(match_value.connectionAbort(), legacy);
+} else {
+TTCN_Logger::log_event_str("{ connectionAbort := ");
+single_value.field_connectionAbort->log_match(match_value.connectionAbort(), legacy);
+TTCN_Logger::log_event_str(" }");
+}
+break;
+default:
+TTCN_Logger::print_logmatch_buffer();
+TTCN_Logger::log_event_str("<invalid selector>");
+}
+} 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 TP__CM_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 TP__CM::ALT_requestToSend:
+single_value.field_requestToSend->encode_text(text_buf);
+break;
+case TP__CM::ALT_clearToSend:
+single_value.field_clearToSend->encode_text(text_buf);
+break;
+case TP__CM::ALT_endOfMessageAcknowledgement:
+single_value.field_endOfMessageAcknowledgement->encode_text(text_buf);
+break;
+case TP__CM::ALT_broadcastAnn