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


hrl_srvs
Author(s): Advait Jain
autogenerated on Wed Nov 27 2013 11:32:22