quality: Add test cases for group_mod message
This commit is contained in:
parent
ca07b47575
commit
37754a6ca4
8 changed files with 142 additions and 21 deletions
|
|
@ -26,12 +26,14 @@ defmodule Openflow.GetConfig.Reply do
|
|||
@spec ofp_type() :: t()
|
||||
def ofp_type, do: 8
|
||||
|
||||
@spec read(<<_::32>>) :: t()
|
||||
def read(<<flags_int::16, miss_send_len0::16>>) do
|
||||
flags = Openflow.Enums.int_to_flags(flags_int, :config_flags)
|
||||
miss_send_len = Openflow.Utils.get_enum(miss_send_len0, :controller_max_len)
|
||||
%Reply{flags: flags, miss_send_len: miss_send_len}
|
||||
end
|
||||
|
||||
@spec to_binary(t()) :: <<_::32>>
|
||||
def to_binary(%Reply{flags: flags, miss_send_len: miss_send_len0}) do
|
||||
flags_int = Openflow.Enums.flags_to_int(flags, :config_flags)
|
||||
miss_send_len = Openflow.Utils.get_enum(miss_send_len0, :controller_max_len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue