def handle_destroy_mesh(self, station, message): logger.info("Received destroy request") station_address = StationAddress.deserialize(message[4:]) station_index = message[1] self.on_destroy_request(station, station_index, station_address)
def handle_join_request(self, station, message): logger.info("Received join request") station_address = StationAddress.deserialize(message[4:]) station_index = message[1] self.station_protocol.send_ack(station, message) self.on_join_request(station, station_index, station_address)
def handle_destroy_mesh(self, station, message): station_address = StationAddress.deserialize(message[4:]) station_index = message[1] self.on_destroy_request(station, station_index, station_address)
def deserialize(cls, data): address = StationAddress.deserialize(data) args = struct.unpack_from(cls.fmt, data, address.sizeof()) return cls(address, *args)
def handle_leave_response(self, station, message): station_address = StationAddress.deserialize(message[4:]) station_index = message[1] self.on_leave_response(station, station_index, station_address)