frappy/cfg/test_cfg.py
Alexander Zaft 7904f243cb server: add option to dynamically create devices
add module which scans a connection and registers new devices depending
on the answer.
* change module initialization to demand-based
* move code from server to dispatcher
- remove intermediate step in Attached __get__

TODO:
  factor out dispatcher (regards to playground)
  discuss factoring out of module creation code from server AND
  dispatcher

Change-Id: I7af959b99a84c291c526aac067a4e2bf3cd741d4
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/31470
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
2023-07-05 17:10:56 +02:00

75 lines
1.3 KiB
Python

Node('test.config.frappy.demo',
'''short description of the testing sec-node
This description for the node can be as long as you need if you use a multiline string.
Very long!
The needed fields are Equipment id (1st argument), description (this)
and the main interface of the node (3rd arg)
''',
'tcp://10768',
)
Mod('attachtest',
'frappy_demo.test.WithAtt',
'test attached',
att = 'LN2',
)
Mod('pinata',
'frappy_demo.test.Pin',
'scan test',
)
Mod('recursive',
'frappy_demo.test.RecPin',
'scan test',
)
Mod('LN2',
'frappy_demo.test.LN2',
'random value between 0..100%',
value = Param(default = 0, unit = '%'),
)
Mod('heater',
'frappy_demo.test.Heater',
'some heater',
maxheaterpower = 10,
)
Mod('T1',
'frappy_demo.test.Temp',
'some temperature',
sensor = 'X34598T7',
)
Mod('T2',
'frappy_demo.test.Temp',
'some temperature',
sensor = 'X34598T8',
)
Mod('T3',
'frappy_demo.test.Temp',
'some temperature',
sensor = 'X34598T9',
)
Mod('Lower',
'frappy_demo.test.Lower',
'something else',
)
Mod('Decision',
'frappy_demo.test.Mapped',
'Random value from configured property choices. Config accepts anything ' \
'that can be converted to a list',
choices = ['Yes', 'Maybe', 'No'],
)
Mod('c',
'frappy_demo.test.Commands',
'a command test',
)