A Simple Variable Supervision and Control application written in python
import monitor
from monitor import variable_model as vm
class VariableTable(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()
import monitor
monitor.set_tracked_table(table)
The multiprocessing one has not yet developed, so use a new thread to start the server
import threading
import monitor
threading.Thread(target=monitor.app).start()
Manipulate variables in the table instance as usual.
Notice: The variables end with
Supervised
are not readable, and the ones end withControlled
is not Writable
table.a = 233
# And later
table.a = 2333
- Install all dependency
- Set PYTHONPATH
export PYTHONPATH=<path of monitor app>
- Run
python tests/test_index.py