/*
 * can_read_pump_data.h
 *
 *  Created on: Sep 18, 2025
 *      Author: herli
 */

#ifndef IMMOBILISERS_CAN_READ_PUMP_DATA_H_
#define IMMOBILISERS_CAN_READ_PUMP_DATA_H_

#include <stdint.h>


/* Configure the 4 logical pieces (optional; defaults are compiled in) */
void can_read_pump_data_set_client_model(const char *ascii);  // e.g. "059 130 106L"
void can_read_pump_data_set_serial(const char *ascii);        // e.g. "142974"
void can_read_pump_data_set_sw(const char *ascii);            // e.g. "C150_1.V79"
void can_read_pump_data_set_pin(const char *ascii);           // e.g. "482"

/* Build the full ASCII payload from the 4 pieces. Call at boot (or after setters). */
void can_read_pump_data_init(void);

/* Register the wrapper handler on 0x502 (MSG_ID_SEND2).
 * - Pump data pattern (FFFF A5..AB) -> handled here and reply is queued via the 60 ms path.
 * - Otherwise -> forwarded to the normal 0x502 address→value handler.
 */
void can_read_pump_data_register(void);

#endif /* IMMOBILISERS_CAN_READ_PUMP_DATA_H_ */
