DevProxy is an interface written in clojure. DevProxy allows the implementation of measurement sequences that are independent of client or customer devices. It is therefore a device proxy
┌────────────────────────────────────────────────────┐
│ │
│ Metis │
│ │
│ │
└───────▲────────────────────────────────────▲───────┘
│ │
┌───────▼───────────┐ │
│ │ │
│ DevProxy │ │
│ │ │
└───────▲───────────┘ │
│ │
┌───────▼────────────────────────────────────▼───────┐
│ │
│ DevHub DevHub │
│ │
└─▲───▲───▲───────────────────────────▲───▲───▲───▲──┘
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ ┌───────────────────┐ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ DUT 1 │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ ┌───────────────┐ │ │ │ │ │ ┌───────────────────────────────┐
│ │ └───┼─► TCP device │ │ │ │ │ │ │ │
│ │ │ ┌───────────────┤ │ │ │ │ │ │ Standard │
│ │ └─┴───────────────┴─┘ │ │ │ │ │ │
│ │ │ │ │ │ │ valves, motors │
│ │ ┌───────────────────┐ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ pressure sensors │
│ │ │ DUT 2 │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ temperature sensors │
│ │ │ ┌───────────────┐ │ │ │ │ │ │ │
│ └───────┼─► MODBUS device │ │ │ │ │ │ │ ┌───────────────┐ │
│ │ ┌───────────────┤ │ │ │ │ └──┼───────► VXI11 device 1│ │
│ └─┴───────────────┴─┘ │ │ │ │ ┌───────────────┤ │
│ │ │ │ │ └───────────────┤ │
│ ┌───────────────────┐ │ │ └──────┼───────► TCP device 1 │ │
│ │ │ │ │ │ ┌───────────────┤ │
│ │ DUT n │ │ │ │ └───────────────┤ │
│ │ │ │ └──────────┼───────► MODBUS device │ │
│ │ ┌───────────────┐ │ │ │ ┌───────────────┤ │
└───────────┼─► TCP device │ │ │ │ └───────────────┤ │
│ ┌───────────────┤ │ └──────────────┼───────► TCP device n │ │
└─┴───────────────┴─┘ └───────────────────────┴───────┘
Default configurations are in resources/conf.edn
. Some entries may be overwritten by environment variables:
DEVPROXY_FACILITY
(fallbacks: DEVHUB_FACILITY, METIS_FACILITY)DEVHUB_HOST
(defaultlocalhost
)DEVHUB_PORT
(default8009
)REDIS_HOST
(defaultlocalhost
)COUCH_HOST
CAL_USR
CAL_PWD
At the nrepl prompt type:
(start)
This starts a server localhost (default port: 8009).
The folder devproxy/target/uberjar/
contains a standalone version of
DevProxy (build with lein uberjar
). Run with:
java -jar devproxy/target/uberjar/devproxy-x.y.z-standalone.jar
systemd
configuration:
cd /path/to/devproxy
sudo mkdir /usr/local/share/devproxy
sudo cp devproxy.jar /usr/local/share/devproxy
sudo cp devproxy.service /etc/systemd/system/
sudo systemctl enable devproxy.service
sudo systemctl start devproxy.service
sudo systemctl status devproxy.service
Build a stand alone app with:
clj -T:build clean
clj -T:build prep
clj -T:build uber
Run it with:
java -jar target/devproxy-x.y.z-standalone.jar
clojure -X:dev:codox
upload:
scp -r docs/ bock04@a75438://var/www/html/devproxy/
[clojure-interop/java.nio "1.0.5"]
- https://cljdoc.org/d/clojure-interop/java.nio/1.0.5
- overcome
SSL peer shut down incorrectly
error by:
export JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2