Module#
- class pycanape.module.Module(asap3_handle: LP_tAsap3Hdl, module_handle: c_ushort)#
The
Module
class is not meant to be instantiated by the user. Instead,Module
instances are returned bycreate_module()
,get_module_by_index()
andget_module_by_name()
.- Parameters:
asap3_handle –
module_handle –
- get_calibration_object(name: str) Union[ScalarCalibrationObject, AxisCalibrationObject, CurveCalibrationObject, MapCalibrationObject, AsciiCalibrationObject, ValueBlockCalibrationObject] #
Get calibration object by name or wildcard pattern (e.g. ‘*InitReset’).
- get_communication_type() str #
Get current communication type (e.g. “CAN”).
- get_database_info() DBFileInfo #
Get Info concerning the database file.
- get_database_objects() List[str] #
Get a list of all object names in database.
- Returns:
List of object names
- get_database_path() str #
Get path to database file.
- get_ecu_driver_type() DriverType #
Retrieves the drivertype of an ECU.
- Returns:
DriverType enum
- get_ecu_tasks() Dict[str, EcuTask] #
Get available data acquisition tasks.
- Returns:
A dictionary with the ecu task description as keys and the EcuTask instances as values
- get_measurement_list_entries() Dict[str, MeasurementListEntry] #
Retrieve the entries from the CANape Measurement list.
- Returns:
A dict of Measurement list entries that uses the object name of the entries as key
- get_module_name() str #
Get name of module.
- get_network_name() str #
Receives the name of the used network.
- has_resume_mode() bool #
Information about the Resume mode.
- Returns:
Function returns True if the device supports resume mode.
- is_ecu_online() bool #
Asks CANape whether a ECU is online or offline
- is_module_active() bool #
Return the activation state of the module.
- Returns:
activation state
- module_activation(activate: bool = True) None #
Switches the module activation state.
- Parameters:
activate – True -> activate Module False -> deactivate Module
- release_module() None #
- reset_data_acquisition_channels_by_module() None #
Clears the data acquisition channel list of a specific module.
Note
this function only clears these measurement objects from the API-Measurement-List which are defined by API
- switch_ecu_on_offline(online: bool, download: bool = True) None #
Switches an ECU from online to offline and vice versa.
- Parameters:
online – Switch ECU online if True, switch ECU offline if False
download – if this parameter is set to true CANape will execute an download in case of online = True
- class pycanape.module.MeasurementListEntry(task_id, rate, save_flag, disabled, object_name)#
Create new instance of MeasurementListEntry(task_id, rate, save_flag, disabled, object_name)
- disabled: bool#
Alias for field number 3
- object_name: str#
Alias for field number 4
- rate: int#
Alias for field number 1
- save_flag: bool#
Alias for field number 2
- task_id: int#
Alias for field number 0
- class pycanape.module.DBFileInfo(file_name, file_path, file_type)#
Create new instance of DBFileInfo(file_name, file_path, file_type)
- file_name: str#
Alias for field number 0
- file_path: str#
Alias for field number 1
- file_type: DBFileType#
Alias for field number 2