feat: integrate load_config method for VILLASnodeManager#75
feat: integrate load_config method for VILLASnodeManager#75bekiralti wants to merge 1 commit intoVILLASframework:masterfrom
Conversation
Signed-off-by: Bekir Altindal <bekir.altindal@rwth-aachen.de>
|
Hi @bekiralti, I am wondering, isnt this already handled by the One of the design goals of VILLAScontroller has been to harmonize control and configuration of different components via a common set of control actions (start, stop, pause, resume, ...). Hence, if possible, I would argue we should try to avoid introducing any new actions targeted at single component types and instead try to generalize. The reasoning behind this is, also that the VILLASweb interface can currently only send this standard control actions. Adding support for new ones, will require a lot of custom code for the web-interface. And I am not sure if we really want to do this for every type of component. |
|
Hi @stv0g, thanks for your reply! Yeah, that is quite troublesome. For now, I would like to try and clarify my intentions and thought process. While experimenting with
To better understand the current behavior, I tried the following:
This left me a bit unsure what the intended model for VILLAScontroller is in the case of VILLASnode:
It is quite possible that I am missing something obvious, and a short clarification would help me to better align future PRs with the intended behaviour. :) |
Integrates the existing load_config method from the villas-node
library into VILLASnodeManager to enable configuration loading
via RabbitMQ messages.
Example
Example (
tx.py) Python Code to send messages to villas-controller via RabbitMQ:Minimal (
example_ctl.json) configuration forvillas-controller:{ "broker": { "url": "amqp://guest:guest@localhost/%2F" }, "components": [ { "category": "manager", "type": "villas-node" } ] }Minimal (
example_node.json) configuration to sent via RabbitMQ to villas-controller, then villas-controller reloads the running villas-node with this configuration.{ "nodes": { "my_sig": { "type": "signal.v2", "rate": 1, "in": { "signals": [ { "signal": "constant", "amplitude": 1 } ] } } }, "paths": [ { "in": "my_sig", "hooks": [ { "type": "print" } ] } ] }docker run -p 5672:5672 -p 15672:15672 -d rabbitmq:managementvillas-nodevillas-controller -c example_ctl.json -d DEBUG daemonexample_node.json:python tx.py load_config example_node.json