Class: SDN::Message::SetNetworkLock
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::SetNetworkLock
- Defined in:
- lib/sdn/message/set.rb
Constant Summary collapse
- MSG =
0x16
Instance Attribute Summary collapse
-
#locked ⇒ Object
Returns the value of attribute locked.
-
#priority ⇒ Object
Returns the value of attribute priority.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
Methods inherited from SDN::Message
#==, #class_inspect, expected_response?, inherited, #initialize, #inspect, parse, #serialize
Methods included from Helpers
#checksum, #from_number, #from_string, #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
This class inherits a constructor from SDN::Message
Instance Attribute Details
#locked ⇒ Object
Returns the value of attribute locked.
238 239 240 |
# File 'lib/sdn/message/set.rb', line 238 def locked @locked end |
#priority ⇒ Object
Returns the value of attribute priority.
238 239 240 |
# File 'lib/sdn/message/set.rb', line 238 def priority @priority end |
Instance Method Details
#params ⇒ Object
245 246 247 |
# File 'lib/sdn/message/set.rb', line 245 def params transform_param(locked ? 1 : 0) + transform_param(priority) end |
#parse(params) ⇒ Object
240 241 242 243 |
# File 'lib/sdn/message/set.rb', line 240 def parse(params) self.locked = to_number(params[0]) == 1 self.priority = to_number(params[1]) end |