View Source Grizzly.ZWave.Commands.S2MessageEncapsulation (grizzly v8.6.0)

Encapsulates a message for transmission using S2.

Params

  • :seq_number - must carry an increment of the value carried in the previous outgoing message.
  • :extensions - a list of extensions (SPAN, MGRP, MOS) to include with the command.
  • :encrypted_extensions? - when set, indicates that the command includes encrypted extensions (MPAN). Unlike extensions?, this param is required when encoding as it is impossible to determine if the encrypted payload contains extensions at that point.
  • :encrypted_payload - includes the encrypted extensions (if any), encrypted command payload, and auth tag

Notes

  • Although this module's functions support encoding/decoding the MPAN extension, MPAN is an encrypted extension and must be included in the encrypted payload. As such, it will be ignored if provided in the :extensions param.

Summary

Types

@type extension() ::
  {:span, <<_::128>>} | {:mgrp, group_id :: byte()} | {:mos, boolean()}
@type extension_type() :: :span | :mpan | :mgrp | :mos
@type param() ::
  {:seq_number, byte()}
  | {:extensions, list()}
  | {:encrypted_extensions?, boolean()}
  | {:encrypted_payload, binary()}

Functions

Link to this function

decode_extensions(arg, extensions \\ [])

View Source
Link to this function

encode_extensions(extensions)

View Source