Skip to content

Commit

Permalink
Add create routed multistate-input object support
Browse files Browse the repository at this point in the history
  • Loading branch information
abelino committed Oct 11, 2024
1 parent 10bb13b commit 910aa22
Show file tree
Hide file tree
Showing 5 changed files with 984 additions and 4 deletions.
24 changes: 24 additions & 0 deletions lib/bacnet/gateway/object.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,28 @@ defmodule BACNet.Gateway.Object do

GenServer.call(pid, request)
end

@doc """
Creates a new multistate input object.
## Parameters
- `pid`: The PID of the GenServer managing the BACnet communication.
- `device_id`: The ID of the BACnet device where the object will be created.
- `object_id`: The unique ID for the new multistate input object.
- `name`: A unique name for the object.
"""
@spec create_multistate_input(
pid :: pid,
device_id :: integer,
object_id :: integer,
name :: String.t,
states :: [String.t]
) :: :ok | {:error, term}
def create_multistate_input(pid, device_id, object_id, name, states) do
request =
{:create_routed_multistate_input, device_id, object_id, name, states}

GenServer.call(pid, request)
end
end
Loading

0 comments on commit 910aa22

Please sign in to comment.