Compare commits
No commits in common. "820f8e4aebb0e8172de57cd0d6acaaa33e865153" and "ec07550cb1dd3f09fade1bf13453b917c146be3a" have entirely different histories.
820f8e4aeb
...
ec07550cb1
20
Dockerfile
20
Dockerfile
|
|
@ -1,20 +0,0 @@
|
||||||
FROM manjarolinux/base:latest
|
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm && \
|
|
||||||
pacman -S --noconfirm \
|
|
||||||
clang \
|
|
||||||
cmake \
|
|
||||||
make \
|
|
||||||
git \
|
|
||||||
boost \
|
|
||||||
sqlite \
|
|
||||||
systemd-libs \
|
|
||||||
zlib && \
|
|
||||||
pacman -Scc --noconfirm
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN cmake -B build -S . && cmake --build build -j$(nproc)
|
|
||||||
|
|
||||||
ENTRYPOINT ["./build/canscope"]
|
|
||||||
40
README.md
40
README.md
|
|
@ -29,23 +29,6 @@ cmake -B build -S . && cmake --build build -j$(nproc)
|
||||||
|
|
||||||
Binary: `build/canscope`
|
Binary: `build/canscope`
|
||||||
|
|
||||||
### Docker
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker build -t canscope .
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# TUI mode -- requires terminal and CAN interface access
|
|
||||||
docker run -it --network=host canscope -e "candump can0" -j1939 /app/thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Headless mode
|
|
||||||
docker run --network=host canscope -hl -e "candump can0" -j1939 /app/thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Read from stdin
|
|
||||||
candump can0 | docker run -i canscope -j1939 /app/thirdparty/j1939da_2018.xlsx -hl
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -58,21 +41,6 @@ candump can0 | docker run -i canscope -j1939 /app/thirdparty/j1939da_2018.xlsx -
|
||||||
# Headless -- JSON to file
|
# Headless -- JSON to file
|
||||||
./build/canscope -hl -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx -of output.json
|
./build/canscope -hl -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx -of output.json
|
||||||
|
|
||||||
# Read from stdin (pipe)
|
|
||||||
candump can0 | ./build/canscope -j1939 thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Headless with stdin
|
|
||||||
candump can0 | ./build/canscope -hl -j1939 thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Docker -- TUI with CAN interface access
|
|
||||||
docker run -it --network=host canscope -e "candump can0" -j1939 /app/thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Docker -- headless
|
|
||||||
docker run --network=host canscope -hl -e "candump can0" -j1939 /app/thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Docker -- read from stdin
|
|
||||||
candump can0 | docker run -i canscope -hl -j1939 /app/thirdparty/j1939da_2018.xlsx
|
|
||||||
|
|
||||||
# Record to SQLite database
|
# Record to SQLite database
|
||||||
./build/canscope -rec -db recording.db -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx
|
./build/canscope -rec -db recording.db -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx
|
||||||
|
|
||||||
|
|
@ -80,8 +48,6 @@ candump can0 | docker run -i canscope -hl -j1939 /app/thirdparty/j1939da_2018.xl
|
||||||
./build/canscope -rec -db recording.db -tui -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx
|
./build/canscope -rec -db recording.db -tui -e "candump can0" -j1939 thirdparty/j1939da_2018.xlsx
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note:** J1939 decoding has only been tested with the Digital Annex 2018 edition. Other editions may work but are not guaranteed.
|
|
||||||
|
|
||||||
### CLI flags
|
### CLI flags
|
||||||
|
|
||||||
| Flag | Long form | Description |
|
| Flag | Long form | Description |
|
||||||
|
|
@ -131,9 +97,3 @@ candump / other CAN source
|
||||||
- Factory functions via `extern` declarations instead of header includes
|
- Factory functions via `extern` declarations instead of header includes
|
||||||
- `std::jthread` / `std::stop_token` for async task management
|
- `std::jthread` / `std::stop_token` for async task management
|
||||||
- SIGINT gracefully stops all background tasks
|
- SIGINT gracefully stops all background tasks
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
|
|
||||||
- **Cross-platform support** -- Windows and macOS in addition to Linux
|
|
||||||
- ~~**Docker deployment** -- pre-built image for quick setup without manual compilation~~
|
|
||||||
- **CANopen protocol support** -- CANopen decoding alongside J1939
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue