Class: Pr2_controllers_msgs::QueryCalibrationStateResponse
- Inherits:
-
ROS::Message
- Object
- ROS::Message
- Pr2_controllers_msgs::QueryCalibrationStateResponse
- Defined in:
- lib/pr2_controllers_msgs/QueryCalibrationState.rb
Constant Summary collapse
- @@struct_C =
::ROS::Struct.new("C")
- @@struct_L =
::ROS::Struct.new("L")
- @@slot_types =
['bool']
Instance Attribute Summary collapse
-
#is_calibrated ⇒ Object
Returns the value of attribute is_calibrated.
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 = {}) ⇒ QueryCalibrationStateResponse
constructor
Constructor.
- #message_definition ⇒ Object
-
#serialize(buff) ⇒ Object
serialize message into buffer.
Constructor Details
#initialize(args = {}) ⇒ QueryCalibrationStateResponse
Constructor. You can set the default values using keyword operators.
101 102 103 104 105 106 107 108 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 101 def initialize(args={}) # message fields cannot be None, assign default values for those that are if args[:is_calibrated] @is_calibrated = args[:is_calibrated] else @is_calibrated = false end end |
Instance Attribute Details
#is_calibrated ⇒ Object
Returns the value of attribute is_calibrated.
90 91 92 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 90 def is_calibrated @is_calibrated end |
Class Method Details
.md5sum ⇒ Object
73 74 75 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 73 def self.md5sum "28af3beedcb84986b8e470dc5470507d" end |
.type ⇒ Object
77 78 79 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 77 def self.type "pr2_controllers_msgs/QueryCalibrationStateResponse" end |
Instance Method Details
#_get_types ⇒ String
internal API method
112 113 114 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 112 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
129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 129 def deserialize(str) begin end_point = 0 start = end_point end_point += ROS::Struct::calc_size('C') (@is_calibrated,) = @@struct_C.unpack(str[start..(end_point-1)]) @is_calibrated = bool(@is_calibrated) return self rescue => exception raise "message DeserializationError: #{exception}" #most likely buffer underfill end end |
#has_header? ⇒ Boolean
81 82 83 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 81 def has_header? false end |
#message_definition ⇒ Object
85 86 87 88 89 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 85 def "bool is_calibrated " end |
#serialize(buff) ⇒ Object
serialize message into buffer
118 119 120 121 122 123 124 125 |
# File 'lib/pr2_controllers_msgs/QueryCalibrationState.rb', line 118 def serialize(buff) begin buff.write(@@struct_C.pack(@is_calibrated)) rescue => exception raise "some erro in serialize: #{exception}" end end |