A Simple Variable Supervision and Control application written in python
importmonitorfrommonitorimportvariable_modelasvmclassVariableTable(monitor.Table):
a=vm.PlainSupervised()
b=vm.PlainSupervised()
f=vm.FloatSupervised()
g=vm.FloatSupervised(round_to=2)
i=vm.ImageSupervised()
j=vm.ImageSupervised()
c=vm.PlainControlled(init=3.1415)
table=VariableTable()importmonitormonitor.set_tracked_table(table)The multiprocessing one has not yet developed, so use a new thread to start the server
importthreadingimportmonitorthreading.Thread(target=monitor.app).start()Manipulate variables in the table instance as usual.
Notice: The variables end with
Supervisedare not readable, and the ones end withControlledis not Writable
table.a=233# And latertable.a=2333- Install all dependency
- Set PYTHONPATH
export PYTHONPATH=<path of monitor app> - Run
python tests/test_index.py