def query_sysex_data( self, addr, len ):
self.receive_cond.acquire()
self.data = []
self.addr = []
msg = list( addr )
msg.extend( Katana.encode_scalar(len) )
self.target_count = (len // 241) + 1
self._send( QUERY_PREFIX, msg )
result = self.receive_cond.wait(5)
if not result:
syslog.syslog( "Error: Timeout on cond wait" )
self.receive_cond.release()
return self.addr, self.data
# Request sysex data (possibly requiring multiple chunks) by
# passing first and last address of desired range. It is the
# caller's responsibility to ensure the total response does not
# span address discontinuities. If that occurs the chunk count is
# likely to be over-estimated and the operation will timeout.
评论列表
文章目录