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


sr_robot_msgs
Author(s): Ugo Cupcic/ugo@shadowrobot.com
autogenerated on Mon Oct 6 2014 07:40:06