How ingdric29/driver_modbus works
Devlog is a SCADA-style variable logger: the runtime loads configuration, periodically polls configured devices, stores readings for later analysis, and evaluates alarms and events. The README also describes a dynamic web interface, but its implementation is not present in the supplied tree. MySQL/MariaDB, SMTP, and SMS are documented or represented integrations; some specific runtime links are uncertain because excerpts are partial, so those links are marked unverified.
Main entry points: main.cpp Polling runtime · cls_defalarmas.cpp Alarm evaluation · cls_equipos.cpp Device readers · loadconfig.cpp Configuration loader
Components 18
Runtime orchestration
- Polling runtime
src/main.cpp - Configuration loader
src/loadconfig.cpp
Device acquisition
- Device readers
src/cls_equipos.cpp - Serial transport
src/rs232.c
Monitoring operations
- Alarm evaluation
src/cls_defalarmas.cpp - Event definitions
src/cls_defeventos.cpp - Device commands
src/cls_cmd.cpp - Email delivery
src/cls_email.cpp - SMS notifications
src/cls_sms.cpp - Web visualization
Shared services
- Value conversion
src/conversiones.cpp - Runtime logging
src/cls_logger.cpp
Other components
- Operator
- Runtime settings
configdb.cfg - Field devices
- MySQL / MariaDB
- SMTP service
- Log files
log
Connections 18
- Operator → Polling runtime: starts
README.md - Polling runtime → Configuration loader: loads settings
src/main.cpp - Configuration loader → Runtime settings: reads
- Polling runtime → Device readers: starts polling
src/main.cpp - Device readers → Field devices: polls
- Device readers → Serial transport: uses serial I/O
- Polling runtime → MySQL / MariaDB: stores readings
- Polling runtime → Alarm evaluation: evaluates alarms
src/main.cpp - Polling runtime → Event definitions: updates events
- Polling runtime → Device commands: dispatches commands
- Alarm evaluation → Device commands: can trigger
- Alarm evaluation → Email delivery: can notify
- Alarm evaluation → SMS notifications: can notify
- Email delivery → SMTP service: sends mail
- MySQL / MariaDB → Web visualization: serves visualization data
README.md - Polling runtime → Value conversion: uses conversions
- Polling runtime → Runtime logging: records runtime events
- Runtime logging → Log files: writes logs