Communication Module Technicals
Overview
The DroneEngage Communication module (de_comm) is responsible for establishing and maintaining communication between drone units and the central cloud server. It provides a robust WebSocket-based communication framework with authentication, message routing, and system-level command capabilities.
Architecture
The Communication module follows a modular architecture with several key components:
Core Classes
CAndruavAuthenticator - Handles authentication and hardware validation with the remote server
CAndruavCommServer - Manages WebSocket connections and message routing
CAndruavFacade - Provides high-level API for communication operations
CAndruavParser - Processes incoming messages and commands
CConfigFile - Manages configuration settings and file monitoring
Key Features
Secure Authentication: Validates drone agents and hardware IDs with HTTPS-based authentication
WebSocket Communication: Real-time bidirectional communication with cloud server
Message Routing: Efficient message parsing and routing to appropriate system components
Configuration Management: Dynamic configuration updates with file monitoring
Error Handling: Comprehensive error handling and recovery mechanisms
Communication Flow
Authentication: Drone authenticates with server using credentials and hardware ID
Connection: WebSocket connection established with authenticated parameters
Message Exchange: Bidirectional message flow for commands, telemetry, and system updates
Monitoring: Continuous connection monitoring with automatic reconnection
Integration Points
The Communication module integrates with:
DataBus: Inter-module communication via UDP sockets
MAVLink Module: Flight controller communication
Web Client: User interface and control
Plugin System: Extensible functionality
Configuration
The module uses JSON-based configuration files for:
Authentication server settings
Connection parameters
Message routing rules
System behavior options
Security
HTTPS-based authentication
Hardware ID validation
Encrypted WebSocket communication
Access control and permissions
Performance
Non-blocking I/O operations
Event-driven architecture
Connection pooling and optimization
Minimal latency message processing
This module serves as the foundation for all external communications in the DroneEngage system, ensuring reliable and secure connectivity between drone units and ground control infrastructure.