00001 """autogenerated by genmsg_py from MultipleAddTwoIntsRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class MultipleAddTwoIntsRequest(roslib.message.Message):
00007 _md5sum = "55328e64986cccd71be7fe834e693c76"
00008 _type = "test_rospy/MultipleAddTwoIntsRequest"
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(MultipleAddTwoIntsRequest, 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 MultipleAddTwoIntsResponse.msg. Do not edit."""
00121 import roslib.message
00122 import struct
00123
00124
00125 class MultipleAddTwoIntsResponse(roslib.message.Message):
00126 _md5sum = "e6fcb876df417a4130d2c7eb2d1b2436"
00127 _type = "test_rospy/MultipleAddTwoIntsResponse"
00128 _has_header = False
00129 _full_text = """int32 ab
00130 int32 cd
00131
00132 """
00133 __slots__ = ['ab','cd']
00134 _slot_types = ['int32','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 ab,cd
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(MultipleAddTwoIntsResponse, self).__init__(*args, **kwds)
00152
00153 if self.ab is None:
00154 self.ab = 0
00155 if self.cd is None:
00156 self.cd = 0
00157 else:
00158 self.ab = 0
00159 self.cd = 0
00160
00161 def _get_types(self):
00162 """
00163 internal API method
00164 """
00165 return self._slot_types
00166
00167 def serialize(self, buff):
00168 """
00169 serialize message into buffer
00170 @param buff: buffer
00171 @type buff: StringIO
00172 """
00173 try:
00174 _x = self
00175 buff.write(_struct_2i.pack(_x.ab, _x.cd))
00176 except struct.error, se: self._check_types(se)
00177 except TypeError, te: self._check_types(te)
00178
00179 def deserialize(self, str):
00180 """
00181 unpack serialized message in str into this message instance
00182 @param str: byte array of serialized message
00183 @type str: str
00184 """
00185 try:
00186 end = 0
00187 _x = self
00188 start = end
00189 end += 8
00190 (_x.ab, _x.cd,) = _struct_2i.unpack(str[start:end])
00191 return self
00192 except struct.error, e:
00193 raise roslib.message.DeserializationError(e)
00194
00195
00196 def serialize_numpy(self, buff, numpy):
00197 """
00198 serialize message with numpy array types into buffer
00199 @param buff: buffer
00200 @type buff: StringIO
00201 @param numpy: numpy python module
00202 @type numpy module
00203 """
00204 try:
00205 _x = self
00206 buff.write(_struct_2i.pack(_x.ab, _x.cd))
00207 except struct.error, se: self._check_types(se)
00208 except TypeError, 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
00214 @type str: str
00215 @param numpy: numpy python module
00216 @type numpy: module
00217 """
00218 try:
00219 end = 0
00220 _x = self
00221 start = end
00222 end += 8
00223 (_x.ab, _x.cd,) = _struct_2i.unpack(str[start:end])
00224 return self
00225 except struct.error, e:
00226 raise roslib.message.DeserializationError(e)
00227
00228 _struct_I = roslib.message.struct_I
00229 _struct_2i = struct.Struct("<2i")
00230 class MultipleAddTwoInts(roslib.message.ServiceDefinition):
00231 _type = 'test_rospy/MultipleAddTwoInts'
00232 _md5sum = '51899e11b54a9c6a1153d9517a921791'
00233 _request_class = MultipleAddTwoIntsRequest
00234 _response_class = MultipleAddTwoIntsResponse