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