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, #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.



12
13
14
15
# File 'lib/sdn/message/ilt2/post.rb', line 12

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

Instance Attribute Details

#channelsObject

Returns the value of attribute channels.



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

def channels
  @channels
end

Instance Method Details

#class_inspectObject



30
31
32
# File 'lib/sdn/message/ilt2/post.rb', line 30

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

#paramsObject



26
27
28
# File 'lib/sdn/message/ilt2/post.rb', line 26

def params
  transform_param(channels)
end

#parse(params) ⇒ Object



21
22
23
24
# File 'lib/sdn/message/ilt2/post.rb', line 21

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