44 lines
1.1 KiB
C
Executable File
44 lines
1.1 KiB
C
Executable File
#ifndef EVSE_LIMITS_H
|
|
#define EVSE_LIMITS_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "evse_state.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/// Estado dos limites
|
|
void evse_set_limit_reached(uint8_t value);
|
|
bool evse_is_limit_reached(void);
|
|
|
|
/// Verifica e aplica lógica de limites com base no estado atual do EVSE
|
|
void evse_limits_check(evse_state_t state);
|
|
|
|
/// Limites ativos (runtime)
|
|
uint32_t evse_get_consumption_limit(void);
|
|
void evse_set_consumption_limit(uint32_t value);
|
|
|
|
uint32_t evse_get_charging_time_limit(void);
|
|
void evse_set_charging_time_limit(uint32_t value);
|
|
|
|
uint16_t evse_get_under_power_limit(void);
|
|
void evse_set_under_power_limit(uint16_t value);
|
|
|
|
/// Limites padrão (persistentes)
|
|
uint32_t evse_get_default_consumption_limit(void);
|
|
void evse_set_default_consumption_limit(uint32_t value);
|
|
|
|
uint32_t evse_get_default_charging_time_limit(void);
|
|
void evse_set_default_charging_time_limit(uint32_t value);
|
|
|
|
uint16_t evse_get_default_under_power_limit(void);
|
|
void evse_set_default_under_power_limit(uint16_t value);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // EVSE_LIMITS_H
|