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

can_id changed to octetstring

parent 94c9b6d7
......@@ -9,7 +9,7 @@
# Michael Josenhans
##############################################################################
// Revision R1A
[LOGGING]
FileMask := LOG_ALL
......@@ -22,12 +22,8 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
// Syntax:
// <component_name>.<port_name>.<parameter_name> := <parameter_value>
system.pt_socketCAN.SocketCAN_can_interface_name := "vcan0"
system.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"
system.pt_socketCAN_VCAN_IFB.SocketCAN_debugging := "YES"
*.pt_socketCAN.SocketCAN_can_interface_name := "vcan0"
*.pt_socketCAN.SocketCAN_debugging := "YES"
[EXECUTE]
......
......@@ -11,7 +11,7 @@
// File: SocketCAN_BCM_test.ttcn
// Description: SocketCAN testcases for CAN_BCM frames
//
// Revision R1A
module SocketCAN_BCM_test {
......@@ -41,11 +41,11 @@ testcase tc_can_bcm_TX_SETUP_TX_DELETE() runs on MTC {
var SocketCAN_bcm_frame v_bcm_activation_frame, v_bcm_deactivation_frame
v_can_frame1 := {can_id := 1, can_pdu := '1111111111111111'O};
v_can_frame2 := {can_id := 2, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := 3, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := 4, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := 5, can_pdu := '5555555555555555'O};
v_can_frame1 := {can_id := '00000001'O, can_pdu := '1111111111111111'O};
v_can_frame2 := {can_id := '00000002'O, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := '00000003'O, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := '00000004'O, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := '00000005'O, can_pdu := '5555555555555555'O};
template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := {
{can_frame := v_can_frame1},
......@@ -61,12 +61,12 @@ testcase tc_can_bcm_TX_SETUP_TX_DELETE() runs on MTC {
}
v_bcm_activation_frame := {
opcode := 1, // TX_SETUP
opcode := '00000001'O, // TX_SETUP
flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER
count := 0,
ival1 := {0, 0},
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 := {
v_can_frame1,
v_can_frame2,
......@@ -76,12 +76,12 @@ testcase tc_can_bcm_TX_SETUP_TX_DELETE() runs on MTC {
}
v_bcm_deactivation_frame := {
opcode := 2, // TX_DELETE
opcode := '00000002'O, // TX_DELETE
flags := '00000000000000000000000000000000'B,
count := 0,
ival1 := {0, 0},
ival2 := {0, 0},
can_id := 66,
can_id := '00000042'O,
frames := {can_frame := {}}
}
......@@ -142,11 +142,11 @@ testcase tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken() runs on MTC {
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_frame2 := {can_id := 2, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := 3, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := 4, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := 5, can_pdu := '5555555555555555'O};
v_can_frame1 := {can_id := '00000001'O, can_pdu := '1111111111111111'O};
v_can_frame2 := {can_id := '00000002'O, can_pdu := '2222222222222222'O};
v_can_frame3 := {can_id := '00000003'O, can_pdu := '3333333333333333'O};
v_can_frame4 := {can_id := '00000004'O, can_pdu := '4444444444444444'O};
v_can_frame5 := {can_id := '00000005'O, can_pdu := '5555555555555555'O};
template SocketCAN_CAN_or_CAN_FD_frames a_expected_can_frames := {
{can_frame := v_can_frame1},
......@@ -162,12 +162,12 @@ testcase tc_can_bcm_TX_SETUP_TX_DELETE_TX_READ__broken() runs on MTC {
}
v_bcm_activation_frame := {
opcode := 1, // TX_SETUP
opcode := '00000001'O, // TX_SETUP
flags := '00000000000000000000000000000011'B, // refers to SETTIMER | STARTTIMER
count := 0,
ival1 := {0, 0},
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 := {
v_can_frame1,
v_can_frame2,
......@@ -177,17 +177,17 @@ v_bcm_activation_frame := {
}
v_bcm_deactivation_frame := {
opcode := 2, // TX_DELETE
opcode := '00000002'O, // TX_DELETE
flags := '00000000000000000000000000000000'B,
count := 0,
ival1 := {0, 0},
ival2 := {0, 0},
can_id := 66,
can_id := '00000042'O,
frames := {can_frame := {}}
}
v_bcm_read_status_frame := {
opcode := 3, // TX_READ
opcode := '00000003'O, // TX_READ
flags :=
// workaround for titan constants instead of enums:
('00000000000000000000000000000001'B << 0) or4b // enum2int(e_CAN_BCM_SETTIMER_BITINDEX)) instead of 0
......@@ -196,7 +196,7 @@ v_bcm_activation_frame := {
count := 0,
ival1 := {0, 0},
ival2 := {0, 0},
can_id := 66,
can_id := '00000042'O,
frames := {can_frame := {}}
}
......
......@@ -11,7 +11,6 @@
// File: SocketCAN_RAW_test.ttcn
// Description: SocketCAN testcases for CAN_RAW frames
//
// Revision R1A
module SocketCAN_RAW_test
......@@ -33,7 +32,7 @@ testcase tc_can_raw_send_and_receive_frame() runs on MTC {
var SocketCAN_CAN_or_CAN_FD_frame v_frame_to_send
v_frame_to_send := {can_frame :=
{can_id := 21,
{can_id := '00000015'O,
can_pdu := '0123456789ABCDEF'O}
}
......@@ -68,12 +67,15 @@ testcase tc_can_raw_setsockopt_CAN_RAW_FILTER() runs on MTC {
connect(mtc:pt_sync, v_ptc_rawDeactivateFilters:pt_sync)
// activate filters
const CAN_RAW_filter c_rfilter0 :=
{can_id := 123, can_mask := bit2int(oct2bit(CAN_EFF_FLAG) or4b oct2bit(CAN_RTR_FLAG) or4b oct2bit(CAN_SFF_MASK))};
const CAN_RAW_filter c_rfilter1 := {can_id := oct2int('0200'O), can_mask := oct2int('0700'O)};
const CAN_RAW_filter c_rfilter2 := {can_id := bit2int(oct2bit('12345678'O) or4b oct2bit(CAN_EFF_FLAG)),
can_mask := bit2int(oct2bit(CAN_EFF_FLAG) or4b oct2bit(CAN_RTR_FLAG) or4b oct2bit(CAN_EFF_MASK))};
const CAN_RAW_filter c_rfilter0 := {
can_id := '00000123'O,
can_mask := bit2oct(oct2bit(CAN_EFF_FLAG) or4b oct2bit(CAN_RTR_FLAG) or4b oct2bit(CAN_SFF_MASK))};
const CAN_RAW_filter c_rfilter1 := {
can_id := '00000200'O,
can_mask := '00000700'O};
const CAN_RAW_filter c_rfilter2 := {
can_id := bit2oct(oct2bit('12345678'O) or4b oct2bit(CAN_EFF_FLAG)),
can_mask := bit2oct(oct2bit(CAN_EFF_FLAG) or4b oct2bit(CAN_RTR_FLAG) or4b oct2bit(CAN_EFF_MASK))};
const SocketCAN_setsockopt_commandu c_commandu_activate_filters := {rfilter:={c_rfilter0, c_rfilter1, c_rfilter2}}
const SocketCAN_setsockopt_commandu c_commandu_deactivate_filters := {rfilter:={}}
......
......@@ -9,7 +9,7 @@
# Michael Josenhans
##############################################################################
// Revision R1A
[LOGGING]
FileMask := LOG_ALL
......
......@@ -11,7 +11,7 @@
// File: SocketCANtest.ttcn
// Description: SocketCAN port type test
//
// Revision R1A
module SocketCANtest {
......@@ -159,12 +159,6 @@ type component MTC{
var PTCSet v_PTCSet := {}
}
type port PTC_PT message {
out PhaseStartReq
in PhaseEndInd
} with { extension "internal" }
altstep alt_awaitPhaseStartReq(in e_Phase p_phase) runs on PTC {
var PhaseStartReq v_PhaseStartReq;
[] pt_sync.receive (PhaseStartReq: {phase := p_phase, phase_int := ?}){
......
......@@ -9,7 +9,7 @@
# Michael Josenhans
##############################################################################
# Revision R1A
#!/bin/bash
......
......@@ -41,15 +41,59 @@ ifconfig
#--------------------------------------
cd src
./src/initscript.sh
./demo/initscript.sh
or alternatively
source src/initscript.sh
source demo/initscript.sh
make clean; make
ttcn3_start SocketCANtest client.cfg SocketCANtest.tc_can_raw1 SocketCANtest.tc_can_bcm1
ttcn3_start SocketCAN client.cfg
or to run a certain testcase:
ttcn3_start SocketCAN client.cfg SocketCANtest.tc_can_raw1 SocketCANtest.tc_can_bcm1
Review the newly created log files in the src directory
and use e.g. Wireshark to trace the CAN interfacce.
#--------------------------------------
Notes:
-Using multiple Test interfacces:
Currently the init script sets up multiple virtual can interfaces ("vcan0",
"vcan1" in oder to allow using multiple CAN interfaces.
The CAN interfaces have to be defined in the TTCN configuration files or may
alternatively be defined in the optional parameters of port messages commands
ioctl and send_data.
Handling of multiple CAN interfaces is work in progress and no test cases are
provided. In order to configure usage with multiple test interfaces,
test interfaces for each interface have to be defined in the MTC.
-CAN RAW:
CAN FD has been implemented, however not been tested.
Depending on the availability of the C-code #define "CAN_FD_FRAME"
in /usr/include/linux/can/bcm.h, CAN-FD support is enabled at compile time.
The RAW setsockopt has path coverage. However no test coverage that insures
the setsockopt functionality provided by the kernel is working correctly.
For this purpose in the future might be added additional test cases.
-CAN BCM:
TX_SETUP, TX_DELETE have been tested, TX_READ is known to fail test cases.
Some tests have indicated, that that SocketCAN BCM does not support concurrently
active BCM channels.
The BCM has test coverage for TX_SETUP and TX_DELETE. However no test coverage
that insures the BCM functionality provided by the kernel is working correctly.
For this purpose in the future might be added additional test cases.
Return values other than the error code by the BCM are not yet supported.
BCM wth CAN FD frames has not been tested yet.
-Merging of logfiles:
To merge the logfies from multiple Parallel Test Componets (PTCs) from a
single run in timely order into sigle file, run:
$ TTCN3_DIR/bin/ttcn3_logmerge -o log_merged.txt *.log
The merged log-file is found at log_merged.txt
-Dunping CAN Frames using SocketCAN:
To dump all received can frames of e.g. "vcan0" run a seperate terminal:
$ candump "vcan0"
Converting a Titan Project to include Eclipse C/C++
File -> New -> Other
-> C/C++
-> Convert to a C/C++ project (Add C/C++ nature)
Project -> Properties
-> C++ General
-> Path and Symbols
-> GNU C -> Add "/usr/include"
-> GNU C++ -> Add path to titan.core/core
......@@ -9,7 +9,7 @@
* Michael Josenhans
******************************************************************************/
//Revision R1A
module Bcm
{
......@@ -71,13 +71,9 @@ type record Bcm_timeval {
//type record length (0 .. CAN_FRAME_MAX_NUMBER) of CAN_frame Can_frame;
type record SocketCAN_bcm_frame {
// workaround:
LIN4_BO_LAST opcode,
//OCT4 opcode,
OCT4 opcode,
bitstring flags length (32),
// workaround:
LIN4_BO_LAST count,
// OCT4 count,
Bcm_timeval ival1,
Bcm_timeval ival2,
CAN_id can_id,
......
......@@ -9,7 +9,7 @@
* Michael Josenhans
******************************************************************************/
//Revision R1A
module Can
{
......@@ -65,25 +65,19 @@ const integer CAN_MAX_DLEN := 8;
// See /usr/include/linux/can.h
const integer CANFD_MAX_DLEN := 64;
//workaround: octetstring has been replaced by hexstring of twice that length
// should be octetstring length (4);
type LIN4_BO_LAST CAN_id;
//type octetstring CAN_id length (4);
type octetstring CAN_id length (4);
type bitstring CAN_flags length (8); // only used with CAN FD
// should be octetstring and PDU size should be half as large
// type hexstring CAN_PDU;
type octetstring CAN_PDU;
type record CAN_frame {
CAN_id can_id, // 32 bit CAN_ID + EFF/RTR/
// workaround, CAN_PDU should be octetstring of lenth (0 .. CAN_MAX_DLEN)
CAN_PDU can_pdu length (0 .. CAN_MAX_DLEN)
}
type record CANFD_frame {
CAN_id can_id, // 32 bit CAN_ID + EFF/RTR/
CAN_flags can_flags, // only used with CAN FD
// workaround, CAN_PDU should be octetstring of length (0 .. CANFD_MAX_DLEN)
CAN_PDU can_pdu length (0 .. CANFD_MAX_DLEN)
}
}
......@@ -9,7 +9,7 @@
* Michael Josenhans
******************************************************************************/
//Revision R1A
module CanError
{
......
......@@ -12,7 +12,7 @@
// File: SocketCAN_PT.cc
// Description: SocketCAN_PT test port source
//
// Revision R1A
#include "SocketCAN_PT.hh"
#include <Addfunc.hh>
......@@ -69,6 +69,7 @@ struct canfd_frame;
#define CAN_MTU (sizeof(struct can_frame))
#endif //CANFD_MTU
// workaround, as canfd not defined in some older kernel versions
// and thus canfd frames can not be used for data transfer between
// kernel module and userspace.
......@@ -246,7 +247,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
parameters.ifr().if__index() = ifr.ifr_ifindex;
parameters.ifr().if__name() = ifr.ifr_name;
parameters.id() = a;
frameref.can__id() = frame.can_id;
frameref.can__id() = int2oct(frame.can_id, 4);
frameref.can__pdu() = OCTETSTRING(len, frame.data);
} else {
// CAN FD frame received:
......@@ -255,7 +256,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
log(
"Received a CAN FD frame from interface %s of %d bytes and with payload length %d",
ifr.ifr_name, nbytes, (int)len);
frameref.can__id() = can_id;
frameref.can__id() = int2oct(can_id, 4);
#ifdef CANFD_FRAME_STRUCT_DEFINED
frameref.can__flags() = BITSTRING(
int2bit(frame.flags,
......@@ -317,7 +318,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
parameters.ifr().if__name() = ifr.ifr_name;
uint32_t nframes = bcm_msg.msg_head.nframes;
parameters.frame().opcode() = bcm_msg.msg_head.opcode;
parameters.frame().opcode() = int2oct(bcm_msg.msg_head.opcode, 4);
parameters.frame().flags() = BITSTRING(
int2bit(INTEGER(msg_head_flags),
BCM_FRAME_FLAGS_SIZE));
......@@ -330,7 +331,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
bcm_msg.msg_head.ival2.tv_sec;
parameters.frame().ival2().tv__usec() =
bcm_msg.msg_head.ival2.tv_usec;
parameters.frame().can__id() = bcm_msg.msg_head.can_id;
parameters.frame().can__id() = int2oct(bcm_msg.msg_head.can_id, 4);
#ifdef BCM_CANFD_SUPPORT
long flags = bcm_msg.msg_head.flags;
if ((flags & CAN_FD_FRAME ) == CAN_FD_FRAME ) {
......@@ -344,7 +345,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
TTCN_error("Writing data: CAN FD pdu size too large\n");
};
parameters.frame().frames().canfd__frame()[i].can__id() =
bcm_msg.frame[i].can_id;
int2oct(bcm_msg.frame[i].can_id, 4);
//Here the bitstring shall be stored into a
parameters.frame().frames().canfd__frame()[i].can__flags() =
BITSTRING(32,
......@@ -373,7 +374,7 @@ void SocketCAN__PT_PROVIDER::Handle_Fd_Event_Readable(int sock) {
len = CAN_MAX_DLEN;
};
parameters.frame().frames().can__frame()[i].can__id() =
bcm_msg.frame[i].can_id;
int2oct(bcm_msg.frame[i].can_id, 4);
parameters.frame().frames().can__frame()[i].can__pdu() =
OCTETSTRING(len,
(const unsigned char*) &(bcm_msg.frame[i].data));
......@@ -790,14 +791,14 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
struct can_frame frame;
log("SocketCAN: Sending CAN frame)");
logInteger(" to can id: ",
logOctet(" to can id: ",
send_par.frame().can__frame().can__id());
logOctet("containing data: ",
send_par.frame().can__frame().can__pdu());
size_t can_dlc =
send_par.frame().can__frame().can__pdu().lengthof();
frame.can_id = send_par.frame().can__frame().can__id();
frame.can_id = oct2int(send_par.frame().can__frame().can__id());
memcpy(frame.data, send_par.frame().can__frame().can__pdu(),
can_dlc);
frame.can_dlc = can_dlc;
......@@ -858,7 +859,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
struct canfd_frame fd_frame;
log("SocketCAN: Sending CAN FD frame)");
logInteger(" to can id: ",
logOctet(" to can id: ",
send_par.frame().canfd__frame().can__id());
logBitstring("with flags: ",
send_par.frame().canfd__frame().can__flags());
......@@ -867,7 +868,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
size_t len =
send_par.frame().canfd__frame().can__pdu().lengthof();
fd_frame.can_id = send_par.frame().canfd__frame().can__id();
fd_frame.can_id = oct2int(send_par.frame().canfd__frame().can__id());
memcpy(fd_frame.data,
send_par.frame().canfd__frame().can__pdu(), len);
fd_frame.len = len;
......@@ -1008,7 +1009,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
const Bcm::SocketCAN__bcm__frame& bcm__tx__msg =
send_par.bcm__tx__msg();
bcm_msg.msg_head.opcode = bcm__tx__msg.opcode();
bcm_msg.msg_head.opcode = oct2int(bcm__tx__msg.opcode());
bcm_msg.msg_head.flags = bit2int(
send_par.bcm__tx__msg().flags());
bcm_msg.msg_head.count = bcm__tx__msg.count();
......@@ -1018,25 +1019,25 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
bcm_msg.msg_head.ival2.tv_sec = bcm__tx__msg.ival2().tv__sec();
bcm_msg.msg_head.ival2.tv_usec =
bcm__tx__msg.ival2().tv__usec();
bcm_msg.msg_head.can_id = bcm__tx__msg.can__id();
bcm_msg.msg_head.can_id = oct2int(bcm__tx__msg.can__id());
bcm_msg.msg_head.nframes = nframes;
log("SocketCAN: Sending BCM Message)");
logInteger(" opcode: ", bcm__tx__msg.opcode());
logOctet(" opcode: ", bcm__tx__msg.opcode());
logBitstring(" flags: ", bcm__tx__msg.flags());
logInteger(" count: ", bcm__tx__msg.count());
logInteger(" ival1: ", bcm__tx__msg.ival1().tv__sec());
logInteger(" ival1: ", bcm__tx__msg.ival1().tv__usec());
logInteger(" ival2: ", bcm__tx__msg.ival2().tv__sec());
logInteger(" ival2: ", bcm__tx__msg.ival2().tv__usec());
logInteger(" can_id: ", bcm__tx__msg.can__id());
logOctet(" can_id: ", bcm__tx__msg.can__id());
logInteger(" nframes: ", nframes);
for (int i = 0; i < nframes; i++) {
const Bcm::SocketCAN__bcm__frame_frames_can__frame& frame =
bcm__tx__msg.frames().can__frame();
bcm_msg.frame[i].can_id = frame[i].can__id();
bcm_msg.frame[i].can_id = oct2int(frame[i].can__id());
unsigned int can_dlc;
can_dlc = frame[i].can__pdu().lengthof();
if (can_dlc > CAN_MAX_DLEN) {
......@@ -1045,7 +1046,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
can_dlc = CAN_MAX_DLEN;
};
log(" containing CAN frame:)");
logInteger(" can id: ", frame[i].can__id());
logOctet(" can id: ", frame[i].can__id());
logInteger(" can dlc: ", can_dlc);
bcm_msg.frame[i].can_dlc = can_dlc;
......@@ -1146,7 +1147,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
const Bcm::SocketCAN__bcm__frame& bcm__tx__msg =
send_par.bcm__tx__msg();
bcm_msg.msg_head.opcode = bcm__tx__msg.opcode();
bcm_msg.msg_head.opcode = oct2int(bcm__tx__msg.opcode());
bcm_msg.msg_head.flags = bit2int(
send_par.bcm__tx__msg().flags());
bcm_msg.msg_head.count = bcm__tx__msg.count();
......@@ -1159,21 +1160,21 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
bcm_msg.msg_head.nframes = nframes;
log("SocketCAN: Sending BCM Message)");
logInteger(" opcode: ", bcm__tx__msg.opcode());
logOctet(" opcode: ", bcm__tx__msg.opcode());
logBitstring(" flags: ", bcm__tx__msg.flags());
logInteger(" count: ", bcm__tx__msg.count());
logInteger(" ival1: ", bcm__tx__msg.ival1().tv__sec());
logInteger(" ival1: ", bcm__tx__msg.ival1().tv__usec());
logInteger(" ival2: ", bcm__tx__msg.ival2().tv__sec());
logInteger(" ival2: ", bcm__tx__msg.ival2().tv__usec());
logInteger(" can_id: ", send_par.bcm__tx__msg().can__id());
logOctet(" can_id: ", send_par.bcm__tx__msg().can__id());
logInteger(" nframes: ", nframes);
for (unsigned int i = 0; i < nframes; i++) {
const Bcm::SocketCAN__bcm__frame_frames_canfd__frame& frame =
bcm__tx__msg.frames().canfd__frame();
bcm_msg.frame[i].can_id = frame[i].can__id();
bcm_msg.frame[i].can_id = oct2int(frame[i].can__id());
bcm_msg.frame[i].flags = bit2int(frame[i].can__flags());
unsigned int len = frame[i].can__pdu().lengthof();
if (len > CANFD_MAX_DLEN) {
......@@ -1181,7 +1182,7 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
len = CANFD_MAX_DLEN;
};
log(" containing CAN FD frame:)");
logInteger(" can id: ", frame[i].can__id());
logOctet(" can id: ", frame[i].can__id());
logInteger(" can len: ", len);
bcm_msg.frame[i].len = len;
......@@ -1283,9 +1284,9 @@ void SocketCAN__PT_PROVIDER::outgoing_send(
} else {
for (std::size_t i = 0; i < rfilter_size; i++) {
rfilter[i].can_id =
send_par.command().rfilter()[i].can__id();
oct2int(send_par.command().rfilter()[i].can__id());
rfilter[i].can_mask =
send_par.command().rfilter()[i].can__mask();
oct2int(send_par.command().rfilter()[i].can__mask());
};
res = setsockopt(sock, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter,
sizeof(rfilter));
......
......@@ -12,7 +12,7 @@
// File: SocketCAN_PT.hh
// Description: SocketCAN test port header
//
// Revision R1A
#ifndef SocketCAN__PT_HH
#define SocketCAN__PT_HH
......
......@@ -12,7 +12,7 @@
// File: SocketCAN_PortType.ttcn
// Description: SocketCAN testport port definition file
//
// Revision R1A
module SocketCAN_PortType
{
......
......@@ -12,7 +12,7 @@
// File: SocketCAN_Types.ttcn
// Description: SocketCAN definition file
//
// Revision R1A
module SocketCAN_Types
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment