Example #1
0
    def __init__(self, peer_device_address):

        self.peer_device_address = peer_device_address

        self.num_of_errors = 0
        self.log_handler = TimestampLogger()
        self.connected = False
        self.disconnect_event_expected = True
        self.service_setup_done = True
        self.last_disconnect_reason = -1
    def __init__(self,
                 peer_device_address,
                 baud_rate=1000000,
                 own_address=None,
                 bond_info=None):

        self.peer_device_address = peer_device_address

        self.num_of_errors = 0
        self.log_handler = TimestampLogger()
        self.connected = False
        self.disconnect_event_expected = True
        self.service_setup_done = True
        self.last_disconnect_reason = -1

        self.baud_rate = baud_rate

        self.own_address = own_address
        self.bond_info = bond_info