-
Notifications
You must be signed in to change notification settings - Fork 24
Architecture & Design
The software consists of three main parts:
- smart meter sub package
- sinks sub package
- collector module
The smartmeter
package contains the code for reading and parsing data from the various smart meters. Each meter might use a different type of Reader
depending on their physical and data-link layer. The L+G E450 uses wired M-Bus as physical layer, therefore requires the SerialReader
. Its data-link layer is HDLC with DLMS as transport layer which is handled by HdlcDlmsParser
.
Common to all Meter
s is the asynchronously blocking start()
method and a register(observer)
method. The registered observer must be asynchronously notified with notify(List[MeterDataPoint])
(see abstract base class Meter
).
After calling start()
a meter must notify its registered observers when new measurements have been received. The data is forwarded as a list of MeterDataPoint
objects which contain the following fields:
- type of measurement (
MeterDataPointType
) - measurement as
float
value - source ID of the meter
- timestamp
For the types use the enum MeterDataPointTypes
in the meter_data
module.
The sink
sub package contains code that exports the measurements produced by the Meters
in different ways.
Common to all DataSinks
are the asynchronously non-blocking start()
, stop()
and send(MeterDataPoint)
methods (see abstract base class DataSink
).
The glue between the objects of the above sub packages is the Collector
which is notified by the Meter
s upon new data, stores them into its asynchronous queue and keeps forwarding them to the registered DataSink
s.
The objects mentioned above are built by a factory
module during application setup based on a .ini
configuration parsed by the config
module.
Smart Meter Data Collector