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


corobot_srvs
Author(s): Morgan Cormier/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:38:11