BxCmdClearScreen.py 621 B

123456789101112131415161718192021222324
  1. from .BxCmd import baseBxCmd
  2. from .BxCmdCode import CMD_CLEAR_SCREEN
  3. class BxCmdClearScreen(baseBxCmd):
  4. def __init__(self):
  5. super().__init__(CMD_CLEAR_SCREEN.group, CMD_CLEAR_SCREEN.code)
  6. def Build(self):
  7. result = bytearray()
  8. # 写入命令组
  9. result.append(self.group)
  10. # 写入命令
  11. result.append(self.cmd)
  12. # 写入响应标志
  13. result.append(self.ReqResp())
  14. # 写入保留值
  15. result.append(self.r0)
  16. result.append(self.r1)
  17. return bytes(result)
  18. def NewBxCmdClearScreen(group, cmd):
  19. return BxCmdClearScreen()