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