Class: SDN::Message::SetMotorLimits
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::SetMotorLimits
- Defined in:
- lib/sdn/message/set.rb
Constant Summary collapse
- MSG =
0x11
- PARAMS_LENGTH =
4
- TYPE =
{ delete: 0x00, current_position: 0x01, specified_position: 0x02, jog_ms: 0x04, jog_pulses: 0x05 }.freeze
- TARGET =
{ down: 0x00, up: 0x01 }.freeze
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from SDN::Message
#ack_requested, #dest, #node_type, #src
Instance Method Summary collapse
-
#initialize(dest = nil, type = :delete, target = :up, value = nil, **kwargs) ⇒ SetMotorLimits
constructor
A new instance of SetMotorLimits.
- #params ⇒ Object
- #parse(params) ⇒ Object
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(dest = nil, type = :delete, target = :up, value = nil, **kwargs) ⇒ SetMotorLimits
Returns a new instance of SetMotorLimits.
168 169 170 171 172 173 174 |
# File 'lib/sdn/message/set.rb', line 168 def initialize(dest = nil, type = :delete, target = :up, value = nil, **kwargs) kwargs[:dest] ||= dest super(**kwargs) self.type = type self.target = target self.value = value end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
166 167 168 |
# File 'lib/sdn/message/set.rb', line 166 def target @target end |
#type ⇒ Object
Returns the value of attribute type.
166 167 168 |
# File 'lib/sdn/message/set.rb', line 166 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
166 167 168 |
# File 'lib/sdn/message/set.rb', line 166 def value @value end |