26 lines
503 B
C
26 lines
503 B
C
#pragma once
|
|
|
|
#include <esp_http_server.h>
|
|
|
|
#define HTML_RESPONSE_SIZE 4096U
|
|
#define METRIC_NAME_MAX_SIZE 64U
|
|
#define METRIC_MAX_COUNT 32U
|
|
|
|
typedef enum _MetricValueType
|
|
{
|
|
FLOAT,
|
|
INTEGER_U8,
|
|
INTEGER_64,
|
|
} eMetricValueType;
|
|
|
|
typedef struct _metric
|
|
{
|
|
char caMetricName[METRIC_NAME_MAX_SIZE];
|
|
eMetricValueType type;
|
|
float fMetricValue;
|
|
uint8_t u8MetricValue;
|
|
int64_t i64MetricValue;
|
|
} sMetric;
|
|
|
|
void initMetrics(void);
|
|
void vSetMetrics(sMetric *paMetrics, uint16_t u16Size); |