api doxygen - Alteriom/painlessMesh GitHub Wiki
Comprehensive API documentation automatically generated from the AlteriomPainlessMesh source code using Doxygen.
Explore every class, function, and file in the AlteriomPainlessMesh library. Documentation is automatically generated from source code comments to ensure accuracy and completeness.
For power users who prefer direct access to the Doxygen documentation:
| Section | Description | Link |
|---|---|---|
| 🏠 Main Index | Complete API documentation homepage | 📖 Open Documentation |
| 📋 Class List | All classes with brief descriptions | 🔍 Browse Classes |
| ⚙️ Function Index | Global functions and utilities | 🔧 Browse Functions |
| 📁 File Structure | Source files and their contents | 📂 Browse Files |
| 🌳 Class Hierarchy | Inheritance and relationships | 🌲 View Hierarchy |
Quick links to the most important classes in the library:
| Class | Purpose | Documentation |
|---|---|---|
painlessMesh |
Main mesh network management | 📖 Documentation |
Scheduler |
Task scheduling and timing | 📖 Documentation |
Task |
Individual task management | 📖 Documentation |
| Package Type | Purpose | Documentation |
|---|---|---|
SensorPackage |
Environmental data collection | 📖 Documentation |
CommandPackage |
Device control commands | 📖 Documentation |
StatusPackage |
System status monitoring | 📖 Documentation |
| Component | Purpose | Documentation |
|---|---|---|
SinglePackage |
Point-to-point messaging | 📖 Documentation |
BroadcastPackage |
Network-wide broadcasts | 📖 Documentation |
Variant |
Type-safe message container | 📖 Documentation |
#include "AlteriomPainlessMesh.h"
painlessMesh mesh;
Scheduler userScheduler;
void setup() {
// Initialize mesh - see painlessMesh class documentation
mesh.init("MyMesh", "password", &userScheduler, 5555);
// Set up callbacks - see callback documentation
mesh.onReceive(&receivedCallback);
mesh.onNewConnection(&newConnectionCallback);
mesh.onChangedConnections(&changedConnectionCallback);
}
void loop() {
mesh.update(); // Keep the mesh running
}#include "AlteriomPainlessMesh.h"
void sendSensorData() {
// Create sensor package - see SensorPackage documentation
alteriom::SensorPackage sensor;
sensor.temperature = 25.5;
sensor.humidity = 60.0;
sensor.sensorId = mesh.getNodeId();
sensor.timestamp = mesh.getNodeTime();
// Send to all nodes - see mesh.sendPackage() documentation
mesh.sendPackage(&sensor);
}
void sendCommand(uint32_t targetNode) {
// Create command package - see CommandPackage documentation
alteriom::CommandPackage cmd;
cmd.command = 1; // Turn on LED
cmd.targetDevice = targetNode;
cmd.commandId = random(1000000);
// Send to specific node - see mesh.sendSingle() documentation
mesh.sendSingle(targetNode, cmd.toString());
}- 🔍 Complete API Coverage - Every public class, method, and function
- 📝 Detailed Descriptions - Purpose, parameters, return values, and examples
- 🌳 Inheritance Diagrams - Visual class relationships and hierarchies
- 🔗 Cross-References - Easy navigation between related components
- 💡 Usage Examples - Practical code snippets for common tasks
-
⚠️ Notes & Warnings - Important usage information and gotchas
All API documentation follows consistent standards:
- Brief Description - One-line summary of purpose
- Detailed Description - How it works and when to use it
- Parameters - All parameters with types and descriptions
- Return Values - What the function returns and possible errors
- Examples - Practical usage patterns
- See Also - Related functions and classes
The API documentation is automatically generated from source code comments. To improve it:
-
Edit source files - Documentation is in
.hand.hppfiles - Use Doxygen syntax - Follow the existing comment patterns
-
Test locally - Run
doxygen doxygen/Doxyfileto preview changes - Submit PR - Documentation updates deploy automatically
# Install Doxygen
sudo apt-get install doxygen graphviz # Linux
brew install doxygen graphviz # macOS
# Generate documentation
doxygen doxygen/Doxyfile
# Open documentation
open docs/api-reference/html/index.html- 📖 Core API Guide - High-level API overview
- 🎯 Configuration Guide - Detailed setup options
- 🔄 Callbacks Guide - Event handling patterns
- 🛠️ Troubleshooting - Common API issues
?> 💡 Pro Tip: The Doxygen documentation is searchable! Use Ctrl+F in the embedded viewers or the search functionality in the full documentation to quickly find what you need.