#ifndef MODBUS_REGISTER_MAP_H
#define MODBUS_REGISTER_MAP_H

#include <stdint.h>

typedef struct {
    uint8_t num;
    int16_t (*read_register_fun)(void);
    void (*write_register_fun)(int16_t);
} rs485_register_struct;

int16_t GetOnOff(void);
void SetOnOff(int16_t data);
int16_t GetSetRoomTemp(void);
void SetSetRoomTemp(int16_t data);
int16_t GetFanSpeed(void);
void SetFanSpeed(int16_t data);
int16_t GetWorkMode(void);
void SetWorkMode(int16_t data);
int16_t GetKeyLock(void);
void SetKeyLock(int16_t data);
int16_t GetSleepMode(void);
void SetSleepMode(int16_t data);
int16_t GetRoomTemp(void);
int16_t GetRoomHum(void);
int16_t GetExSensorTemp(void);
int16_t GetRoomCardStatus(void);
int16_t GetAlarm(void);
int16_t GetAddress(void);
void SetAddress(int16_t data);
int16_t GetBaudRate(void);
void SetBaudRate(int16_t data);
int16_t GetTempCalibration(void);
void SetTempCalibration(int16_t data);
int16_t GetSetTempUpper(void);
void SetSetTempUpper(int16_t data);
int16_t GetSetTemplower(void);
void SetSetTemplower(int16_t data);
int16_t GetPowerOffMemory(void);
void SetPowerOffMemory(int16_t data);
int16_t GetFanDelayOff(void);
void SetFanDelayOff(int16_t data);
int16_t GetFanStateWithHV(void);
void SetFanStateWithHV(int16_t data);
int16_t GetFanStateWithCV(void);
void SetFanStateWithCV(int16_t data);
int16_t GetValveStartDelay(void);
void SetValveStartDelay(int16_t data);
int16_t GetPipeOption(void);
void SetPipeOption(int16_t data);
int16_t GetSystemMode(void);
void SetSystemMode(int16_t data);
int16_t GetExInput(void);
void SetExInput(int16_t data);
int16_t GetEcoHeat(void);
void SetEcoHeat(int16_t data);
int16_t GetEcoCool(void);
void SetEcoCool(int16_t data);
int16_t GetProgramOption(void);
void SetProgramOption(int16_t data);
int16_t GetTempUnit(void);
void SetTempUnit(int16_t data);
int16_t GetProportionalBand(void);
void SetProportionalBand(int16_t data);
int16_t GetMinValveOpen(void);
void SetMinValveOpen(int16_t data);
int16_t GetValveInterval(void);
void SetValveInterval(int16_t data);
int16_t GetMaxFanVoltage(void);
void SetMaxFanVoltage(int16_t data);
int16_t GetMinFanVoltage(void);
void SetMinFanVoltage(int16_t data);
int16_t GetHighFanVoltage(void);
void SetHighFanVoltage(int16_t data);
int16_t GetMedFanVoltage(void);
void SetMedFanVoltage(int16_t data);
int16_t GetLowFanVoltage(void);
void SetLowFanVoltage(int16_t data);

extern rs485_register_struct rs485_register_array[];
extern const int rs485_register_count;

#endif
