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


test_roslisp
Author(s): Bhaskara Marthi
autogenerated on Thu Jan 2 2014 11:55:57