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