class Pio::OpenFlow13::Actions13
Actions list of actions-apply instruction.
Public Instance Methods
get()
click to toggle source
rubocop:disable MethodLength
# File lib/pio/open_flow13/actions.rb, line 33 def get actions = [] tmp = binary until tmp.empty? action = case BinData::Uint16be.read(tmp) when 0 OpenFlow13::SendOutPort.read(tmp) else UnsupportedAction.read(tmp) end tmp = tmp[action.action_length..-1] actions << action end actions end
set(actions)
click to toggle source
# File lib/pio/open_flow13/actions.rb, line 28 def set(actions) self.binary = Array(actions).map(&:to_binary).join end