Class: SDN::Message::PostMotorIP
- Inherits:
-
SDN::Message
- Object
- SDN::Message
- SDN::Message::PostMotorIP
- Defined in:
- lib/sdn/messages/post.rb
Constant Summary collapse
- MSG =
0x35
- PARAMS_LENGTH =
4
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#position_percent ⇒ Object
Returns the value of attribute position_percent.
-
#position_pulses ⇒ Object
Returns the value of attribute position_pulses.
Attributes inherited from SDN::Message
#ack_requested, #dest, #reserved, #src
Instance Method Summary collapse
Methods inherited from SDN::Message
#class_inspect, #initialize, #inspect, parse, readpartial, #serialize
Methods included from Helpers
#checksum, #from_number, #from_string, #is_group_address?, #parse_address, #print_address, #to_number, #to_string, #transform_param
Constructor Details
This class inherits a constructor from SDN::Message
Instance Attribute Details
#ip ⇒ Object
Returns the value of attribute ip.
90 91 92 |
# File 'lib/sdn/messages/post.rb', line 90 def ip @ip end |
#position_percent ⇒ Object
Returns the value of attribute position_percent.
90 91 92 |
# File 'lib/sdn/messages/post.rb', line 90 def position_percent @position_percent end |
#position_pulses ⇒ Object
Returns the value of attribute position_pulses.
90 91 92 |
# File 'lib/sdn/messages/post.rb', line 90 def position_pulses @position_pulses end |
Instance Method Details
#parse(params) ⇒ Object
92 93 94 95 96 97 |
# File 'lib/sdn/messages/post.rb', line 92 def parse(params) super self.ip = to_number(params[0]) self.position_pulses = to_number(params[1..2], nillable: true) self.position_percent = to_number(params[3], nillable: true) end |