def __init__(self, sim_env=None, message_id=None, data=None, timestamp=None, sender_id=None): ''' Constructor Input: sim_env simpy.Environment environment of this component message_id integer message identifier data object content of the message timestamp float time the message was generated sender_id string id of the sender ''' AutomotiveComponent.__init__(self, sim_env) # parameter self.data = data self.message_identifier = message_id self.timestamp = timestamp self.sender_id = sender_id self.gw_id = None # message length self._msg_length_in_bit = 0
def __init__(self, sim_env): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.connected_controller = None
def __init__(self, sim_env): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.datalink_lay = None self.transceiver = None self._jitter = 1
def __init__(self, sim_env): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.physical_lay = None self.controller = None self._jitter = 1 self.effective_bittime = 0
def __init__(self, sim_env): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.connected_bus = None self.connected_controller = None self._jitter = 1 self.ecu_is_active = True
def __init__(self, sim_env, test=None): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.datalink_lay = None self.MessageClass = proj.BUS_MSG_CLASS self._jitter = 1
def __init__(self, sim_env, comm_mod, app_lay): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) self.comm_mod = comm_mod self.app_lay = app_lay self._connect_layers()
def __init__(self, sim_env, ecu_id=-1): ''' Constructor Input: sim_env simpy.Environment environment of this component ecu_id string id of the corresponding AbstractECU Output: - ''' AutomotiveComponent.__init__(self, sim_env) self._comm_mod = None self._jitter = 1 self._ecu_id = ecu_id self.microcontroller = None self.initial_sending_acts = []
def __init__(self, sim_env, transceive, controller, micro_controller): """ Constructor Input: sim_env simpy.Environment environment of this component Output: - """ AutomotiveComponent.__init__(self, sim_env) # hardware self.transceiver = transceive self.controller = controller self.mic_controller = micro_controller # cross communication of hardware for i in range(len(self.transceiver)): self.transceiver[i].connected_controller = controller[i] self.controller[i].connected_transceiver = transceive[i]
def __init__(self, sim_env, transceive, controller, micro_controller): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) # hardware self.transceiver = transceive self.controller = controller self.mic_controller = micro_controller # cross communication of hardware for i in range(len(self.transceiver)): self.transceiver[i].connected_controller = controller[i] self.controller[i].connected_transceiver = transceive[i]
def __init__(self, sim_env, transceive, controller, micro_controller): ''' Constructor Input: sim_env simpy.Environment environment of this component Output: - ''' AutomotiveComponent.__init__(self, sim_env) # hardware self.transceiver = transceive self.controller = controller self.mic_controller = micro_controller # hardware cross communication self.transceiver.connected_controller = controller self.controller.connected_transceiver = transceive self.controller.connnected_mic_con = micro_controller self.mic_controller.connected_controller = controller
def __init__(self, sim_env, bus_id, data_rate, avg_ecu_dist=2): ''' Constructor Input: sim_env simpy.Environment environment in which this Bus acts bus_id string id of this Bus object data_rate float datarate of this bus avg_ecu_dist float average distance between two connected ECUs Output: - ''' AutomotiveComponent.__init__(self, sim_env, bus_id) self.current_bus = None self.data_rate = data_rate # data rate of the bus self.avg_dist_between_ecus = avg_ecu_dist # meter self.effective_datarate = float("inf") # Bit per second self.effective_bittime = 1 / self.effective_datarate # determined by the ecu/self with slowest rate self.connected_ecus = [] self.connected_gws = []
def __init__(self, sim_env=None, message_id=None, data=None, timestamp=None, sender_id=None): """ Constructor Input: sim_env simpy.Environment environment of this component message_id integer message identifier data object content of the message timestamp float time the message was generated sender_id string id of the sender """ AutomotiveComponent.__init__(self, sim_env) # parameter self.data = data self.message_identifier = message_id self.timestamp = timestamp self.sender_id = sender_id self.gw_id = None # message length self._msg_length_in_bit = 0
def __init__(self, sim_env, ecu_id, data_rate): ''' Constructor Input: sim_env simpy.Environment environment of this component ecu_id string id of the corresponding AbstractECU data_rate float datarate of the ecu Output: - ''' AutomotiveComponent.__init__(self, sim_env) self._ABSTRACT_ECU = True self._ecu_id = ecu_id # ID of the ECU self.ecuSW = None # what is done self.ecuHW = None # what is used to make it happen self.MessageClass = proj.BUS_MSG_CLASS # what kind of messages are exchanged self.connected_bus = None # Bus that is connected to the ECU self.data_rate = proj.BUS_ECU_DATARATE # Datarate with which bits are put on the bus self._effective_datarate = 0 # Bit per second self._effective_bittime = 0 # seconds self._jitter = 1 self.startup_delay = False