Ejemplo n.º 1
0
def profile_from_device_string(device_string):
    # TODO: The input is actually an "args" string, which contains multiple devices space-separated. We should support this, but it is hard because osmosdr does not export the internal args_to_vector function and parsing it ourselves would need to be escaping-aware.
    params = {k: v for k, v in osmosdr.device_t(device_string).items()}
    for param_key in params.iterkeys():
        if param_key in _default_profiles:
            # is a device of this type
            return _default_profiles[param_key]
    # no match / unknown
    return OsmoSDRProfile()
Ejemplo n.º 2
0
def get_devices(hint=""):
    return osmosdr.device_find(osmosdr.device_t(hint))