2023-05-26 15:48:20 +01:00
|
|
|
// Copyright (c) 2023 Cesanta Software Limited
|
|
|
|
// All rights reserved
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "mongoose.h"
|
|
|
|
|
2023-11-08 17:02:46 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-05-26 15:48:20 +01:00
|
|
|
#if !defined(HTTP_URL)
|
|
|
|
#define HTTP_URL "http://0.0.0.0:8000"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HTTPS_URL)
|
2023-07-25 13:07:28 +01:00
|
|
|
#define HTTPS_URL "https://0.0.0.0:8443"
|
2023-05-26 15:48:20 +01:00
|
|
|
#endif
|
|
|
|
|
2023-05-28 17:06:47 +01:00
|
|
|
#define MAX_DEVICE_NAME 40
|
2023-06-19 04:43:55 -04:00
|
|
|
#define MAX_EVENTS_NO 400
|
2023-06-15 06:11:07 -04:00
|
|
|
#define MAX_EVENT_TEXT_SIZE 10
|
|
|
|
#define EVENTS_PER_PAGE 20
|
2023-05-28 17:06:47 +01:00
|
|
|
|
2023-06-15 06:11:07 -04:00
|
|
|
// Event log entry
|
|
|
|
struct ui_event {
|
2023-06-19 04:43:55 -04:00
|
|
|
uint8_t type, prio;
|
2023-06-15 06:11:07 -04:00
|
|
|
unsigned long timestamp;
|
|
|
|
char text[10];
|
|
|
|
};
|
|
|
|
|
2023-05-26 15:48:20 +01:00
|
|
|
void web_init(struct mg_mgr *mgr);
|
2023-11-08 17:02:46 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|