Beispiel #1
0
 def Start(self, p_pyhouse_obj, p_controller_obj):
     """
     @param p_controller_obj: is the Controller_Data object we are starting.
     """
     self.m_pyhouse_obj = p_pyhouse_obj
     self.m_controller_obj = p_controller_obj
     self.m_USB_obj = UsbDriverAPI._get_usb_device_data(p_controller_obj)
     if usbopenAPI.open_device(self.m_USB_obj):
         self._write_control_device(self.m_USB_obj,
                                    usbopenAPI.Setup(self.m_USB_obj))
         self.read_usb(self.m_pyhouse_obj)
         LOG.info("Opened Controller:{}".format(self.m_USB_obj.Name))
         l_ret = True
     else:
         LOG.error("Failed to open Controller:{}".format(
             self.m_USB_obj.Name))
         l_ret = False
     LOG.info('Started')
     return l_ret
Beispiel #2
0
 def Start(self, p_pyhouse_obj, p_controller_obj):
     """
     @param p_controller_obj: is the Controller_Data object we are starting.
     """
     self.m_pyhouse_obj = p_pyhouse_obj
     self.m_controller_obj = p_controller_obj
     self.m_USB_obj = UsbDriverAPI._get_usb_device_data(p_controller_obj)
     if usbopenAPI.open_device(self.m_USB_obj):
         self._write_control_device(self.m_USB_obj, usbopenAPI.Setup(self.m_USB_obj))
         self.read_usb(self.m_pyhouse_obj)
         LOG.info("Opened Controller:{}".format(self.m_USB_obj.Name))
         l_ret = True
     else:
         LOG.error("Failed to open Controller:{}".format(self.m_USB_obj.Name))
         l_ret = False
     LOG.info('Started')
     return l_ret
Beispiel #3
0
 def Stop(self):
     usbopenAPI.close_device(self.m_USB_obj)
Beispiel #4
0
 def Stop(self):
     usbopenAPI.close_device(self.m_USB_obj)