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