67 lines
1.4 KiB
C
Executable File
67 lines
1.4 KiB
C
Executable File
#ifndef EVSE_MANAGER_H
|
|
#define EVSE_MANAGER_H
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/queue.h>
|
|
|
|
/**
|
|
* @brief Inicializa os módulos internos do EVSE (hardware, estado, erros, etc.)
|
|
* e inicia a tarefa de supervisão periódica (tick).
|
|
*/
|
|
void evse_manager_init(void);
|
|
|
|
/**
|
|
* @brief Executa uma iteração do ciclo de controle do EVSE.
|
|
*
|
|
* Esta função é chamada automaticamente pela task periódica,
|
|
* mas pode ser chamada manualmente em testes.
|
|
*/
|
|
void evse_manager_tick(void);
|
|
|
|
/**
|
|
* @brief Verifica se o EVSE está disponível para uso.
|
|
*
|
|
* Isso considera falhas críticas, disponibilidade configurada, etc.
|
|
*/
|
|
bool evse_manager_is_available(void);
|
|
|
|
/**
|
|
* @brief Define se o EVSE deve estar disponível (ex: via controle remoto).
|
|
*/
|
|
void evse_manager_set_available(bool available);
|
|
|
|
/**
|
|
* @brief Define se o EVSE está autorizado a carregar (ex: após autenticação).
|
|
*/
|
|
void evse_manager_set_authorized(bool authorized);
|
|
|
|
/**
|
|
* @brief Verifica se o EVSE está atualmente carregando.
|
|
*/
|
|
bool evse_manager_is_charging(void);
|
|
|
|
/**
|
|
* @brief Ativa ou desativa logicamente o EVSE (controla habilitação geral).
|
|
*/
|
|
void evse_manager_set_enabled(bool enabled);
|
|
|
|
/**
|
|
* @brief Verifica se o EVSE está ativado logicamente.
|
|
*/
|
|
bool evse_manager_is_enabled(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif // EVSE_MANAGER_H
|