cmp.cli

c-mon

(c-mon conf mp-id i)

Shortcut to push a mon to the control interface of mp container i.

c-reset

(c-reset conf mp-id i)

Shortcut to push a reset to the control interface of mp container i. The reset cmd don’t de-register the state listener so that the container starts from the beginning. reset is a container restart

c-run

(c-run conf mp-id i)

Shortcut to push a run to the control interface of mp container i.

c-stop

(c-stop conf mp-id i)

Shortcut to push a stop to the control interface of mp container i.

c-suspend

(c-suspend conf mp-id i)

Shortcut to push a suspend to the control interface of mp container i. The suspend cmd de-register the state listener and leaves the state as it is.

d-add

(d-add conf mp-id doc-id)

Adds a doc to the api to store the resuls in.

d-ids

(d-ids conf mp-id)

Gets a list of ids added.

d-rm

(d-rm conf mp-id doc-id)

Removes a doc from the api.

init-log!

(init-log! {conf :mulog})

logger

m-build-ltm

(m-build-ltm conf mp-id)

Loads a mpd from long term memory and builds up a st-mem version of it. The mp-id may be set with workon!. m-start is called after mp is build.

Example:

(m-build {} mpid)

m-build-ref

(m-build-ref conf)

Builds up the reference mpd provided in edn format in the resources folder.

m-start

(m-start conf mp-id)

Registers a listener for the ctrl interface of a mp-id.

m-stop

(m-stop conf mp-id)

De-registers the listener for the ctrl interface of the given mp-id (see workon!).

set-ctrl

(set-ctrl conf mp-id i cmd)

Writes the command string (cmd) to the control interface of a mpd. If the mpd is already started (see m-start) the next steps work as follows: cmd is written to the short term memory by means of cmp.st-mem.set-val!. The writing process triggers the registered callback (registered by m-start). The callback cares about the cmd. cmds are:

  • "run"
  • "stop"
  • "mon"
  • "suspend"
(set-ctrl {} "ref" 0"run")

NOTE:

set-ctrl only writes to the container structure. The definitions struct should not be started by a user.

start-log!

(start-log! conf)

stop-log!

(stop-log! conf)

t-build

(t-build conf)

Builds the tasks endpoint. At runtime all tasks are provided by st-mem. The advantage is: tasks can be modified at runtime.

t-clear

(t-clear conf)

Function removes all keys starting with tasks.

t-refresh

(t-refresh conf)

Refreshs the tasks endpoint.

Example:

(t-refresh {})

t-run-by-key

(t-run-by-key conf k)

Runs the task the key is related to.

Example:

(t-run-by-key {} "ce3-cmp_calib@container@000@state@000@000")