Go to the documentation of this file.00001 """autogenerated by genpy from worldmodel_msgs/SetObjectStateRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import worldmodel_msgs.msg
00008
00009 class SetObjectStateRequest(genpy.Message):
00010 _md5sum = "f1ca4bb9d91ddc88e48d16dceb6ab0e5"
00011 _type = "worldmodel_msgs/SetObjectStateRequest"
00012 _has_header = False
00013 _full_text = """
00014
00015 string object_id
00016 ObjectState new_state
00017
00018 ================================================================================
00019 MSG: worldmodel_msgs/ObjectState
00020 # The state of an object estimate used to track
00021 # states smaller than 0 disable all updates
00022
00023 # Predefined states. Use states smaller than 0 or bigger than 63 for user defined states.
00024 int8 UNKNOWN = 0
00025 int8 PENDING = 1
00026 int8 ACTIVE = 2
00027 int8 INACTIVE = 3
00028 int8 CONFIRMED = -1
00029 int8 DISCARDED = -2
00030 int8 APPROACHING = -3
00031
00032 int8 state
00033
00034 """
00035 __slots__ = ['object_id','new_state']
00036 _slot_types = ['string','worldmodel_msgs/ObjectState']
00037
00038 def __init__(self, *args, **kwds):
00039 """
00040 Constructor. Any message fields that are implicitly/explicitly
00041 set to None will be assigned a default value. The recommend
00042 use is keyword arguments as this is more robust to future message
00043 changes. You cannot mix in-order arguments and keyword arguments.
00044
00045 The available fields are:
00046 object_id,new_state
00047
00048 :param args: complete set of field values, in .msg order
00049 :param kwds: use keyword arguments corresponding to message field names
00050 to set specific fields.
00051 """
00052 if args or kwds:
00053 super(SetObjectStateRequest, self).__init__(*args, **kwds)
00054
00055 if self.object_id is None:
00056 self.object_id = ''
00057 if self.new_state is None:
00058 self.new_state = worldmodel_msgs.msg.ObjectState()
00059 else:
00060 self.object_id = ''
00061 self.new_state = worldmodel_msgs.msg.ObjectState()
00062
00063 def _get_types(self):
00064 """
00065 internal API method
00066 """
00067 return self._slot_types
00068
00069 def serialize(self, buff):
00070 """
00071 serialize message into buffer
00072 :param buff: buffer, ``StringIO``
00073 """
00074 try:
00075 _x = self.object_id
00076 length = len(_x)
00077 if python3 or type(_x) == unicode:
00078 _x = _x.encode('utf-8')
00079 length = len(_x)
00080 buff.write(struct.pack('<I%ss'%length, length, _x))
00081 buff.write(_struct_b.pack(self.new_state.state))
00082 except struct.error as se: self._check_types(se)
00083 except TypeError as te: self._check_types(te)
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 :param str: byte array of serialized message, ``str``
00089 """
00090 try:
00091 if self.new_state is None:
00092 self.new_state = worldmodel_msgs.msg.ObjectState()
00093 end = 0
00094 start = end
00095 end += 4
00096 (length,) = _struct_I.unpack(str[start:end])
00097 start = end
00098 end += length
00099 if python3:
00100 self.object_id = str[start:end].decode('utf-8')
00101 else:
00102 self.object_id = str[start:end]
00103 start = end
00104 end += 1
00105 (self.new_state.state,) = _struct_b.unpack(str[start:end])
00106 return self
00107 except struct.error as e:
00108 raise genpy.DeserializationError(e)
00109
00110
00111 def serialize_numpy(self, buff, numpy):
00112 """
00113 serialize message with numpy array types into buffer
00114 :param buff: buffer, ``StringIO``
00115 :param numpy: numpy python module
00116 """
00117 try:
00118 _x = self.object_id
00119 length = len(_x)
00120 if python3 or type(_x) == unicode:
00121 _x = _x.encode('utf-8')
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 buff.write(_struct_b.pack(self.new_state.state))
00125 except struct.error as se: self._check_types(se)
00126 except TypeError as 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, ``str``
00132 :param numpy: numpy python module
00133 """
00134 try:
00135 if self.new_state is None:
00136 self.new_state = worldmodel_msgs.msg.ObjectState()
00137 end = 0
00138 start = end
00139 end += 4
00140 (length,) = _struct_I.unpack(str[start:end])
00141 start = end
00142 end += length
00143 if python3:
00144 self.object_id = str[start:end].decode('utf-8')
00145 else:
00146 self.object_id = str[start:end]
00147 start = end
00148 end += 1
00149 (self.new_state.state,) = _struct_b.unpack(str[start:end])
00150 return self
00151 except struct.error as e:
00152 raise genpy.DeserializationError(e)
00153
00154 _struct_I = genpy.struct_I
00155 _struct_b = struct.Struct("<b")
00156 """autogenerated by genpy from worldmodel_msgs/SetObjectStateResponse.msg. Do not edit."""
00157 import sys
00158 python3 = True if sys.hexversion > 0x03000000 else False
00159 import genpy
00160 import struct
00161
00162
00163 class SetObjectStateResponse(genpy.Message):
00164 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00165 _type = "worldmodel_msgs/SetObjectStateResponse"
00166 _has_header = False
00167 _full_text = """
00168
00169 """
00170 __slots__ = []
00171 _slot_types = []
00172
00173 def __init__(self, *args, **kwds):
00174 """
00175 Constructor. Any message fields that are implicitly/explicitly
00176 set to None will be assigned a default value. The recommend
00177 use is keyword arguments as this is more robust to future message
00178 changes. You cannot mix in-order arguments and keyword arguments.
00179
00180 The available fields are:
00181
00182
00183 :param args: complete set of field values, in .msg order
00184 :param kwds: use keyword arguments corresponding to message field names
00185 to set specific fields.
00186 """
00187 if args or kwds:
00188 super(SetObjectStateResponse, self).__init__(*args, **kwds)
00189
00190 def _get_types(self):
00191 """
00192 internal API method
00193 """
00194 return self._slot_types
00195
00196 def serialize(self, buff):
00197 """
00198 serialize message into buffer
00199 :param buff: buffer, ``StringIO``
00200 """
00201 try:
00202 pass
00203 except struct.error as se: self._check_types(se)
00204 except TypeError as te: self._check_types(te)
00205
00206 def deserialize(self, str):
00207 """
00208 unpack serialized message in str into this message instance
00209 :param str: byte array of serialized message, ``str``
00210 """
00211 try:
00212 end = 0
00213 return self
00214 except struct.error as e:
00215 raise genpy.DeserializationError(e)
00216
00217
00218 def serialize_numpy(self, buff, numpy):
00219 """
00220 serialize message with numpy array types into buffer
00221 :param buff: buffer, ``StringIO``
00222 :param numpy: numpy python module
00223 """
00224 try:
00225 pass
00226 except struct.error as se: self._check_types(se)
00227 except TypeError as te: self._check_types(te)
00228
00229 def deserialize_numpy(self, str, numpy):
00230 """
00231 unpack serialized message in str into this message instance using numpy for array types
00232 :param str: byte array of serialized message, ``str``
00233 :param numpy: numpy python module
00234 """
00235 try:
00236 end = 0
00237 return self
00238 except struct.error as e:
00239 raise genpy.DeserializationError(e)
00240
00241 _struct_I = genpy.struct_I
00242 class SetObjectState(object):
00243 _type = 'worldmodel_msgs/SetObjectState'
00244 _md5sum = 'f1ca4bb9d91ddc88e48d16dceb6ab0e5'
00245 _request_class = SetObjectStateRequest
00246 _response_class = SetObjectStateResponse