00001 """autogenerated by genmsg_py from Auction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import roslib.rostime
00007 import std_msgs.msg
00008
00009 class Auction(roslib.message.Message):
00010 _md5sum = "003387503e87218848189bfdbbf986d1"
00011 _type = "auction_msgs/Auction"
00012 _has_header = True
00013 _full_text = """Header header
00014 string command
00015 string task_type_name
00016 string subject
00017 string metrics
00018 duration length
00019 geometry_msgs/Point task_location
00020
00021 ================================================================================
00022 MSG: std_msgs/Header
00023 # Standard metadata for higher-level stamped data types.
00024 # This is generally used to communicate timestamped data
00025 # in a particular coordinate frame.
00026 #
00027 # sequence ID: consecutively increasing ID
00028 uint32 seq
00029 #Two-integer timestamp that is expressed as:
00030 # * stamp.secs: seconds (stamp_secs) since epoch
00031 # * stamp.nsecs: nanoseconds since stamp_secs
00032 # time-handling sugar is provided by the client library
00033 time stamp
00034 #Frame this data is associated with
00035 # 0: no frame
00036 # 1: global frame
00037 string frame_id
00038
00039 ================================================================================
00040 MSG: geometry_msgs/Point
00041 # This contains the position of a point in free space
00042 float64 x
00043 float64 y
00044 float64 z
00045
00046 """
00047 __slots__ = ['header','command','task_type_name','subject','metrics','length','task_location']
00048 _slot_types = ['Header','string','string','string','string','duration','geometry_msgs/Point']
00049
00050 def __init__(self, *args, **kwds):
00051 """
00052 Constructor. Any message fields that are implicitly/explicitly
00053 set to None will be assigned a default value. The recommend
00054 use is keyword arguments as this is more robust to future message
00055 changes. You cannot mix in-order arguments and keyword arguments.
00056
00057 The available fields are:
00058 header,command,task_type_name,subject,metrics,length,task_location
00059
00060 @param args: complete set of field values, in .msg order
00061 @param kwds: use keyword arguments corresponding to message field names
00062 to set specific fields.
00063 """
00064 if args or kwds:
00065 super(Auction, self).__init__(*args, **kwds)
00066
00067 if self.header is None:
00068 self.header = std_msgs.msg._Header.Header()
00069 if self.command is None:
00070 self.command = ''
00071 if self.task_type_name is None:
00072 self.task_type_name = ''
00073 if self.subject is None:
00074 self.subject = ''
00075 if self.metrics is None:
00076 self.metrics = ''
00077 if self.length is None:
00078 self.length = roslib.rostime.Duration()
00079 if self.task_location is None:
00080 self.task_location = geometry_msgs.msg.Point()
00081 else:
00082 self.header = std_msgs.msg._Header.Header()
00083 self.command = ''
00084 self.task_type_name = ''
00085 self.subject = ''
00086 self.metrics = ''
00087 self.length = roslib.rostime.Duration()
00088 self.task_location = geometry_msgs.msg.Point()
00089
00090 def _get_types(self):
00091 """
00092 internal API method
00093 """
00094 return self._slot_types
00095
00096 def serialize(self, buff):
00097 """
00098 serialize message into buffer
00099 @param buff: buffer
00100 @type buff: StringIO
00101 """
00102 try:
00103 _x = self
00104 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00105 _x = self.header.frame_id
00106 length = len(_x)
00107 buff.write(struct.pack('<I%ss'%length, length, _x))
00108 _x = self.command
00109 length = len(_x)
00110 buff.write(struct.pack('<I%ss'%length, length, _x))
00111 _x = self.task_type_name
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self.subject
00115 length = len(_x)
00116 buff.write(struct.pack('<I%ss'%length, length, _x))
00117 _x = self.metrics
00118 length = len(_x)
00119 buff.write(struct.pack('<I%ss'%length, length, _x))
00120 _x = self
00121 buff.write(_struct_2i3d.pack(_x.length.secs, _x.length.nsecs, _x.task_location.x, _x.task_location.y, _x.task_location.z))
00122 except struct.error as se: self._check_types(se)
00123 except TypeError as te: self._check_types(te)
00124
00125 def deserialize(self, str):
00126 """
00127 unpack serialized message in str into this message instance
00128 @param str: byte array of serialized message
00129 @type str: str
00130 """
00131 try:
00132 if self.header is None:
00133 self.header = std_msgs.msg._Header.Header()
00134 if self.length is None:
00135 self.length = roslib.rostime.Duration()
00136 if self.task_location is None:
00137 self.task_location = geometry_msgs.msg.Point()
00138 end = 0
00139 _x = self
00140 start = end
00141 end += 12
00142 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00143 start = end
00144 end += 4
00145 (length,) = _struct_I.unpack(str[start:end])
00146 start = end
00147 end += length
00148 self.header.frame_id = str[start:end]
00149 start = end
00150 end += 4
00151 (length,) = _struct_I.unpack(str[start:end])
00152 start = end
00153 end += length
00154 self.command = str[start:end]
00155 start = end
00156 end += 4
00157 (length,) = _struct_I.unpack(str[start:end])
00158 start = end
00159 end += length
00160 self.task_type_name = str[start:end]
00161 start = end
00162 end += 4
00163 (length,) = _struct_I.unpack(str[start:end])
00164 start = end
00165 end += length
00166 self.subject = str[start:end]
00167 start = end
00168 end += 4
00169 (length,) = _struct_I.unpack(str[start:end])
00170 start = end
00171 end += length
00172 self.metrics = str[start:end]
00173 _x = self
00174 start = end
00175 end += 32
00176 (_x.length.secs, _x.length.nsecs, _x.task_location.x, _x.task_location.y, _x.task_location.z,) = _struct_2i3d.unpack(str[start:end])
00177 self.length.canon()
00178 return self
00179 except struct.error as e:
00180 raise roslib.message.DeserializationError(e)
00181
00182
00183 def serialize_numpy(self, buff, numpy):
00184 """
00185 serialize message with numpy array types into buffer
00186 @param buff: buffer
00187 @type buff: StringIO
00188 @param numpy: numpy python module
00189 @type numpy module
00190 """
00191 try:
00192 _x = self
00193 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00194 _x = self.header.frame_id
00195 length = len(_x)
00196 buff.write(struct.pack('<I%ss'%length, length, _x))
00197 _x = self.command
00198 length = len(_x)
00199 buff.write(struct.pack('<I%ss'%length, length, _x))
00200 _x = self.task_type_name
00201 length = len(_x)
00202 buff.write(struct.pack('<I%ss'%length, length, _x))
00203 _x = self.subject
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 _x = self.metrics
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 _x = self
00210 buff.write(_struct_2i3d.pack(_x.length.secs, _x.length.nsecs, _x.task_location.x, _x.task_location.y, _x.task_location.z))
00211 except struct.error as se: self._check_types(se)
00212 except TypeError as te: self._check_types(te)
00213
00214 def deserialize_numpy(self, str, numpy):
00215 """
00216 unpack serialized message in str into this message instance using numpy for array types
00217 @param str: byte array of serialized message
00218 @type str: str
00219 @param numpy: numpy python module
00220 @type numpy: module
00221 """
00222 try:
00223 if self.header is None:
00224 self.header = std_msgs.msg._Header.Header()
00225 if self.length is None:
00226 self.length = roslib.rostime.Duration()
00227 if self.task_location is None:
00228 self.task_location = geometry_msgs.msg.Point()
00229 end = 0
00230 _x = self
00231 start = end
00232 end += 12
00233 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 start = end
00238 end += length
00239 self.header.frame_id = str[start:end]
00240 start = end
00241 end += 4
00242 (length,) = _struct_I.unpack(str[start:end])
00243 start = end
00244 end += length
00245 self.command = str[start:end]
00246 start = end
00247 end += 4
00248 (length,) = _struct_I.unpack(str[start:end])
00249 start = end
00250 end += length
00251 self.task_type_name = str[start:end]
00252 start = end
00253 end += 4
00254 (length,) = _struct_I.unpack(str[start:end])
00255 start = end
00256 end += length
00257 self.subject = str[start:end]
00258 start = end
00259 end += 4
00260 (length,) = _struct_I.unpack(str[start:end])
00261 start = end
00262 end += length
00263 self.metrics = str[start:end]
00264 _x = self
00265 start = end
00266 end += 32
00267 (_x.length.secs, _x.length.nsecs, _x.task_location.x, _x.task_location.y, _x.task_location.z,) = _struct_2i3d.unpack(str[start:end])
00268 self.length.canon()
00269 return self
00270 except struct.error as e:
00271 raise roslib.message.DeserializationError(e)
00272
00273 _struct_I = roslib.message.struct_I
00274 _struct_3I = struct.Struct("<3I")
00275 _struct_2i3d = struct.Struct("<2i3d")