Crate sml_rs

Source
Expand description

Smart Message Language (SML) parser written in Rust.

Modern German power meters periodically send SML-encoded data via an optical interface. The main use-case of this library is to decode that data.

See the transport module for encoding / decoding the SML transport protocol v1 and the parser module for parsing decoded data into SML data structures.

Complete examples of how to use the library can be found on github in the examples folder.

§Feature flags

  • std (default) — Remove this feature to make the library no_std compatible.
  • alloc (default) — Implementations using allocations (alloc::Vec et al.).
  • embedded_hal — Allows using pins implementing embedded_hal::serial::Read in SmlReader.
  • nb - Enables non-blocking APIs using the nb crate.

Modules§

parser
SML parsers.
transport
SML transport protocol (version 1).
util
utility stuff

Structs§

SmlReader
Main API of sml-rs
SmlReaderBuilder
Builder struct for SmlReader that allows configuring the internal buffer type.

Enums§

ReadParsedError
Error returned by functions parsing sml data read from a reader

Traits§

SmlParse
Helper trait implemented for types that can be built from decoded bytes.

Type Aliases§

DecodedBytes
Type alias for decoded bytes.