def __init__(self, sim_env=None, ecu_id=None, data_rate=None, size_sending_buffer=None, size_receive_buffer=None): ''' Constructor Input: sim_env simpy.Environment environment in which this ECU lives ecu_id string id of this ECU component data_rate integer data_rate of the connected bus size_sending_buffer float size of the sending buffer of this ECU size_receive_buffer float size of the receiving buffer of this ECU Output: - ''' # set settings self.set_settings() self._authenticated = False # no instantiation if sim_env == None: return # set SW and HW SimpleECU.__init__(self, sim_env, ecu_id, data_rate, size_sending_buffer, size_receive_buffer) # create software self.ecuSW = ECUSoftware(sim_env, SecureCommModule(sim_env, ecu_id), SecureApplicationLayer(sim_env, ecu_id)) # connect self._connect_hw_sw()
def __init__(self, sim_env=None, ecu_id=None, data_rate=None, size_sending_buffer=None, size_receive_buffer=None): ''' Constructor Input: sim_env simpy.Environment environment in which this ECU lives ecu_id string id of this ECU component data_rate integer data_rate of the connected bus size_sending_buffer float size of the sending buffer of this ECU size_receive_buffer float size of the receiving buffer of this ECU Output: - ''' # set settings self.set_settings() # no instantiation if sim_env == None: return # software SimpleECU.__init__(self, sim_env, ecu_id, data_rate, size_sending_buffer, size_receive_buffer) self._SECMODULE = True self.ecuSW = ECUSoftware(sim_env, SecModStdCommModule(sim_env), StdSecurityModuleAppLayer(sim_env, ecu_id=ecu_id)) # connect self._connect_hw_sw() # project settings self.SECMOD_CERT_HASHING_MECH = proj.SECMOD_CERT_HASHING_MECH self.SECMOD_CERT_ENCRYPTION_MECH = proj.SECMOD_CERT_ENCRYPTION_MECH self.SECMOD_CERT_ENCRYPTION_MECH_OPTION = proj.SECMOD_CERT_ENCRYPTION_MECH_OPTION self.SECMOD_CERT_KEYL = proj.SECMOD_CERT_KEYL self.SECMOD_CERT_CA_LEN = proj.SECMOD_CERT_CA_LEN self.SECMOD_CERT_SIZE_HASH_TO_SIGN = proj.SECMOD_CERT_SIZE_HASH_TO_SIGN self.SECMOD_CERT_SIZE_HASH_SIGNED = proj.SECMOD_CERT_SIZE_HASH_SIGNED
def __init__(self, sim_env, ecu_id, data_rate, MessageClass, size_sending_buffer, size_receive_buffer): ''' 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 MessageClass class class that is used for message transmission size_sending_buffer integer capacity of the sending buffer size_receive_buffer integer capacity of the receiving buffer Output: - ''' SimpleECU.__init__(self, sim_env, ecu_id, data_rate, MessageClass, size_sending_buffer, size_receive_buffer) # initialize Software self.ecuSW = ECUSoftware(sim_env, SegmentCommModule(sim_env, MessageClass), SimpleApplicationLayer(sim_env, ecu_id)) self.set_settings() # connect layers self._connect_hw_sw()
def __init__(self, sim_env=None, ecu_id=None, data_rate=None, size_sending_buffer=None, size_receive_buffer=None): ''' Constructor Input: sim_env simpy.Environment environment in which this ECU lives ecu_id string id of this ECU component data_rate integer data_rate of the connected bus size_sending_buffer float size of the sending buffer of this ECU size_receive_buffer float size of the receiving buffer of this ECU Output: - ''' # set settings self.set_settings() # no instantiation if sim_env == None: return # software SimpleECU.__init__(self, sim_env, ecu_id, data_rate, size_sending_buffer, size_receive_buffer) self._SECMODULE = True self.ecuSW = ECUSoftware( sim_env, SecModStdCommModule(sim_env), StdSecurityModuleAppLayer(sim_env, ecu_id=ecu_id)) # connect self._connect_hw_sw() # project settings self.SECMOD_CERT_HASHING_MECH = proj.SECMOD_CERT_HASHING_MECH self.SECMOD_CERT_ENCRYPTION_MECH = proj.SECMOD_CERT_ENCRYPTION_MECH self.SECMOD_CERT_ENCRYPTION_MECH_OPTION = proj.SECMOD_CERT_ENCRYPTION_MECH_OPTION self.SECMOD_CERT_KEYL = proj.SECMOD_CERT_KEYL self.SECMOD_CERT_CA_LEN = proj.SECMOD_CERT_CA_LEN self.SECMOD_CERT_SIZE_HASH_TO_SIGN = proj.SECMOD_CERT_SIZE_HASH_TO_SIGN self.SECMOD_CERT_SIZE_HASH_SIGNED = proj.SECMOD_CERT_SIZE_HASH_SIGNED