Go to the documentation of this file.00001 """autogenerated by genpy from corobot_srvs/GetEngagedRequest.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 GetEngagedRequest(genpy.Message):
00009 _md5sum = "c4ecff52046eaecf0190e650b1958286"
00010 _type = "corobot_srvs/GetEngagedRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016
00017
00018
00019
00020 int8 index
00021
00022
00023 """
00024 __slots__ = ['index']
00025 _slot_types = ['int8']
00026
00027 def __init__(self, *args, **kwds):
00028 """
00029 Constructor. Any message fields that are implicitly/explicitly
00030 set to None will be assigned a default value. The recommend
00031 use is keyword arguments as this is more robust to future message
00032 changes. You cannot mix in-order arguments and keyword arguments.
00033
00034 The available fields are:
00035 index
00036
00037 :param args: complete set of field values, in .msg order
00038 :param kwds: use keyword arguments corresponding to message field names
00039 to set specific fields.
00040 """
00041 if args or kwds:
00042 super(GetEngagedRequest, self).__init__(*args, **kwds)
00043
00044 if self.index is None:
00045 self.index = 0
00046 else:
00047 self.index = 0
00048
00049 def _get_types(self):
00050 """
00051 internal API method
00052 """
00053 return self._slot_types
00054
00055 def serialize(self, buff):
00056 """
00057 serialize message into buffer
00058 :param buff: buffer, ``StringIO``
00059 """
00060 try:
00061 buff.write(_struct_b.pack(self.index))
00062 except struct.error as se: self._check_types(se)
00063 except TypeError as te: self._check_types(te)
00064
00065 def deserialize(self, str):
00066 """
00067 unpack serialized message in str into this message instance
00068 :param str: byte array of serialized message, ``str``
00069 """
00070 try:
00071 end = 0
00072 start = end
00073 end += 1
00074 (self.index,) = _struct_b.unpack(str[start:end])
00075 return self
00076 except struct.error as e:
00077 raise genpy.DeserializationError(e)
00078
00079
00080 def serialize_numpy(self, buff, numpy):
00081 """
00082 serialize message with numpy array types into buffer
00083 :param buff: buffer, ``StringIO``
00084 :param numpy: numpy python module
00085 """
00086 try:
00087 buff.write(_struct_b.pack(self.index))
00088 except struct.error as se: self._check_types(se)
00089 except TypeError as te: self._check_types(te)
00090
00091 def deserialize_numpy(self, str, numpy):
00092 """
00093 unpack serialized message in str into this message instance using numpy for array types
00094 :param str: byte array of serialized message, ``str``
00095 :param numpy: numpy python module
00096 """
00097 try:
00098 end = 0
00099 start = end
00100 end += 1
00101 (self.index,) = _struct_b.unpack(str[start:end])
00102 return self
00103 except struct.error as e:
00104 raise genpy.DeserializationError(e)
00105
00106 _struct_I = genpy.struct_I
00107 _struct_b = struct.Struct("<b")
00108 """autogenerated by genpy from corobot_srvs/GetEngagedResponse.msg. Do not edit."""
00109 import sys
00110 python3 = True if sys.hexversion > 0x03000000 else False
00111 import genpy
00112 import struct
00113
00114
00115 class GetEngagedResponse(genpy.Message):
00116 _md5sum = "a33bed68685ae53bd39b0a9242210752"
00117 _type = "corobot_srvs/GetEngagedResponse"
00118 _has_header = False
00119 _full_text = """
00120
00121 int8 state
00122
00123
00124 """
00125 __slots__ = ['state']
00126 _slot_types = ['int8']
00127
00128 def __init__(self, *args, **kwds):
00129 """
00130 Constructor. Any message fields that are implicitly/explicitly
00131 set to None will be assigned a default value. The recommend
00132 use is keyword arguments as this is more robust to future message
00133 changes. You cannot mix in-order arguments and keyword arguments.
00134
00135 The available fields are:
00136 state
00137
00138 :param args: complete set of field values, in .msg order
00139 :param kwds: use keyword arguments corresponding to message field names
00140 to set specific fields.
00141 """
00142 if args or kwds:
00143 super(GetEngagedResponse, self).__init__(*args, **kwds)
00144
00145 if self.state is None:
00146 self.state = 0
00147 else:
00148 self.state = 0
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 buff.write(_struct_b.pack(self.state))
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 start = end
00174 end += 1
00175 (self.state,) = _struct_b.unpack(str[start:end])
00176 return self
00177 except struct.error as e:
00178 raise genpy.DeserializationError(e)
00179
00180
00181 def serialize_numpy(self, buff, numpy):
00182 """
00183 serialize message with numpy array types into buffer
00184 :param buff: buffer, ``StringIO``
00185 :param numpy: numpy python module
00186 """
00187 try:
00188 buff.write(_struct_b.pack(self.state))
00189 except struct.error as se: self._check_types(se)
00190 except TypeError as te: self._check_types(te)
00191
00192 def deserialize_numpy(self, str, numpy):
00193 """
00194 unpack serialized message in str into this message instance using numpy for array types
00195 :param str: byte array of serialized message, ``str``
00196 :param numpy: numpy python module
00197 """
00198 try:
00199 end = 0
00200 start = end
00201 end += 1
00202 (self.state,) = _struct_b.unpack(str[start:end])
00203 return self
00204 except struct.error as e:
00205 raise genpy.DeserializationError(e)
00206
00207 _struct_I = genpy.struct_I
00208 _struct_b = struct.Struct("<b")
00209 class GetEngaged(object):
00210 _type = 'corobot_srvs/GetEngaged'
00211 _md5sum = '7ba934f8ace215be6b855c89d48933b3'
00212 _request_class = GetEngagedRequest
00213 _response_class = GetEngagedResponse