_Trigger.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_srvs/TriggerRequest.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 TriggerRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "cob_srvs/TriggerRequest"
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(TriggerRequest, 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00048     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00071     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 cob_srvs/TriggerResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091 
00092 import std_msgs.msg
00093 
00094 class TriggerResponse(genpy.Message):
00095   _md5sum = "bdad515e8f4c013bd650d3407753d2b8"
00096   _type = "cob_srvs/TriggerResponse"
00097   _has_header = False #flag to mark the presence of a Header object
00098   _full_text = """std_msgs/Bool success
00099 std_msgs/String error_message
00100 
00101 
00102 ================================================================================
00103 MSG: std_msgs/Bool
00104 bool data
00105 ================================================================================
00106 MSG: std_msgs/String
00107 string data
00108 
00109 """
00110   __slots__ = ['success','error_message']
00111   _slot_types = ['std_msgs/Bool','std_msgs/String']
00112 
00113   def __init__(self, *args, **kwds):
00114     """
00115     Constructor. Any message fields that are implicitly/explicitly
00116     set to None will be assigned a default value. The recommend
00117     use is keyword arguments as this is more robust to future message
00118     changes.  You cannot mix in-order arguments and keyword arguments.
00119 
00120     The available fields are:
00121        success,error_message
00122 
00123     :param args: complete set of field values, in .msg order
00124     :param kwds: use keyword arguments corresponding to message field names
00125     to set specific fields.
00126     """
00127     if args or kwds:
00128       super(TriggerResponse, self).__init__(*args, **kwds)
00129       #message fields cannot be None, assign default values for those that are
00130       if self.success is None:
00131         self.success = std_msgs.msg.Bool()
00132       if self.error_message is None:
00133         self.error_message = std_msgs.msg.String()
00134     else:
00135       self.success = std_msgs.msg.Bool()
00136       self.error_message = std_msgs.msg.String()
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       buff.write(_struct_B.pack(self.success.data))
00151       _x = self.error_message.data
00152       length = len(_x)
00153       if python3 or type(_x) == unicode:
00154         _x = _x.encode('utf-8')
00155         length = len(_x)
00156       buff.write(struct.pack('<I%ss'%length, length, _x))
00157     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00158     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00159 
00160   def deserialize(self, str):
00161     """
00162     unpack serialized message in str into this message instance
00163     :param str: byte array of serialized message, ``str``
00164     """
00165     try:
00166       if self.success is None:
00167         self.success = std_msgs.msg.Bool()
00168       if self.error_message is None:
00169         self.error_message = std_msgs.msg.String()
00170       end = 0
00171       start = end
00172       end += 1
00173       (self.success.data,) = _struct_B.unpack(str[start:end])
00174       self.success.data = bool(self.success.data)
00175       start = end
00176       end += 4
00177       (length,) = _struct_I.unpack(str[start:end])
00178       start = end
00179       end += length
00180       if python3:
00181         self.error_message.data = str[start:end].decode('utf-8')
00182       else:
00183         self.error_message.data = str[start:end]
00184       return self
00185     except struct.error as e:
00186       raise genpy.DeserializationError(e) #most likely buffer underfill
00187 
00188 
00189   def serialize_numpy(self, buff, numpy):
00190     """
00191     serialize message with numpy array types into buffer
00192     :param buff: buffer, ``StringIO``
00193     :param numpy: numpy python module
00194     """
00195     try:
00196       buff.write(_struct_B.pack(self.success.data))
00197       _x = self.error_message.data
00198       length = len(_x)
00199       if python3 or type(_x) == unicode:
00200         _x = _x.encode('utf-8')
00201         length = len(_x)
00202       buff.write(struct.pack('<I%ss'%length, length, _x))
00203     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00204     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00205 
00206   def deserialize_numpy(self, str, numpy):
00207     """
00208     unpack serialized message in str into this message instance using numpy for array types
00209     :param str: byte array of serialized message, ``str``
00210     :param numpy: numpy python module
00211     """
00212     try:
00213       if self.success is None:
00214         self.success = std_msgs.msg.Bool()
00215       if self.error_message is None:
00216         self.error_message = std_msgs.msg.String()
00217       end = 0
00218       start = end
00219       end += 1
00220       (self.success.data,) = _struct_B.unpack(str[start:end])
00221       self.success.data = bool(self.success.data)
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       start = end
00226       end += length
00227       if python3:
00228         self.error_message.data = str[start:end].decode('utf-8')
00229       else:
00230         self.error_message.data = str[start:end]
00231       return self
00232     except struct.error as e:
00233       raise genpy.DeserializationError(e) #most likely buffer underfill
00234 
00235 _struct_I = genpy.struct_I
00236 _struct_B = struct.Struct("<B")
00237 class Trigger(object):
00238   _type          = 'cob_srvs/Trigger'
00239   _md5sum = 'bdad515e8f4c013bd650d3407753d2b8'
00240   _request_class  = TriggerRequest
00241   _response_class = TriggerResponse


cob_srvs
Author(s): Florian Weisshardt
autogenerated on Sun Oct 5 2014 22:58:03