00001 """autogenerated by genmsg_py from ScanAngle.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006
00007 class ScanAngle(roslib.message.Message):
00008 _md5sum = "06e2c839dc5c7f5c13ac09a8b4ff0a6a"
00009 _type = "turtlebot_calibration/ScanAngle"
00010 _has_header = True
00011 _full_text = """Header header
00012 float64 scan_angle
00013 ================================================================================
00014 MSG: std_msgs/Header
00015 # Standard metadata for higher-level stamped data types.
00016 # This is generally used to communicate timestamped data
00017 # in a particular coordinate frame.
00018 #
00019 # sequence ID: consecutively increasing ID
00020 uint32 seq
00021 #Two-integer timestamp that is expressed as:
00022 # * stamp.secs: seconds (stamp_secs) since epoch
00023 # * stamp.nsecs: nanoseconds since stamp_secs
00024 # time-handling sugar is provided by the client library
00025 time stamp
00026 #Frame this data is associated with
00027 # 0: no frame
00028 # 1: global frame
00029 string frame_id
00030
00031 """
00032 __slots__ = ['header','scan_angle']
00033 _slot_types = ['Header','float64']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 header,scan_angle
00044
00045 @param args: complete set of field values, in .msg order
00046 @param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(ScanAngle, self).__init__(*args, **kwds)
00051
00052 if self.header is None:
00053 self.header = std_msgs.msg._Header.Header()
00054 if self.scan_angle is None:
00055 self.scan_angle = 0.
00056 else:
00057 self.header = std_msgs.msg._Header.Header()
00058 self.scan_angle = 0.
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 @param buff: buffer
00070 @type buff: StringIO
00071 """
00072 try:
00073 _x = self
00074 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00075 _x = self.header.frame_id
00076 length = len(_x)
00077 buff.write(struct.pack('<I%ss'%length, length, _x))
00078 buff.write(_struct_d.pack(self.scan_angle))
00079 except struct.error, se: self._check_types(se)
00080 except TypeError, te: self._check_types(te)
00081
00082 def deserialize(self, str):
00083 """
00084 unpack serialized message in str into this message instance
00085 @param str: byte array of serialized message
00086 @type str: str
00087 """
00088 try:
00089 if self.header is None:
00090 self.header = std_msgs.msg._Header.Header()
00091 end = 0
00092 _x = self
00093 start = end
00094 end += 12
00095 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00096 start = end
00097 end += 4
00098 (length,) = _struct_I.unpack(str[start:end])
00099 start = end
00100 end += length
00101 self.header.frame_id = str[start:end]
00102 start = end
00103 end += 8
00104 (self.scan_angle,) = _struct_d.unpack(str[start:end])
00105 return self
00106 except struct.error, e:
00107 raise roslib.message.DeserializationError(e)
00108
00109
00110 def serialize_numpy(self, buff, numpy):
00111 """
00112 serialize message with numpy array types into buffer
00113 @param buff: buffer
00114 @type buff: StringIO
00115 @param numpy: numpy python module
00116 @type numpy module
00117 """
00118 try:
00119 _x = self
00120 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00121 _x = self.header.frame_id
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 buff.write(_struct_d.pack(self.scan_angle))
00125 except struct.error, se: self._check_types(se)
00126 except TypeError, te: self._check_types(te)
00127
00128 def deserialize_numpy(self, str, numpy):
00129 """
00130 unpack serialized message in str into this message instance using numpy for array types
00131 @param str: byte array of serialized message
00132 @type str: str
00133 @param numpy: numpy python module
00134 @type numpy: module
00135 """
00136 try:
00137 if self.header is None:
00138 self.header = std_msgs.msg._Header.Header()
00139 end = 0
00140 _x = self
00141 start = end
00142 end += 12
00143 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00144 start = end
00145 end += 4
00146 (length,) = _struct_I.unpack(str[start:end])
00147 start = end
00148 end += length
00149 self.header.frame_id = str[start:end]
00150 start = end
00151 end += 8
00152 (self.scan_angle,) = _struct_d.unpack(str[start:end])
00153 return self
00154 except struct.error, e:
00155 raise roslib.message.DeserializationError(e)
00156
00157 _struct_I = roslib.message.struct_I
00158 _struct_3I = struct.Struct("<3I")
00159 _struct_d = struct.Struct("<d")