# Path: fluxghost/g.py
# USBDEVS = {}


from time import time
from fluxghost import g
import logging
import json
    doc.update({
        "st_ts": st.get("st_ts"),
        "st_id": st.get("st_id"),
        "st_prog": st.get("st_prog"),
        "head_module": st.get("st_head", st.get("head_module")),
        "error_label": st.get("st_err", st.get("error_label"))
    })
    return doc


def get_offline_message(source, device=None, uuid=None):
    return {
        "uuid": device.uuid.hex if device else uuid.hex,
        "alive": False,
        "source": source
    }


def discover_api_mixin(cls):
    class DiscoverApi(cls):
        def __init__(self, *args):
            super().__init__(*args)
            self.lan_alive_devices = set()
            self.usb_alive_addr = {}
            self.server.discover_devices.items()
            self.POOL_TIME = 1.0

        def review_lan_devices(self):
            t = time()


# Path: fluxghost/g.py
# USBDEVS = {}


# Path: fluxghost/api/discover.py
from time import time
from fluxghost import g
import logging
import json

    doc.update({
        "st_ts": st.get("st_ts"),
        "st_id": st.get("st_id"),
        "st_prog": st.get("st_prog"),
        "head_module": st.get("st_head", st.get("head_module")),
        "error_label": st.get("st_err", st.get("error_label"))
    })
    return doc


def get_offline_message(source, device=None, uuid=None):
    return {
        "uuid": device.uuid.hex if device else uuid.hex,
        "alive": False,
        "source": source
    }


def discover_api_mixin(cls):
    class DiscoverApi(cls):
        def __init__(self, *args):
            super().__init__(*args)
            self.lan_alive_devices = set()
            self.usb_alive_addr = {}
            self.server.discover_devices.items()
            self.POOL_TIME = 1.0

        def review_lan_devices(self):
            t = time()


            with self.server.discover_mutex: