12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- # -*- coding:utf-8 -*-
- import os, sys, time
- # from ssat_sdk.device_manage.c22293_manager import *
- from ssat_sdk.device_manage.Chroma22293 import C22293Manager
- class SourceGenInput():
- def __init__(self):
- self.c22293Manager = C22293Manager()
- def setPattern(self, pattern, device = 1, timeout = 300):
- return self.c22293Manager.setPattern(pattern, device, timeout)
- def setTiming(self, timing, device = 1, timeout = 300):
- return self.c22293Manager.setTiming(timing, device, timeout)
- def setTimingPattern(self, timing, pattern, device = 1, timeout = 300):
- if self.setTiming(timing, device, timeout):
- if self.setPattern(pattern, device, timeout):
- return True
- return False
- # return self.c22293Manager.setTimingPattern(timing, pattern, device, timeout)
- def getDeviceName(self, device = 1, timeout = 300):
- return self.c22293Manager.getDeviceName(device, timeout)
- def getDeviceSoft(self, device = 1, timeout = 300):
- return self.c22293Manager.getDeviceSoft(device, timeout)
- def getStatus(self, device = 1, timeout = 300):
- return self.c22293Manager.getStatus(device, timeout)
- def setBlueOFF(self, device = 1, timeout = 300):
- return self.c22293Manager.setBlueOFF(device, timeout)
- def setBlueON(self, device = 1, timeout = 300):
- return self.c22293Manager.setBlueON(device, timeout)
- def setGreenOFF(self, device = 1, timeout = 300):
- return self.c22293Manager.setGreenOFF(device, timeout)
- def setGreenON(self, device = 1, timeout = 300):
- return self.c22293Manager.setGreenON(device, timeout)
- def setRedOFF(self, device = 1, timeout = 300):
- return self.c22293Manager.setRedOFF(device, timeout)
- def setRedON(self, device = 1, timeout = 300):
- return self.c22293Manager.setRedON(device, timeout)
- def setKeyBoardLock(self, device = 1, timeout = 300):
- return self.c22293Manager.setKeyBoardLock(device, timeout)
- def setKeyBoardUnLock(self, device = 1, timeout = 300):
- return self.c22293Manager.setKeyBoardUnLock(device, timeout)
- if __name__ == "__main__":
- SG = SourceGenInput()
- SG.setPattern(106)
- SG.setTiming(74)
- SG.setTimingPattern(73,101)
- SG.setBlueOFF()
- SG.setBlueON()
- SG.setRedOFF()
- SG.setRedON()
- SG.setGreenOFF()
- SG.setGreenON()
- print SG.getStatus()
- print SG.getDeviceSoft()
- print SG.getDeviceName()
- SG.setKeyBoardLock()
- SG.setKeyBoardUnLock()
|