DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
sunspec.h File Reference

SunSpec Modbus device-information-model codec (DETWS_ENABLE_SUNSPEC) - zero-heap model-chain walker + register-point readers and a map builder, layered on the holding-register model so a solar inverter / meter / battery is interoperable. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

SunSpec Modbus device-information-model codec (DETWS_ENABLE_SUNSPEC) - zero-heap model-chain walker + register-point readers and a map builder, layered on the holding-register model so a solar inverter / meter / battery is interoperable.

A SunSpec map (SunSpec Device Information Model) lives in a contiguous holding-register block and is laid out as raw big-endian 16-bit registers:

"SunS" (0x53756E53, 2 registers) // well-known identifier
[Model ID][Length L][L body registers] // repeated, one per model
...
[0xFFFF][0] // end model terminates the map

Length L is the number of registers after the length point (the model body). Models are contiguous (no gap between them). Common model = ID 1.

The reader is a cursor over the received register bytes (big-endian, 2 bytes/register): verify the marker, then walk each model and read typed points by register offset. The writer emits the same layout (marker, model headers + points, end model) for a device exposing its own map. Marker / header format verified against the SunSpec spec.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file sunspec.h.