Expand description
§gwa-core
Dispatch a signed wake-up and read a commissioned smart meter gateway’s simulator profile over its mutually authenticated callback. The library runs one network attempt for an explicit three-slot ProfileWindow. The gwad service owns submission, durable timestamps, job identity and result storage.
Load CommissionedGateway from the administrator’s credential bundle and the gateway’s equipment identifier. Compare its peer_fingerprint() with the job’s commissioned SHA-256 leaf pin. Bind the callback listener, reserve a fresh signed UTC second, then call ReadExchange::read. The callback must authenticate with the exact certificate that produced the pin.
The successful response contains the meter records or an explicit meter-unavailable outcome. Transport errors and malformed responses let the worker retry the read. A worker crash after the gateway serves a read can cause another read on restart. The simulator uses a read-only GET for this operation. HTTP idempotency · Simulator walkthrough
Use CallbackListener::bind once per shared simulator address and CommissionedGateway::read_shared per read. The signed wake-up digest selects the pending TLS endpoint. The gateway confirms that digest again over pinned mutual TLS before the worker sends its request.
§Device information
device_info::decode_device_info validates the published class 32781 version 1 XML representation against the requested logical device and returns its manufacturer and firmware. The offline verifier checks both source digests before decoding. Reproduce the published example
Licensed under MIT OR Apache-2.0.
Modules§
- device_
info - Decode the WAN API v2.0.0 device-information example for a commissioned logical device.
Structs§
- Callback
Listener - Accepts callbacks for multiple independently pinned reads on one loopback address.
- Commissioned
Gateway - The administrator’s signing identity and commissioned gateway for one job target.
- Profile
Window - Three consecutive quarter-hour slots identified by their first UTC second.
- Read
Exchange - A one-shot read with a bound callback listener.
- Record
Enums§
- Read
Outcome - A complete, validated management response from a commissioned gateway.
Constants§
- FIXTURE_
RECIPIENT - Synthetic DIN 43849 equipment identifier used by the simulator.
Functions§
- parse_
recipient - Parse a commissioned equipment identifier from 18 hexadecimal digits.
- peer_
fingerprint - Read the commissioned gateway leaf pin from its administrator’s bundle. This needs only the peer certificate. An executing worker must compare its loaded TLS endpoint’s pin with the saved value before sending a wake-up.