Skip to content

Commit

Permalink
Add structured member read
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaleb Bozorgzadeh committed Oct 7, 2020
1 parent 8b25b3b commit 2addbc6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions lib/scrub/cip/type.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Scrub.CIP.Type do
import Scrub.BinaryUtils, warn: false
require Logger

alias Scrub.CIP.Symbol

def decode(<<0xA0, 0x02, _crc::uint, data::binary>>, %{members: members} = structure) do
Expand Down Expand Up @@ -39,8 +39,6 @@ defmodule Scrub.CIP.Type do
end

def decode(<<type::binary(2, 8), data::binary()>>, _t) do
Logger.debug("### Type for member is: #{inspect(Symbol.type_decode(type))}")

Symbol.type_decode(type)
|> decode_type(data)
end
Expand Down
1 change: 0 additions & 1 deletion lib/scrub/session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ defmodule Scrub.Session do
case :gen_tcp.connect(host, port, socket_opts, timeout) do
{:ok, sock} ->
state = %{
name: :kaleb,
socket: sock,
host: host,
port: port,
Expand Down

0 comments on commit 2addbc6

Please sign in to comment.