def __init__(self, bus, index, write_callback_func): """ :param bus: the dbus connection :param index: the index of the service """ Service.__init__(self, write_callback_func, bus, index, self.SYS_SRV_UUID, True) self.add_characteristic(MemoryPercentageChrc(bus, 0, self)) self.add_characteristic(CpuPercentageChrc(bus, 1, self))
def __init__(self, bus, index, write_callback_func): """ :param bus: the dbus connection :param index: the index of the service """ Service.__init__(self, write_callback_func, bus, index, self.AUTIO_UUID, True) self.add_characteristic(AutIODigitalChrc(bus, 0, self)) self.energy_expended = 0
# Testing things? from core import Service service = Service("./data/config.json") category = "fall_2016" service.add_category(category,"*****@*****.**","*****@*****.**","https://www.google.com/intl/en/about/"); service.add_recipients(category,"*****@*****.**") service.add_links(category,"https://www.google.com/intl/en/about/,http://michaelgreen.net") service.update()
def service(self, key): return Service(key)