JXCT Soil Sensor 7-in-1 v3.4.9 (June 2025)
Professional IoT soil monitoring system with ESP32, Modbus RTU, MQTT, and advanced compensation algorithms
Загрузка...
Поиск...
Не найдено
Файл routes_data.cpp

Маршруты для работы с данными датчика Подробнее...

#include "../../include/web_routes.h"
#include "../../include/logger.h"
#include "../../include/jxct_config_vars.h"
#include "../../include/jxct_ui_system.h"
#include "../../include/jxct_format_utils.h"
#include "../wifi_manager.h"
#include "../modbus_sensor.h"
#include "calibration_manager.h"
#include <ArduinoJson.h>
#include <NTPClient.h>
#include <LittleFS.h>
#include <time.h>
#include "../../include/jxct_strings.h"

См. исходные тексты.

Классы

struct  RecValues
 

Функции

String navHtml ()
 
String formatValue (float value, const char *unit, int precision)
 
String getApSsid ()
 
static RecValues computeRecommendations ()
 
static void handleReadingsUpload ()
 
static void handleProfileSave ()
 
static void sendSensorJson ()
 
void setupDataRoutes ()
 Настройка маршрутов данных датчика (/readings, /sensor_json, /api/sensor)
 

Переменные

NTPClient * timeClient
 
static File uploadFile
 
static SoilProfile uploadProfile = SoilProfile::SAND
 

Подробное описание

Маршруты для работы с данными датчика

Обработка запросов показаний датчика, JSON API и веб-интерфейса данных

См. определение в файле routes_data.cpp

Функции

◆ computeRecommendations()

static RecValues computeRecommendations ( )
static

См. определение в файле routes_data.cpp строка 34

Перекрестные ссылки config.

Используется в sendSensorJson().

◆ formatValue()

String formatValue ( float value,
const char * unit,
int precision )
extern

См. определение в файле jxct_format_utils.cpp строка 40

◆ getApSsid()

String getApSsid ( )
extern

См. определение в файле wifi_manager.cpp строка 206

◆ handleProfileSave()

static void handleProfileSave ( )
static

См. определение в файле routes_data.cpp строка 169

Перекрестные ссылки config, logSuccess(), saveConfig() и webServer.

Используется в setupDataRoutes().

◆ handleReadingsUpload()

static void handleReadingsUpload ( )
static

См. определение в файле routes_data.cpp строка 137

Перекрестные ссылки CalibrationManager::init(), logError(), logSuccess(), CalibrationManager::profileToFilename(), SAND, uploadFile и webServer.

Используется в setupDataRoutes().

◆ navHtml()

String navHtml ( )
extern

См. определение в файле wifi_manager.cpp строка 82

Используется в setupDataRoutes().

◆ sendSensorJson()

static void sendSensorJson ( )
static

◆ setupDataRoutes()

void setupDataRoutes ( )

Настройка маршрутов данных датчика (/readings, /sensor_json, /api/sensor)

См. определение в файле routes_data.cpp строка 274

Перекрестные ссылки AP, API_SENSOR, config, currentWiFiMode, CalibrationManager::deleteTable(), generateApModeUnavailablePage(), generateButton(), generatePageFooter(), generatePageHeader(), handleProfileSave(), handleReadingsUpload(), CalibrationManager::hasTable(), CalibrationManager::init(), logDebug(), logWebRequest(), navHtml(), PRIMARY, SAND, SECONDARY, sendSensorJson(), UI_ICON_DATA, UI_ICON_UPLOAD и webServer.

Используется в setupWebServer().

Переменные

◆ timeClient

NTPClient* timeClient
extern

См. определение в файле main.cpp строка 43

◆ uploadFile

File uploadFile
static

См. определение в файле routes_data.cpp строка 29

◆ uploadProfile

SoilProfile uploadProfile = SoilProfile::SAND
static

См. определение в файле routes_data.cpp строка 30