Telltales
The Telltale module provides a set of functionalities for managing various telltale indicators, including turn signals, park brake, hazard lights, seat belt status, ABS, brake malfunction, high coolant temperature warnings, and cruise control. It ensures proper activation, state monitoring, and output management of these indicators.
Configuration Parameters
All API functions for the Telltale module require the first argument to be the module ID.
Name |
Description |
Range |
---|---|---|
can_id |
CAN ID for the telltale signal. |
Any valid CAN ID |
value |
Value of the telltale indicator (on/off or value). |
0 or 1 |
active |
Indicator status (active/inactive). |
0 (inactive) or 1 (active) |
is_analog |
Type of signal (analog or digital). |
0 (digital) or 1 (analog) |
APIs
The Telltale module provides the following APIs to initialize, process, and update the telltale indicators:
Function |
Description |
---|---|
rs_am_telltale_init |
Initializes the telltale module by registering all telltale indicators and their corresponding notification handlers. |
rs_am_telltale_process |
Processes and updates the telltale indicators based on the latest data. |
Error Codes
Each API for the telltale module returns success or failure codes. For detailed information on the error codes, please refer to the following section:
See also
:doc:/error_codes
Telltale Module Header Details
The header file for the telltale module, rs_am_telltale.h, defines the required structures and APIs for initialization and processing.
Typedefs
-
typedef struct tag_rs_telltale_config rs_telltale_config_t
Includes.
Structure of telltale configuration
-
typedef struct tag_rs_telltale_runtime rs_telltale_runtime_t
Structure of telltale runtime.
-
typedef struct tag_rs_telltale_output rs_telltale_output_t
Structure of telltale output.
-
typedef struct tag_rs_am_telltale rs_am_telltale_t
Structure integrates the configuration, runtime, and output structures.
Functions
-
rs_ret_val_t rs_am_telltale_init(rs_am_telltale_t *ptr_telltale)
Initializes the telltale module by registering all the telltale indicators and their corresponding notification handlers.
This function registers the telltale indicators with the data processor, ensuring that the system can receive and process updates for various telltale states.
- Parameters:
ptr_telltale – [in] Pointer to the telltale structure to be initialized.
- Returns:
Returns success after initialization.
-
rs_ret_val_t rs_am_telltale_process(rs_am_telltale_t *ptr_telltale)
Processes and updates the telltale indicators based on the latest data.
This function processes the incoming telltale data, updates the runtime states of the indicators, and dispatches the updated statuses to the relevant consumers for display or further processing.
- Parameters:
ptr_telltale – [in] Pointer to the telltale structure.
- Returns:
Returns success after processing the telltale.
-
struct tag_rs_telltale_config
- #include <rs_am_telltale.h>
Includes.
Structure of telltale configuration
-
struct tag_rs_telltale_runtime
- #include <rs_am_telltale.h>
Structure of telltale runtime.
Public Members
-
uint8_t can_input_value
Raw CAN input value for the indicator.
-
uint16_t analog_value
Processed analog value of the telltale indicator.
-
uint8_t dig_value
Processed digital value of the telltale indicator.
-
uint8_t is_active
Whether the indicator is currently active.
-
uint16_t processed_value
Final processed value of the indicator.
-
uint8_t turn_left
Status of the left turn indicator (ON/OFF).
-
uint8_t turn_right
Status of the right turn indicator (ON/OFF).
-
uint8_t hazard
Status of the hazard lights indicator (ON/OFF).
-
uint8_t seat_belt
Status of the seat belt indicator (ON/OFF).
-
uint8_t park_brake
Status of the parking brake indicator (ON/OFF).
-
uint8_t brake_malfunction
Status of the brake malfunction indicator (ON/OFF).
-
uint8_t abs
Status of the ABS indicator (ON/OFF).
-
uint8_t high_coolant_temp_warning
Status of the high coolant temperature warning (ON/OFF).
-
uint8_t cruise_control
Status of the cruise control indicator (ON/OFF).
-
uint8_t can_input_value
-
struct tag_rs_telltale_output
- #include <rs_am_telltale.h>
Structure of telltale output.
Public Members
-
uint8_t priority_level
The priority level of the telltale indicator.
-
uint8_t turn_left
Final output status of the left turn indicator (ON/OFF).
-
uint8_t turn_right
Final output status of the right turn indicator (ON/OFF).
-
uint8_t hazard
Final output status of the hazard lights indicator (ON/OFF).
-
uint8_t seat_belt
Final output status of the seat belt indicator (ON/OFF).
-
uint8_t park_brake
Final output status of the parking brake indicator (ON/OFF).
-
uint8_t brake_malfunction
Final output status of the brake malfunction indicator (ON/OFF).
-
uint8_t abs
Final output status of the ABS indicator (ON/OFF).
-
uint8_t high_coolant_temp_warning
Final output status of the high coolant temperature warning (ON/OFF).
-
uint8_t cruise_control
Final output status of the cruise control indicator (ON/OFF).
-
uint8_t priority_level
-
struct tag_rs_am_telltale
- #include <rs_am_telltale.h>
Structure integrates the configuration, runtime, and output structures.
Public Members
-
rs_telltale_config_t config
Configuration settings for the telltale indicators.
-
rs_telltale_runtime_t runtime
Current runtime data of the telltale indicators.
-
rs_telltale_output_t output
Output display data of the telltale indicators.
-
rs_telltale_config_t config