00001 """autogenerated by genmsg_py from SetCloudSettingsRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import collision_environment_msgs.msg
00006
00007 class SetCloudSettingsRequest(roslib.message.Message):
00008 _md5sum = "219fc709d3a77cf5b9e935f61784178e"
00009 _type = "collision_environment_msgs/SetCloudSettingsRequest"
00010 _has_header = False
00011 _full_text = """collision_environment_msgs/CloudSettings settings
00012
00013 ================================================================================
00014 MSG: collision_environment_msgs/CloudSettings
00015 string cloud_name
00016 int32 static_publish
00017 int32 dynamic_publish
00018 int32 INCLUDE = 1
00019 int32 EXCLUDE = 2
00020
00021 """
00022 __slots__ = ['settings']
00023 _slot_types = ['collision_environment_msgs/CloudSettings']
00024
00025 def __init__(self, *args, **kwds):
00026 """
00027 Constructor. Any message fields that are implicitly/explicitly
00028 set to None will be assigned a default value. The recommend
00029 use is keyword arguments as this is more robust to future message
00030 changes. You cannot mix in-order arguments and keyword arguments.
00031
00032 The available fields are:
00033 settings
00034
00035 @param args: complete set of field values, in .msg order
00036 @param kwds: use keyword arguments corresponding to message field names
00037 to set specific fields.
00038 """
00039 if args or kwds:
00040 super(SetCloudSettingsRequest, self).__init__(*args, **kwds)
00041
00042 if self.settings is None:
00043 self.settings = collision_environment_msgs.msg.CloudSettings()
00044 else:
00045 self.settings = collision_environment_msgs.msg.CloudSettings()
00046
00047 def _get_types(self):
00048 """
00049 internal API method
00050 """
00051 return self._slot_types
00052
00053 def serialize(self, buff):
00054 """
00055 serialize message into buffer
00056 @param buff: buffer
00057 @type buff: StringIO
00058 """
00059 try:
00060 _x = self.settings.cloud_name
00061 length = len(_x)
00062 buff.write(struct.pack('<I%ss'%length, length, _x))
00063 _x = self
00064 buff.write(_struct_2i.pack(_x.settings.static_publish, _x.settings.dynamic_publish))
00065 except struct.error, se: self._check_types(se)
00066 except TypeError, te: self._check_types(te)
00067
00068 def deserialize(self, str):
00069 """
00070 unpack serialized message in str into this message instance
00071 @param str: byte array of serialized message
00072 @type str: str
00073 """
00074 try:
00075 if self.settings is None:
00076 self.settings = collision_environment_msgs.msg.CloudSettings()
00077 end = 0
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 start = end
00082 end += length
00083 self.settings.cloud_name = str[start:end]
00084 _x = self
00085 start = end
00086 end += 8
00087 (_x.settings.static_publish, _x.settings.dynamic_publish,) = _struct_2i.unpack(str[start:end])
00088 return self
00089 except struct.error, e:
00090 raise roslib.message.DeserializationError(e)
00091
00092
00093 def serialize_numpy(self, buff, numpy):
00094 """
00095 serialize message with numpy array types into buffer
00096 @param buff: buffer
00097 @type buff: StringIO
00098 @param numpy: numpy python module
00099 @type numpy module
00100 """
00101 try:
00102 _x = self.settings.cloud_name
00103 length = len(_x)
00104 buff.write(struct.pack('<I%ss'%length, length, _x))
00105 _x = self
00106 buff.write(_struct_2i.pack(_x.settings.static_publish, _x.settings.dynamic_publish))
00107 except struct.error, se: self._check_types(se)
00108 except TypeError, te: self._check_types(te)
00109
00110 def deserialize_numpy(self, str, numpy):
00111 """
00112 unpack serialized message in str into this message instance using numpy for array types
00113 @param str: byte array of serialized message
00114 @type str: str
00115 @param numpy: numpy python module
00116 @type numpy: module
00117 """
00118 try:
00119 if self.settings is None:
00120 self.settings = collision_environment_msgs.msg.CloudSettings()
00121 end = 0
00122 start = end
00123 end += 4
00124 (length,) = _struct_I.unpack(str[start:end])
00125 start = end
00126 end += length
00127 self.settings.cloud_name = str[start:end]
00128 _x = self
00129 start = end
00130 end += 8
00131 (_x.settings.static_publish, _x.settings.dynamic_publish,) = _struct_2i.unpack(str[start:end])
00132 return self
00133 except struct.error, e:
00134 raise roslib.message.DeserializationError(e)
00135
00136 _struct_I = roslib.message.struct_I
00137 _struct_2i = struct.Struct("<2i")
00138 """autogenerated by genmsg_py from SetCloudSettingsResponse.msg. Do not edit."""
00139 import roslib.message
00140 import struct
00141
00142
00143 class SetCloudSettingsResponse(roslib.message.Message):
00144 _md5sum = "02bb8ab80d2e4d71edb3834adae6d945"
00145 _type = "collision_environment_msgs/SetCloudSettingsResponse"
00146 _has_header = False
00147 _full_text = """int32 value
00148 int32 SUCCESS=1
00149 int32 NAME_NONEXISTANT=-1
00150 int32 FAILED=-2
00151
00152
00153
00154
00155
00156
00157
00158 """
00159
00160 SUCCESS = 1
00161 NAME_NONEXISTANT = -1
00162 FAILED = -2
00163
00164 __slots__ = ['value']
00165 _slot_types = ['int32']
00166
00167 def __init__(self, *args, **kwds):
00168 """
00169 Constructor. Any message fields that are implicitly/explicitly
00170 set to None will be assigned a default value. The recommend
00171 use is keyword arguments as this is more robust to future message
00172 changes. You cannot mix in-order arguments and keyword arguments.
00173
00174 The available fields are:
00175 value
00176
00177 @param args: complete set of field values, in .msg order
00178 @param kwds: use keyword arguments corresponding to message field names
00179 to set specific fields.
00180 """
00181 if args or kwds:
00182 super(SetCloudSettingsResponse, self).__init__(*args, **kwds)
00183
00184 if self.value is None:
00185 self.value = 0
00186 else:
00187 self.value = 0
00188
00189 def _get_types(self):
00190 """
00191 internal API method
00192 """
00193 return self._slot_types
00194
00195 def serialize(self, buff):
00196 """
00197 serialize message into buffer
00198 @param buff: buffer
00199 @type buff: StringIO
00200 """
00201 try:
00202 buff.write(_struct_i.pack(self.value))
00203 except struct.error, se: self._check_types(se)
00204 except TypeError, 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
00210 @type str: str
00211 """
00212 try:
00213 end = 0
00214 start = end
00215 end += 4
00216 (self.value,) = _struct_i.unpack(str[start:end])
00217 return self
00218 except struct.error, e:
00219 raise roslib.message.DeserializationError(e)
00220
00221
00222 def serialize_numpy(self, buff, numpy):
00223 """
00224 serialize message with numpy array types into buffer
00225 @param buff: buffer
00226 @type buff: StringIO
00227 @param numpy: numpy python module
00228 @type numpy module
00229 """
00230 try:
00231 buff.write(_struct_i.pack(self.value))
00232 except struct.error, se: self._check_types(se)
00233 except TypeError, te: self._check_types(te)
00234
00235 def deserialize_numpy(self, str, numpy):
00236 """
00237 unpack serialized message in str into this message instance using numpy for array types
00238 @param str: byte array of serialized message
00239 @type str: str
00240 @param numpy: numpy python module
00241 @type numpy: module
00242 """
00243 try:
00244 end = 0
00245 start = end
00246 end += 4
00247 (self.value,) = _struct_i.unpack(str[start:end])
00248 return self
00249 except struct.error, e:
00250 raise roslib.message.DeserializationError(e)
00251
00252 _struct_I = roslib.message.struct_I
00253 _struct_i = struct.Struct("<i")
00254 class SetCloudSettings(roslib.message.ServiceDefinition):
00255 _type = 'collision_environment_msgs/SetCloudSettings'
00256 _md5sum = '03bd1c0bc8bf6184c0a06e0328484ce8'
00257 _request_class = SetCloudSettingsRequest
00258 _response_class = SetCloudSettingsResponse