Adicionar primeiro
This commit is contained in:
63
components/evse/include/evse_manager.h
Normal file
63
components/evse/include/evse_manager.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef EVSE_MANAGER_H
|
||||
#define EVSE_MANAGER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "evse_state.h"
|
||||
#include "evse_error.h"
|
||||
#include "evse_config.h"
|
||||
|
||||
/**
|
||||
* @brief Inicializa todos os módulos do EVSE e inicia a tarefa de supervisão periódica.
|
||||
*/
|
||||
void evse_manager_init(void);
|
||||
|
||||
/**
|
||||
* @brief Executa uma iteração do ciclo de controle do EVSE (chamada automaticamente pela task).
|
||||
*
|
||||
* Você normalmente não precisa chamar isso manualmente.
|
||||
*/
|
||||
void evse_manager_tick(void);
|
||||
|
||||
/**
|
||||
* @brief Verifica se o EVSE está disponível para conexão (não bloqueado, sem falha crítica, etc).
|
||||
*/
|
||||
bool evse_manager_is_available(void);
|
||||
|
||||
/**
|
||||
* @brief Define se o EVSE deve estar disponível.
|
||||
*
|
||||
* Pode ser usado, por exemplo, para bloquear carregamento via comando remoto.
|
||||
*/
|
||||
void evse_manager_set_available(bool available);
|
||||
|
||||
/**
|
||||
* @brief Define se o EVSE está autorizado a iniciar carregamento (ex: após autenticação).
|
||||
*/
|
||||
void evse_manager_set_authorized(bool authorized);
|
||||
|
||||
/**
|
||||
* @brief Verifica se o EVSE está em estado de carregamento ativo.
|
||||
*/
|
||||
bool evse_manager_is_charging(void);
|
||||
|
||||
/**
|
||||
* @brief Ativa ou desativa o EVSE (liga/desliga logicamente o carregamento).
|
||||
*/
|
||||
void evse_manager_set_enabled(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Verifica se o EVSE está ativado logicamente.
|
||||
*/
|
||||
bool evse_manager_is_enabled(void);
|
||||
|
||||
void evse_manager_task(void *arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // EVSE_MANAGER_H
|
||||
Reference in New Issue
Block a user