Class: SDN::Message::ILT2::PostMotorSettings
- Inherits:
-
UnknownMessage
- Object
- Message
- UnknownMessage
- SDN::Message::ILT2::PostMotorSettings
- Defined in:
- lib/sdn/message/ilt2/post.rb
Overview
Response carrying ILT2 motor settings in a partially decoded form.
Constant Summary collapse
- MSG =
Protocol message number
0x62- PARAMS_LENGTH =
Number of protocol parameter bytes expected
3
Instance Attribute Summary collapse
-
#limit ⇒ Integer?
Reported configured lower limit.
Attributes inherited from UnknownMessage
Instance Method Summary collapse
-
#initialize(limit = nil) ⇒ PostMotorSettings
constructor
Creates an ILT2 motor settings 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 UnknownMessage
Constructor Details
#initialize(limit = nil) ⇒ PostMotorSettings
Creates an ILT2 motor settings response.
171 172 173 174 |
# File 'lib/sdn/message/ilt2/post.rb', line 171 def initialize(limit = nil, **) super(**) self.limit = limit end |
Instance Attribute Details
#limit ⇒ Integer?
Reported configured lower limit.
166 167 168 |
# File 'lib/sdn/message/ilt2/post.rb', line 166 def limit @limit end |
Instance Method Details
#params ⇒ <Integer>
Returns the protocol-specific payload bytes for this message.
183 184 185 |
# File 'lib/sdn/message/ilt2/post.rb', line 183 def params transform_param(0) + from_number(limit, 2) end |
#parse(params) ⇒ void
This method returns an undefined value.
Parses protocol-specific parameter bytes into this message instance.
177 178 179 180 |
# File 'lib/sdn/message/ilt2/post.rb', line 177 def parse(params) super self.limit = to_number(params[1..2]) end |