pcdshub / BEAMS

Beamline Engineering Automation Management Systems
Other
1 stars 2 forks source link

Keep Serialization, Behavior Trees, EPICS unentwined in code #46

Open joshc-slac opened 2 months ago

joshc-slac commented 2 months ago

Current Behavior

Fundamental to where we want to take this library we cannot be limited by only facilitating EPICS level commands. This is relatively well captured but it is easy within the current paradigm to allow EPICS things to creep into a place where they should not be.

Case and point: https://github.com/pcdshub/BEAMS/blob/ac37dfff70dc5872af3d3436381f5769df64316c/beams/behavior_tree/ActionWorker.py#L37

ActionWorker should default to spawning a Process and take as argument from its ActionNode parent what type of process this is.: https://github.com/pcdshub/BEAMS/blob/ac37dfff70dc5872af3d3436381f5769df64316c/beams/behavior_tree/ActionNode.py#L83-L90

Possible Solution

This may require making an enum that we gets set by the results of the type of node specified in the config json file and parsed by tree_config.py that gets passed the action node, there are other alternatives as well.

joshc-slac commented 1 month ago

Another location, this one I would argue is a more serious infringement of the conceptual distance between BTs / Serialization / EPICS

https://github.com/pcdshub/BEAMS/blob/3b8b95bfad8f8465337965551b9e688519b6e5e2/beams/tree_config.py#L135-L148

joshc-slac commented 1 week ago

This was pretty well addressed by #67; I think theres probably more creep, going to keep this open