mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Docs changes are to reflect how it is currently in fw This adds ability to send datagram data to everyone in channel
19 lines
731 B
C++
19 lines
731 B
C++
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#define TXT_TYPE_PLAIN 0 // a plain text message
|
|
#define TXT_TYPE_CLI_DATA 1 // a CLI command
|
|
#define TXT_TYPE_SIGNED_PLAIN 2 // plain text, signed by sender
|
|
#define TXT_TYPE_CUSTOM_BINARY 0xFF // custom app binary payload (group/channel datagrams)
|
|
|
|
class StrHelper {
|
|
public:
|
|
static void strncpy(char* dest, const char* src, size_t buf_sz);
|
|
static void strzcpy(char* dest, const char* src, size_t buf_sz); // pads with trailing nulls
|
|
static const char* ftoa(float f);
|
|
static const char* ftoa3(float f); //Converts float to string with 3 decimal places
|
|
static bool isBlank(const char* str);
|
|
static uint32_t fromHex(const char* src);
|
|
};
|