Index: dialin/dg/calibration_record.py =================================================================== diff -u -ra3008f2085dca1d8de69c242414b91429bc188e9 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/dg/calibration_record.py (.../calibration_record.py) (revision a3008f2085dca1d8de69c242414b91429bc188e9) +++ dialin/dg/calibration_record.py (.../calibration_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -76,8 +76,8 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 + self._current_message = 0 + self._total_messages = 0 self._is_getting_cal_in_progress = False self.cal_data = 0 self._raw_cal_record = [] @@ -174,8 +174,8 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total + self._current_message = curr + self._total_messages = total # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept @@ -186,11 +186,11 @@ # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other. - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_cal_record += (message['message'][self._RECORD_START_INDEX + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Check if the requested read was just for comparing the results before writing to firmware back self._is_getting_cal_in_progress = False # If all the messages have been received, call another function to process the raw data Index: dialin/dg/service_record.py =================================================================== diff -u -r3a70bfb451b74106348c064c34f19934aadd9119 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/dg/service_record.py (.../service_record.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) +++ dialin/dg/service_record.py (.../service_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -59,10 +59,10 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 - self.received_msg_length = 0 - self.service_data = 0 + self._current_message = 0 + self._total_messages = 0 + self._received_msg_length = 0 + self._service_data = 0 self._is_getting_service_in_progress = False self._raw_service_record = [] self._utilities = NVOpsUtils(logger=self.logger) @@ -132,23 +132,23 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total - self.received_msg_length = length + self._current_message = curr + self._total_messages = total + self._received_msg_length = length # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept - end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self.received_msg_length + end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self._received_msg_length # Get the data only and not specs of it (i.e current message number) - self.service_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] + self._service_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_service_record += (message['message'][MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Done with receiving the messages self._is_getting_service_in_progress = False # If all the messages have been received, call another function to process the raw data Index: dialin/dg/system_record.py =================================================================== diff -u -rbff28676dd855ea33707bbb26a624abc94aebdf0 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/dg/system_record.py (.../system_record.py) (revision bff28676dd855ea33707bbb26a624abc94aebdf0) +++ dialin/dg/system_record.py (.../system_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -64,11 +64,11 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 - self.received_msg_length = 0 + self._current_message = 0 + self._total_messages = 0 + self._received_msg_length = 0 self._is_getting_sys_in_progress = False - self.sys_data = 0 + self._sys_data = 0 self._raw_system_record = [] self._utilities = NVOpsUtils(logger=self.logger) # System main record @@ -171,23 +171,23 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total - self.received_msg_length = length + self._current_message = curr + self._total_messages = total + self._received_msg_length = length # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept - end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self.received_msg_length + end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self._received_msg_length # Get the data only and not specs of it (i.e current message number) - self.sys_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] + self._sys_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_system_record += (message['message'][MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Done with receiving the messages self._is_getting_sys_in_progress = False # If all the messages have been received, call another function to process the raw data Index: dialin/hd/calibration_record.py =================================================================== diff -u -ra3008f2085dca1d8de69c242414b91429bc188e9 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/hd/calibration_record.py (.../calibration_record.py) (revision a3008f2085dca1d8de69c242414b91429bc188e9) +++ dialin/hd/calibration_record.py (.../calibration_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -64,11 +64,11 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 - self.received_msg_length = 0 + self._current_message = 0 + self._total_messages = 0 + self._received_msg_length = 0 self._is_getting_cal_in_progress = False - self.cal_data = 0 + self._cal_data = 0 self._raw_cal_record = [] self._utilities = NVOpsUtils(logger=self.logger) # HD Calibration main record @@ -161,23 +161,23 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total - self.received_msg_length = length + self._current_message = curr + self._total_messages = total + self._received_msg_length = length # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept - end_of_data_index = self._RECORD_START_INDEX + self._RECORD_SPECS_BYTES + self.received_msg_length + end_of_data_index = self._RECORD_START_INDEX + self._RECORD_SPECS_BYTES + self._received_msg_length # Get the calibration_record data only - self.cal_data = message['message'][self._RECORD_START_INDEX:end_of_data_index] + self._cal_data = message['message'][self._RECORD_START_INDEX:end_of_data_index] # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_cal_record += (message['message'][self._RECORD_START_INDEX + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Done with receiving the messages self._is_getting_cal_in_progress = False # If all the messages have been received, call another function to process the raw data Index: dialin/hd/service_record.py =================================================================== diff -u -r3a70bfb451b74106348c064c34f19934aadd9119 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/hd/service_record.py (.../service_record.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) +++ dialin/hd/service_record.py (.../service_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -61,12 +61,12 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 - self.received_msg_length = 0 + self._current_message = 0 + self._total_messages = 0 + self._received_msg_length = 0 self._is_getting_service_in_progress = False self._write_fw_data_to_excel = True - self.service_data = 0 + self._service_data = 0 self._raw_service_record = [] self._utilities = NVOpsUtils(logger=self.logger) self.hd_service_record = self._prepare_hd_service_record() @@ -133,23 +133,23 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total - self.received_msg_length = length + self._current_message = curr + self._total_messages = total + self._received_msg_length = length # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept - end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self.received_msg_length + end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self._received_msg_length # Get the data only and not specs of it (i.e current message number) - self.service_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] + self._service_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_service_record += (message['message'][MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Done with receiving the messages self._is_getting_service_in_progress = False # If all the messages have been received, call another function to process the raw data Index: dialin/hd/system_record.py =================================================================== diff -u -rbff28676dd855ea33707bbb26a624abc94aebdf0 -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- dialin/hd/system_record.py (.../system_record.py) (revision bff28676dd855ea33707bbb26a624abc94aebdf0) +++ dialin/hd/system_record.py (.../system_record.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -64,11 +64,11 @@ self.can_interface = can_interface self.logger = logger - self.current_message = 0 - self.total_messages = 0 - self.received_msg_length = 0 + self._current_message = 0 + self._total_messages = 0 + self._received_msg_length = 0 self._is_getting_sys_in_progress = False - self.sys_data = 0 + self._sys_data = 0 self._raw_system_record = [] self._utilities = NVOpsUtils(logger=self.logger) # System main record @@ -171,23 +171,23 @@ length = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.current_message = curr - self.total_messages = total - self.received_msg_length = length + self._current_message = curr + self._total_messages = total + self._received_msg_length = length # The end of calibration_record record payload is from the start index + 12 bytes for the current message +total # messages + the length of calibration_record. The rest is the CAN messaging CRC that is not needed # to be kept - end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self.received_msg_length + end_of_data_index = MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES + self._received_msg_length # Get the data only and not specs of it (i.e current message number) - self.sys_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] + self._sys_data = message['message'][MsgFieldPositions.START_POS_FIELD_1:end_of_data_index] # Continue getting calibration_record records until the all the calibration_record messages are received. # Concatenate the calibration_record records to each other - if self.current_message <= self.total_messages: + if self._current_message <= self._total_messages: self._raw_system_record += (message['message'][MsgFieldPositions.START_POS_FIELD_1 + self._RECORD_SPECS_BYTES:end_of_data_index]) - if self.current_message == self.total_messages: + if self._current_message == self._total_messages: # Done with receiving the messages self._is_getting_sys_in_progress = False # If all the messages have been received, call another function to process the raw data Index: tests/dg_tests.py =================================================================== diff -u -reb5e1db6feb04feb5eb5ac5cf3251b6e4f8e94ff -r2050200f1b9130d4df0e9ea43827ec4f29984c3d --- tests/dg_tests.py (.../dg_tests.py) (revision eb5e1db6feb04feb5eb5ac5cf3251b6e4f8e94ff) +++ tests/dg_tests.py (.../dg_tests.py) (revision 2050200f1b9130d4df0e9ea43827ec4f29984c3d) @@ -698,13 +698,13 @@ # cmd_set_disinfect_ui_screen() - collect_treatment_data() + #collect_treatment_data() #collect_hd_treatment() - #while True: - # print(get_hd_fans_info(), get_dg_fans_info()) - # sleep(1) + while True: + print(get_hd_fans_info(), get_dg_fans_info(), get_temperature_sensors_info()) + sleep(1) #while True: # print(dg.rtc.get_rtc_epoch(), hd.rtc.get_rtc_epoch())