wactbprot / cmp

A study of an interpreter handling measurement-program-definitions (mpd) written in clojure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmp

An interpreter handling measurement program definitions (mpd) written in clojure.

Table of Contents

documentation

buddy pipeline

requirements

  • java (8 or 11)
  • redis (with activated keyspace notification)

installation

All of the mp state is kept in a redis database.

redis config

Since version 0.3.0 cmp relies on Keyspace Notifications. Therefore it is necassary to replace in /etc/redis/redis.conf:

notify-keyspace-events ""

by

notify-keyspace-events AK

and restart the service:

# restart
$ sudo systemctl restart redis.service

# check status
$ sudo systemctl status redis.service

cmp standalone version

Download the latest version from here. Set the environment variables (see next section). Start cmp with:

java -jar cmp-x.y.z-standalone.jar

environment variables

var Description Example
CMP_BUILD_ON_START mpds to build on server start export CMP_BUILD_ON_START="ppc-gas_dosing"
export CMP_BUILD_ON_START="se3-servo,se3-cmp_valves,se3-cmp_state"
CMP_DEVHUB_URL url for device requests
(Action: TCP, VXI11, MODBUS EXECUTE)
export CMP_DEVHUB_URL="http://localhost:9009"
export CMP_DEVHUB_URL="http://a73434:55555"
CMP_LT_SRV CouchDB server export CMP_LT_SRV="127.0.0.1"
export CMP_LT_SRV="a73434"

cmp REPL version

Leiningen on Ubuntu

sudo apt install leiningen

Leiningen on openSUSE (LEAP 15)

zypper ar https://download.opensuse.org/repositories/devel:/languages:/clojure/openSUSE_Leap_15.1/devel:languages:clojure.repo
zypper ref devel_languages_clojure
zypper in  leiningen

cmp from git repo

git clone https://github.com/wactbprot/cmp.git
cd cmp
lein deps
lein repl 

links

Clojure

redis guis

$ npm install -g redis-commander
## --> http://localhost:8081/

About

A study of an interpreter handling measurement-program-definitions (mpd) written in clojure.

License:Eclipse Public License 1.0


Languages

Language:Clojure 66.8%Language:CSS 31.8%Language:JavaScript 1.1%Language:Shell 0.2%