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