|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <arpa/inet.h>#include <netinet/in.h>#include <signal.h>#include <sys/socket.h>#include <sys/wait.h>#include <unistd.h>#include <atomic>#include <cstdlib>#include <cstring>#include <fstream>#include <iostream>#include <sstream>#include <string>#include <thread>#include <vector>#include "config/Config.hpp"#include "net/DaqInterface.hpp"Go to the source code of this file.
Namespaces | |
| namespace | anonymous_namespace{ota_service_main.cpp} |
| OTA Service — Ethernet firmware flash for DiabloAvionics ESP32-S3 boards. | |
Functions | |
| void | anonymous_namespace{ota_service_main.cpp}::signalHandler (int) |
| std::string | anonymous_namespace{ota_service_main.cpp}::trim (const std::string &s) |
| bool | anonymous_namespace{ota_service_main.cpp}::flashFirmware (const std::string &ip, const std::string &bin_path, std::string &error) |
| std::string | anonymous_namespace{ota_service_main.cpp}::readFirstPioEnv (const std::string &iniPath) |
| void | anonymous_namespace{ota_service_main.cpp}::sanitizeOneLine (std::string &s) |
| bool | anonymous_namespace{ota_service_main.cpp}::runPioBuild (const std::string &projectDir, int boardId, std::string &buildLog, std::string &error) |
| Run pio in projectDir; capture combined stdout/stderr into buildLog. | |
| bool | anonymous_namespace{ota_service_main.cpp}::buildAndFlash (const std::string &ip, const std::string &projectDir, int boardId, std::string &error, std::string &buildOutput) |
| void | anonymous_namespace{ota_service_main.cpp}::handleClient (int client_fd) |
| int | main (int argc, char *argv[]) |
Variables | |
| std::atomic< bool > | anonymous_namespace{ota_service_main.cpp}::g_running {true} |
| static constexpr uint16_t | anonymous_namespace{ota_service_main.cpp}::OTA_PORT = 3232 |
| std::string | anonymous_namespace{ota_service_main.cpp}::g_bind_address = "0.0.0.0" |
| static constexpr size_t | anonymous_namespace{ota_service_main.cpp}::CHUNK_SIZE = 4096 |
| static constexpr int | anonymous_namespace{ota_service_main.cpp}::CONNECT_TIMEOUT_S = 5 |
| static constexpr int | anonymous_namespace{ota_service_main.cpp}::TRANSFER_TIMEOUT_S = 60 |
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 379 of file ota_service_main.cpp.
References anonymous_namespace{ota_service_main.cpp}::g_bind_address, g_running, anonymous_namespace{ota_service_main.cpp}::handleClient(), fsw::config::load(), fsw::net::resolveDaqBindAddress(), and signalHandler().