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