Commit 7f806518 authored by Elemer Lelik's avatar Elemer Lelik
Browse files

can_id changed to octetstring

parent 94c9b6d7
############################################################################## ##############################################################################
# Copyright (c) 2010, 2016 Ericsson AB # Copyright (c) 2010, 2016 Ericsson AB
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html # http://www.eclipse.org/legal/epl-v10.html
# #
# Contributors: # Contributors:
# Michael Josenhans # Michael Josenhans
############################################################################## ##############################################################################
// Revision R1A
[LOGGING] [LOGGING]
FileMask := LOG_ALL FileMask := LOG_ALL
ConsoleMask := LOG_ALL ConsoleMask := LOG_ALL
LogSourceInfo := Yes LogSourceInfo := Yes
SourceInfoFormat:= Single // Single or Stack SourceInfoFormat:= Single // Single or Stack
LogEntityName:= Yes LogEntityName:= Yes
LogEventTypes:= Yes LogEventTypes:= Yes
[TESTPORT_PARAMETERS] [TESTPORT_PARAMETERS]
// Syntax: // Syntax:
// <component_name>.<port_name>.<parameter_name> := <parameter_value> // <component_name>.<port_name>.<parameter_name> := <parameter_value>
system.pt_socketCAN.SocketCAN_can_interface_name := "vcan0" *.pt_socketCAN.SocketCAN_can_interface_name := "vcan0"
system.pt_socketCAN.SocketCAN_debugging := "YES" *.pt_socketCAN.SocketCAN_debugging := "YES"
system.pt_socketCAN_VCAN_IFA.SocketCAN_can_interface_name := "vcan0"
system.pt_socketCAN_VCAN_IFA.SocketCAN_debugging := "YES"
system.pt_socketCAN_VCAN_IFB.SocketCAN_can_interface_name := "vcan1" [EXECUTE]
system.pt_socketCAN_VCAN_IFB.SocketCAN_debugging := "YES" //CAN RAW tests
SocketCAN_RAW_test.tc_can_raw_send_and_receive_frame
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FILTER
[EXECUTE] SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER
//CAN RAW tests SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_LOOPBACK
SocketCAN_RAW_test.tc_can_raw_send_and_receive_frame SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FILTER SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_ERR_FILTER SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_LOOPBACK //CAN BCM tests
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_RECV_OWN_MSGS SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_FD_FRAMES // broken CAN BCM tests:
SocketCAN_RAW_test.tc_can_raw_setsockopt_CAN_RAW_JOIN_FILTERS //SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken
//CAN BCM tests
SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE
// broken CAN BCM tests:
//SocketCAN_BCM_test.tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken
/* Copyright (c) 2010, 2016 Ericsson AB /* Copyright (c) 2010, 2016 Ericsson AB
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Michael Josenhans * Michael Josenhans
******************************************************************************/ ******************************************************************************/
// //
// File: SocketCAN_BCM_test.ttcn // File: SocketCAN_BCM_test.ttcn
// Description: SocketCAN testcases for CAN_BCM frames // Description: SocketCAN testcases for CAN_BCM frames
// //
// Revision R1A
module SocketCAN_BCM_test { module SocketCAN_BCM_test {
import from SocketCANtest all import from SocketCANtest all
import from SocketCAN_Types all; import from SocketCAN_Types all;
import from Bcm all import from Bcm all
import from Can all import from Can all
template SocketCAN_CAN_or_CAN_FD_frame a_CAN_frame (template CAN_frame p_can_frame) := {can_frame := p_can_frame} template SocketCAN_CAN_or_CAN_FD_frame a_CAN_frame (template CAN_frame p_can_frame) := {can_frame := p_can_frame}
testcase tc_can_bcm_TX_SETUP_TX_DELETE() runs on MTC { testcase tc_can_bcm_TX_SETUP_TX_DELETE() runs on MTC {
// here are 5 CAN frames cyclicly started with TX_SETUP (can_id = 66), but after receiving // here are 5 CAN frames cyclicly started with TX_SETUP (can_id = 66), but after receiving
// a sequnce of 10 frames the cyclic sending of the frames is stopped with TX_DELETE (can id = 66). // a sequnce of 10 frames the cyclic sending of the frames is stopped with TX_DELETE (can id = 66).
var PTC v_ptc_bcmConfigurator := PTC.create("PTC1_ptc_bcmConfigurator") alive var PTC v_ptc_bcmConfigurator := PTC.create("PTC1_ptc_bcmConfigurator") alive
var PTC v_ptc_rawFrameReceiver1 := PTC.create("PTC2_ptc_rawFrameReceiver1") alive var PTC v_ptc_rawFrameReceiver1 := PTC.create("PTC2_ptc_rawFrameReceiver1") alive
var PTC v_ptc_rawFrameReceiver2 := PTC.create("PTC2_ptc_rawFrameReceiver2") alive var PTC v_ptc_rawFrameReceiver2 := PTC.create("PTC2_ptc_rawFrameReceiver2") alive
f_addSyncSlaveSet(v_ptc_bcmConfigurator, v_PTCSet) f_addSyncSlaveSet(v_ptc_bcmConfigurator, v_PTCSet)
f_addSyncSlaveSet(v_ptc_rawFrameReceiver1, v_PTCSet) f_addSyncSlaveSet(v_ptc_rawFrameReceiver1, v_PTCSet)
f_addSyncSlaveSet(v_ptc_rawFrameReceiver2, v_PTCSet) f_addSyncSlaveSet(v_ptc_rawFrameReceiver2, v_PTCSet)
connect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync) connect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync)
connect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync) connect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync)
connect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync) connect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync)
var CAN_frame v_can_frame1, v_can_frame2, v_can_frame3, v_can_frame4, v_can_frame5; var CAN_frame v_can_frame1, v_can_frame2, v_can_frame3, v_can_frame4, v_can_frame5;
var SocketCAN_bcm_frame v_bcm_activation_frame, v_bcm_deactivation_frame var SocketCAN_bcm_frame v_bcm_activation_frame, v_bcm_deactivation_frame
v_can_frame1 := {can_id := 1, can_pdu := '1111111111111111'O}; v_can_frame1 := {can_id := '00000001'O, can_pdu := '1111111111111111'O};
v_can_frame2 := {can_id := 2, can_pdu := '2222222222222222'O}; v_can_frame2 := {can_id := '00000002'O, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := 3, can_pdu := '3333333333333333'O}; v_can_frame3 := {can_id := '00000003'O, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := 4, can_pdu := '4444444444444444'O}; v_can_frame4 := {can_id := '00000004'O, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := 5, can_pdu := '5555555555555555'O}; v_can_frame5 := {can_id := '00000005'O, can_pdu := '5555555555555555'O};
template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := { template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := {
{can_frame := v_can_frame1}, {can_frame := v_can_frame1},
{can_frame := v_can_frame2}, {can_frame := v_can_frame2},
{can_frame := v_can_frame3}, {can_frame := v_can_frame3},
{can_frame := v_can_frame4}, {can_frame := v_can_frame4},
{can_frame := v_can_frame5}, {can_frame := v_can_frame5},
{can_frame := v_can_frame1}, {can_frame := v_can_frame1},
{can_frame := v_can_frame2}, {can_frame := v_can_frame2},
{can_frame := v_can_frame3}, {can_frame := v_can_frame3},
{can_frame := v_can_frame4}, {can_frame := v_can_frame4},
{can_frame := v_can_frame5} {can_frame := v_can_frame5}
} }
v_bcm_activation_frame := { v_bcm_activation_frame := {
opcode := 1, // TX_SETUP opcode := '00000001'O, // TX_SETUP
flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER
count := 0, count := 0,
ival1 := {0, 0}, ival1 := {0, 0},
ival2 := {0, 100000}, ival2 := {0, 100000},
can_id := 66, // should become octetstring in the future can_id := '00000042'O, // should become octetstring in the future
frames := {can_frame := { frames := {can_frame := {
v_can_frame1, v_can_frame1,
v_can_frame2, v_can_frame2,
v_can_frame3, v_can_frame3,
v_can_frame4, v_can_frame4,
v_can_frame5}} v_can_frame5}}
} }
v_bcm_deactivation_frame := { v_bcm_deactivation_frame := {
opcode := 2, // TX_DELETE opcode := '00000002'O, // TX_DELETE
flags := '00000000000000000000000000000000'B, flags := '00000000000000000000000000000000'B,
count := 0, count := 0,
ival1 := {0, 0}, ival1 := {0, 0},
ival2 := {0, 0}, ival2 := {0, 0},
can_id := 66, can_id := '00000042'O,
frames := {can_frame := {}} frames := {can_frame := {}}
} }
var BCM_cmds v_cmds := var BCM_cmds v_cmds :=
{ {
{phase := e_testbody2, bcm_frame := v_bcm_activation_frame}, {phase := e_testbody2, bcm_frame := v_bcm_activation_frame},
{phase := e_testbody5, bcm_frame := v_bcm_deactivation_frame} {phase := e_testbody5, bcm_frame := v_bcm_deactivation_frame}
} }
v_ptc_bcmConfigurator.start(f_ptc_bcmComandSendInitiator(v_cmds)) v_ptc_bcmConfigurator.start(f_ptc_bcmComandSendInitiator(v_cmds))
var SocketCAN_CAN_or_CAN_FD_frame v_frame_to_receive1, v_frame_to_receive5 var SocketCAN_CAN_or_CAN_FD_frame v_frame_to_receive1, v_frame_to_receive5
v_frame_to_receive1 := {can_frame := v_can_frame1} v_frame_to_receive1 := {can_frame := v_can_frame1}
v_frame_to_receive5 := {can_frame := v_can_frame5} v_frame_to_receive5 := {can_frame := v_can_frame5}
// stop when receiving v_frame_to_receive // stop when receiving v_frame_to_receive
v_ptc_rawFrameReceiver1.start(f_ptc_RawFrameReceiver(e_testbody3, v_frame_to_receive1)) v_ptc_rawFrameReceiver1.start(f_ptc_RawFrameReceiver(e_testbody3, v_frame_to_receive1))
// stop when receiving v_frame_to_receive // stop when receiving v_frame_to_receive
v_ptc_rawFrameReceiver2.start(f_ptc_RawFrameSequenceReceiver(e_testbody4, a_expected_can_frames, e_testbody5, 2.0)) v_ptc_rawFrameReceiver2.start(f_ptc_RawFrameSequenceReceiver(e_testbody4, a_expected_can_frames, e_testbody5, 2.0))
var e_Phase v_phase var e_Phase v_phase
for(v_phase := c_firstPhase; v_phase < e_testcase_complete; v_phase := f_incMTCPhase(v_phase)) { for(v_phase := c_firstPhase; v_phase < e_testcase_complete; v_phase := f_incMTCPhase(v_phase)) {
f_startPhase(v_phase) f_startPhase(v_phase)
log("MTC: ", v_phase) log("MTC: ", v_phase)
f_awaitEndPhase(v_phase) f_awaitEndPhase(v_phase)
} }
all component.done; all component.done;
log("MTC done") log("MTC done")
disconnect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync) disconnect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync)
disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync) disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync)
disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync) disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync)
all component.kill; all component.kill;
} }
testcase tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken() runs on MTC { testcase tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken() runs on MTC {
// here are 5 CAN frames cyclicly started with TX_SETUP (can_id = 66), but after receiving // here are 5 CAN frames cyclicly started with TX_SETUP (can_id = 66), but after receiving
// a sequnce of 10 frames the cyclic sending of the frames is stopped with TX_DELETE (can id = 66). // a sequnce of 10 frames the cyclic sending of the frames is stopped with TX_DELETE (can id = 66).
var PTC v_ptc_bcmConfigurator := PTC.create("PTC1_ptc_bcmConfigurator") alive var PTC v_ptc_bcmConfigurator := PTC.create("PTC1_ptc_bcmConfigurator") alive
var PTC v_ptc_rawFrameReceiver1 := PTC.create("PTC2_ptc_rawFrameReceiver1") alive var PTC v_ptc_rawFrameReceiver1 := PTC.create("PTC2_ptc_rawFrameReceiver1") alive
var PTC v_ptc_rawFrameReceiver2 := PTC.create("PTC2_ptc_rawFrameReceiver2") alive var PTC v_ptc_rawFrameReceiver2 := PTC.create("PTC2_ptc_rawFrameReceiver2") alive
f_addSyncSlaveSet(v_ptc_bcmConfigurator, v_PTCSet) f_addSyncSlaveSet(v_ptc_bcmConfigurator, v_PTCSet)
f_addSyncSlaveSet(v_ptc_rawFrameReceiver1, v_PTCSet) f_addSyncSlaveSet(v_ptc_rawFrameReceiver1, v_PTCSet)
f_addSyncSlaveSet(v_ptc_rawFrameReceiver2, v_PTCSet) f_addSyncSlaveSet(v_ptc_rawFrameReceiver2, v_PTCSet)
connect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync) connect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync)
connect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync) connect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync)
connect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync) connect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync)
var CAN_frame v_can_frame1, v_can_frame2, v_can_frame3, v_can_frame4, v_can_frame5; var CAN_frame v_can_frame1, v_can_frame2, v_can_frame3, v_can_frame4, v_can_frame5;
var SocketCAN_bcm_frame v_bcm_activation_frame, v_bcm_deactivation_frame, v_bcm_read_status_frame var SocketCAN_bcm_frame v_bcm_activation_frame, v_bcm_deactivation_frame, v_bcm_read_status_frame
v_can_frame1 := {can_id := 1, can_pdu := '1111111111111111'O}; v_can_frame1 := {can_id := '00000001'O, can_pdu := '1111111111111111'O};
v_can_frame2 := {can_id := 2, can_pdu := '2222222222222222'O}; v_can_frame2 := {can_id := '00000002'O, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := 3, can_pdu := '3333333333333333'O}; v_can_frame3 := {can_id := '00000003'O, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := 4, can_pdu := '4444444444444444'O}; v_can_frame4 := {can_id := '00000004'O, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := 5, can_pdu := '5555555555555555'O}; v_can_frame5 := {can_id := '00000005'O, can_pdu := '5555555555555555'O};
template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := { template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := {
{can_frame := v_can_frame1}, {can_frame := v_can_frame1},
{can_frame := v_can_frame2}, {can_frame := v_can_frame2},
{can_frame := v_can_frame3}, {can_frame := v_can_frame3},
{can_frame := v_can_frame4}, {can_frame := v_can_frame4},
{can_frame := v_can_frame5}, {can_frame := v_can_frame5},
{can_frame := v_can_frame1}, {can_frame := v_can_frame1},
{can_frame := v_can_frame2}, {can_frame := v_can_frame2},
{can_frame := v_can_frame3}, {can_frame := v_can_frame3},
{can_frame := v_can_frame4}, {can_frame := v_can_frame4},
{can_frame := v_can_frame5} {can_frame := v_can_frame5}
} }
v_bcm_activation_frame := { v_bcm_activation_frame := {
opcode := 1, // TX_SETUP opcode := '00000001'O, // TX_SETUP
flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER
count := 0, count := 0,
ival1 := {0, 0}, ival1 := {0, 0},
ival2 := {0, 100000}, ival2 := {0, 100000},
can_id := 66, // should become octetstring in the future can_id := '00000042'O, // should become octetstring in the future
frames := {can_frame := { frames := {can_frame := {
v_can_frame1, v_can_frame1,
v_can_frame2, v_can_frame2,
v_can_frame3, v_can_frame3,
v_can_frame4, v_can_frame4,
v_can_frame5}} v_can_frame5}}
} }
v_bcm_deactivation_frame := { v_bcm_deactivation_frame := {
opcode := 2, // TX_DELETE opcode := '00000002'O, // TX_DELETE
flags := '00000000000000000000000000000000'B, flags := '00000000000000000000000000000000'B,
count := 0, count := 0,
ival1 := {0, 0}, ival1 := {0, 0},
ival2 := {0, 0}, ival2 := {0, 0},
can_id := 66, can_id := '00000042'O,
frames := {can_frame := {}} frames := {can_frame := {}}
} }
v_bcm_read_status_frame := { v_bcm_read_status_frame := {
opcode := 3, // TX_READ opcode := '00000003'O, // TX_READ
flags := flags :=
// workaround for titan constants instead of enums: // workaround for titan constants instead of enums:
('00000000000000000000000000000001'B << 0) or4b // enum2int(e_CAN_BCM_SETTIMER_BITINDEX)) instead of 0 ('00000000000000000000000000000001'B << 0) or4b // enum2int(e_CAN_BCM_SETTIMER_BITINDEX)) instead of 0
('00000000000000000000000000000001'B << 1) or4b // enum2int(e_CAN_BCM_TX_COUNTEVT_BITINDEX)) instead of 1 ('00000000000000000000000000000001'B << 1) or4b // enum2int(e_CAN_BCM_TX_COUNTEVT_BITINDEX)) instead of 1
('00000000000000000000000000000001'B << 4), // enum2int(e_CAN_BCM_TX_CP_CAN_ID_BITINDEX) instead of 4 ('00000000000000000000000000000001'B << 4), // enum2int(e_CAN_BCM_TX_CP_CAN_ID_BITINDEX) instead of 4
count := 0, count := 0,
ival1 := {0, 0}, ival1 := {0, 0},
ival2 := {0, 0}, ival2 := {0, 0},
can_id := 66, can_id := '00000042'O,
frames := {can_frame := {}} frames := {can_frame := {}}
} }
var BCM_cmds v_cmds := var BCM_cmds v_cmds :=
{ {
//{phase := e_testbody2, bcm_frame := v_bcm_activation_frame}, //{phase := e_testbody2, bcm_frame := v_bcm_activation_frame},
{phase := e_testbody3, bcm_frame := v_bcm_read_status_frame}, {phase := e_testbody3, bcm_frame := v_bcm_read_status_frame},
{phase := e_testbody4, bcm_frame := v_bcm_deactivation_frame}, {phase := e_testbody4, bcm_frame := v_bcm_deactivation_frame},
{phase := e_testbody6, bcm_frame := v_bcm_read_status_frame} {phase := e_testbody6, bcm_frame := v_bcm_read_status_frame}
} }
v_ptc_bcmConfigurator.start(f_ptc_bcmComandSendReceiveInitiator(v_cmds)) v_ptc_bcmConfigurator.start(f_ptc_bcmComandSendReceiveInitiator(v_cmds))
var SocketCAN_CAN_or_CAN_FD_frame v_frame_to_receive1, v_frame_to_receive5 var SocketCAN_CAN_or_CAN_FD_frame v_frame_to_receive1, v_frame_to_receive5
v_frame_to_receive1 := {can_frame := v_can_frame1} v_frame_to_receive1 := {can_frame := v_can_frame1}
v_frame_to_receive5 := {can_frame := v_can_frame5} v_frame_to_receive5 := {can_frame := v_can_frame5}
// stop when receiving v_frame_to_receive // stop when receiving v_frame_to_receive
v_ptc_rawFrameReceiver1.start(f_ptc_RawFrameReceiver(e_testbody3, v_frame_to_receive1)) v_ptc_rawFrameReceiver1.start(f_ptc_RawFrameReceiver(e_testbody3, v_frame_to_receive1))
// stop when receiving v_frame_to_receive // stop when receiving v_frame_to_receive
v_ptc_rawFrameReceiver2.start(f_ptc_RawFrameSequenceReceiver(e_testbody5, a_expected_can_frames, e_testbody6, 2.0)) v_ptc_rawFrameReceiver2.start(f_ptc_RawFrameSequenceReceiver(e_testbody5, a_expected_can_frames, e_testbody6, 2.0))
var e_Phase v_phase var e_Phase v_phase
for(v_phase := c_firstPhase; v_phase < e_testcase_complete; v_phase := f_incMTCPhase(v_phase)) { for(v_phase := c_firstPhase; v_phase < e_testcase_complete; v_phase := f_incMTCPhase(v_phase)) {
f_startPhase(v_phase) f_startPhase(v_phase)
log("MTC: ", v_phase) log("MTC: ", v_phase)
f_awaitEndPhase(v_phase) f_awaitEndPhase(v_phase)
} }
all component.done; all component.done;
log("MTC done") log("MTC done")
disconnect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync) disconnect(mtc:pt_sync, v_ptc_bcmConfigurator:pt_sync)
disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync) disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver1:pt_sync)
disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync) disconnect(mtc:pt_sync, v_ptc_rawFrameReceiver2:pt_sync)
all component.kill; all component.kill;
} }
} }
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# Michael Josenhans # Michael Josenhans
############################################################################## ##############################################################################
// Revision R1A
[LOGGING] [LOGGING]
FileMask := LOG_ALL FileMask := LOG_ALL
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# Michael Josenhans # Michael Josenhans
############################################################################## ##############################################################################
# Revision R1A
#!/bin/bash #!/bin/bash
......
# titan.TestPorts.SocketCANasp # titan.TestPorts.SocketCANasp
Main project page: Main project page:
https://projects.eclipse.org/projects/tools.titan https://projects.eclipse.org/projects/tools.titan
The source code of the TTCN-3 compiler and executor: The source code of the TTCN-3 compiler and executor:
https://github.com/eclipse/titan.core https://github.com/eclipse/titan.core
References: References:
https://www.kernel.org/doc/Documentation/networking/can.txt https://www.kernel.org/doc/Documentation/networking/can.txt
Other useful documentation: Other useful documentation:
https://docs.python.org/3/library/socket.html (search for: "AF_CAN") https://docs.python.org/3/library/socket.html (search for: "AF_CAN")
https://media.readthedocs.org/pdf/python-can/latest/python-can.pdf https://media.readthedocs.org/pdf/python-can/latest/python-can.pdf
http%3A%2F%2Fwww.can-cia.de%2Ffileadmin%2Fresources%2Fdocuments%2Fproceedings%2F2012_hartkopp.pdf http%3A%2F%2Fwww.can-cia.de%2Ffileadmin%2Fresources%2Fdocuments%2Fproceedings%2F2012_hartkopp.pdf
http://www.can-cia.de/fileadmin/resources/documents/proceedings/2012_hartkopp.pdf http://www.can-cia.de/fileadmin/resources/documents/proceedings/2012_hartkopp.pdf
http://v2.can-newsletter.org/uploads/media/raw/46c15d02e1fdd3b04e671693ec548ff7.pdf http://v2.can-newsletter.org/uploads/media/raw/46c15d02e1fdd3b04e671693ec548ff7.pdf
# See file: src/initscript.sh: # See file: src/initscript.sh:
#-------------------------------------- #--------------------------------------
#!/bin/bash #!/bin/bash
# based on ideas from: # based on ideas from:
# #
# create a virtual can interface: # create a virtual can interface:
sudo modprobe vcan sudo modprobe vcan
sudo ip link add dev vcan0 type vcan