Initial commit

This commit is contained in:
2025-12-13 03:36:06 +01:00
commit b424321bc0
62 changed files with 19669 additions and 0 deletions

37
include/udp_logger.h Normal file
View File

@@ -0,0 +1,37 @@
/**
* @file udp_logger.h
* @author techniccontroller (mail[at]techniccontroller.com)
* @brief Class for sending logging Strings as multicast messages
* @version 0.1
* @date 2022-03-21
*
* @copyright Copyright (c) 2022
*
*/
#ifndef UDP_LOGGER_H
#define UDP_LOGGER_H
#include <Arduino.h>
#include <WiFiUdp.h>
class UDPLogger
{
public:
UDPLogger();
UDPLogger(IPAddress interface_addr, IPAddress multicast_addr, uint16_t port, String name);
void set_name(String name);
void log_string(String message);
void log_color_24bit(uint32_t color);
private:
char _packetBuffer[100] = {0};
int _port;
IPAddress _interfaceAddr;
IPAddress _multicastAddr;
String _name = "Logger";
unsigned long _lastSend = 0;
WiFiUDP _udp;
};
#endif /* UDP_LOGGER_H */