diff --git a/code/cu_manager/src/wattrex_cycler_cu_manager/context.py b/code/cu_manager/src/wattrex_cycler_cu_manager/context.py index af77fb83..e362b03c 100644 --- a/code/cu_manager/src/wattrex_cycler_cu_manager/context.py +++ b/code/cu_manager/src/wattrex_cycler_cu_manager/context.py @@ -30,11 +30,15 @@ DEFAULT_RX_CAN_NAME : str = 'RX_CAN_QUEUE' # Default rx_can system queue name DEFAULT_DETECT_TIMEOUT : int = 2 # Default time to read asked devices answers DEFAULT_DEV_PATH : str = '/dev/wattrex/' # Default path to the devices -DEFAULT_SCPI_QUEUE_PREFIX: str = 'DET_' # Default prefix for the scpi queues +DEFAULT_SCPI_QUEUE_PREFIX : str = 'DET_' # Default prefix for the scpi queues +DEFAULT_CU_ID_PATH : str = './config/cu_manager/.cu_id' +# Default path to credential file for rabbitmq +DEFAULT_CRED_PATH : str = './config/.cred.yaml' CONSTANTS_NAMES = ('DEFAULT_TX_CAN_NAME', 'DEFAULT_TX_SCPI_NAME', 'DEFAULT_RX_CAN_NAME', 'DEFAULT_DETECT_TIMEOUT', - 'DEFAULT_DEV_PATH', 'DEFAULT_SCPI_QUEUE_PREFIX') + 'DEFAULT_DEV_PATH', 'DEFAULT_SCPI_QUEUE_PREFIX', + 'DEFAULT_CU_ID_PATH', 'DEFAULT_CRED_PATH') sys_conf_update_config_params(context=globals(), constants_names=CONSTANTS_NAMES, diff --git a/code/cu_manager/src/wattrex_cycler_cu_manager/cu_broker_client.py b/code/cu_manager/src/wattrex_cycler_cu_manager/cu_broker_client.py index fdd457bf..2b53f74f 100644 --- a/code/cu_manager/src/wattrex_cycler_cu_manager/cu_broker_client.py +++ b/code/cu_manager/src/wattrex_cycler_cu_manager/cu_broker_client.py @@ -11,11 +11,9 @@ ####################### THIRD PARTY IMPORTS ####################### ####################### SYSTEM ABSTRACTION IMPORTS ####################### -from system_logger_tool import sys_log_logger_get_module_logger, SysLogLoggerC, Logger +from system_logger_tool import sys_log_logger_get_module_logger, Logger ####################### LOGGER CONFIGURATION ####################### -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='../log_config.yaml') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### PROJECT IMPORTS ####################### @@ -26,6 +24,9 @@ ####################### MODULE IMPORTS ####################### +###################### CONSTANTS ###################### +from .context import DEFAULT_CRED_PATH + ####################### ENUMS ####################### _REGISTER_TOPIC = '/register' _INFORM_TOPIC = '/inform_reg' @@ -35,7 +36,6 @@ _SUFFIX_RX_LAUNCH = '/launch' - ####################### CLASSES ####################### class BrokerClientC(): @@ -45,7 +45,7 @@ class BrokerClientC(): def __init__(self, error_callback : Callable, launch_callback : Callable,\ detect_callback : Callable, store_cu_info_cb : Callable) -> None: self.mqtt : DrvMqttDriverC = DrvMqttDriverC(error_callback=error_callback, - cred_path='./devops/.cred.yaml') + cred_path=DEFAULT_CRED_PATH) self.__launch_cb : Callable = launch_callback self.__detect_cb : Callable = detect_callback self.__store_cu_info_cb : Callable = store_cu_info_cb diff --git a/code/cu_manager/src/wattrex_cycler_cu_manager/cu_manager.py b/code/cu_manager/src/wattrex_cycler_cu_manager/cu_manager.py index 38f576b7..cfa39fbf 100644 --- a/code/cu_manager/src/wattrex_cycler_cu_manager/cu_manager.py +++ b/code/cu_manager/src/wattrex_cycler_cu_manager/cu_manager.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 """ -Cu Manager +Cum Manager """ ####################### MANDATORY IMPORTS ####################### @@ -15,11 +15,9 @@ ####################### THIRD PARTY IMPORTS ####################### ####################### SYSTEM ABSTRACTION IMPORTS ####################### -from system_logger_tool import sys_log_logger_get_module_logger, SysLogLoggerC, Logger +from system_logger_tool import sys_log_logger_get_module_logger, Logger ####################### LOGGER CONFIGURATION ####################### -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./log_config.yaml') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### PROJECT IMPORTS ####################### @@ -32,6 +30,9 @@ from .register import get_cu_info from .detect import DetectorC +###################### CONSTANTS ###################### +from .context import DEFAULT_CU_ID_PATH + ####################### ENUMS ####################### ####################### CLASSES ####################### @@ -42,7 +43,7 @@ class CuManagerNodeC(SysShdNodeC): ''' def __init__(self, working_flag : Event, cycle_period : int, - cu_id_file_path : str = './devops/cu_manager/.cu_id') -> None: + cu_id_file_path : str = DEFAULT_CU_ID_PATH) -> None: ''' Initialize the CU manager node. ''' diff --git a/code/cycler/src/wattrex_battery_cycler/app/app_man/app_man_core.py b/code/cycler/src/wattrex_battery_cycler/app/app_man/app_man_core.py index 5e386da4..d4097ab2 100644 --- a/code/cycler/src/wattrex_battery_cycler/app/app_man/app_man_core.py +++ b/code/cycler/src/wattrex_battery_cycler/app/app_man/app_man_core.py @@ -246,6 +246,7 @@ def execute_machine_status(self) -> None: #pylint: disable=too-many-branches, to if self.state == AppManCoreStatusE.GET_EXP: ## Wait for cs status to continue if self.__get_exp_status is _AppManCoreGetExpStatusE.GET_EXP: + log.info("Searching for new experiment") self.__fetch_new_exp() self.__request_cs_status() self.__get_exp_status = _AppManCoreGetExpStatusE.WAIT_CS @@ -288,7 +289,7 @@ def execute_machine_status(self) -> None: #pylint: disable=too-many-branches, to log.debug("Executing experiment") self.__execute_experiment() ## Check if the experiment has finish and try to get the next one - log.debug(f"Experiment status: {self.exp_status}") + log.info(f"Experiment status: {self.exp_status}") if self.exp_status in (CyclerDataExpStatusE.FINISHED, CyclerDataExpStatusE.ERROR): self.experiment = None diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/context.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/context.py index 734b14b5..f995326d 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/context.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/context.py @@ -24,8 +24,8 @@ ###################### CONSTANTS ###################### # For further information check out README.md -DEFAULT_PERIOD_ELECT_MEAS: int = 25 # Express in centiseconds -DEFAULT_PERIOD_TEMP_MEAS: int = 25 # Express in centiseconds +DEFAULT_PERIOD_ELECT_MEAS : int = 25 # Express in centiseconds +DEFAULT_PERIOD_TEMP_MEAS : int = 25 # Express in centiseconds CONSTANTS_NAMES = ('DEFAULT_PERIOD_ELECT_MEAS', 'DEFAULT_PERIOD_TEMP_MEAS') sys_conf_update_config_params(context=globals(), diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/mid_dabs.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/mid_dabs.py index a02d5f95..91060ee9 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/mid_dabs.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_dabs/mid_dabs.py @@ -11,9 +11,7 @@ ####################### THIRD PARTY IMPORTS ####################### -from system_logger_tool import SysLogLoggerC, sys_log_logger_get_module_logger, Logger -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels= 'log_config.yaml') +from system_logger_tool import sys_log_logger_get_module_logger, Logger log: Logger = sys_log_logger_get_module_logger(__name__) from scpi_sniffer import DrvScpiSerialConfC @@ -110,15 +108,19 @@ class MidDabsPwrMeterC: #pylint: disable= too-many-instance-attributes '''Instanciates an object enable to measure but are also power devices. ''' def __init__(self, device: list [CyclerDataDeviceC]) -> None: - self.device_type: CyclerDataDeviceTypeE = device[0].device_type - self._dev_db_id: int = device[0].dev_db_id + pwr_devices: List[CyclerDataDeviceC] = device.copy() + for dev in pwr_devices: + if not dev.is_control: + pwr_devices.remove(dev) + self.device_type: CyclerDataDeviceTypeE = pwr_devices[0].device_type + self._dev_db_id: int = pwr_devices[0].dev_db_id ## Commented for first version # self.bisource : DrvEaDeviceC | None = None # self.source : DrvEaDeviceC | None = None # self.load : DrvRsDeviceC | None = None self.epc : DrvEpcDeviceC| None = None try: - for dev in device: + for dev in pwr_devices: if dev.device_type == CyclerDataDeviceTypeE.EPC: can_id= 0 if not dev.iface_name.isnumeric(): # isinstance(dev.iface_name, str), @@ -220,12 +222,7 @@ class MidDabsPwrDevC(MidDabsPwrMeterC): """Instanciates an object enable to control the devices. """ def _init__(self, device: List[CyclerDataDeviceC])->None: - pwr_devices: List[CyclerDataDeviceC] = device.copy() - for dev in pwr_devices: - if dev.device_type not in (CyclerDataDeviceTypeE.EPC, CyclerDataDeviceTypeE.SOURCE, - CyclerDataDeviceTypeE.LOAD, CyclerDataDeviceTypeE.BISOURCE): - pwr_devices.remove(dev) - super().__init__(pwr_devices) + super().__init__(device) def set_cv_mode(self,volt_ref: int, limit_ref: int, limit_type: CyclerDataPwrLimitE = None) -> CyclerDataDeviceStatusE: diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_meas/mid_meas.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_meas/mid_meas.py index 16f944e1..0fd0b177 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_meas/mid_meas.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_meas/mid_meas.py @@ -9,15 +9,13 @@ from threading import Event ####################### THIRD PARTY IMPORTS ####################### -from system_logger_tool import SysLogLoggerC, sys_log_logger_get_module_logger, Logger -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels= 'log_config.yaml') +from system_logger_tool import sys_log_logger_get_module_logger, Logger log: Logger = sys_log_logger_get_module_logger(__name__) from system_shared_tool import (SysShdSharedObjC, SysShdNodeC, SysShdNodeParamsC, SysShdErrorC, SysShdNodeStatusE) from wattrex_cycler_datatypes.cycler_data import (CyclerDataDeviceC, CyclerDataGenMeasC, - CyclerDataDeviceTypeE, CyclerDataExtMeasC, CyclerDataAllStatusC, CyclerDataMergeTagsC) + CyclerDataExtMeasC, CyclerDataAllStatusC, CyclerDataMergeTagsC) ####################### MODULE IMPORTS ####################### from ..mid_dabs import MidDabsPwrMeterC, MidDabsExtraMeterC #pylint: disable= relative-beyond-top-level @@ -54,8 +52,7 @@ def __init__(self,shared_gen_meas: SysShdSharedObjC, shared_ext_meas: SysShdShar self.working_flag = working_flag self.__extra_meter: List[MidDabsExtraMeterC] = [] for dev in devices: - if dev.device_type in (CyclerDataDeviceTypeE.BK, CyclerDataDeviceTypeE.BMS, - CyclerDataDeviceTypeE.FLOW): + if not dev.is_control: self.__extra_meter.append(MidDabsExtraMeterC(dev)) devices.remove(dev) self.__pwr_dev: MidDabsPwrMeterC = MidDabsPwrMeterC(devices) diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_pwr/mid_pwr.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_pwr/mid_pwr.py index 7bf93e9c..77510c0b 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_pwr/mid_pwr.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_pwr/mid_pwr.py @@ -11,9 +11,7 @@ from time import time ####################### THIRD PARTY IMPORTS ####################### -from system_logger_tool import SysLogLoggerC, sys_log_logger_get_module_logger, Logger -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels= 'log_config.yaml') +from system_logger_tool import sys_log_logger_get_module_logger, Logger log: Logger = sys_log_logger_get_module_logger(__name__) ####################### PROJECT IMPORTS ####################### diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/context.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/context.py index 0bb1f692..69096728 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/context.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/context.py @@ -27,7 +27,7 @@ DEFAULT_TIMEOUT_CONNECTION: int = 5 DEFAULT_NODE_PERIOD: int = 250 # Express in milliseconds DEFAULT_NODE_NAME: str = 'STR' -DEFAULT_CRED_FILEPATH : str = './devops/.cred.yaml' # Path to the location of the credential file +DEFAULT_CRED_FILEPATH : str = './config/.cred.yaml' # Path to the location of the credential file CONSTANTS_NAMES = ('DEFAULT_TIMEOUT_CONNECTION', 'DEFAULT_NODE_PERIOD', 'DEFAULT_NODE_NAME', 'DEFAULT_CRED_FILEPATH') diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_cmd.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_cmd.py index dd50daa9..14c92dc6 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_cmd.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_cmd.py @@ -12,11 +12,9 @@ ####################### THIRD PARTY IMPORTS ####################### ####################### SYSTEM ABSTRACTION IMPORTS ####################### -from system_logger_tool import sys_log_logger_get_module_logger, SysLogLoggerC, Logger +from system_logger_tool import sys_log_logger_get_module_logger, Logger ####################### LOGGER CONFIGURATION ####################### -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='../log_config.yaml') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### MODULE IMPORTS ####################### diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_facade.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_facade.py index 408fb97e..9c697745 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_facade.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_facade.py @@ -86,7 +86,6 @@ def get_start_queued_exp(self) -> Tuple[CyclerDataExperimentC|None, CyclerDataBa filter( DrvDbMasterExperimentC.Status == DrvDbExpStatusE.QUEUED.value, DrvDbMasterExperimentC.CSID == self.cs_id).order_by( DrvDbMasterExperimentC.DateCreation.asc()).all() - log.critical(f"Experiment fetched: {exp_result}") if len(exp_result) != 0: exp_result: DrvDbMasterExperimentC = exp_result[0] exp : CyclerDataExperimentC = CyclerDataExperimentC() @@ -106,7 +105,6 @@ def get_start_queued_exp(self) -> Tuple[CyclerDataExperimentC|None, CyclerDataBa log.debug(f"Experiment fetched: {exp.__dict__}, {battery.__dict__}, {profile.__dict__}") else: log.debug("No experiment found") - log.info(f"No experiment found {exp_result}") return exp, battery, profile ## All methods that get information will gather the info from the master db @@ -224,6 +222,7 @@ def get_cycler_station_info(self) -> CyclerDataCyclerStationC|None: #pylint: dis for db_name, att_name in MAPPING_DEV_DB.items(): if att_name == "device_type": setattr(device, att_name, CyclerDataDeviceTypeE(getattr(comp_dev_res,db_name))) + device.check_power_device() elif db_name in detected_dev_res.__dict__: setattr(device, att_name, getattr(detected_dev_res,db_name)) else: @@ -323,7 +322,8 @@ def write_extended_measures(self, exp_id: int) -> None: ext_meas.UsedMeasID = key.split('_')[-1] ext_meas.MeasID = self.meas_id ext_meas.Value = getattr(self.ext_meas,key) - self.__cache_db.session.add(ext_meas) + if ext_meas.Value is not None: + self.__cache_db.session.add(ext_meas) def turn_cycler_station_deprecated(self, exp_id: int|None) -> None: """Method to turn a cycler station to deprecated. diff --git a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_node.py b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_node.py index 6e580a0b..050adc7b 100644 --- a/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_node.py +++ b/code/cycler/src/wattrex_battery_cycler/mid/mid_str/mid_str_node.py @@ -85,7 +85,7 @@ def __apply_command(self, command : MidStrCmdDataC) -> None: #pylint: disable= t ''' #Check which type of command has been received and matchs the payload type if command.cmd_type == MidStrReqCmdE.GET_NEW_EXP: - log.info('Getting new experiment info from database') + log.debug('Getting new experiment info from database') exp_info, battery_info, profile_info = self.db_iface.get_start_queued_exp() if exp_info is not None: self.__actual_exp_id = exp_info.exp_id diff --git a/code/cycler/tests/prueba_mid_str_meas.py b/code/cycler/tests/prueba_mid_str_meas.py index 0d3632fe..82c3a3b4 100644 --- a/code/cycler/tests/prueba_mid_str_meas.py +++ b/code/cycler/tests/prueba_mid_str_meas.py @@ -15,7 +15,7 @@ ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="code/log_config.yaml") +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml") log: Logger = sys_log_logger_get_module_logger(name="test_mid_str") from system_shared_tool import SysShdSharedObjC, SysShdChanC ####################### THIRD PARTY IMPORTS ####################### diff --git a/code/cycler/tests/test_app_man.py b/code/cycler/tests/test_app_man.py index 6c5c70c7..dd970d02 100644 --- a/code/cycler/tests/test_app_man.py +++ b/code/cycler/tests/test_app_man.py @@ -14,7 +14,7 @@ from pytest import fixture, mark ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/cycler/log_config.yaml") +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml") log: Logger = sys_log_logger_get_module_logger(name="test_app_man") ####################### THIRD PARTY IMPORTS ####################### diff --git a/code/cycler/tests/test_mid_dabs.py b/code/cycler/tests/test_mid_dabs.py index e9415663..a262f965 100644 --- a/code/cycler/tests/test_mid_dabs.py +++ b/code/cycler/tests/test_mid_dabs.py @@ -16,7 +16,8 @@ ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/cycler/log_config.yaml", output_sub_folder='tests') +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml", + output_sub_folder='tests') log: Logger = sys_log_logger_get_module_logger(name="test_mid_dabs") from system_shared_tool import SysShdChanC ####################### THIRD PARTY IMPORTS ####################### diff --git a/code/cycler/tests/test_mid_meas.py b/code/cycler/tests/test_mid_meas.py index 495b20b5..347ba9df 100644 --- a/code/cycler/tests/test_mid_meas.py +++ b/code/cycler/tests/test_mid_meas.py @@ -14,7 +14,7 @@ from pytest import fixture, mark ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/log_config.yaml") +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml") log: Logger = sys_log_logger_get_module_logger(name="test_mid_dabs") from system_shared_tool import SysShdSharedObjC, SysShdNodeStatusE ####################### THIRD PARTY IMPORTS ####################### diff --git a/code/cycler/tests/test_mid_pwr.py b/code/cycler/tests/test_mid_pwr.py index 17119ffa..eda6d31c 100644 --- a/code/cycler/tests/test_mid_pwr.py +++ b/code/cycler/tests/test_mid_pwr.py @@ -14,7 +14,7 @@ from pytest import fixture, mark ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/cycler/log_config.yaml", +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml", output_sub_folder='tests') log: Logger = sys_log_logger_get_module_logger(name="test_mid_pwr") from system_shared_tool import SysShdSharedObjC, SysShdNodeStatusE diff --git a/code/cycler/tests/test_mid_str.py b/code/cycler/tests/test_mid_str.py index 72e33399..02914bef 100644 --- a/code/cycler/tests/test_mid_str.py +++ b/code/cycler/tests/test_mid_str.py @@ -16,7 +16,7 @@ ####################### SYSTEM ABSTRACTION IMPORTS ####################### from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/cycler/log_config.yaml", +main_logger = SysLogLoggerC(file_log_levels="config/cycler/log_config.yaml", output_sub_folder='tests') log: Logger = sys_log_logger_get_module_logger(name="test_mid_str") from system_shared_tool import SysShdSharedObjC, SysShdChanC diff --git a/code/datatypes/src/wattrex_cycler_datatypes/cycler_data/cycler_data_device.py b/code/datatypes/src/wattrex_cycler_datatypes/cycler_data/cycler_data_device.py index e80257a1..c1a780b8 100644 --- a/code/datatypes/src/wattrex_cycler_datatypes/cycler_data/cycler_data_device.py +++ b/code/datatypes/src/wattrex_cycler_datatypes/cycler_data/cycler_data_device.py @@ -160,6 +160,7 @@ def __init__(self, dev_db_id: int|None = None, manufacturer : str| None= None, None. """ ## Check if is initialized to none + self.is_control = False if device_type is not None: device_type = CyclerDataDeviceTypeE(device_type) self.dev_db_id : int|None = dev_db_id @@ -171,6 +172,19 @@ def __init__(self, dev_db_id: int|None = None, manufacturer : str| None= None, self.mapping_names : Dict| None = mapping_names self.link_conf: CyclerDataLinkConfC|None = link_configuration + def check_power_device(self) -> None: + """ + Checks if the device is a power device. + If the device type is one of the power device types (EPC, LOAD, SOURCE, BISOURCE), + sets the is_control attribute to True. + """ + list_pwr_devices: list[CyclerDataDeviceTypeE]= [CyclerDataDeviceTypeE.EPC, + CyclerDataDeviceTypeE.LOAD, + CyclerDataDeviceTypeE.SOURCE, CyclerDataDeviceTypeE.BISOURCE] + if self.device_type in list_pwr_devices: + self.is_control = True + + class CyclerDataCyclerStationC: ''' Cycler station information. diff --git a/code/db_sync/src/wattrex_cycler_db_sync/context.py b/code/db_sync/src/wattrex_cycler_db_sync/context.py index 5c164180..c0932009 100644 --- a/code/db_sync/src/wattrex_cycler_db_sync/context.py +++ b/code/db_sync/src/wattrex_cycler_db_sync/context.py @@ -23,7 +23,7 @@ ###################### CONSTANTS ###################### # For further information check out README.md -DEFAULT_CRED_FILEPATH : str = 'devops/.cred.yaml' # Max number of allowed message per chan +DEFAULT_CRED_FILEPATH : str = 'config/.cred.yaml' # Max number of allowed message per chan DEFAULT_SYNC_NODE_NAME: str = 'SYNC' DEFAULT_COMP_UNIT: int = 1 DEFAULT_NODE_PERIOD: int = 200 # ms # Period of the node diff --git a/code/db_sync/src/wattrex_cycler_db_sync/db_sync_fachade.py b/code/db_sync/src/wattrex_cycler_db_sync/db_sync_fachade.py index 266e06b6..3fa4b420 100644 --- a/code/db_sync/src/wattrex_cycler_db_sync/db_sync_fachade.py +++ b/code/db_sync/src/wattrex_cycler_db_sync/db_sync_fachade.py @@ -15,9 +15,7 @@ ####################### SYSTEM ABSTRACTION IMPORTS ####################### path.append(os.getcwd()) -from system_logger_tool import SysLogLoggerC, sys_log_logger_get_module_logger # pylint: disable=wrong-import-position -if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./log_config.yaml') +from system_logger_tool import sys_log_logger_get_module_logger # pylint: disable=wrong-import-position log = sys_log_logger_get_module_logger(__name__) ####################### PROJECT IMPORTS ####################### diff --git a/code/db_sync/tests/run_db_sync.py b/code/db_sync/tests/run_db_sync.py index f6c6aa3c..13c419d4 100644 --- a/code/db_sync/tests/run_db_sync.py +++ b/code/db_sync/tests/run_db_sync.py @@ -15,7 +15,7 @@ from system_logger_tool import sys_log_logger_get_module_logger, SysLogLoggerC, Logger ####################### LOGGER CONFIGURATION ####################### -cycler_logger = SysLogLoggerC(file_log_levels='./devops/db_sync/log_config.yaml', +cycler_logger = SysLogLoggerC(file_log_levels='./config/db_sync/log_config.yaml', output_sub_folder='db_sync') log: Logger = sys_log_logger_get_module_logger(__name__) diff --git a/code/db_sync/tests/test_db_sync.py b/code/db_sync/tests/test_db_sync.py index e10e954c..c235bc8b 100644 --- a/code/db_sync/tests/test_db_sync.py +++ b/code/db_sync/tests/test_db_sync.py @@ -17,7 +17,7 @@ ####################### SYSTEM ABSTRACTION IMPORTS ####################### sys.path.append(os.getcwd()) from system_logger_tool import Logger, SysLogLoggerC, sys_log_logger_get_module_logger -main_logger = SysLogLoggerC(file_log_levels="devops/db_sync/log_config.yaml", +main_logger = SysLogLoggerC(file_log_levels="config/db_sync/log_config.yaml", output_sub_folder='tests') log: Logger = sys_log_logger_get_module_logger(name="test_db_sync") diff --git a/config/config_params_example.yaml b/config/config_params_example.yaml index 6c302042..8c384122 100644 --- a/config/config_params_example.yaml +++ b/config/config_params_example.yaml @@ -2,7 +2,7 @@ system_shared_tool: DEFAULT_CHAN_NUM_MSG: 300 - DEFAULT_IPC_MSG_SIZE: 600 + DEFAULT_IPC_MSG_SIZE: 400 DEFAULT_CHAN_TIMEOUT: 3 wattrex_cycler_cu_manager: @@ -10,15 +10,19 @@ wattrex_cycler_cu_manager: DEFAULT_TX_SCPI_NAME : 'tx_scpi' # Default tx_scpi system queue name DEFAULT_RX_CAN_NAME : 'RX_CAN_QUEUE' # Default rx_can system queue name DEFAULT_RX_SCPI_NAME : 'RX_SCPI_QUEUE' # Default rx_scpi system queue name - DEFAULT_DETECT_TIMEOUT : 20 # Default time to read asked devices answers + DEFAULT_DETECT_TIMEOUT : 2 # Default time to read asked devices answers + # Default path to file which stores cu_id + DEFAULT_CU_ID_PATH : './config/cu_manager/.cu_id' + # Default path to credential file for rabbitmq + DEFAULT_CRED_PATH : './config/.cred.yaml' wattrex_driver_db: - DEFAULT_CRED_FILEPATH: '~/roberto/cycler_controler/devops/.cred.yaml' + DEFAULT_CRED_FILEPATH: '~/roberto/cycler_controler/config/.cred.yaml' wattrex_driver_epc: DEFAULT_MAX_HS_VOLT : 14100 # Max high side voltage the epc has as hardware limits DEFAULT_MIN_HS_VOLT : 5300 # Min high side voltage the epc has as hardware limits - DEFAULT_MAX_LS_VOLT : 5100 # Max low side voltage the epc has as hardware limits + DEFAULT_MAX_LS_VOLT : 9000 #5100 # Max low side voltage the epc has as hardware limits DEFAULT_MIN_LS_VOLT : 400 # Min low side voltage the epc has as hardware limits DEFAULT_MAX_LS_CURR : 15500 # Max low side current the epc has as hardware limits DEFAULT_MIN_LS_CURR : -15500 # Min low side current the epc has as hardware limits @@ -66,12 +70,16 @@ can_sniffer: DEFAULT_IFACE_CHAN_NAME : 'can0' # Name of the CAN interface channel ################### CYCLER ################### +app_man: + DEFAULT_PERIOD_CYCLE_MAN : 300 # Express in milliseconds + DEFAULT_CS_MNG_NODE_NAME : 'MANAGER' + DEFAULT_PERIOD_WAIT_EXP : 10 # Periods of the cycle manager mid_str: DEFAULT_TIMEOUT_CONNECTION : 5 - DEFAULT_NODE_PERIOD : 250 # Express in milliseconds + DEFAULT_NODE_PERIOD : 200 # Express in milliseconds DEFAULT_NODE_NAME : 'STR' - DEFAULT_CRED_FILEPATH : './devops/.cred.yaml' # Path to the location of the credential file + DEFAULT_CRED_FILEPATH : './config/.cred.yaml' # Path to the location of the credential file mid_meas: DEFAULT_NODE_PERIOD : 120 # Express in milliseconds @@ -82,7 +90,7 @@ mid_dabs: DEFAULT_PERIOD_TEMP_MEAS : 25 # Express in centiseconds wattrex_cycler_db_sync: - DEFAULT_CRED_FILEPATH : './devops/.cred.yaml' # Path to the location of the credential file + DEFAULT_CRED_FILEPATH : './config/.cred.yaml' # Path to the location of the credential file DEFAULT_SYNC_NODE_NAME : 'SYNC' DEFAULT_COMP_UNIT : 2 DEFAULT_NODE_PERIOD : 500 # ms # Period of the node diff --git a/config/cu_manager/log_config_example.yaml b/config/cu_manager/log_config_example.yaml index 13de2368..9c87cc48 100644 --- a/config/cu_manager/log_config_example.yaml +++ b/config/cu_manager/log_config_example.yaml @@ -6,14 +6,17 @@ __main__: "INFO" ##### DEV ###### wattrex_cycler_cu_manager: "DEBUG" -src.wattrex_cycler_cu_manager: "DEBUG" +cu_manager.src.wattrex_cycler_cu_manager: "DEBUG" ##### DRV ###### -drv_mqtt: "DEBUG" +wattrex_driver_mqtt: "ERROR" +can_sniffer: "ERROR" +scpi_sniffer: "ERROR" ##### SYS ##### sys_abs.sys_conf: "ERROR" system_logger_tool: "ERROR" system_shared_tool: "ERROR" +system_config_tool: "ERROR" file_handlers: {} \ No newline at end of file diff --git a/config/cycler/log_config_example.yaml b/config/cycler/log_config_example.yaml index bc386ab6..dd74fd64 100644 --- a/config/cycler/log_config_example.yaml +++ b/config/cycler/log_config_example.yaml @@ -12,12 +12,26 @@ detect: "INFO" register: "DEBUG" ##### DRV ###### -wattrex_driver_epc: "INFO" +wattrex_driver_epc: "ERROR" +wattrex_driver_db: "ERROR" +wattrex_driver_base : "ERROR" +wattrex_driver_bms: "ERROR" +wattrex_driver_flow : "ERROR" can_sniffer: "INFO" +scpi_sniffer: "ERROR" ##### SYS ##### sys_abs.sys_conf: "ERROR" system_logger_tool: "ERROR" system_shared_tool: "INFO" +system_config_tool: "ERROR" + +##### CYCLER ##### +cycler.src.wattrex_battery_cycler.app.app_man: "INFO" +wattrex_cycler_datatypes.cycler_data: "INFO" +mid.mid_str: "INFO" +mid.mid_dabs : "INFO" +mid.mid_meas : "INFO" +mid.mid_pwr : "INFO" file_handlers: {} \ No newline at end of file diff --git a/config/db_sync/log_config_example.yaml b/config/db_sync/log_config_example.yaml index d3b7769f..c2801068 100644 --- a/config/db_sync/log_config_example.yaml +++ b/config/db_sync/log_config_example.yaml @@ -1,32 +1,17 @@ ---- #YAML FILE START +--- +#YAML FILE START __main__: "DEBUG" -##### app ##### -app.app_man: "DEBUG" -app.app_diag: "DEBUG" +##### DB SYNC ##### +wattrex_cycler_db_sync: "INFO" +db_sync.src.wattrex_cycler_db_sync: "DEBUG" +##### DRV ###### +scpi_sniffer: "DEBUG" -##### mid ##### -mid.mid_dabs: "DEBUG" -mid.mid_meas: "DEBUG" -mid.mid_data: "DEBUG" -mid.mid_str: "DEBUG" +##### SYS ##### +system_logger_tool: "ERROR" +system_shared_tool: "ERROR" +system_config_tool: "ERROR" -##### drv ###### -wattrex_driver_epc: 'WARNING' -wattrex_driver_ea: 'INFO' -wattrex_driver_rs: 'INFO' -wattrex_driver_pwr: 'INFO' -wattrex_driver_bk: 'INFO' -scpi_sniffer: 'INFO' -can_sniffer: 'INFO' - -##### sys ##### -system_shared_tool: "INFO" -system_config_tool: "INFO" -system_logger_tool: "INFO" - -test_mid_dabs: 'DEBUG' -file_handlers: { - # "log_can" : [ drv.drv_can, drv.drv_epc ], -} \ No newline at end of file +file_handlers: {} \ No newline at end of file diff --git a/devops/can/can_node.py b/devops/can/can_node.py index 6cbb5771..2d29a98c 100644 --- a/devops/can/can_node.py +++ b/devops/can/can_node.py @@ -18,7 +18,8 @@ ####################### LOGGER CONFIGURATION ####################### if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./devops/can/log_config.yaml', output_sub_folder='can') + cycler_logger = SysLogLoggerC(file_log_levels='./config/can/log_config.yaml', + output_sub_folder='can') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### MODULE IMPORTS ####################### diff --git a/devops/cu_manager/run_cu_node.py b/devops/cu_manager/run_cu_node.py index f0843b40..c886ed06 100644 --- a/devops/cu_manager/run_cu_node.py +++ b/devops/cu_manager/run_cu_node.py @@ -16,12 +16,12 @@ ####################### LOGGER CONFIGURATION ####################### if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./devops/cu_manager/log_config.yaml') + cycler_logger = SysLogLoggerC(file_log_levels='./config/cu_manager/log_config.yaml') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### MODULE IMPORTS ####################### -# sys.path.append(os.getcwd()+'/code/cu_manager/') -# from src.wattrex_cycler_cu_manager import CuManagerNodeC +#sys.path.append(os.path.dirname(__file__)+'/../../code') +# from cu_manager.src.wattrex_cycler_cu_manager import CuManagerNodeC from wattrex_cycler_cu_manager import CuManagerNodeC ####################### PROJECT IMPORTS ####################### @@ -50,6 +50,6 @@ def signal_handler(sig, frame) -> None: #pylint: disable= unused-argument working_flag_event.set() cu_manager_node = CuManagerNodeC(working_flag=working_flag_event, cycle_period=1000, - cu_id_file_path='./devops/cu_manager/.cu_id') + cu_id_file_path='./config/cu_manager/.cu_id') signal(SIGINT, signal_handler) cu_manager_node.run() diff --git a/devops/cycler/Dockerfile.cycler b/devops/cycler/Dockerfile.cycler index 887a1a31..6489b71f 100644 --- a/devops/cycler/Dockerfile.cycler +++ b/devops/cycler/Dockerfile.cycler @@ -11,17 +11,21 @@ WORKDIR ${APP_PATH} ENV PATH="${PATH}:/home/${UG_NAME}/.local/bin" RUN pip install --upgrade pip RUN pip install pytest -ADD --chown=${UG_NAME}:${UG_NAME} ./devops/config_params_example.yaml ./devops/config_params.yaml -ENV CONFIG_FILE_PATH=${APP_PATH}/devops/config_params.yaml -ADD --chown=${UG_NAME}:${UG_NAME} ./devops/cycler ./devops/cycler +ADD --chown=${UG_NAME}:${UG_NAME} ./config/config_params_example.yaml ./config/config_params.yaml +ENV CONFIG_FILE_PATH=${APP_PATH}/config/config_params.yaml +ADD --chown=${UG_NAME}:${UG_NAME} ./devops/cycler devops/cycler FROM cycler_base as cycler_test ARG UPDATE_REQS=default -ADD --chown=${UG_NAME}:${UG_NAME} ./code/cycler ./code/cycler +WORKDIR ${APP_PATH} +ADD --chown=${UG_NAME}:${UG_NAME} ./code/cycler code/cycler +RUN ls /cycler RUN pip install -r ./code/cycler/requirements.txt FROM cycler_base as cycler_prod ARG UPDATE_REQS=default +WORKDIR ${APP_PATH} RUN pip install wattrex-battery-cycler + CMD ["python", "./devops/cycler/run_cycler.py"] \ No newline at end of file diff --git a/devops/cycler/run_cycler.py b/devops/cycler/run_cycler.py index 694e0eaa..ec977dd5 100644 --- a/devops/cycler/run_cycler.py +++ b/devops/cycler/run_cycler.py @@ -17,14 +17,14 @@ ####################### LOGGER CONFIGURATION ####################### CS_ID = os.getenv("CSID") if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./devops/cycler/log_config.yaml', + cycler_logger = SysLogLoggerC(file_log_levels='./config/cycler/log_config.yaml', output_sub_folder=f'cycler_{CS_ID}') log: Logger = sys_log_logger_get_module_logger(__name__) -log.critical(f'CS_ID: {CS_ID}') +log.info(f'CS_ID: {CS_ID}') ####################### MODULE IMPORTS ####################### -# sys.path.append(os.getcwd()+'/code/cycler/') -# from src.wattrex_battery_cycler.app.app_man import AppManNodeC +# sys.path.append(os.path.dirname(__file__)+'/../../code/') +# from cycler.src.wattrex_battery_cycler.app.app_man import AppManNodeC from wattrex_battery_cycler.app.app_man import AppManNodeC ####################### PROJECT IMPORTS ####################### diff --git a/devops/db_sync/Dockerfile.db_sync b/devops/db_sync/Dockerfile.db_sync index 28c75a38..a74ac245 100644 --- a/devops/db_sync/Dockerfile.db_sync +++ b/devops/db_sync/Dockerfile.db_sync @@ -10,8 +10,8 @@ ENV APP_PATH=/cycler WORKDIR ${APP_PATH} ENV PATH="${PATH}:/home/${UG_NAME}/.local/bin" RUN pip install --upgrade pip -ADD --chown=${UG_NAME}:${UG_NAME} ./devops/config_params_example.yaml ./devops/config_params.yaml -ENV CONFIG_FILE_PATH=${APP_PATH}/devops/config_params.yaml +ADD --chown=${UG_NAME}:${UG_NAME} ./config/config_params_example.yaml ./config/config_params.yaml +ENV CONFIG_FILE_PATH=${APP_PATH}/config/config_params.yaml ADD --chown=${UG_NAME}:${UG_NAME} ./devops/db_sync ./devops/db_sync FROM db_sync_base as db_sync_local diff --git a/devops/db_sync/run_db_sync.py b/devops/db_sync/run_db_sync.py index 0d6d1aa9..c9476474 100644 --- a/devops/db_sync/run_db_sync.py +++ b/devops/db_sync/run_db_sync.py @@ -15,13 +15,13 @@ from system_logger_tool import sys_log_logger_get_module_logger, SysLogLoggerC, Logger ####################### LOGGER CONFIGURATION ####################### -cycler_logger = SysLogLoggerC(file_log_levels='./devops/db_sync/log_config.yaml', +cycler_logger = SysLogLoggerC(file_log_levels='./config/db_sync/log_config.yaml', output_sub_folder='db_sync') log: Logger = sys_log_logger_get_module_logger(__name__) ####################### MODULE IMPORTS ####################### -sys.path.append(os.path.dirname(__file__)+'/../') -#from code.db_sync.src.wattrex_cycler_db_sync import DbSyncNodeC +sys.path.append(os.path.dirname(__file__)+'/../../code') +# from db_sync.src.wattrex_cycler_db_sync import DbSyncNodeC from wattrex_cycler_db_sync import DbSyncNodeC ####################### PROJECT IMPORTS ####################### diff --git a/devops/deploy.sh b/devops/deploy.sh index e83355e2..6737ddbb 100755 --- a/devops/deploy.sh +++ b/devops/deploy.sh @@ -2,12 +2,13 @@ DEVOPS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" && pwd ) REPO_ROOT_DIR=$( cd "${DEVOPS_DIR}/../" && pwd) -ENV_FILE=.cred.env +CONFIG_DIR="${REPO_ROOT_DIR}/config" +ENV_FILE=".cred.env" DOCKER_FOLDER=./ DOCKER_COMPOSE=docker-compose.yml CYCLER_SRC_DIR="${REPO_ROOT_DIR}/code/cycler" INT_RE='^[0-9]+$' -DOCKER_COMPOSE_ARGS="-f ${DEVOPS_DIR}/${DOCKER_FOLDER}/${DOCKER_COMPOSE} --env-file ${DEVOPS_DIR}/${ENV_FILE}" +DOCKER_COMPOSE_ARGS="-f ${DEVOPS_DIR}/${DOCKER_FOLDER}/${DOCKER_COMPOSE} --env-file ${CONFIG_DIR}/${ENV_FILE}" ARG1=$1 ARG2=$2 @@ -62,7 +63,7 @@ check_sniffer () { if ! [[ $? -eq 0 ]]; then echo "Setting up can sniffer" systemctl --user set-environment SRC_PATH=${DEVOPS_DIR} - systemctl --user set-environment CONFIG_FILE_PATH=${DEVOPS_DIR}/config_params.yaml + systemctl --user set-environment CONFIG_FILE_PATH=${CONFIG_DIR}/config_params.yaml systemctl --user enable ${DEVOPS_DIR}/can/can_sniffer.service systemctl --user start can_sniffer.service else @@ -75,7 +76,7 @@ check_sniffer () { if ! [[ $? -eq 0 ]]; then echo "Setting up scpi sniffer" systemctl --user set-environment SRC_PATH=${DEVOPS_DIR} - systemctl --user set-environment CONFIG_FILE_PATH=${DEVOPS_DIR}/config_params.yaml + systemctl --user set-environment CONFIG_FILE_PATH=${CONFIG_DIR}/config_params.yaml systemctl --user enable ${DEVOPS_DIR}/scpi/scpi_sniffer.service systemctl --user start scpi_sniffer.service else @@ -107,7 +108,7 @@ force_stop () { # MAIN -if ! [ -f "${DEVOPS_DIR}/${ENV_FILE}" ]; then +if ! [ -f "${CONFIG_DIR}/${ENV_FILE}" ]; then >&2 echo "[ERROR] .cred.env file not found" exit 2 fi @@ -123,16 +124,22 @@ else fi # Check if the required files are present. -required_file_list=("docker-compose.yml" ".cred.env" ".cred.yaml" "config_params.yaml" - "scpi/log_config.yaml" "cycler/log_config.yaml" "cu_manager/log_config.yaml" - "can/log_config.yaml" "cache_db/createCacheCyclerTables.sql" - "db_sync/log_config.yaml" ) -for file in ${required_file_list} +required_file_list=("${DEVOPS_DIR}/docker-compose.yml" + "${DEVOPS_DIR}/cache_db/createCacheCyclerTables.sql" + "${CONFIG_DIR}/.cred.env" + "${CONFIG_DIR}/.cred.yaml" + "${CONFIG_DIR}/config_params.yaml" + "${CONFIG_DIR}/scpi/log_config.yaml" + "${CONFIG_DIR}/cycler/log_config.yaml" + "${CONFIG_DIR}/cu_manager/log_config.yaml" + "${CONFIG_DIR}/can/log_config.yaml" + "${CONFIG_DIR}/db_sync/log_config.yaml" ) + +for file_path in ${required_file_list} do - file_path=${DEVOPS_DIR}/${file} if [ ! -f ${file_path} ]; then - echo "${file_path} not found" - exit 1 + echo "${file_path} not found" + exit 1 fi done diff --git a/devops/docker-compose.yml b/devops/docker-compose.yml index f10b42ef..4f6ed688 100644 --- a/devops/docker-compose.yml +++ b/devops/docker-compose.yml @@ -14,7 +14,7 @@ services: environment: TZ: Europe/Berlin env_file: - - ./.cred.env + - ../config/.cred.env healthcheck: test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u${MARIADB_ROOT_USER}", "-p${MARIADB_ROOT_PASSWORD}"] interval: 10s @@ -36,10 +36,10 @@ services: # user: ${USER_ID}:${GROUP_ID} ipc: host volumes: - - ./.cred.yaml:/cycler/devops/.cred.yaml - - ./cycler/log_config.yaml:/cycler/devops/cycler/log_config.yaml + - ../config/.cred.yaml:/cycler/config/.cred.yaml + - ../config/cycler/log_config.yaml:/cycler/config/cycler/log_config.yaml - ../log:/cycler/log - - ./config_params.yaml:/cycler/devops/config_params.yaml + - ../config/config_params.yaml:/cycler/config/config_params.yaml networks: - wattrex-net depends_on: @@ -61,8 +61,8 @@ services: ipc: host volumes: - ./db_sync/run_db_sync.py:/cycler/devops/db_sync/run_db_sync.py - - ./.cred.yaml:/cycler/devops/.cred.yaml - - ./db_sync/log_config.yaml:/cycler/devops/db_sync/log_config.yaml + - ../config/.cred.yaml:/cycler/config/.cred.yaml + - ../config/db_sync/log_config.yaml:/cycler/config/db_sync/log_config.yaml - ../log:/cycler/log networks: - wattrex-net diff --git a/devops/scpi/scpi_node.py b/devops/scpi/scpi_node.py index 6e9e1977..b83f60b8 100644 --- a/devops/scpi/scpi_node.py +++ b/devops/scpi/scpi_node.py @@ -18,7 +18,7 @@ ####################### LOGGER CONFIGURATION ####################### if __name__ == '__main__': - cycler_logger = SysLogLoggerC(file_log_levels='./devops/scpi/log_config.yaml', + cycler_logger = SysLogLoggerC(file_log_levels='./config/scpi/log_config.yaml', output_sub_folder='scpi') log: Logger = sys_log_logger_get_module_logger(__name__)