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