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