blob: 282c7192cbbf3c2ee10143605bd34d25b2c3f810 [file] [log] [blame]
// 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 "SocketCAN_RAW_test.hh"
namespace SocketCAN__RAW__test {
/* Prototypes of static functions */
static void pre_init_module();
static void post_init_module();
/* Literal string constants */
static const unsigned char bs_2_bits[] = { 0, 0, 0, 0 },
bs_1_bits[] = { 0, 0, 0, 130 },
bs_0_bits[] = { 85 };
static const BITSTRING bs_2(32, bs_2_bits),
bs_1(32, bs_1_bits),
bs_0(8, bs_0_bits);
static const unsigned char os_0_octets[] = { 0, 0, 0, 21 },
os_3_octets[] = { 0, 0, 1, 35 },
os_5_octets[] = { 0, 0, 2, 0 },
os_6_octets[] = { 0, 0, 7, 0 },
os_1_octets[] = { 1, 35, 69, 103, 137, 171, 205, 239 },
os_2_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_7_octets[] = { 146, 52, 86, 120 },
os_4_octets[] = { 192, 0, 7, 255 },
os_8_octets[] = { 223, 255, 255, 255 };
static const OCTETSTRING os_0(4, os_0_octets),
os_3(4, os_3_octets),
os_5(4, os_5_octets),
os_6(4, os_6_octets),
os_1(8, os_1_octets),
os_2(64, os_2_octets),
os_7(4, os_7_octets),
os_4(4, os_4_octets),
os_8(4, os_8_octets);
static const unsigned char module_checksum[] = { 0x08, 0x1f, 0xf2, 0x31, 0x93, 0x24, 0x77, 0x53, 0x50, 0x24, 0x7d, 0xf1, 0x61, 0x86, 0x2d, 0xe5 };
/* Global variable definitions */
TTCN_Module module_object("SocketCAN_RAW_test", __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 */
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("SocketCAN_RAW_test.ttcn", 25, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_send_and_receive_can_frame");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_send_and_receive_can_frame", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(26);
#line 26 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawSendInitiator(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawSendInitiator", NULL, TRUE));
current_location.update_lineno(27);
#line 27 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawFrameReceiver(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC2_ptc_rawFrameReceiver", NULL, TRUE));
current_location.update_lineno(29);
#line 29 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawSendInitiator, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(30);
#line 30 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawFrameReceiver, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(31);
#line 31 "SocketCAN_RAW_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(32);
#line 32 "SocketCAN_RAW_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(34);
#line 34 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__frame__to__send;
current_location.update_lineno(35);
#line 35 "SocketCAN_RAW_test.ttcn"
{
Can::CAN__frame& tmp_1 = v__frame__to__send.can__frame();
tmp_1.can__id() = os_0;
tmp_1.can__pdu() = os_1;
}
current_location.update_lineno(40);
#line 40 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__ptc__RawSendInitiator(v__ptc__rawSendInitiator, SocketCANtest::e__Phase::e__testbody1, v__frame__to__send);
current_location.update_lineno(41);
#line 41 "SocketCAN_RAW_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(43);
#line 43 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(45);
#line 45 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(45);
#line 45 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(45);
#line 45 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(46);
#line 46 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(47);
#line 47 "SocketCAN_RAW_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(48);
#line 48 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(45);
#line 45 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(51);
#line 51 "SocketCAN_RAW_test.ttcn"
{
tmp_4:
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_4;
}
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_4;
}
current_location.update_lineno(51);
#line 51 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 51.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(52);
#line 52 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(54);
#line 54 "SocketCAN_RAW_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(55);
#line 55 "SocketCAN_RAW_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(57);
#line 57 "SocketCAN_RAW_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("SocketCAN_RAW_test.ttcn", 60, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_send_and_receive_canfd_frame");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_send_and_receive_canfd_frame", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(61);
#line 61 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawSendInitiator(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawSendInitiator", NULL, TRUE));
current_location.update_lineno(62);
#line 62 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawFrameReceiver(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC2_ptc_rawFrameReceiver", NULL, TRUE));
current_location.update_lineno(65);
#line 65 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawSendInitiator, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(66);
#line 66 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawFrameReceiver, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(68);
#line 68 "SocketCAN_RAW_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(69);
#line 69 "SocketCAN_RAW_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(71);
#line 71 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__CAN__or__CAN__FD__frame v__canfd__frame__to__send;
current_location.update_lineno(72);
#line 72 "SocketCAN_RAW_test.ttcn"
{
Can::CANFD__frame& tmp_6 = v__canfd__frame__to__send.canfd__frame();
tmp_6.can__id() = os_0;
tmp_6.can__flags() = bs_0;
tmp_6.can__pdu() = os_2;
}
current_location.update_lineno(78);
#line 78 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__ptc__RawSendInitiator(v__ptc__rawSendInitiator, SocketCANtest::e__Phase::e__testbody2, v__canfd__frame__to__send);
current_location.update_lineno(79);
#line 79 "SocketCAN_RAW_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(81);
#line 81 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(83);
#line 83 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(83);
#line 83 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(83);
#line 83 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(84);
#line 84 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(85);
#line 85 "SocketCAN_RAW_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(86);
#line 86 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(83);
#line 83 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(89);
#line 89 "SocketCAN_RAW_test.ttcn"
{
tmp_9:
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_9;
}
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_9;
}
current_location.update_lineno(89);
#line 89 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 89.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(90);
#line 90 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(93);
#line 93 "SocketCAN_RAW_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(94);
#line 94 "SocketCAN_RAW_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(96);
#line 96 "SocketCAN_RAW_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();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__FILTER(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 99, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_FILTER");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_FILTER", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(101);
#line 101 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawSetFilters(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawSetFilters", NULL, TRUE));
current_location.update_lineno(102);
#line 102 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateFilters(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateFilters", NULL, TRUE));
current_location.update_lineno(104);
#line 104 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawSetFilters, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(105);
#line 105 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateFilters, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(106);
#line 106 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSetFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(107);
#line 107 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(110);
#line 110 "SocketCAN_RAW_test.ttcn"
Raw::CAN__RAW__filter c__rfilter0;
c__rfilter0.can__id() = os_3;
c__rfilter0.can__mask() = os_4;
current_location.update_lineno(113);
#line 113 "SocketCAN_RAW_test.ttcn"
Raw::CAN__RAW__filter c__rfilter1;
c__rfilter1.can__id() = os_5;
c__rfilter1.can__mask() = os_6;
current_location.update_lineno(116);
#line 116 "SocketCAN_RAW_test.ttcn"
Raw::CAN__RAW__filter c__rfilter2;
c__rfilter2.can__id() = os_7;
c__rfilter2.can__mask() = os_8;
current_location.update_lineno(119);
#line 119 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__filters;
{
SocketCAN__Types::CAN__RAW__filters& tmp_10 = c__commandu__activate__filters.rfilter();
tmp_10.set_size(3);
tmp_10[0] = c__rfilter0;
tmp_10[1] = c__rfilter1;
tmp_10[2] = c__rfilter2;
}
current_location.update_lineno(120);
#line 120 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__filters;
c__commandu__deactivate__filters.rfilter() = NULL_VALUE;
current_location.update_lineno(123);
#line 123 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawSetFilters, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__filters);
current_location.update_lineno(126);
#line 126 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateFilters, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__filters);
current_location.update_lineno(128);
#line 128 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(130);
#line 130 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(130);
#line 130 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(130);
#line 130 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(131);
#line 131 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(132);
#line 132 "SocketCAN_RAW_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(133);
#line 133 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(130);
#line 130 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(136);
#line 136 "SocketCAN_RAW_test.ttcn"
{
tmp_13:
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_13;
}
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_13;
}
current_location.update_lineno(136);
#line 136 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 136.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(137);
#line 137 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(139);
#line 139 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawSetFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(140);
#line 140 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(142);
#line 142 "SocketCAN_RAW_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_setsockopt_CAN_RAW_FILTER was stopped.");
}
return TTCN_Runtime::end_testcase();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__ERR__FILTER(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 145, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(147);
#line 147 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawActivateErrorMask(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawActivateErrorMask", NULL, TRUE));
current_location.update_lineno(148);
#line 148 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateErrorMask(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateErrorMask", NULL, TRUE));
current_location.update_lineno(150);
#line 150 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawActivateErrorMask, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(151);
#line 151 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateErrorMask, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(152);
#line 152 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateErrorMask, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(153);
#line 153 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateErrorMask, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(155);
#line 155 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__err__mask;
c__commandu__activate__err__mask.err__mask() = bs_1;
current_location.update_lineno(156);
#line 156 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__err__mask;
c__commandu__deactivate__err__mask.err__mask() = bs_2;
current_location.update_lineno(159);
#line 159 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawActivateErrorMask, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__err__mask);
current_location.update_lineno(162);
#line 162 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateErrorMask, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__err__mask);
current_location.update_lineno(164);
#line 164 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(166);
#line 166 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(166);
#line 166 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(166);
#line 166 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(167);
#line 167 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(168);
#line 168 "SocketCAN_RAW_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(169);
#line 169 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(166);
#line 166 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(172);
#line 172 "SocketCAN_RAW_test.ttcn"
{
tmp_16:
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_16;
}
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_16;
}
current_location.update_lineno(172);
#line 172 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 172.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(173);
#line 173 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(175);
#line 175 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateErrorMask, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(176);
#line 176 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateErrorMask, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(178);
#line 178 "SocketCAN_RAW_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_setsockopt_CAN_RAW_ERR_FILTER was stopped.");
}
return TTCN_Runtime::end_testcase();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__LOOPBACK(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 181, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_LOOPBACK");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_LOOPBACK", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(183);
#line 183 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawActivateLoopback(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawActivateLoopback", NULL, TRUE));
current_location.update_lineno(184);
#line 184 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateLoopback(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateLoopback", NULL, TRUE));
current_location.update_lineno(186);
#line 186 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawActivateLoopback, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(187);
#line 187 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateLoopback, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(188);
#line 188 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateLoopback, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(189);
#line 189 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateLoopback, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(191);
#line 191 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__loopback;
c__commandu__activate__loopback.loopback() = Raw::DisableEnable__enum::Enable;
current_location.update_lineno(192);
#line 192 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__loopback;
c__commandu__deactivate__loopback.loopback() = Raw::DisableEnable__enum::Disable;
current_location.update_lineno(195);
#line 195 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawActivateLoopback, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__loopback);
current_location.update_lineno(198);
#line 198 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateLoopback, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__loopback);
current_location.update_lineno(200);
#line 200 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(202);
#line 202 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(202);
#line 202 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(202);
#line 202 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(203);
#line 203 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(204);
#line 204 "SocketCAN_RAW_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(205);
#line 205 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(202);
#line 202 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(208);
#line 208 "SocketCAN_RAW_test.ttcn"
{
tmp_19:
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_19;
}
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_19;
}
current_location.update_lineno(208);
#line 208 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 208.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(209);
#line 209 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(211);
#line 211 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateLoopback, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(212);
#line 212 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateLoopback, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(214);
#line 214 "SocketCAN_RAW_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_setsockopt_CAN_RAW_LOOPBACK was stopped.");
}
return TTCN_Runtime::end_testcase();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__RECV__OWN__MSGS(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 217, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(219);
#line 219 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawActivateReceiveOwnMessages(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawActivateReceiveOwnMessages", NULL, TRUE));
current_location.update_lineno(220);
#line 220 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateReceiveOwnMessages(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateReceiveOwnMessages", NULL, TRUE));
current_location.update_lineno(222);
#line 222 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawActivateReceiveOwnMessages, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(223);
#line 223 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateReceiveOwnMessages, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(224);
#line 224 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateReceiveOwnMessages, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(225);
#line 225 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateReceiveOwnMessages, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(227);
#line 227 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__ReceiveOwnMessages;
c__commandu__activate__ReceiveOwnMessages.recv__own__msgs() = Raw::DisableEnable__enum::Enable;
current_location.update_lineno(228);
#line 228 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__ReceiveOwnMessages;
c__commandu__deactivate__ReceiveOwnMessages.recv__own__msgs() = Raw::DisableEnable__enum::Disable;
current_location.update_lineno(231);
#line 231 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawActivateReceiveOwnMessages, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__ReceiveOwnMessages);
current_location.update_lineno(234);
#line 234 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateReceiveOwnMessages, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__ReceiveOwnMessages);
current_location.update_lineno(236);
#line 236 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(238);
#line 238 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(238);
#line 238 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(238);
#line 238 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(239);
#line 239 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(240);
#line 240 "SocketCAN_RAW_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(241);
#line 241 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(238);
#line 238 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(244);
#line 244 "SocketCAN_RAW_test.ttcn"
{
tmp_22:
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_22;
}
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_22;
}
current_location.update_lineno(244);
#line 244 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 244.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(245);
#line 245 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(247);
#line 247 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateReceiveOwnMessages, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(248);
#line 248 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateReceiveOwnMessages, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(250);
#line 250 "SocketCAN_RAW_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_setsockopt_CAN_RAW_RECV_OWN_MSGS was stopped.");
}
return TTCN_Runtime::end_testcase();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__FD__FRAMES(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 253, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(255);
#line 255 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawActivateFD__Frames(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawActivateFD_Frames", NULL, TRUE));
current_location.update_lineno(256);
#line 256 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateFD__Frames(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateFD_Frames", NULL, TRUE));
current_location.update_lineno(258);
#line 258 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawActivateFD__Frames, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(259);
#line 259 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateFD__Frames, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(260);
#line 260 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateFD__Frames, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(261);
#line 261 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateFD__Frames, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(263);
#line 263 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__FD__Frames;
c__commandu__activate__FD__Frames.fd__frames() = Raw::DisableEnable__enum::Enable;
current_location.update_lineno(264);
#line 264 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__FD__Frames;
c__commandu__deactivate__FD__Frames.fd__frames() = Raw::DisableEnable__enum::Disable;
current_location.update_lineno(267);
#line 267 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawActivateFD__Frames, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__FD__Frames);
current_location.update_lineno(270);
#line 270 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateFD__Frames, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__FD__Frames);
current_location.update_lineno(272);
#line 272 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(274);
#line 274 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(274);
#line 274 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(274);
#line 274 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(275);
#line 275 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(276);
#line 276 "SocketCAN_RAW_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(277);
#line 277 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(274);
#line 274 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(280);
#line 280 "SocketCAN_RAW_test.ttcn"
{
tmp_25:
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_25;
}
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_25;
}
current_location.update_lineno(280);
#line 280 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 280.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(281);
#line 281 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(283);
#line 283 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateFD__Frames, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(284);
#line 284 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateFD__Frames, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(286);
#line 286 "SocketCAN_RAW_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_setsockopt_CAN_RAW_FD_FRAMES was stopped.");
}
return TTCN_Runtime::end_testcase();
}
verdicttype testcase_tc__can__raw__setsockopt__CAN__RAW__JOIN__FILTERS(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 289, TTCN_Location::LOCATION_TESTCASE, "tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS");
try {
TTCN_Runtime::begin_testcase("SocketCAN_RAW_test", "tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS", "SocketCANtest", "MTC", "SocketCANtest", "MTC", has_timer, timer_value);
current_location.update_lineno(291);
#line 291 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawActivateJoinFilters(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawActivateJoinFilters", NULL, TRUE));
current_location.update_lineno(292);
#line 292 "SocketCAN_RAW_test.ttcn"
COMPONENT v__ptc__rawDeactivateJoinFilters(TTCN_Runtime::create_component("SocketCANtest", "PTC", "PTC1_ptc_rawDeactivateJoinFilters", NULL, TRUE));
current_location.update_lineno(294);
#line 294 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawActivateJoinFilters, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(295);
#line 295 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__addSyncSlaveSet(v__ptc__rawDeactivateJoinFilters, SocketCANtest::MTC_component_v__PTCSet);
current_location.update_lineno(296);
#line 296 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateJoinFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(297);
#line 297 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::connect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateJoinFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(299);
#line 299 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__activate__JoinFilters;
c__commandu__activate__JoinFilters.join__filters() = Raw::DisableEnable__enum::Enable;
current_location.update_lineno(300);
#line 300 "SocketCAN_RAW_test.ttcn"
SocketCAN__Types::SocketCAN__setsockopt__commandu c__commandu__deactivate__JoinFilters;
c__commandu__deactivate__JoinFilters.join__filters() = Raw::DisableEnable__enum::Disable;
current_location.update_lineno(303);
#line 303 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawActivateJoinFilters, SocketCANtest::e__Phase::e__testbody1, c__commandu__activate__JoinFilters);
current_location.update_lineno(306);
#line 306 "SocketCAN_RAW_test.ttcn"
SocketCANtest::start_f__raw__setsockopt(v__ptc__rawDeactivateJoinFilters, SocketCANtest::e__Phase::e__testbody3, c__commandu__deactivate__JoinFilters);
current_location.update_lineno(308);
#line 308 "SocketCAN_RAW_test.ttcn"
SocketCANtest::e__Phase v__phase;
current_location.update_lineno(310);
#line 310 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::c__firstPhase;
current_location.update_lineno(310);
#line 310 "SocketCAN_RAW_test.ttcn"
for ( ; ; ) {
current_location.update_lineno(310);
#line 310 "SocketCAN_RAW_test.ttcn"
if (!(v__phase < SocketCANtest::e__Phase::e__testcase__complete)) break;
current_location.update_lineno(311);
#line 311 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__startPhase(v__phase);
current_location.update_lineno(312);
#line 312 "SocketCAN_RAW_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(313);
#line 313 "SocketCAN_RAW_test.ttcn"
SocketCANtest::f__awaitEndPhase(v__phase);
current_location.update_lineno(310);
#line 310 "SocketCAN_RAW_test.ttcn"
v__phase = SocketCANtest::f__incMTCPhase(v__phase);
}
current_location.update_lineno(316);
#line 316 "SocketCAN_RAW_test.ttcn"
{
tmp_28:
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_28;
}
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_28;
}
current_location.update_lineno(316);
#line 316 "SocketCAN_RAW_test.ttcn"
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file SocketCAN_RAW_test.ttcn, line 316.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(317);
#line 317 "SocketCAN_RAW_test.ttcn"
TTCN_Logger::log_str(TTCN_USER, "MTC done");
current_location.update_lineno(319);
#line 319 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawActivateJoinFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(320);
#line 320 "SocketCAN_RAW_test.ttcn"
TTCN_Runtime::disconnect_port(MTC_COMPREF, SocketCANtest::MTC_component_pt__sync.get_name(), v__ptc__rawDeactivateJoinFilters, SocketCANtest::PTC_component_pt__sync.get_name());
current_location.update_lineno(322);
#line 322 "SocketCAN_RAW_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_setsockopt_CAN_RAW_JOIN_FILTERS was stopped.");
}
return TTCN_Runtime::end_testcase();
}
/* Bodies of static functions */
static void pre_init_module()
{
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "SocketCAN_RAW_test");
SocketCANtest::module_object.pre_init_module();
CanError::module_object.pre_init_module();
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);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_FILTER", testcase_tc__can__raw__setsockopt__CAN__RAW__FILTER);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER", testcase_tc__can__raw__setsockopt__CAN__RAW__ERR__FILTER);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_LOOPBACK", testcase_tc__can__raw__setsockopt__CAN__RAW__LOOPBACK);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS", testcase_tc__can__raw__setsockopt__CAN__RAW__RECV__OWN__MSGS);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES", testcase_tc__can__raw__setsockopt__CAN__RAW__FD__FRAMES);
module_object.add_testcase_nonpard("tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS", testcase_tc__can__raw__setsockopt__CAN__RAW__JOIN__FILTERS);
}
static void post_init_module()
{
TTCN_Location current_location("SocketCAN_RAW_test.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "SocketCAN_RAW_test");
SocketCANtest::module_object.post_init_module();
CanError::module_object.post_init_module();
}
} /* end of namespace */