def __init__(self, port, baud=1000000, show_packets=False): Bus.__init__(self, show_packets) self.serial_port = serial.Serial(port=port, baudrate=baud, timeout=0.1, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, xonxoff=False, rtscts=False, dsrdtr=False)
def __init__(self, port, baud=1000000, show=SHOW_NONE): Bus.__init__(self, show) self.serial_port = serial.Serial(port=port, baudrate=baud, timeout=0.1, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, xonxoff=False, rtscts=False, dsrdtr=False)
def __init__(self, bus_id, bus_type, init_stop, controller): Bus.__init__(self, bus_id, bus_type, init_stop, controller) # tunable parameters self.exploration_probability = 0 self.movement_policy_switch_time = MainBus._DEFAULT_MOVEMENT_SWITCH_TIME self.initial_buses = MainBus._DEFAULT_INITIAL_BUS_COUNT
def __init__(self, make_in, model_in, year_in, riders_in): Bus.__init__(self, make_in, model_in, year_in, riders_in) self.color = "Yellow"
def __init__(self, make_in, model_in, year_in, riders_in, doors_in): Bus.__init__(self, make_in, model_in, year_in, riders_in) Car.__init__(self, make_in, model_in, year_in, doors_in) self.meter = 5.0