ssdk_service.py 787 B

1234567891011121314151617181920212223242526272829303132
  1. # -*- coding:utf-8 -*-
  2. import os, sys, time
  3. from service.ccard_service import *
  4. from service.service_manager import *
  5. SManager = ServiceManager()
  6. def startCaptureCard():
  7. print u"视频采集卡"
  8. def startAllService():
  9. print u"启动所有服务"
  10. startCaptureCard()
  11. def startService(service_name):
  12. if (service_name == "all"):
  13. startAllService()
  14. elif (service_name == "ccard"):
  15. startCaptureCard()
  16. else:
  17. print u"未找到需要启动的设备服务:",service_name
  18. if __name__ == "__main__":
  19. print u"你输入的命令参数:", sys.argv
  20. if (sys.argv.__len__() < 3):
  21. print u"请输入正确的命令"
  22. exit(0)
  23. command = sys.argv[1]
  24. param = sys.argv[2]
  25. if "start" == command:
  26. startService(param)