Class: SDN::Message::ILT2::PostIRConfig
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::ILT2::PostIRConfig
- Defined in:
- lib/sdn/message/ilt2/post.rb
Overview
Response carrying the configured ILT2 IR channel bitmask.
Direct Known Subclasses
Constant Summary collapse
- MSG =
Protocol message number
0x69- PARAMS_LENGTH =
Number of protocol parameter bytes expected
1
Instance Attribute Summary collapse
-
#channels ⇒ Integer?
IR channel bitmask.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
-
#class_inspect ⇒ String?
Returns the protocol-specific portion of the inspection string.
-
#initialize(channels = nil) ⇒ PostIRConfig
constructor
Creates an ILT2 IR configuration 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(channels = nil) ⇒ PostIRConfig
Creates an ILT2 IR configuration response.
23 24 25 26 |
# File 'lib/sdn/message/ilt2/post.rb', line 23 def initialize(channels = nil, **) super(**) self.channels = channels end |
Instance Attribute Details
#channels ⇒ Integer?
IR channel bitmask.
18 19 20 |
# File 'lib/sdn/message/ilt2/post.rb', line 18 def channels @channels end |
Instance Method Details
#class_inspect ⇒ String?
Returns the protocol-specific portion of the inspection string.
44 45 46 |
# File 'lib/sdn/message/ilt2/post.rb', line 44 def class_inspect ", @channels=#{channels.chr.unpack1("b8")}" end |
#params ⇒ <Integer>
Returns the protocol-specific payload bytes for this message.
39 40 41 |
# File 'lib/sdn/message/ilt2/post.rb', line 39 def params transform_param(channels) end |
#parse(params) ⇒ void
This method returns an undefined value.
Parses protocol-specific parameter bytes into this message instance.
33 34 35 36 |
# File 'lib/sdn/message/ilt2/post.rb', line 33 def parse(params) super self.channels = to_number(params[0]) end |