Auto Modules Introduction
The RAPIDSEA Automotive Modules provide a comprehensive suite of features for managing automotive data such as speedometer, tachometer, odometer, tripmeter, fuel gauge, and temperature readings. These modules use an efficient moving average filter for processing the data.
The following modules are supported in RAPIDSEA:
Overview
The Automotive application primarily involves:

Configuring modules such as the speedometer, trip meter, tachometer, odometer, and others with scaling factors, thresholds, and other parameters.
Receiving and processing from UDP/TCP/CAN data for automotive modules.
Displaying processed data to the user interface through registered callbacks.
Auto Modules Data Structures
The RAPIDSEA Automotive Modules provide a robust and flexible solution for managing and monitoring automotive data. By using a set of well-defined configuration, runtime, and output structures, these modules enable seamless integration into the vehicle’s ECU. Whether you are tracking speed, temperature, fuel, or other vital vehicle parameters, RAPIDSEA’s modules offer efficient processing, real-time data monitoring, and diagnostic capabilities to ensure vehicle performance and safety.
Structure |
Description |
---|---|
am_config_t |
Each module has a configuration structure that stores the setup and initialization parameters. This includes module enable or disable, the module’s CAN ID for communication, settings for signal types (analog/digital), and any other configuration parameters that are essential for the module’s operation. |
am_runtime_t |
The runtime structure stores dynamic and real-time data that changes during the vehicle’s operation. It holds values received from sensors, processed values, and the current state of the system. |
am_output_t |
The output structure contains the final values that represent the module’s status. This may include output data for indicators or signals that the module controls or monitors. |
rs_am_t |
Finally, each module is encapsulated in a global structure, which integrates the configuration, runtime, and output structures. This structure allows for easy access to all of the data related to the module and provides a central point for management. |
Auto Modules Working Processes
The Auto Modules in RAPIDSEA follow a structured process to efficiently manage and monitor vehicle data. Here’s a simple overview of how the modules work:
Configuration Phase - Each module is configured using the am_config_t structure.
Data Collection - The module collects real-time data from ECU (e.g., speed, temperature, fuel level). This data is stored in the am_runtime_t structure for processing.
Data Processing - The collected data is processed using algorithms like the moving average filter to smooth out any fluctuations. The processed data is then stored in the same runtime structure.
Output Generation - After processing, the module generates output values (e.g., current speed, fuel level) stored in the am_output_t structure.
Communication - The final processed output is sent back to the Vehicle ECU Simulator via a UDP socket. This allows the vehicle dashboard or simulator to display the data in real-time
Error Codes
Each API for the filter moving average module returns success or failure codes. For detailed information on the error codes, please refer to the following section:
See also
Conclusion
The RAPIDSEA Automotive Modules provide a comprehensive and flexible solution for real-time data monitoring, diagnostics, and performance tracking in modern vehicles. By leveraging robust data structures and efficient processing algorithms (such as the moving average filter), RAPIDSEA enables seamless integration with a vehicle’s ECU. These modules empower automotive manufacturers with the tools needed for effective data management, system diagnostics, and user interface control.
Auto Module Header Details
The header file for the Auto module, rs_am.h, defines the overall Auto modules required structures and APIs for initialization and processing.
Defines
-
RS_AM_DATA_ID_SPEEDOMETER_RAW_SPEED_VALUE
Includes.
Data ID for raw speed value
-
RS_AM_DATA_ID_SPEEDOMETER_DISPLAY_SPEED_VALUE
Data ID for display speed value.
-
RS_AM_DATA_ID_TACHOMETER_RAW_TECHO_VAL
Data ID for raw tachometer value.
-
RS_AM_DATA_ID_TACHOMETER_DISPLAY_TACHO_VAL
Data ID for display tachometer value.
-
RS_AM_DATA_ID_ODOMETER_RAW_ODO_VAL
Data ID for raw odometer value.
-
RS_AM_DATA_ID_ODOMETER_DISPLAY_ODO_VAL
Data ID for display odometer value.
-
RS_AM_DATA_ID_FUELGAUGE_RAW_FUEL_VAL
Data ID for raw fuel gauge value.
-
RS_AM_DATA_ID_FUELGAUGE_DISPLAY_FUEL_VAL
Data ID for display fuel gauge value.
-
RS_AM_DATA_ID_TRIPMETER_RAW_TRIP_VAL
Data ID for raw trip meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_VAL
Data ID for display trip meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_X_VAL
Data ID for display trip X meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_TIMER
Data ID for display trip timer meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_X_TIMER
Data ID for display trip A timer meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_AVG_SPEED
Data ID for display trip average speed value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_X_AVG_SPEED
Data ID for display trip A timer meter value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_AFE
Data ID for display trip AFE value.
-
RS_AM_DATA_ID_TRIPMETER_DISPLAY_TRIP_X_AFE
Data ID for display trip A timer meter value.
-
RS_AM_DATA_ID_TEMPERATURE_RAW_TEMP_VAL
Data ID for raw temperature value.
-
RS_AM_DATA_ID_TEMPERATURE_DISPLAY_TEMP_VAL
Data ID for display temperature value.
-
RS_AM_DATA_ID_TRIPMETER_RAW_AFE_VAL
Data ID for raw trip AFE value.
-
RS_AM_DATA_ID_RAW_LEFT_TELLTALE
Data ID for raw turn left telltale value.
-
RS_AM_DATA_ID_DISPLAY_LEFT_TELLTALE
Data ID for display turn left telltale value.
-
RS_AM_DATA_ID_RAW_RIGHT_TELLTALE
Data ID for raw turn right telltale value.
-
RS_AM_DATA_ID_DISPLAY_RIGHT_TELLTALE
Data ID for display turn right telltale value.
-
RS_AM_DATA_ID_RAW_HAZARD_TELLTALE
Data ID for raw hazard telltale value.
-
RS_AM_DATA_ID_DISPLAY_HAZARD_TELLTALE
Data ID for display hazard telltale value.
-
RS_AM_DATA_ID_RAW_SEAT_BELT_TELLTALE
Data ID for raw seat belt telltale value.
-
RS_AM_DATA_ID_DISPLAY_SEAT_BELT_TELLTALE
Data ID for display seat belt telltale value.
-
RS_AM_DATA_ID_RAW_PARK_BRAKE_TELLTALE
Data ID for raw park brake telltale value.
-
RS_AM_DATA_ID_DISPLAY_PARK_BRAKE_TELLTALE
Data ID for display park brake telltale value.
-
RS_AM_DATA_ID_RAW_BRAKE_MALFUNCTION_TELLTALE
Data ID for raw brake malfunction telltale value.
-
RS_AM_DATA_ID_DISPLAY_BRAKE_MALFUNCTION_TELLTALE
Data ID for display brake malfunction telltale value.
-
RS_AM_DATA_ID_RAW_ABS_TELLTALE
Data ID for raw abs telltale value.
-
RS_AM_DATA_ID_DISPLAY_ABS_TELLTALE
Data ID for display abs telltale value.
-
RS_AM_DATA_ID_RAW_HIGH_COOLANT_WARNING_TELLTALE
Data ID for raw high coolant temperature warning telltale value.
-
RS_AM_DATA_ID_DISPLAY_HIGH_COOLANT_WARNING_TELLTALE
Data ID for display high coolant temperature warning telltale value.
-
RS_AM_DATA_ID_RAW_CRUISE_CONTROL_TELLTALE
Data ID for raw cruise control telltale value.
-
RS_AM_DATA_ID_DISPLAY_CRUISE_CONTROL_TELLTALE
Data ID for display cruise control telltale value.
-
RS_AM_DATA_ID_RAW_GEAR_VAL
Data ID for raw gear module value.
-
RS_AM_DATA_ID_DISPLAY_GEAR_VAL
Data ID for display gear module value.
Typedefs
-
typedef struct tag_rs_system_status rs_am_system_status_t
System state data structure.
-
typedef struct tag_rs_am_info rs_am_info_t
Contains information about all automotive modules.
Functions
-
rs_ret_val_t rs_am_init(rs_am_info_t *ptr_am_info)
Initializes the Auto Modules.
This function initializes all modules such as speedometer, tachometer, odometer, trip meter, fuel gauge, and temperature, and sets the global pointer to the module information structure.
- Parameters:
ptr_am_info – [in] Pointer to the
rs_am_info_t
structure containing module configurations.- Returns:
RS_RET_SUCCESS
if initialization is successful.
-
rs_ret_val_t rs_am_process()
Processes the data for all initialized Auto Modules.
This function processes all modules by invoking their respective process functions. It updates data for speedometer, tachometer, odometer, trip meter, fuel gauge, and temperature modules.
- Parameters:
ptr_am_info – [in] Pointer to the
rs_am_info_t
structure containing module information.- Returns:
RS_RET_SUCCESS
if processing is successful.
-
rs_ret_val_t rs_data_info_read_to_mem(uint16_t data_id, void *ptr_dst)
Reads data from memory based on the data ID.
This function retrieves data from memory (global variables) based on the provided data ID and copies it to the destination pointer.
- Parameters:
data_id – [in] The ID of the data to read.
ptr_dst – [out] Pointer to the destination memory where data will be copied.
- Returns:
Returns a result code indicating the success.
-
rs_ret_val_t rs_data_info_write_from_mem(uint16_t data_id, const void *ptr_src)
-
struct tag_rs_system_status
- #include <rs_am.h>
System state data structure.
-
struct tag_rs_am_info
- #include <rs_am.h>
Contains information about all automotive modules.
Public Members
-
rs_am_system_status_t system_status_info
System status information.
-
rs_am_speedometer_t speedometer_info
Speedometer module information.
-
rs_am_tachometer_t tachometer_info
Tachometer module information.
-
rs_am_odometer_t odometer_info
Odometer module information.
-
rs_am_temperature_t temperature_info
Temperature module information.
-
rs_am_tripmeter_t tripmeter_info
Trip meter module information.
-
rs_am_fuelgauge_t fuelgauge_info
Fuel gauge module information.
-
rs_am_telltale_t telltale_info
Telltale module information.
-
rs_am_gear_t gear_info
Gear module infomation.
-
rs_am_system_status_t system_status_info