Created
May 9, 2017 22:13
-
-
Save adkron/391adc12cd0fdc1d972ce9ce90fa9cbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Zwave.Command.EnterInclusion.Pattern do | |
@moduledoc false | |
defmacro pattern do | |
quote do | |
<<0x00, 0x4A, 0xC1, 0x01>> | |
end | |
end | |
end | |
defmodule Zwave.Command.EnterInclusion do | |
alias __MODULE__ | |
require Zwave.Command.EnterInclusion.Pattern, as: Pattern | |
import Pattern | |
@moduledoc """ | |
This command may be called by a primary controller application to | |
invoke the inclusion of new nodes in a Z-Wave network. | |
The default mode is | |
> ADD_NODE_ANY | | |
> ADD_NODE_OPTION_NORMAL_POWER | | |
> ADD_NODE_OPTION_NETWORK_WIDE | |
""" | |
defstruct [type: 0x00, command: 0x4A, mode: 0xC1, function_id: 0x01] | |
defimpl Zwave.Command.Serializable do | |
def serialize(%EnterInclusion{type: type, command: command, mode: mode, function_id: function_id}) do | |
<<type, command, mode, function_id>> | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment