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


ros_rt_wmp_msgs
Author(s): Pablo Urcola
autogenerated on Fri Jan 3 2014 12:07:44