Class: Pr2_controllers_msgs::QueryTrajectoryStateRequest
- Inherits:
-
ROS::Message
- Object
- ROS::Message
- Pr2_controllers_msgs::QueryTrajectoryStateRequest
- Defined in:
- lib/pr2_controllers_msgs/QueryTrajectoryState.rb
Constant Summary collapse
- @@struct_L2 =
::ROS::Struct.new("L2")
- @@struct_L =
::ROS::Struct.new("L")
- @@slot_types =
['time']
Instance Attribute Summary collapse
-
#time ⇒ Object
Returns the value of attribute time.
Class Method Summary collapse
Instance Method Summary collapse
-
#_get_types ⇒ String
internal API method.
-
#deserialize(str) ⇒ Object
unpack serialized message in str into this message instance @param [String] str: byte array of serialized message.
- #has_header? ⇒ Boolean
-
#initialize(args = {}) ⇒ QueryTrajectoryStateRequest
constructor
Constructor.
- #message_definition ⇒ Object
-
#serialize(buff) ⇒ Object
serialize message into buffer.
Constructor Details
#initialize(args = {}) ⇒ QueryTrajectoryStateRequest
Constructor. You can set the default values using keyword operators.
37 38 39 40 41 42 43 44 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 37 def initialize(args={}) # message fields cannot be None, assign default values for those that are if args[:time] @time = args[:time] else @time = ROS::Time.new end end |
Instance Attribute Details
#time ⇒ Object
Returns the value of attribute time.
26 27 28 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 26 def time @time end |
Class Method Details
.md5sum ⇒ Object
9 10 11 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 9 def self.md5sum "556a4fb76023a469987922359d08a844" end |
.type ⇒ Object
13 14 15 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 13 def self.type "pr2_controllers_msgs/QueryTrajectoryStateRequest" end |
Instance Method Details
#_get_types ⇒ String
internal API method
48 49 50 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 48 def _get_types @slot_types end |
#deserialize(str) ⇒ Object
unpack serialized message in str into this message instance
@param [String] str: byte array of serialized message
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 65 def deserialize(str) begin if @time == nil @time = ROS::Time.new end end_point = 0 start = end_point end_point += ROS::Struct::calc_size('L2') (@time.secs, @time.nsecs,) = @@struct_L2.unpack(str[start..(end_point-1)]) return self rescue => exception raise "message DeserializationError: #{exception}" #most likely buffer underfill end end |
#has_header? ⇒ Boolean
17 18 19 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 17 def has_header? false end |
#message_definition ⇒ Object
21 22 23 24 25 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 21 def "time time " end |
#serialize(buff) ⇒ Object
serialize message into buffer
54 55 56 57 58 59 60 61 |
# File 'lib/pr2_controllers_msgs/QueryTrajectoryState.rb', line 54 def serialize(buff) begin buff.write(@@struct_L2.pack(@time.secs, @time.nsecs)) rescue => exception raise "some erro in serialize: #{exception}" end end |