Beispiel #1
0
 def __init__(self, service, shared_state):
     Characteristic.__init__(
         self, constants.WIFI_CONFIGURED_SERVICES_CHARACTERISTIC_UUID,
         ["read"], service)
     self.add_descriptor(WifiConfiguredServicesDescriptor(self))
     self.add_descriptor(OpaqueStructureDescriptor(self))
     self.shared_state = shared_state
Beispiel #2
0
 def __init__(self, service):
     Characteristic.__init__(self,
                             constants.ASSERT_LOCATION_CHARACTERISTIC_UUID,
                             ["read", "write", "notify"], service)
     self.add_descriptor(AssertLocationDescriptor(self))
     self.add_descriptor(OpaqueStructureDescriptor(self))
     self.notifyValue = string_to_dbus_encoded_byte_array("init")
 def __init__(self, service):
     Characteristic.__init__(self,
                             constants.ADD_GATEWAY_CHARACTERISTIC_UUID,
                             ["read", "write", "notify"], service)
     self.add_descriptor(AddGatewayDescriptor(self))
     self.add_descriptor(OpaqueStructureDescriptor(self))
     self.notifyValue = string_to_dbus_encoded_byte_array("init")
Beispiel #4
0
 def __init__(self, service):
     self.notifying = False
     Characteristic.__init__(self,
                             constants.WIFI_REMOVE_CHARACTERISTIC_UUID,
                             ["read", "write", "notify"], service)
     self.add_descriptor(WifiRemoveDescriptor(self))
     self.add_descriptor(OpaqueStructureDescriptor(self))
     self.wifi_status = "False"
Beispiel #5
0
    def __init__(self, service, eth0_mac_address, wlan0_mac_address,
                 firmware_version):
        Characteristic.__init__(self,
                                constants.DIAGNOSTICS_CHARACTERISTIC_UUID,
                                ["read"], service)
        self.add_descriptor(DiagnosticsDescriptor(self))
        self.add_descriptor(OpaqueStructureDescriptor(self))

        self.new_diagnostics_proto(eth0_mac_address.replace(":", ""),
                                   wlan0_mac_address.replace(":", ""),
                                   firmware_version)
    def __init__(self, service):
        self.notifying = False
        self.connecting = True
        Characteristic.__init__(
                self, constants.WIFI_CONNECT_CHARACTERISTIC_UUID,
                ["read", "write", "notify"], service)
        self.add_descriptor(WifiConnectDescriptor(self))
        self.add_descriptor(OpaqueStructureDescriptor(self))

        # Credential to connect to a WiFi
        self.wifi_service = ""
        self.wifi_password = ""  # nosec B105