$search
00001 """autogenerated by genmsg_py from SetNetworkParametersRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import wpa_supplicant_node.msg 00006 00007 class SetNetworkParametersRequest(roslib.message.Message): 00008 _md5sum = "910652ba566487098d045356b15748d7" 00009 _type = "wpa_supplicant_node/SetNetworkParametersRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """int32 network_id 00012 NetworkParameter[] parameters 00013 00014 ================================================================================ 00015 MSG: wpa_supplicant_node/NetworkParameter 00016 string key 00017 string value 00018 00019 """ 00020 __slots__ = ['network_id','parameters'] 00021 _slot_types = ['int32','wpa_supplicant_node/NetworkParameter[]'] 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 network_id,parameters 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(SetNetworkParametersRequest, self).__init__(*args, **kwds) 00039 #message fields cannot be None, assign default values for those that are 00040 if self.network_id is None: 00041 self.network_id = 0 00042 if self.parameters is None: 00043 self.parameters = [] 00044 else: 00045 self.network_id = 0 00046 self.parameters = [] 00047 00048 def _get_types(self): 00049 """ 00050 internal API method 00051 """ 00052 return self._slot_types 00053 00054 def serialize(self, buff): 00055 """ 00056 serialize message into buffer 00057 @param buff: buffer 00058 @type buff: StringIO 00059 """ 00060 try: 00061 buff.write(_struct_i.pack(self.network_id)) 00062 length = len(self.parameters) 00063 buff.write(_struct_I.pack(length)) 00064 for val1 in self.parameters: 00065 _x = val1.key 00066 length = len(_x) 00067 buff.write(struct.pack('<I%ss'%length, length, _x)) 00068 _x = val1.value 00069 length = len(_x) 00070 buff.write(struct.pack('<I%ss'%length, length, _x)) 00071 except struct.error as se: self._check_types(se) 00072 except TypeError as te: self._check_types(te) 00073 00074 def deserialize(self, str): 00075 """ 00076 unpack serialized message in str into this message instance 00077 @param str: byte array of serialized message 00078 @type str: str 00079 """ 00080 try: 00081 end = 0 00082 start = end 00083 end += 4 00084 (self.network_id,) = _struct_i.unpack(str[start:end]) 00085 start = end 00086 end += 4 00087 (length,) = _struct_I.unpack(str[start:end]) 00088 self.parameters = [] 00089 for i in range(0, length): 00090 val1 = wpa_supplicant_node.msg.NetworkParameter() 00091 start = end 00092 end += 4 00093 (length,) = _struct_I.unpack(str[start:end]) 00094 start = end 00095 end += length 00096 val1.key = str[start:end] 00097 start = end 00098 end += 4 00099 (length,) = _struct_I.unpack(str[start:end]) 00100 start = end 00101 end += length 00102 val1.value = str[start:end] 00103 self.parameters.append(val1) 00104 return self 00105 except struct.error as e: 00106 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00107 00108 00109 def serialize_numpy(self, buff, numpy): 00110 """ 00111 serialize message with numpy array types into buffer 00112 @param buff: buffer 00113 @type buff: StringIO 00114 @param numpy: numpy python module 00115 @type numpy module 00116 """ 00117 try: 00118 buff.write(_struct_i.pack(self.network_id)) 00119 length = len(self.parameters) 00120 buff.write(_struct_I.pack(length)) 00121 for val1 in self.parameters: 00122 _x = val1.key 00123 length = len(_x) 00124 buff.write(struct.pack('<I%ss'%length, length, _x)) 00125 _x = val1.value 00126 length = len(_x) 00127 buff.write(struct.pack('<I%ss'%length, length, _x)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize_numpy(self, str, numpy): 00132 """ 00133 unpack serialized message in str into this message instance using numpy for array types 00134 @param str: byte array of serialized message 00135 @type str: str 00136 @param numpy: numpy python module 00137 @type numpy: module 00138 """ 00139 try: 00140 end = 0 00141 start = end 00142 end += 4 00143 (self.network_id,) = _struct_i.unpack(str[start:end]) 00144 start = end 00145 end += 4 00146 (length,) = _struct_I.unpack(str[start:end]) 00147 self.parameters = [] 00148 for i in range(0, length): 00149 val1 = wpa_supplicant_node.msg.NetworkParameter() 00150 start = end 00151 end += 4 00152 (length,) = _struct_I.unpack(str[start:end]) 00153 start = end 00154 end += length 00155 val1.key = str[start:end] 00156 start = end 00157 end += 4 00158 (length,) = _struct_I.unpack(str[start:end]) 00159 start = end 00160 end += length 00161 val1.value = str[start:end] 00162 self.parameters.append(val1) 00163 return self 00164 except struct.error as e: 00165 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00166 00167 _struct_I = roslib.message.struct_I 00168 _struct_i = struct.Struct("<i") 00169 """autogenerated by genmsg_py from SetNetworkParametersResponse.msg. Do not edit.""" 00170 import roslib.message 00171 import struct 00172 00173 00174 class SetNetworkParametersResponse(roslib.message.Message): 00175 _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15" 00176 _type = "wpa_supplicant_node/SetNetworkParametersResponse" 00177 _has_header = False #flag to mark the presence of a Header object 00178 _full_text = """bool success 00179 00180 00181 """ 00182 __slots__ = ['success'] 00183 _slot_types = ['bool'] 00184 00185 def __init__(self, *args, **kwds): 00186 """ 00187 Constructor. Any message fields that are implicitly/explicitly 00188 set to None will be assigned a default value. The recommend 00189 use is keyword arguments as this is more robust to future message 00190 changes. You cannot mix in-order arguments and keyword arguments. 00191 00192 The available fields are: 00193 success 00194 00195 @param args: complete set of field values, in .msg order 00196 @param kwds: use keyword arguments corresponding to message field names 00197 to set specific fields. 00198 """ 00199 if args or kwds: 00200 super(SetNetworkParametersResponse, self).__init__(*args, **kwds) 00201 #message fields cannot be None, assign default values for those that are 00202 if self.success is None: 00203 self.success = False 00204 else: 00205 self.success = False 00206 00207 def _get_types(self): 00208 """ 00209 internal API method 00210 """ 00211 return self._slot_types 00212 00213 def serialize(self, buff): 00214 """ 00215 serialize message into buffer 00216 @param buff: buffer 00217 @type buff: StringIO 00218 """ 00219 try: 00220 buff.write(_struct_B.pack(self.success)) 00221 except struct.error as se: self._check_types(se) 00222 except TypeError as te: self._check_types(te) 00223 00224 def deserialize(self, str): 00225 """ 00226 unpack serialized message in str into this message instance 00227 @param str: byte array of serialized message 00228 @type str: str 00229 """ 00230 try: 00231 end = 0 00232 start = end 00233 end += 1 00234 (self.success,) = _struct_B.unpack(str[start:end]) 00235 self.success = bool(self.success) 00236 return self 00237 except struct.error as e: 00238 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00239 00240 00241 def serialize_numpy(self, buff, numpy): 00242 """ 00243 serialize message with numpy array types into buffer 00244 @param buff: buffer 00245 @type buff: StringIO 00246 @param numpy: numpy python module 00247 @type numpy module 00248 """ 00249 try: 00250 buff.write(_struct_B.pack(self.success)) 00251 except struct.error as se: self._check_types(se) 00252 except TypeError as te: self._check_types(te) 00253 00254 def deserialize_numpy(self, str, numpy): 00255 """ 00256 unpack serialized message in str into this message instance using numpy for array types 00257 @param str: byte array of serialized message 00258 @type str: str 00259 @param numpy: numpy python module 00260 @type numpy: module 00261 """ 00262 try: 00263 end = 0 00264 start = end 00265 end += 1 00266 (self.success,) = _struct_B.unpack(str[start:end]) 00267 self.success = bool(self.success) 00268 return self 00269 except struct.error as e: 00270 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00271 00272 _struct_I = roslib.message.struct_I 00273 _struct_B = struct.Struct("<B") 00274 class SetNetworkParameters(roslib.message.ServiceDefinition): 00275 _type = 'wpa_supplicant_node/SetNetworkParameters' 00276 _md5sum = '5976506ced89c8f3cbb16c30615609ad' 00277 _request_class = SetNetworkParametersRequest 00278 _response_class = SetNetworkParametersResponse