Class: SDN::Message::ILT2::PostMotorSettings

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

Constant Summary collapse

MSG =
0x62
PARAMS_LENGTH =
3

Instance Attribute Summary collapse

Attributes inherited from UnknownMessage

#msg

Attributes inherited from SDN::Message

#ack_requested, #dest, #node_type, #src

Instance Method Summary collapse

Methods inherited from UnknownMessage

#class_inspect, #serialize

Methods inherited from SDN::Message

#==, #class_inspect, 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(limit = nil, **kwargs) ⇒ PostMotorSettings

Returns a new instance of PostMotorSettings.



109
110
111
112
# File 'lib/sdn/message/ilt2/post.rb', line 109

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

Instance Attribute Details

#limitObject

Returns the value of attribute limit.



107
108
109
# File 'lib/sdn/message/ilt2/post.rb', line 107

def limit
  @limit
end

Instance Method Details

#paramsObject



119
120
121
# File 'lib/sdn/message/ilt2/post.rb', line 119

def params
  transform_param(0) + from_number(limit, 2)
end

#parse(params) ⇒ Object



114
115
116
117
# File 'lib/sdn/message/ilt2/post.rb', line 114

def parse(params)
  super
  self.limit = to_number(params[1..2])
end