def ReadValue(self, options): logging.debug('Read WiFi Services') wifiSsids = wifi_services_pb2.wifi_services_v1() for network in wifiCache: if (network.ssid != "--"): wifiSsids.services.append(str(network.ssid)) logging.debug(str(network.ssid)) value = [] val = wifiSsids.SerializeToString() for c in val: value.append(dbus.Byte(c)) return value
def ReadValue(self, options): logging.debug('Read WiFi CONFIGURED Services') wifiConfigured = wifi_services_pb2.wifi_services_v1() for network in wifiCache: if (network.ssid != "--"): if (network.in_use): activeConnection = str(network.ssid) wifiConfigured.services.append(activeConnection) print(activeConnection) value = [] val = wifiConfigured.SerializeToString() for c in val: value.append(dbus.Byte(c)) return value
def ReadValue(self, options): logging.debug('Read WiFi Services') wifiSsids = wifi_services_pb2.wifi_services_v1() for network in wifiCache: ssidStr = str(network.ssid) if(ssidStr != "--" and ssidStr != ""): if(ssidStr not in wifiSsids.services): wifiSsids.services.append(ssidStr) logging.debug(ssidStr) value = [] val = wifiSsids.SerializeToString() for c in val: value.append(dbus.Byte(c)) if("offset" in options): cutDownArray = value[int(options["offset"]):] return cutDownArray else: return value