evse_link feature

This commit is contained in:
2025-08-05 16:55:11 +01:00
parent bd587a10c0
commit 0d0dc5b129
35 changed files with 4353 additions and 2257 deletions

View File

@@ -11,67 +11,32 @@ extern "C" {
/**
* @brief Initializes the load balancer.
*
* This function configures the load balancer and its resources, including
* any necessary persistence configurations, such as storage in NVS (Non-Volatile Storage).
* This function prepares the system to perform load balancing efficiently.
* @brief Inicializa o módulo de load balancer
*/
void loadbalancer_init(void);
/**
* @brief Continuous task for the load balancer.
*
* This function executes the load balancing logic continuously, typically in a FreeRTOS task.
* It performs balance calculations, checks the grid current and energy conditions, and adjusts
* the outputs as necessary to ensure efficient energy consumption.
*
* @param param Input parameter, usually used to pass additional information or relevant context
* for the task execution.
* @brief Task contínua do algoritmo de balanceamento
*/
void loadbalancer_task(void *param);
/**
* @brief Enables or disables the load balancing system.
*
* This function allows enabling or disabling the load balancing system. When enabled, the load
* balancer starts managing the grid current based on the configured limits. If disabled, the system
* operates without balancing.
*
* The configuration is persisted in NVS, ensuring that the choice is maintained across system restarts.
*
* @param value If true, enables load balancing. If false, disables it.
* @brief Ativa ou desativa o load balancing
*/
void loadbalancer_set_enabled(bool value);
/**
* @brief Checks if load balancing is enabled.
*
* This function returns the current status of the load balancing system.
*
* @return Returns true if load balancing is enabled, otherwise returns false.
* @brief Verifica se o load balancing está ativo
*/
bool loadbalancer_is_enabled(void);
/**
* @brief Sets the maximum grid current.
*
* This function configures the maximum grid current that can be supplied to the load balancing system.
* The value set ensures that the system does not overload the electrical infrastructure and respects
* the safety limits.
*
* @param max_grid_current The maximum allowed current (in amperes) for the load balancing system.
* This value should be appropriate for the grid capacity and the installation.
* @brief Define a corrente máxima do grid
*/
esp_err_t load_balancing_set_max_grid_current(uint8_t max_grid_current);
/**
* @brief Gets the maximum grid current.
*
* This function retrieves the current maximum grid current limit.
*
* @return The maximum grid current (in amperes).
* @brief Obtém a corrente máxima do grid
*/
uint8_t load_balancing_get_max_grid_current(void);