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


gazebo_taskboard
Author(s): TCSASSEMBLER
autogenerated on Mon Oct 6 2014 02:45:45