Files
chargeflow/components/loadbalancer/include/loadbalancer_events.h
2025-06-14 10:27:29 +01:00

25 lines
495 B
C

#pragma once
#include "esp_event.h"
#include <stdbool.h>
#include <stdint.h>
#include "esp_timer.h"
ESP_EVENT_DECLARE_BASE(LOADBALANCER_EVENTS);
typedef enum {
LOADBALANCER_EVENT_INIT,
LOADBALANCER_EVENT_STATE_CHANGED,
LOADBALANCER_EVENT_CHARGING_LIMIT_CHANGED
} loadbalancer_event_id_t;
typedef struct {
float limit;
int64_t timestamp_us;
} loadbalancer_charging_limit_event_t;
typedef struct {
bool enabled;
int64_t timestamp_us;
} loadbalancer_state_event_t;