示例#1
0
 def read(self):
     frames = []
     buf = self._read()
     if len(buf) > 0:
         self.debug("<< ", util.bindebug(buf))
     for i in range(len(buf)):
         got = self.unframer.parse(buf[i])
         if got:
             f = self.unframer.getframe()
             frames.append(f)
     return frames
 def read(self):
     frames = []
     buf = self._read()
     if len(buf) > 0:
         self.debug("<< ", util.bindebug(buf))
     for i in range(len(buf)):
         got = self.unframer.parse(buf[i])
         if got:
             f = self.unframer.getframe()
             frames.append(f)
     return frames
示例#3
0
 def write(self, payload, tag=0):
     buf = hxframing.frame(payload, tag)
     self.debug(">> ", util.bindebug(buf))
     self.port.write(buf)
     self.port.flush()
 def write(self, payload, tag=0):
     buf = hxframing.frame(payload,tag)
     self.debug(">> ", util.bindebug( buf ))
     self.port.write(buf)
     self.port.flush()