diff --git a/src/python/phenix_apps/apps/sceptre/configs/configs.py b/src/python/phenix_apps/apps/sceptre/configs/configs.py index 2b813fb..0e5619b 100644 --- a/src/python/phenix_apps/apps/sceptre/configs/configs.py +++ b/src/python/phenix_apps/apps/sceptre/configs/configs.py @@ -23,7 +23,7 @@ def get_fdconfig_class(infrastructure: str) -> type: raise error.AppError(f"Infrastructure: {infrastructure} not supported") class FieldDeviceConfig(base_class): - def __init__(self, provider, name: str, interfaces, devices_by_protocol, publish_endpoint, server_endpoint, reg_config, counter): + def __init__(self, provider, name: str, interfaces, devices_by_protocol, publish_endpoint, server_endpoint, device_subtype, reg_config, counter): super().__init__() if name in reg_config.keys(): self.reg_config = reg_config[name] @@ -36,6 +36,7 @@ def __init__(self, provider, name: str, interfaces, devices_by_protocol, publish self.protocols = self.__generate_protocols(devices_by_protocol, base_class) self.server_endpoint = server_endpoint self.publish_endpoint = publish_endpoint + self.device_subtype = device_subtype self.counter = counter def __generate_protocols(self, devices_by_protocol: dict, base_class: type) -> list: diff --git a/src/python/phenix_apps/apps/sceptre/sceptre.py b/src/python/phenix_apps/apps/sceptre/sceptre.py index e875b3d..06b5fa6 100644 --- a/src/python/phenix_apps/apps/sceptre/sceptre.py +++ b/src/python/phenix_apps/apps/sceptre/sceptre.py @@ -709,6 +709,7 @@ def pre_start(self): srv_name = fd_.metadata.get("server_hostname", None) fd_logic = fd_.metadata.get("logic", None) fd_cycle_time = fd_.metadata.get("cycle_time", None) + subtype = fd_.metadata.get("subtype", "single") parsed = SceptreMetadataParser(fd_.metadata) if self.is_power_provider(provider): @@ -766,6 +767,7 @@ def pre_start(self): devices_by_protocol=parsed.devices_by_protocol, publish_endpoint=pub_endpoint, server_endpoint=srv_endpoint, + device_subtype=subtype, reg_config=reg_config, counter=fd_counter, ) diff --git a/src/python/phenix_apps/apps/sceptre/templates/fd_server.mako b/src/python/phenix_apps/apps/sceptre/templates/fd_server.mako index b11a892..08ce539 100644 --- a/src/python/phenix_apps/apps/sceptre/templates/fd_server.mako +++ b/src/python/phenix_apps/apps/sceptre/templates/fd_server.mako @@ -68,6 +68,7 @@ def intercambio(dictionary, string): 2 tcp://${fd_config.ipaddr}:2404 ${fd_config.name}-104-outstation.log + ${fd_config.device_subtype} % else: % endif