Skip to content

Commit

Permalink
Avoid redefinition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaisal committed Aug 24, 2024
1 parent e0b01d5 commit 1c2abdd
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/csp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <csp/drivers/can_socketcan.h>
#include <csp/interfaces/csp_if_zmqhub.h>

#ifndef CANXL_XLF

/*
* CAN XL payload length and DLC definitions according to ISO 11898-1
* CAN XL DLC ranges from 0 .. 2047 => data length from 1 .. 2048 byte
Expand Down Expand Up @@ -56,6 +56,7 @@
#define CANXL_VCID_VAL_MASK 0xFFUL /* VCID is an 8-bit value */
#define CANXL_VCID_MASK (CANXL_VCID_VAL_MASK << CANXL_VCID_OFFSET)

#if 0
/**
* struct canxl_frame - CAN with e'X'tended frame 'L'ength frame structure
* @prio: 11 bit arbitration priority with zero'ed CAN_*_FLAG flags / VCID
Expand Down
12 changes: 12 additions & 0 deletions services/ground/csp_client.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=CSP client service
Wants=network.target
After=zmqproxy.service

[Service]
Type=simple
PIDFile=/run/csp_client.pid
ExecStart=/usr/local/bin/csp_client -z localhost -f 2 -a 4 -C 5

[Install]
WantedBy=multi-user.target
12 changes: 12 additions & 0 deletions services/ground/csp_server.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=CSP server service
Wants=network.target
After=zmqproxy.service

[Service]
Type=simple
PIDFile=/run/csp_server.pid
ExecStart=/usr/local/bin/csp_server -z localhost -f 2 -a 2

[Install]
WantedBy=multi-user.target
11 changes: 11 additions & 0 deletions services/ground/zmqproxy.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=CSP ZMQ service
Wants=network.target

[Service]
Type=simple
PIDFile=/run/zmqproxy.pid
ExecStart=/usr/local/bin/zmqproxy

[Install]
WantedBy=multi-user.target
14 changes: 14 additions & 0 deletions services/space/csp_client.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=CSP client service
Wants=network.target
After=zmqproxy.service

[Service]
User=pi
Type=simple
PIDFile=/run/csp_client.pid
ExecStart=/usr/local/bin/csp_client -z 10.1.1.138 -f 1 -a 3 -C 2
WorkingDirectory=/home/pi/Projects/libcsp/build/examples/

[Install]
WantedBy=multi-user.target
14 changes: 14 additions & 0 deletions services/space/csp_server.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=CSP server service
Wants=network.target
After=zmqproxy.service

[Service]
User=pi
Type=simple
PIDFile=/run/csp_server.pid
ExecStart=/usr/local/bin/csp_server -z 10.1.1.138 -f 1 -a 5
WorkingDirectory=/home/pi/Projects/libcsp/build/examples/

[Install]
WantedBy=multi-user.target
12 changes: 12 additions & 0 deletions services/space/zmqproxy.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Wants=network.target

[Service]
User=pi
Type=simple
PIDFile=/run/zmqproxy.pid
ExecStart=/usr/local/bin/zmqproxy
WorkingDirectory=/home/pi/Projects/licsp/build/examples/

[Install]
WantedBy=multi-user.target

0 comments on commit 1c2abdd

Please sign in to comment.