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