Index: dialin/dg/dg_debug.py =================================================================== diff -u --- dialin/dg/dg_debug.py (revision 0) +++ dialin/dg/dg_debug.py (revision e3ff2de340f3484e70b48ed21e05a8dfb2402a5c) @@ -0,0 +1,58 @@ +########################################################################### +# +# Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. +# +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN +# WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# @file dg_debug.py +# +# @author (last) Behrouz NematiPour +# @date (last) 17-Mar-2022 +# @author (original) Michael Garthwaite +# @date (original) 20-May-2022 +# +############################################################################ + +import struct +from logging import Logger +from ..common import * +from ..common.msg_defs import MsgIds, MsgFieldPositions +from ..protocols.CAN import DenaliChannels +from ..utils.base import AbstractSubSystem, publish +from datetime import datetime + +class DebugTypes(DialinEnum): + DEBUG_TYPE_UNSIGNED = 0 + DEBUG_TYPE_SIGNED = 1 + DEBUG_TYPE_FLOAT = 2 + DEBUG_TYPE_STRING = 3 + + +class DGDebug(AbstractSubSystem): + """ + Dialysate Generator (DG) Dialin API sub-class for debugging related commands + + """ + def __init__(self, can_interface, logger: Logger): + """ + + @param can_interface: Denali CAN Messenger object + """ + + super().__init__() + self.can_interface = can_interface + self.logger = logger + + if self.can_interface is not None: + channel_id = DenaliChannels.dg_sync_broadcast_ch_id + msg_id = MsgIds.MSG_ID_DG_DEBUG_EVENT.value + self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._hander_dg_debug_sync) + + + + def _hander_dg_debug_sync(self, message): + pass + + + def get_debug_event(self): \ No newline at end of file