api doxygen - Alteriom/painlessMesh GitHub Wiki

📖 API Reference (Doxygen)

Comprehensive API documentation automatically generated from the AlteriomPainlessMesh source code using Doxygen.

🚀 Complete API Documentation

Explore every class, function, and file in the AlteriomPainlessMesh library. Documentation is automatically generated from source code comments to ensure accuracy and completeness.

🎯 Quick Access

📚 Classes

Browse all classes, their methods, and inheritance relationships

Browse Classes

⚙️ Functions

Explore all functions, globals, and their detailed documentation

Browse Functions

📁 Files

Navigate the complete source code structure and file organization

Browse Files

🔗 Direct API Access

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

🎯 Core AlteriomPainlessMesh Classes

Quick links to the most important classes in the library:

🌐 Networking Core

Class Purpose Documentation
painlessMesh Main mesh network management 📖 Documentation
Scheduler Task scheduling and timing 📖 Documentation
Task Individual task management 📖 Documentation

📦 Alteriom Package System

Package Type Purpose Documentation
SensorPackage Environmental data collection 📖 Documentation
CommandPackage Device control commands 📖 Documentation
StatusPackage System status monitoring 📖 Documentation

🔌 Plugin Framework

Component Purpose Documentation
SinglePackage Point-to-point messaging 📖 Documentation
BroadcastPackage Network-wide broadcasts 📖 Documentation
Variant Type-safe message container 📖 Documentation

🚀 API Usage Examples

Basic Mesh Setup

#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
}

Alteriom Package Usage

#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());
}

📚 Documentation Features

What's Included

  • 🔍 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

Documentation Standards

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

🛠️ For Developers

Contributing to Documentation

The API documentation is automatically generated from source code comments. To improve it:

  1. Edit source files - Documentation is in .h and .hpp files
  2. Use Doxygen syntax - Follow the existing comment patterns
  3. Test locally - Run doxygen doxygen/Doxyfile to preview changes
  4. Submit PR - Documentation updates deploy automatically

Generating Documentation Locally

# 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

🔗 Related Resources


?> 💡 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.

⚠️ **GitHub.com Fallback** ⚠️