Class: SDN::Message::ILT2::PostLockStatus
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::ILT2::PostLockStatus
- Defined in:
- lib/sdn/message/ilt2/post.rb
Overview
Response carrying the current ILT2 lock priority.
Constant Summary collapse
- MSG =
Protocol message number
0x6B- PARAMS_LENGTH =
Number of protocol parameter bytes expected
1
Instance Attribute Summary collapse
-
#priority ⇒ Integer?
Reported lock priority, or
0when unlocked.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
-
#initialize(priority = nil) ⇒ PostLockStatus
constructor
Creates an ILT2 lock status response.
-
#params ⇒ <Integer>
Returns the protocol-specific payload bytes for this message.
-
#parse(params) ⇒ void
Parses protocol-specific parameter bytes into this message instance.
Methods inherited from SDN::Message
#==, expected_response?, #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
#initialize(priority = nil) ⇒ PostLockStatus
Creates an ILT2 lock status response.
64 65 66 67 |
# File 'lib/sdn/message/ilt2/post.rb', line 64 def initialize(priority = nil, **) super(**) self.priority = priority end |
Instance Attribute Details
#priority ⇒ Integer?
Reported lock priority, or 0 when unlocked.
59 60 61 |
# File 'lib/sdn/message/ilt2/post.rb', line 59 def priority @priority end |
Instance Method Details
#params ⇒ <Integer>
Returns the protocol-specific payload bytes for this message.
76 77 78 |
# File 'lib/sdn/message/ilt2/post.rb', line 76 def params transform_param(priority) end |
#parse(params) ⇒ void
This method returns an undefined value.
Parses protocol-specific parameter bytes into this message instance.
70 71 72 73 |
# File 'lib/sdn/message/ilt2/post.rb', line 70 def parse(params) super self.current_lock_priority = to_number(params[0]) end |