Index: dialin/common/alarm_defs.py =================================================================== diff -u -rafcc17e958cc581864479c86b344f2370d1c52fc -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/common/alarm_defs.py (.../alarm_defs.py) (revision afcc17e958cc581864479c86b344f2370d1c52fc) +++ dialin/common/alarm_defs.py (.../alarm_defs.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -8,9 +8,9 @@ # @file alarm_defs.py # # @author (last) Peter Lucia -# @date (last) 13-May-2021 +# @date (last) 14-May-2021 # @author (original) Peter Lucia -# @date (original) 13-May-2021 +# @date (original) 14-May-2021 # ############################################################################ from enum import unique Index: dialin/common/msg_defs.py =================================================================== diff -u -rdf58df8b4e8b8d3f0b0764deda9f15050a071d78 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/common/msg_defs.py (.../msg_defs.py) (revision df58df8b4e8b8d3f0b0764deda9f15050a071d78) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -16,20 +16,17 @@ from enum import unique from ..utils.base import DialinEnum from .msg_ids import MsgIds -from aenum import extend_enum # Define msg ids that are not yet added to common but are needed in dialin @unique class MsgIdsDialin(DialinEnum): - DMSG_ID_HD_SERIAL_NUMBER_RESPONSE = 0X87 - DMSG_ID_DG_SERIAL_NUMBER_RESPONSE = 0X88 - DMSG_ID_UI_SYSTEM_USAGE_REQUEST = 0x89 - DMSG_ID_HD_SYSTEM_USAGE_RESPONSE = 0x8A - DMSG_ID_DG_SYSTEM_USAGE_RESPONSE = 0x8C + MSG_DIALIN_ID_HD_SERIAL_NUMBER_RESPONSE = 0X87 + MSG_DIALIN_ID_DG_SERIAL_NUMBER_RESPONSE = 0X88 + MSG_DIALIN_ID_UI_SYSTEM_USAGE_REQUEST = 0x89 + MSG_DIALIN_ID_HD_SYSTEM_USAGE_RESPONSE = 0x8A + MSG_DIALIN_ID_DG_SYSTEM_USAGE_RESPONSE = 0x8C + MSG_DIALIN_ID_HD_FLUID_LEAK_STATE_DETECTOR_OVERRIDE = 0x8047 -# extend MsgIds -for each in MsgIdsDialin: - extend_enum(MsgIds, each.name, each.value) ACK_NOT_REQUIRED = [ MsgIds.MSG_ID_ALARM_CONDITION_CLEARED.value Index: dialin/common/msg_ids.py =================================================================== diff -u -rafcc17e958cc581864479c86b344f2370d1c52fc -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/common/msg_ids.py (.../msg_ids.py) (revision afcc17e958cc581864479c86b344f2370d1c52fc) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -8,9 +8,9 @@ # @file msg_ids.py # # @author (last) Peter Lucia -# @date (last) 13-May-2021 +# @date (last) 14-May-2021 # @author (original) Peter Lucia -# @date (original) 13-May-2021 +# @date (original) 14-May-2021 # ############################################################################ from enum import unique Index: dialin/hd/fluid_leak.py =================================================================== diff -u -r33e3f9f462c34f5ac8f8319dc3fada668b829190 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/hd/fluid_leak.py (.../fluid_leak.py) (revision 33e3f9f462c34f5ac8f8319dc3fada668b829190) +++ dialin/hd/fluid_leak.py (.../fluid_leak.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -15,7 +15,7 @@ ############################################################################ import struct from ..utils.conversions import integer_to_bytearray, float_to_bytearray -from ..common.msg_defs import MsgIds, MsgFieldPositions +from ..common.msg_defs import MsgIds, MsgFieldPositions, MsgIdsDialin from .constants import RESET, NO_RESET from ..protocols.CAN import (DenaliMessage, DenaliChannels) from ..utils.base import _AbstractSubSystem, _publish @@ -90,7 +90,7 @@ payload = rst + det message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, - message_id=MsgIds.MSG_ID_HD_FLUID_LEAK_STATE_DETECTOR_OVERRIDE.value, + message_id=MsgIdsDialin.MSG_DIALIN_ID_HD_FLUID_LEAK_STATE_DETECTOR_OVERRIDE.value, payload=payload) self.logger.debug("Override fluid leak detector state value") Index: dialin/ui/dg_simulator.py =================================================================== diff -u -rbfb0c47181dc8a73d09825ab697a7799dd520417 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision bfb0c47181dc8a73d09825ab697a7799dd520417) +++ dialin/ui/dg_simulator.py (.../dg_simulator.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -50,7 +50,7 @@ MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, self._handler_request_dg_version) self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIdsDialin.DMSG_ID_UI_SYSTEM_USAGE_REQUEST.value, + MsgIdsDialin.MSG_DIALIN_ID_UI_SYSTEM_USAGE_REQUEST.value, self._handler_system_usage_response) def _handler_system_usage_response(self, message: dict) -> None: @@ -66,7 +66,7 @@ payload += integer_to_bytearray(1619887863) message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, - message_id=MsgIdsDialin.DMSG_ID_DG_SYSTEM_USAGE_RESPONSE.value, + message_id=MsgIdsDialin.MSG_DIALIN_ID_DG_SYSTEM_USAGE_RESPONSE.value, payload=payload) self.can_interface.send(message, 0) @@ -434,7 +434,7 @@ payload = b'0123456789\0' message = DenaliMessage.build_message(channel_id=DenaliChannels.dg_to_ui_ch_id, - message_id=MsgIdsDialin.DMSG_ID_DG_SERIAL_NUMBER_RESPONSE.value, + message_id=MsgIdsDialin.MSG_DIALIN_ID_DG_SERIAL_NUMBER_RESPONSE.value, payload=payload) self.can_interface.send(message, 0) Index: dialin/ui/hd_simulator.py =================================================================== diff -u -rbfb0c47181dc8a73d09825ab697a7799dd520417 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision bfb0c47181dc8a73d09825ab697a7799dd520417) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -80,7 +80,7 @@ MsgIds.MSG_ID_REQUEST_FW_VERSIONS.value, self._handler_request_hd_version) self.can_interface.register_receiving_publication_function(DenaliChannels.ui_sync_broadcast_ch_id, - MsgIdsDialin.DMSG_ID_UI_SYSTEM_USAGE_REQUEST.value, + MsgIdsDialin.MSG_DIALIN_ID_UI_SYSTEM_USAGE_REQUEST.value, self._handler_system_usage_response) self.alarms_simulator = HDAlarmsSimulator(self.can_interface, self.logger) @@ -98,7 +98,7 @@ payload += integer_to_bytearray(1619887863) message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, - message_id=MsgIdsDialin.DMSG_ID_HD_SYSTEM_USAGE_RESPONSE.value, + message_id=MsgIdsDialin.MSG_DIALIN_ID_HD_SYSTEM_USAGE_RESPONSE.value, payload=payload) self.can_interface.send(message, 0) @@ -1391,7 +1391,7 @@ payload = bytearray('0123456789\0', encoding="utf-8") message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, - message_id=MsgIdsDialin.DMSG_ID_HD_SERIAL_NUMBER_RESPONSE.value, + message_id=MsgIdsDialin.MSG_DIALIN_ID_HD_SERIAL_NUMBER_RESPONSE.value, payload=payload) self.can_interface.send(message, 0) Index: tests/unit_tests/test_imports.py =================================================================== diff -u -rf053467ac7cfb9fe349e394342d3a9253a377403 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- tests/unit_tests/test_imports.py (.../test_imports.py) (revision f053467ac7cfb9fe349e394342d3a9253a377403) +++ tests/unit_tests/test_imports.py (.../test_imports.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -89,7 +89,7 @@ from dialin.dg import TemperatureSensors from dialin.dg import DGValves - from dialin.ui import HDSimulator, HDAlarmsSimulator + from dialin.ui import HDSimulator def test_common(self): from dialin.common import (AlarmList, Index: tests/unit_tests/test_ui_proxy.py =================================================================== diff -u -r5f420f989a3b1652faef66c99777233f152954a1 -r9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9 --- tests/unit_tests/test_ui_proxy.py (.../test_ui_proxy.py) (revision 5f420f989a3b1652faef66c99777233f152954a1) +++ tests/unit_tests/test_ui_proxy.py (.../test_ui_proxy.py) (revision 9dcdf4c5acaf2d1e31b9e6e0d50c7c37d0cd08c9) @@ -18,13 +18,13 @@ import struct sys.path.append("../../") from dialin import HD -from dialin.utils.base import setup_virtual_can_interface +from dialin.utils import setup_virtual_can_interface from collections import OrderedDict from dialin.utils.conversions import integer_to_bytearray, float_to_bytearray from dialin.protocols.CAN import (DenaliMessage, DenaliChannels) from dialin.common import MsgIds -from dialin.utils.base import is_interface_up, is_interface_present +from dialin.utils import is_interface_up, is_interface_present class Test(unittest.TestCase):