# SmlEx v0.1.0 - API Reference

## Modules

- [Sml](Sml.md): Decoder for SML (Smart Message Language) telegrams.
- [Sml.File](Sml.File.md): A decoded SML file: the messages contained in one telegram.
- [Sml.ListEntry](Sml.ListEntry.md): One entry of the value list in a `Sml.Messages.GetListResponse`
(`SML_ListEntry`), e.g. the meter reading for `1-0:1.8.0*255`.
- [Sml.Message](Sml.Message.md): An SML message (`SML_Message`).
- [Sml.Obis](Sml.Obis.md): OBIS codes (Object Identification System, IEC 62056-61).
- [Sml.PeriodEntry](Sml.PeriodEntry.md): A value in a load profile or parameter tree (`SML_PeriodEntry`).

- [Sml.Time](Sml.Time.md): Decoding of `SML_Time`.
- [Sml.Tree](Sml.Tree.md): A node of a parameter tree (`SML_Tree`) as returned by
`Sml.Messages.GetProcParameterResponse`.
- [Sml.Units](Sml.Units.md): DLMS/COSEM unit codes (IEC 62056-62) as used in the `unit` field of SML
list entries.

- Messages
  - [Sml.Messages.AttentionResponse](Sml.Messages.AttentionResponse.md): Error or status notification (`SML_Attention.Res`) (tag `0xFF01`).

  - [Sml.Messages.CloseRequest](Sml.Messages.CloseRequest.md): Closes an SML session (`SML_PublicClose.Req`) (tag `0x0200`).

  - [Sml.Messages.CloseResponse](Sml.Messages.CloseResponse.md): End of an SML file sent by the meter (`SML_PublicClose.Res`) (tag `0x0201`).

  - [Sml.Messages.GetListRequest](Sml.Messages.GetListRequest.md): Requests a value list (`SML_GetList.Req`) (tag `0x0700`).

  - [Sml.Messages.GetListResponse](Sml.Messages.GetListResponse.md): The current readings of a meter (`SML_GetList.Res`, tag `0x0701`).
  - [Sml.Messages.GetProcParameterResponse](Sml.Messages.GetProcParameterResponse.md): Parameter values (`SML_GetProcParameter.Res`, tag `0x0501`).
  - [Sml.Messages.GetProfileListResponse](Sml.Messages.GetProfileListResponse.md): Load profile values (`SML_GetProfileList.Res`, tag `0x0401`).
  - [Sml.Messages.OpenRequest](Sml.Messages.OpenRequest.md): Opens an SML session (`SML_PublicOpen.Req`) (tag `0x0100`).

  - [Sml.Messages.OpenResponse](Sml.Messages.OpenResponse.md): Start of an SML file sent by the meter (`SML_PublicOpen.Res`) (tag `0x0101`).

- Low level
  - [Sml.CRC16](Sml.CRC16.md): The 16 bit checksums used by SML for the transport frame and each message.
  - [Sml.Decoder](Sml.Decoder.md): Turns the generic terms produced by `Sml.Parser` into `Sml.Message` structs.
  - [Sml.Parser](Sml.Parser.md): Low-level parser for the SML binary encoding (type-length-value).
  - [Sml.Transport](Sml.Transport.md): SML transport protocol version 1 (framing of SML files).

- Exceptions
  - [Sml.DecodeError](Sml.DecodeError.md): Raised by `Sml.decode!/2` when a telegram cannot be decoded.

