BACnet.Protocol.Prescale (bacstack v0.0.1)

View Source

Summary

Functions

Encodes a BACnet prescale into application tags encoding.

Parses a BACnet prescale from application tags encoding.

Validates whether the given prescale is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.Prescale{
  modulo_divide: non_neg_integer(),
  multiplier: non_neg_integer()
}

Functions

encode(prescale, opts \\ [])

@spec encode(t(), Keyword.t()) ::
  {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}

Encodes a BACnet prescale into application tags encoding.

parse(tags)

Parses a BACnet prescale from application tags encoding.

valid?(t)

@spec valid?(t()) :: boolean()

Validates whether the given prescale is in form valid.

It only validates the struct is valid as per type specification.