Skip to content

Commit fbbe9d2

Browse files
KyllianAubryGitHub Enterprise
authored andcommitted
SKA-585: update vCAN naming to vcan (#57)
1 parent 8ec551f commit fbbe9d2

File tree

8 files changed

+14
-26
lines changed

8 files changed

+14
-26
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ install(
9595

9696
install(
9797
FILES
98-
${CMAKE_CURRENT_SOURCE_DIR}/SocketCAN/demos/shell_scripts/setup_vCAN_device.sh
98+
${CMAKE_CURRENT_SOURCE_DIR}/SocketCAN/demos/shell_scripts/setup_vcan_device.sh
9999
${CMAKE_CURRENT_SOURCE_DIR}/SocketCAN/demos/shell_scripts/send_CAN_frames.sh
100-
${CMAKE_CURRENT_SOURCE_DIR}/SocketCAN/demos/shell_scripts/setup_vCAN_start_adapter_send_CAN_frames.sh
100+
${CMAKE_CURRENT_SOURCE_DIR}/SocketCAN/demos/shell_scripts/setup_vcan_start_adapter_send_CAN_frames.sh
101101
DESTINATION SocketCAN/demos/shell_scripts
102102
PERMISSIONS
103103
OWNER_READ OWNER_WRITE OWNER_EXECUTE

SocketCAN/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ participants in order to exchange CAN frames. The `sil-kit-demo-can-echo-device`
3636
## SocketCAN interface setup and CAN traffic generation in Linux
3737
First, run the following command in the Terminal to load the necessary Linux kernel modules and setup a virtual CAN interface named `can0`.
3838

39-
sudo ./SocketCAN/demos/shell_scripts/setup_vCAN_device.sh can0
39+
sudo ./SocketCAN/demos/shell_scripts/setup_vcan_device.sh can0
4040

4141
You should see this output that indicates that the `can0` virtual CAN device has been successfully launched:
4242

@@ -162,7 +162,7 @@ Before you can connect CANoe to the SIL Kit network you should adapt the `Regist
162162
The configuration file is referenced by both following CANoe use cases (Desktop Edition and Server Edition).
163163

164164
#### CANoe Desktop Edition
165-
Load the `CANoe_vCAN_configuration.cfg` from the `demos/CANoe` directory and start the measurement. Optionally you can also start the test unit execution of the `CAN_and_CAN_FD` test configuration.
165+
Load the `CANoe_vcan_configuration.cfg` from the `demos/CANoe` directory and start the measurement. Optionally you can also start the test unit execution of the `CAN_and_CAN_FD` test configuration.
166166

167167
While the demo is running these tests should be successful.
168168

SocketCAN/adapter/AdapterConnections.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class CanConnection : public std::enable_shared_from_this<CanConnection>
3939
SilKit::Services::Logging::ILogger* _logger;
4040
ICanController* _silkitCtrl;
4141

42-
struct VCANDevice
42+
struct CanDevice
4343
{
4444
int fileDescriptor;
45-
vCANDeviceType deviceType;
45+
CanDeviceType deviceType;
4646
} _vcanDevice;
4747
};

SocketCAN/adapter/ConnectionsImplementations.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020

2121
using namespace SilKit::Services::Can;
2222

23-
enum vCANDeviceType
23+
enum CanDeviceType
2424
{
2525
CLASSICAL_CAN_DEVICE,
2626
CAN_FD_DEVICE,
2727
INVALID_DEVICE
2828
};
2929

30-
enum canFrameType
30+
enum CanFrameType
3131
{
3232
PURE_FD_FRAME,
3333
FD_CLASSIC_FRAME,
@@ -47,7 +47,7 @@ struct ICanConnectionImpl
4747
void HandleReceivedCanFrameFromVirtualCanDevice(ICanController* canController, SilKit::Services::Logging::ILogger* logger);
4848

4949
protected:
50-
canFrameType _frameType;
50+
CanFrameType _frameType;
5151
};
5252

5353
struct ClassicalCanConnectionImpl : public ICanConnectionImpl
File renamed without changes.

SocketCAN/demos/CANoe4SW_SE/run_all.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ sleep 1 # wait 1 second for the creation of the .out file
3535
timeout 30s grep -q 'Press CTRL + C to stop the process...' <(tail -f $logDir/sil-kit-demo-can-echo-device.out -n +1) || { echo "[error] Timeout reached while waiting for sil-kit-demo-can-echo-device to start"; exit 1; }
3636

3737
# Run and test adapter with vcan device of MTU 72
38-
$scriptDir/../shell_scripts/setup_vCAN_start_adapter_send_CAN_frames.sh &> $logDir/setup_vCAN_start_adapter_send_CAN_frames.out &
38+
$scriptDir/../shell_scripts/setup_vcan_start_adapter_send_CAN_frames.sh &> $logDir/setup_vcan_start_adapter_send_CAN_frames.out &
3939
script_pid=$!
4040
sleep 1 # wait 1 second for the creation of the .out file
41-
timeout 90s grep -q 'Adapter has been launched and CAN payload is being generated...' <(tail -f $logDir/setup_vCAN_start_adapter_send_CAN_frames.out -n +1) || { echo "[error] Timeout reached while waiting for (setup_vCAN_start_adapter_send_CAN_frames.sh) to start"; exit 1; }
41+
timeout 90s grep -q 'Adapter has been launched and CAN payload is being generated...' <(tail -f $logDir/setup_vcan_start_adapter_send_CAN_frames.out -n +1) || { echo "[error] Timeout reached while waiting for (setup_vcan_start_adapter_send_CAN_frames.sh) to start"; exit 1; }
4242

4343
$scriptDir/run.sh
4444
exit_status=$?
@@ -50,9 +50,9 @@ fi
5050
kill $script_pid
5151

5252
# Run and test adapter with vcan device of MTU 16
53-
$scriptDir/../shell_scripts/setup_vCAN_start_adapter_send_CAN_frames.sh -mtu16 &> $logDir/setup_vCAN_start_adapter_send_CAN_frames-mtu16.out &
53+
$scriptDir/../shell_scripts/setup_vcan_start_adapter_send_CAN_frames.sh -mtu16 &> $logDir/setup_vcan_start_adapter_send_CAN_frames-mtu16.out &
5454
sleep 1 # wait 1 second for the creation of the .out file
55-
timeout 60s grep -q 'Adapter has been launched and CAN payload is being generated...' <(tail -f $logDir/setup_vCAN_start_adapter_send_CAN_frames-mtu16.out -n +1) || { echo "[error] Timeout reached while waiting for (setup_vCAN_start_adapter_send_CAN_frames.sh -mtu16) to start"; exit 1; }
55+
timeout 60s grep -q 'Adapter has been launched and CAN payload is being generated...' <(tail -f $logDir/setup_vcan_start_adapter_send_CAN_frames-mtu16.out -n +1) || { echo "[error] Timeout reached while waiting for (setup_vcan_start_adapter_send_CAN_frames.sh -mtu16) to start"; exit 1; }
5656

5757
$scriptDir/run.sh -mtu16
5858
exit_status=$?
@@ -61,18 +61,6 @@ if [[ exit_status -ne 0 ]]; then
6161
exit $exit_status
6262
fi
6363

64-
echo "sil-kit-registry.out:--------------------------------------------------------------------------------------"
65-
cat $logDir/sil-kit-registry.out
66-
echo "-----------------------------------------------------------------------------------------------------------"
67-
68-
echo "setup_vCAN_start_adapter_send_CAN_frames.out:--------------------------------------------------------------"
69-
cat $logDir/setup_vCAN_start_adapter_send_CAN_frames.out
70-
echo "-----------------------------------------------------------------------------------------------------------"
71-
72-
echo "setup_vCAN_start_adapter_send_CAN_frames-mtu16.out:--------------------------------------------------------"
73-
cat $logDir/setup_vCAN_start_adapter_send_CAN_frames-mtu16.out
74-
echo "-----------------------------------------------------------------------------------------------------------"
75-
7664
#exit run_all.sh with same exit_status
7765
exit $exit_status
7866

File renamed without changes.

SocketCAN/demos/shell_scripts/setup_vCAN_start_adapter_send_CAN_frames.sh renamed to SocketCAN/demos/shell_scripts/setup_vcan_start_adapter_send_CAN_frames.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323

2424
# Setup an FD-capable vcan device (default case)
2525
echo "[info] Setting up [can0]..."
26-
$scriptDir/setup_vCAN_device.sh can0 $arg &> $logDir/setup_vCAN_device_can0$arg.out
26+
$scriptDir/setup_vcan_device.sh can0 $arg &> $logDir/setup_vcan_device_can0$arg.out
2727

2828
# Start adapter
2929
echo "[info] Starting sil-kit-adapter-vcan..."

0 commit comments

Comments
 (0)