def wait(self, msg_type, timeout=<NUM_LIT:1.0>):
event = threading.Event()<EOL>payload = {'<STR_LIT:data>': None}<EOL>def cb(sbp_msg, **metadata):<EOL><INDENT>payload['<STR_LIT:data>'] = sbp_msg<EOL>event.set()<EOL><DEDENT>self.add_callback(cb, msg_type)<EOL>event.wait(timeout)<EOL>self.remove_callback(cb, msg_type)<EOL>return payload['<STR_LIT:data>']<EOL>
Wait for a SBP message.

Parameters
----------
msg_type : int
  SBP message type.
timeout : float
  Waiting period