Class: SDN::Message::ILT2::PostIRConfig

Inherits:
SDN::Message show all
Defined in:
lib/sdn/message/ilt2/post.rb

Direct Known Subclasses

SetIRConfig

Constant Summary collapse

MSG =
0x69
PARAMS_LENGTH =
1

Instance Attribute Summary collapse

Attributes inherited from SDN::Message

#ack_requested, #dest, #node_type, #src

Instance Method Summary collapse

Methods inherited from SDN::Message

#==, 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(channels = nil, **kwargs) ⇒ PostIRConfig

Returns a new instance of PostIRConfig.



10
11
12
13
# File 'lib/sdn/message/ilt2/post.rb', line 10

def initialize(channels = nil, **kwargs)
  super(**kwargs)
  self.channels = channels
end

Instance Attribute Details

#channelsObject

Returns the value of attribute channels.



8
9
10
# File 'lib/sdn/message/ilt2/post.rb', line 8

def channels
  @channels
end

Instance Method Details

#class_inspectObject



28
29
30
# File 'lib/sdn/message/ilt2/post.rb', line 28

def class_inspect
  ", @channels=#{channels.chr.unpack('b8').first}"
end

#paramsObject



24
25
26
# File 'lib/sdn/message/ilt2/post.rb', line 24

def params
  transform_param(channels)
end

#parse(params) ⇒ Object



19
20
21
22
# File 'lib/sdn/message/ilt2/post.rb', line 19

def parse(params)
  super
  self.channels = to_number(params[0])
end