def __init__(self, bus, index, service, wpantun): Characteristic.__init__(self, bus, index, self.XPANID_CHRC_UUID, ["read"], service) if wpantun.is_associated(): self.value = dbus.Array( dbus.Byte(i) for i in struct.pack(">Q", wpantun.xpan_id)) else: self.value = []
def __init__(self, bus, index, service, wpantun): Characteristic.__init__(self, bus, index, self.NAME_CHRC_UUID, ["read"], service) if wpantun.is_associated(): self.value = dbus.Array( dbus.Byte(i) for i in bytes(wpantun.network_name)) else: self.value = []
def __init__(self, bus, index, service, wpantun): Characteristic.__init__(self, bus, index, self.CHANNEL_CHRC_UUID, ["read"], service) if wpantun.is_associated(): self.value = dbus.Array( dbus.Byte(i) for i in struct.pack(">l", wpantun.channel)) else: self.value = []
def __init__(self, bus, index, service, wpantun): Characteristic.__init__(self, bus, index, self.MESHIPV6_CHRC_UUID, ["read"], service) if wpantun.is_associated(): self.value = dbus.Array( dbus.Byte(i) for i in bytes(wpantun.mesh_ipv6)) else: self.value = []
def __init__(self, bus, index, service, wpantun): Characteristic.__init__(self, bus, index, self.MASTERKEY_CHRC_UUID, ["read"], service) if wpantun.is_associated(): self.value = dbus.Array( dbus.Byte(i) for i in bytes(wpantun.masterkey)) else: self.value = []
def __init__(self, bus, index, service): Characteristic.__init__(self, bus, index, self.PSWD_UUID, ["write"], service) self.value = []