Lappy is a backend for AMB TranX-2 timing system.
Required environment variables:
LOG_LEVEL : debug|info|errorDSN : sqlite3 DSN eg. file:test.dbLISTEN_ADDR : address to listen eg. 0.0.0.0:8000SERIAL_PORT : path to serial device eg. /dev/usbTTY11Create tunnel with socat
socat -d -d PTY,raw,echo=0 PTY,raw,echo=0
2018/09/12 13:33:11 socat[31301] N PTY is /dev/pts/4
2018/09/12 13:33:11 socat[31301] N PTY is /dev/pts/5
2018/09/12 13:33:11 socat[31301] N starting data transfer loop with FDs [5,5] and [7,7]
Start container and mount /dev/pts to access just created /dev/pts/4
docker run --rm -it \
-v /dev/pts:/dev/pts \
-p 8000:8000 \
-e LOG_LEVEL='debug' \
-e DSN='file:test.db' \
-e LISTEN_ADDR=':8000' \
-e SERIAL_PORT='/dev/pts/4' \
bitbrewers/lappy:latest
Install simulator and start it to create trafic
go get github.com/bitbrewers/tranx2/cmd/tranx2sim
tranx2sim -i 10000 -t 5 -j 2000 > /dev/pts/5
Instructions for basic linux setup
go get github.com/bitbrewers/tranx2/cmd/tranx2simsocat PTY,raw,link=ttyS10,echo=0 PTY,raw,link=ttyS11,echo=0tranx2sim -i 10000 -t 5 -j 2000 > ./ttyS10SERIAL_PORT=./ttyS11Clone repo and run make dev.
For more check the Makefile.
Content type
Image
Digest
Size
13.4 MB
Last updated
almost 8 years ago
docker pull bitbrewers/lappy