Class: SDN::Message::SetNodeLabel
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::SetNodeLabel
- Defined in:
- lib/sdn/messages/set.rb
Constant Summary collapse
- MSG =
0x55
- PARAMS_LENGTH =
16
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
Attributes inherited from SDN::Message
#ack_requested, #dest, #reserved, #src
Instance Method Summary collapse
-
#initialize(dest = nil, label = '', **kwargs) ⇒ SetNodeLabel
constructor
A new instance of SetNodeLabel.
- #params ⇒ Object
- #parse(params) ⇒ Object
Methods inherited from SDN::Message
#class_inspect, #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
#initialize(dest = nil, label = '', **kwargs) ⇒ SetNodeLabel
Returns a new instance of SetNodeLabel.
215 216 217 218 219 |
# File 'lib/sdn/messages/set.rb', line 215 def initialize(dest = nil, label = '', **kwargs) kwargs[:dest] ||= dest super(**kwargs) self.label = label end |
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label.
213 214 215 |
# File 'lib/sdn/messages/set.rb', line 213 def label @label end |
Instance Method Details
#params ⇒ Object
225 226 227 |
# File 'lib/sdn/messages/set.rb', line 225 def params from_string(label, 16) end |
#parse(params) ⇒ Object
221 222 223 |
# File 'lib/sdn/messages/set.rb', line 221 def parse(params) self.label = to_string(params) end |