Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r2abf398a7fffa390c46f8d41403de44575ffd97e -rda62b4e5e9f194570c53346691dd8959272f740d --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 2abf398a7fffa390c46f8d41403de44575ffd97e) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision da62b4e5e9f194570c53346691dd8959272f740d) @@ -2166,3 +2166,19 @@ payload=payload) self.can_interface.send(message, 0) + + def cmd_send_hd_service_mode_response(self, accepted: int, reason: int) -> None: + """ + A simulated HD response message of service mode request + @param accepted: (int) acceptance. 1 if accepted + @param reason: (int) rejection reason + @return: None + """ + payload = unsigned_integer_to_bytearray(accepted) + payload += unsigned_integer_to_bytearray(reason) + + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=MsgIds.MSG_ID_HD_RESPONSE_SERVICE_MODE_REQUEST.value, + payload=payload) + + self.can_interface.send(message, 0) \ No newline at end of file