BxCmdFactory.py 757 B

123456789101112131415161718192021222324252627
  1. from .BxCmdDelDynamicArea import NewCmdDelDynamicArea
  2. from .BxCmdSendDynamicArea import NewBxCmdSendDynamicArea
  3. from .BxCmdState import NewCmdState
  4. from .BxCmdReadParams import NewCmdReadParams
  5. class BxCmdFactory:
  6. """命令工厂类,用于创建各种命令实例"""
  7. @staticmethod
  8. def NewBxCmdSendDynamicArea(areas):
  9. """创建发送动态区域命令"""
  10. return NewBxCmdSendDynamicArea(areas)
  11. @staticmethod
  12. def NewCmdState():
  13. """创建系统状态命令"""
  14. return NewCmdState()
  15. @staticmethod
  16. def NewCmdReadParams():
  17. """创建读取参数命令"""
  18. return NewCmdReadParams()
  19. @staticmethod
  20. def NewCmdDelDynamicArea(numbers):
  21. return NewCmdDelDynamicArea(numbers)