Skip to content
Snippets Groups Projects

Made some changes to the simulator to debug controller implementation.

Open Tommy Olofsson requested to merge tommyo/extctrl2014:packetdebug into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
186 188 self.frag_num = other.frag_num
187 189 self.data += other.data
188 190 return self
189
191
190 192 def __repr__(self):
191 return "Packet(%s %s %d index=%x flags=%x kind=%x data='%s'" % (
192 ":".join(map(lambda b: "%02.2x" % ord(b), self.destination)),
193 ":".join(map(lambda b: "%02.2x" % ord(b), self.source)),
193 macaddr2str = lambda b: ":".join(["%02.2x" % ord(byte) for byte in b])
  • 322 378 while self.cookie == None:
  • 228 260 elif self.robot:
    229 261 self.await_INIT()
    230 262
    263 @property
  • 228 260 elif self.robot:
    229 261 self.await_INIT()
    230 262
    263 @property
    264 def cookie(self):
    265 if self.cookie_remote_index is None:
    266 return 0
    267 return self.cookie_local_index ^ self.cookie_remote_index
    • Possibly wrong in original as well (we treat cookie == 0 as special)

      result = self.cookie_local_index ^ self.cookie_remote_index
      if result == 0:
          result = 1
      return result
    Please register or sign in to reply
    Loading