_env_plot.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/env_plotRequest.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 env_plotRequest(genpy.Message):
00009   _md5sum = "7c7d5c953455ba35795d2c81b8902191"
00010   _type = "openraveros/env_plotRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 float32[] points
00016 
00017 
00018 float32[] colors
00019 
00020 
00021 float32 size
00022 
00023 
00024 float32 transparency
00025 
00026 
00027 uint8 drawtype
00028 
00029 uint8 Draw_Point=0
00030 uint8 Draw_LineStrip=1
00031 uint8 Draw_LineList=2
00032 uint8 Draw_TriList=3
00033 uint8 Draw_Sphere=4
00034 
00035 """
00036   # Pseudo-constants
00037   Draw_Point = 0
00038   Draw_LineStrip = 1
00039   Draw_LineList = 2
00040   Draw_TriList = 3
00041   Draw_Sphere = 4
00042 
00043   __slots__ = ['points','colors','size','transparency','drawtype']
00044   _slot_types = ['float32[]','float32[]','float32','float32','uint8']
00045 
00046   def __init__(self, *args, **kwds):
00047     """
00048     Constructor. Any message fields that are implicitly/explicitly
00049     set to None will be assigned a default value. The recommend
00050     use is keyword arguments as this is more robust to future message
00051     changes.  You cannot mix in-order arguments and keyword arguments.
00052 
00053     The available fields are:
00054        points,colors,size,transparency,drawtype
00055 
00056     :param args: complete set of field values, in .msg order
00057     :param kwds: use keyword arguments corresponding to message field names
00058     to set specific fields.
00059     """
00060     if args or kwds:
00061       super(env_plotRequest, self).__init__(*args, **kwds)
00062       #message fields cannot be None, assign default values for those that are
00063       if self.points is None:
00064         self.points = []
00065       if self.colors is None:
00066         self.colors = []
00067       if self.size is None:
00068         self.size = 0.
00069       if self.transparency is None:
00070         self.transparency = 0.
00071       if self.drawtype is None:
00072         self.drawtype = 0
00073     else:
00074       self.points = []
00075       self.colors = []
00076       self.size = 0.
00077       self.transparency = 0.
00078       self.drawtype = 0
00079 
00080   def _get_types(self):
00081     """
00082     internal API method
00083     """
00084     return self._slot_types
00085 
00086   def serialize(self, buff):
00087     """
00088     serialize message into buffer
00089     :param buff: buffer, ``StringIO``
00090     """
00091     try:
00092       length = len(self.points)
00093       buff.write(_struct_I.pack(length))
00094       pattern = '<%sf'%length
00095       buff.write(struct.pack(pattern, *self.points))
00096       length = len(self.colors)
00097       buff.write(_struct_I.pack(length))
00098       pattern = '<%sf'%length
00099       buff.write(struct.pack(pattern, *self.colors))
00100       _x = self
00101       buff.write(_struct_2fB.pack(_x.size, _x.transparency, _x.drawtype))
00102     except struct.error as se: self._check_types(se)
00103     except TypeError as te: self._check_types(te)
00104 
00105   def deserialize(self, str):
00106     """
00107     unpack serialized message in str into this message instance
00108     :param str: byte array of serialized message, ``str``
00109     """
00110     try:
00111       end = 0
00112       start = end
00113       end += 4
00114       (length,) = _struct_I.unpack(str[start:end])
00115       pattern = '<%sf'%length
00116       start = end
00117       end += struct.calcsize(pattern)
00118       self.points = struct.unpack(pattern, str[start:end])
00119       start = end
00120       end += 4
00121       (length,) = _struct_I.unpack(str[start:end])
00122       pattern = '<%sf'%length
00123       start = end
00124       end += struct.calcsize(pattern)
00125       self.colors = struct.unpack(pattern, str[start:end])
00126       _x = self
00127       start = end
00128       end += 9
00129       (_x.size, _x.transparency, _x.drawtype,) = _struct_2fB.unpack(str[start:end])
00130       return self
00131     except struct.error as e:
00132       raise genpy.DeserializationError(e) #most likely buffer underfill
00133 
00134 
00135   def serialize_numpy(self, buff, numpy):
00136     """
00137     serialize message with numpy array types into buffer
00138     :param buff: buffer, ``StringIO``
00139     :param numpy: numpy python module
00140     """
00141     try:
00142       length = len(self.points)
00143       buff.write(_struct_I.pack(length))
00144       pattern = '<%sf'%length
00145       buff.write(self.points.tostring())
00146       length = len(self.colors)
00147       buff.write(_struct_I.pack(length))
00148       pattern = '<%sf'%length
00149       buff.write(self.colors.tostring())
00150       _x = self
00151       buff.write(_struct_2fB.pack(_x.size, _x.transparency, _x.drawtype))
00152     except struct.error as se: self._check_types(se)
00153     except TypeError as te: self._check_types(te)
00154 
00155   def deserialize_numpy(self, str, numpy):
00156     """
00157     unpack serialized message in str into this message instance using numpy for array types
00158     :param str: byte array of serialized message, ``str``
00159     :param numpy: numpy python module
00160     """
00161     try:
00162       end = 0
00163       start = end
00164       end += 4
00165       (length,) = _struct_I.unpack(str[start:end])
00166       pattern = '<%sf'%length
00167       start = end
00168       end += struct.calcsize(pattern)
00169       self.points = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00170       start = end
00171       end += 4
00172       (length,) = _struct_I.unpack(str[start:end])
00173       pattern = '<%sf'%length
00174       start = end
00175       end += struct.calcsize(pattern)
00176       self.colors = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00177       _x = self
00178       start = end
00179       end += 9
00180       (_x.size, _x.transparency, _x.drawtype,) = _struct_2fB.unpack(str[start:end])
00181       return self
00182     except struct.error as e:
00183       raise genpy.DeserializationError(e) #most likely buffer underfill
00184 
00185 _struct_I = genpy.struct_I
00186 _struct_2fB = struct.Struct("<2fB")
00187 """autogenerated by genpy from openraveros/env_plotResponse.msg. Do not edit."""
00188 import sys
00189 python3 = True if sys.hexversion > 0x03000000 else False
00190 import genpy
00191 import struct
00192 
00193 
00194 class env_plotResponse(genpy.Message):
00195   _md5sum = "9e60f57d176204c85b4d8a8d3942fc88"
00196   _type = "openraveros/env_plotResponse"
00197   _has_header = False #flag to mark the presence of a Header object
00198   _full_text = """int32 figureid
00199 
00200 
00201 """
00202   __slots__ = ['figureid']
00203   _slot_types = ['int32']
00204 
00205   def __init__(self, *args, **kwds):
00206     """
00207     Constructor. Any message fields that are implicitly/explicitly
00208     set to None will be assigned a default value. The recommend
00209     use is keyword arguments as this is more robust to future message
00210     changes.  You cannot mix in-order arguments and keyword arguments.
00211 
00212     The available fields are:
00213        figureid
00214 
00215     :param args: complete set of field values, in .msg order
00216     :param kwds: use keyword arguments corresponding to message field names
00217     to set specific fields.
00218     """
00219     if args or kwds:
00220       super(env_plotResponse, self).__init__(*args, **kwds)
00221       #message fields cannot be None, assign default values for those that are
00222       if self.figureid is None:
00223         self.figureid = 0
00224     else:
00225       self.figureid = 0
00226 
00227   def _get_types(self):
00228     """
00229     internal API method
00230     """
00231     return self._slot_types
00232 
00233   def serialize(self, buff):
00234     """
00235     serialize message into buffer
00236     :param buff: buffer, ``StringIO``
00237     """
00238     try:
00239       buff.write(_struct_i.pack(self.figureid))
00240     except struct.error as se: self._check_types(se)
00241     except TypeError as te: self._check_types(te)
00242 
00243   def deserialize(self, str):
00244     """
00245     unpack serialized message in str into this message instance
00246     :param str: byte array of serialized message, ``str``
00247     """
00248     try:
00249       end = 0
00250       start = end
00251       end += 4
00252       (self.figureid,) = _struct_i.unpack(str[start:end])
00253       return self
00254     except struct.error as e:
00255       raise genpy.DeserializationError(e) #most likely buffer underfill
00256 
00257 
00258   def serialize_numpy(self, buff, numpy):
00259     """
00260     serialize message with numpy array types into buffer
00261     :param buff: buffer, ``StringIO``
00262     :param numpy: numpy python module
00263     """
00264     try:
00265       buff.write(_struct_i.pack(self.figureid))
00266     except struct.error as se: self._check_types(se)
00267     except TypeError as te: self._check_types(te)
00268 
00269   def deserialize_numpy(self, str, numpy):
00270     """
00271     unpack serialized message in str into this message instance using numpy for array types
00272     :param str: byte array of serialized message, ``str``
00273     :param numpy: numpy python module
00274     """
00275     try:
00276       end = 0
00277       start = end
00278       end += 4
00279       (self.figureid,) = _struct_i.unpack(str[start:end])
00280       return self
00281     except struct.error as e:
00282       raise genpy.DeserializationError(e) #most likely buffer underfill
00283 
00284 _struct_I = genpy.struct_I
00285 _struct_i = struct.Struct("<i")
00286 class env_plot(object):
00287   _type          = 'openraveros/env_plot'
00288   _md5sum = '3ffe9a31e549a1fe4965a4c9efc809be'
00289   _request_class  = env_plotRequest
00290   _response_class = env_plotResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


openraveros
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:15:38