Repository navigation
api doxygen functions
github-actions[bot] edited this page Sep 7, 2026
·
1 revision
Complete function documentation automatically generated from painlessMesh source code using Doxygen.
⚙️ API Reference - Functions
🔗 Open in New Tab
<iframe
src="https://alteriom.github.io/painlessMesh/api-reference/globals_func.html"
width="100%"
height="700px"
frameborder="0"
style="border: 1px solid #d0d7de; border-radius: 6px; background: white;"
loading="lazy"
title="Doxygen Function Documentation">
📄 Your browser doesn't support iframes. Open function documentation in new tab
</iframe>| Function Category | Description | Direct Link |
|---|---|---|
| All Functions | Complete function listing | 📖 Browse All |
| Global Variables | Module-level variables | 🌐 View Globals |
| Defines & Macros | Preprocessor definitions | 🔧 Browse Defines |
| Enumerations | Enum values and types | 📋 View Enums |
-
Initialization:
mesh.init(),mesh.stop() -
Messaging:
mesh.sendBroadcast(),mesh.sendSingle() -
Network Info:
mesh.getNodeList(),mesh.getNodeId()
-
Time Sync:
mesh.getNodeTime(),mesh.isTimeAdjusted() -
Task Management:
scheduler.addTask(),task.enable()
-
Debug Settings:
mesh.setDebugMsgTypes() -
Network Config:
mesh.setRoot(),mesh.setNodeTimeout()
-
Package Registration:
mesh.onPackage() -
Message Processing:
variant.to<T>(),package.addTo()
Each function entry includes:
- Function signature with parameter types
- Brief description of what it does
- Detailed description of behavior and usage
- Parameter documentation with types and descriptions
- Return value details including error conditions
- Usage examples showing practical implementation
Mesh Initialization
// Basic mesh setup
mesh.init("NetworkName", "password", &scheduler, 5555);
mesh.onReceive(&messageCallback);
mesh.onNewConnection(&connectionCallback);Message Handling
// Send to all nodes
bool success = mesh.sendBroadcast("Hello everyone!");
// Send to specific node
uint32_t targetId = 123456789;
bool sent = mesh.sendSingle(targetId, "Private message");Task Scheduling
// Create and schedule task
Task myTask(1000, TASK_FOREVER, &taskCallback);
scheduler.addTask(myTask);
myTask.enable();- Check return values - Many functions return success/failure status
- Use callbacks efficiently - Avoid blocking operations in mesh callbacks
- Monitor memory - Large message queues can cause memory issues
- Handle errors gracefully - Network operations can fail
| Function | Purpose | Parameters |
|---|---|---|
setDebugMsgTypes() |
Control debug output | Message type flags |
setRoot() |
Configure as root node | Boolean root status |
setNodeTimeout() |
Set connection timeout | Timeout in microseconds |
| Function | Purpose | Return Type |
|---|---|---|
getNodeId() |
Get this node's ID | uint32_t |
getNodeList() |
Get connected nodes | std::list<uint32_t> |
getNodeTime() |
Get synchronized time | uint32_t |
| Callback | Triggered When | Signature |
|---|---|---|
onReceive |
Message received | void(uint32_t from, String& msg) |
onNewConnection |
Node connects | void(uint32_t nodeId) |
onChangedConnections |
Topology changes | void() |
After exploring the function documentation:
- Try examples - See functions in action in Basic Examples
- Read class docs - Understand context in Class Reference
- Check file structure - Browse File Reference
- Review guides - Learn patterns in Core API Guide
?> 💡 Tip: Use the search functionality in the embedded documentation to quickly find specific functions. If the iframe doesn't load, use the direct links provided above.