Commit c65cadd2 authored by Perceval Guillou's avatar Perceval Guillou Committed by Matias Guijarro
Browse files

fix module import relative to plugin

parent 2e26ca9e
......@@ -40,7 +40,7 @@ This module implements the classes allowing the control of regulation processes
-
class: Mockup # <-- the controller class inheriting from 'bliss.controllers.regulator.Controller'
module: mockup
module: temperature.mockup
host: lid42
inputs:
-
......@@ -94,7 +94,7 @@ This module implements the classes allowing the control of regulation processes
-
class: MyCustomInput # <-- a custom input defined by the user and inheriting from the ExternalInput class
package: bliss.controllers.temperature.mockup # <-- the module where the custom class is defined
package: bliss.controllers.regulation.temperature.mockup # <-- the module where the custom class is defined
plugin: bliss
name: custom_input
unit: eV
......@@ -102,7 +102,7 @@ This module implements the classes allowing the control of regulation processes
-
class: MyCustomOutput # <-- a custom output defined by the user and inheriting from the ExternalOutput class
package: bliss.controllers.temperature.mockup # <-- the module where the custom class is defined
package: bliss.controllers.regulation.temperature.mockup # <-- the module where the custom class is defined
plugin: bliss
name: custom_output
unit: eV
......
......@@ -69,7 +69,7 @@ def create_objects_from_config_node(config, node):
# --- whatever the object kind, first of all we instanciate the controller
controller_name = node.get("name") # usually is None
controller_class = find_class(node, "bliss.controllers.regulation.temperature")
controller_class = find_class(node, "bliss.controllers.regulation")
controller = controller_class(node)
# controller.initialize_controller() # removed for lasy_init
......
......@@ -14,8 +14,8 @@ Example of .yml file for a mockup temperature controller
with the mandatory fields:
class: mockup
module: mockup
class: Mockup
module: temperature.mockup
host: lid42
inputs:
-
......@@ -131,28 +131,6 @@ class Controller:
elif isinstance(obj, Output):
self.initialize_output(obj)
# ========= INIT ALL DEVICES ATTACHED TO THE CONTROLLER ==================
# if self.__hw_controller_initialized:
# return
# else:
# self.__hw_controller_initialized = True
# self.initialize_controller()
# print("============= controller_hw INITIALIZED")
# for obj in self._objects.values():
# # --- initialize the object
# obj.load_base_config()
# if isinstance(obj, Input):
# self.initialize_input(obj)
# elif isinstance(obj, Output):
# self.initialize_output(obj)
# elif isinstance(obj, Loop):
# self.initialize_loop(obj)
# print(f"============= {obj.name} INITIALIZED")
@property
def name(self):
return self.__name
......
-
class: MyDevice # <== any kind of object
package: bliss.controllers.regulation.temperature.mockup
#module: regulation.temperature.mockup
plugin: bliss
name: my_device
-
class: MyCustomInput # <== a custom input defined by the user, inheriting from the ExternalInput class
package: bliss.controllers.regulation.temperature.mockup
#module: regulation.temperature.mockup
plugin: bliss
name: custom_input
device: $my_device # <== any kind of object
......@@ -16,6 +18,7 @@
-
class: MyCustomOutput # <== a custom output defined by the user, inheriting from the ExternalOutput class
package: bliss.controllers.regulation.temperature.mockup
#module: regulation.temperature.mockup
plugin: bliss
name: custom_output
device: $my_device # <== any kind of object
......@@ -61,7 +64,7 @@
-
class: Mockup
module: mockup
module: temperature.mockup
host: lid42
inputs:
-
......
Supports Markdown
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