Commit 4af22697 authored by Matias Guijarro's avatar Matias Guijarro

mapping: register 'system' keys in constructor

parent 4670a882
......@@ -34,6 +34,12 @@ class Map:
self.G.find_predecessors = self.find_predecessors
self.node_attributes_list = ["name", "address", "plugin"]
self.register("devices", parents_list=["session"])
self.register("comms", parents_list=["session"])
self.register("counters", parents_list=["session"])
self.register("axes", parents_list=["session"])
def register(
self, instance, parents_list=None, children_list=None, tag: str = None, **kwargs
......@@ -50,9 +56,7 @@ class Map:
remapped if another instance will have as a child the other instance.
There could be node parents in form of a string, system defined are:
* 'beamline'
* 'devices'
* 'sessions'
* 'counters'
* 'comms'
......@@ -377,12 +377,6 @@ class Session(object):
self.__map = Map()
self.__map.register("devices", parents_list=[self], tag="devices")
self.__map.register("controllers", parents_list=[self], tag="controllers")
self.__map.register("comms", parents_list=[self], tag="comms")
self.__map.register("axes", parents_list=[self], tag="axes")
self.__map.register("counters", parents_list=[self], tag="counters")
self.__log = Log(map=self.__map)
......@@ -22,11 +22,6 @@ def map():
map = Map()
map.register("devices", parents_list=["session"])
map.register("sessions", parents_list=["session"])
map.register("comms", parents_list=["session"])
map.register("counters", parents_list=["session"])
return map
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment