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