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


amtec
Author(s): Charles DuHadway, Benjamin Pitzer (Maintained by Benjamin Pitzer)
autogenerated on Sat Dec 28 2013 16:49:55