from components.security.ecu.types.impl_ecu_tesla import StdTeslaECUTimingFunctions #=============================================================================== # Setup project, ECUs, Gateways, Busses #=============================================================================== api_log_path = os.path.join(os.path.dirname(__file__), "logs/api.log") api.show_logging(logging.INFO, api_log_path, True) # environment sim_env = api.create_environment(500) # create ECUs: Attention: for Tesla the sending actions defined in add_sending_actions() must # conform the defined MessageStream objects. i.e. if a MessageStream is defined # that starts sending at time t_0 with a message sending interval of t_int then # the exact same sending action has to be put in the add_sending_action() method! ecu_spec = RegularECUSpec(["RegularSecureECU_15"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay # ecu_spec.set_ecu_setting('t_generate_compare_mac', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay ecu_spec.add_sending_actions(260, 0.1, can_registration.CAN_TEST_MSG, "TEST STRING B", 50) ecu_group_1 = api.set_ecus(sim_env, 1, 'TeslaECU', ecu_spec) ecu_spec = RegularECUSpec(["TEST ECU 9", "TEST ECU 10"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay # ecu_spec.set_ecu_setting('t_generate_compare_mac', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay ecu_group_3 = api.set_ecus(sim_env, 2, 'TeslaECU', ecu_spec) ecu_spec = RegularECUSpec(["TEST ECU 11", "TEST ECU 12"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay
#=============================================================================== # Setup project, ECUs, Gateways, Busses #=============================================================================== api_log_path = os.path.join(os.path.dirname(__file__), "logs/api.log") api.show_logging(logging.INFO, api_log_path, True) # environment sim_env = api.create_environment(500) # create ECUs: Attention: for Tesla the sending actions defined in add_sending_actions() must # conform the defined MessageStream objects. i.e. if a MessageStream is defined # that starts sending at time t_0 with a message sending interval of t_int then # the exact same sending action has to be put in the add_sending_action() method! ecu_spec = RegularECUSpec(["RegularSecureECU_15"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay # ecu_spec.set_ecu_setting('t_generate_compare_mac', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay ecu_spec.add_sending_actions(260, 0.1, can_registration.CAN_TEST_MSG, "TEST STRING B", 50) ecu_group_1 = api.set_ecus(sim_env, 1, 'TeslaECU', ecu_spec) ecu_spec = RegularECUSpec(["TEST ECU 9", "TEST ECU 10"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay # ecu_spec.set_ecu_setting('t_generate_compare_mac', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay ecu_group_3 = api.set_ecus(sim_env, 2, 'TeslaECU', ecu_spec) ecu_spec = RegularECUSpec(["TEST ECU 11", "TEST ECU 12"], 20000, 20000) ecu_spec.set_apply_jitter(0.0000001) # ecu_spec.set_ecu_setting('t_prf_for_key_legitimation', 0) # NOTE: If this value has a realistic value this is not working or better to say it works with a extreme delay