예제 #1
0
    def execute_request(self, request):
        """Execute a request on the sampler.
        Returns the byte response.
        """
        if LOG.isEnabledFor(logging.DEBUG):
            LOG.debug("Request: %s", repr(request))

        result_bytes = self.requests[request.get_bytes()]
        
        if LOG.isEnabledFor(logging.DEBUG):
            LOG.debug("Response: %s", (sysex.byte_repr(result_bytes)))
        return result_bytes
예제 #2
0
    def execute_request(self, request):
        """Execute a request on the sampler.
        Returns the byte response.
        """
        if LOG.isEnabledFor(logging.DEBUG):
            LOG.debug("Request: %s", repr(request))

        result_bytes = self.requests[request.get_bytes()]

        if LOG.isEnabledFor(logging.DEBUG):
            LOG.debug("Response: %s", (sysex.byte_repr(result_bytes)))
        return result_bytes
예제 #3
0
 def test_byte_repr(self):
     bytes = '\xf0G_\x00E \x00\x00\x03\xf7'
     self.assertEquals(
         "['f0', '47', '5f', '00', '45', '20', '00', '00', '03', 'f7']",
         sysex.byte_repr(bytes))