Class: SDN::Message::PostNodeLabel
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::PostNodeLabel
- Defined in:
- lib/sdn/message/post.rb
Direct Known Subclasses
Constant Summary collapse
- MSG =
0x65
- MAX_LENGTH =
16
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
-
#initialize(label = nil, **kwargs) ⇒ PostNodeLabel
constructor
A new instance of PostNodeLabel.
- #params ⇒ Object
- #parse(params) ⇒ Object
Methods inherited from SDN::Message
#==, #class_inspect, expected_response?, inherited, #inspect, parse, #serialize
Methods included from Helpers
#checksum, #from_number, #from_string, #is_group_address?, #node_type_from_number, #node_type_to_number, #node_type_to_string, #parse_address, #print_address, #to_number, #to_string, #transform_param
Constructor Details
#initialize(label = nil, **kwargs) ⇒ PostNodeLabel
Returns a new instance of PostNodeLabel.
195 196 197 198 |
# File 'lib/sdn/message/post.rb', line 195 def initialize(label = nil, **kwargs) super(**kwargs) self.label = label end |
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label.
193 194 195 |
# File 'lib/sdn/message/post.rb', line 193 def label @label end |
Instance Method Details
#params ⇒ Object
204 205 206 |
# File 'lib/sdn/message/post.rb', line 204 def params from_string(label, self.class::MAX_LENGTH) end |
#parse(params) ⇒ Object
200 201 202 |
# File 'lib/sdn/message/post.rb', line 200 def parse(params) @label = to_string(params) end |