Class: SDN::Message::Nack

Inherits:
SDN::Message show all
Defined in:
lib/sdn/message.rb

Constant Summary collapse

MSG =
0x6f
PARAMS_LENGTH =
1
VALUES =
{ data_error: 0x01, unknown_message: 0x10, node_is_locked: 0x20, wrong_position: 0x21, limits_not_set: 0x22, ip_not_set: 0x23, out_of_range: 0x24, busy: 0xff }

Instance Attribute Summary collapse

Attributes inherited from SDN::Message

#ack_requested, #dest, #reserved, #src

Instance Method Summary collapse

Methods inherited from SDN::Message

#class_inspect, #initialize, #inspect, parse, readpartial, #serialize

Methods included from Helpers

#checksum, #from_number, #from_string, #is_group_address?, #parse_address, #print_address, #to_number, #to_string, #transform_param

Constructor Details

This class inherits a constructor from SDN::Message

Instance Attribute Details

#error_codeObject

presumed



145
146
147
# File 'lib/sdn/message.rb', line 145

def error_code
  @error_code
end

Instance Method Details

#parse(params) ⇒ Object



147
148
149
150
151
# File 'lib/sdn/message.rb', line 147

def parse(params)
  super
  error_code = to_number(params[0])
  self.error_code = VALUES[error_code] || error_code
end