# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_limesdr_swig')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_limesdr_swig')
    _limesdr_swig = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_limesdr_swig', [dirname(__file__)])
        except ImportError:
            import _limesdr_swig
            return _limesdr_swig
        try:
            _mod = imp.load_module('_limesdr_swig', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _limesdr_swig = swig_import_helper()
    del swig_import_helper
else:
    import _limesdr_swig
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        object.__setattr__(self, name, value)
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr



def high_res_timer_now():
    """high_res_timer_now() -> gr::high_res_timer_type"""
    return _limesdr_swig.high_res_timer_now()

def high_res_timer_now_perfmon():
    """high_res_timer_now_perfmon() -> gr::high_res_timer_type"""
    return _limesdr_swig.high_res_timer_now_perfmon()

def high_res_timer_tps():
    """high_res_timer_tps() -> gr::high_res_timer_type"""
    return _limesdr_swig.high_res_timer_tps()

def high_res_timer_epoch():
    """high_res_timer_epoch() -> gr::high_res_timer_type"""
    return _limesdr_swig.high_res_timer_epoch()
class source(object):
    """Proxy of C++ gr::limesdr::source class."""

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def make(serial, channel_mode, filename):
        """
        make(std::string serial, int channel_mode, std::string const & filename) -> source_sptr

        Return a shared_ptr to a new instance of source.

        To avoid accidental use of raw pointers, source's constructor is private. limesdr::source::make is the public interface for creating new instances.

        Params: (serial, channel_mode, filename)
        """
        return _limesdr_swig.source_make(serial, channel_mode, filename)

    make = staticmethod(make)

    def set_center_freq(self, freq, chan=0):
        """
        set_center_freq(source self, double freq, size_t chan=0) -> double

        Set center frequency

        Params: (freq, chan)
        """
        return _limesdr_swig.source_set_center_freq(self, freq, chan)


    def set_antenna(self, antenna, channel=0):
        """
        set_antenna(source self, int antenna, int channel=0)

        Set which antenna is used

        Params: (antenna, channel)
        """
        return _limesdr_swig.source_set_antenna(self, antenna, channel)


    def set_nco(self, nco_freq, channel):
        """
        set_nco(source self, float nco_freq, int channel)

        Set NCO (numerically controlled oscillator). By selecting NCO frequency configure NCO. When NCO frequency is 0, NCO is off.

        Params: (nco_freq, channel)
        """
        return _limesdr_swig.source_set_nco(self, nco_freq, channel)


    def set_bandwidth(self, analog_bandw, channel=0):
        """
        set_bandwidth(source self, double analog_bandw, int channel=0) -> double

        Set analog filters.

        Params: (analog_bandw, channel)
        """
        return _limesdr_swig.source_set_bandwidth(self, analog_bandw, channel)


    def set_digital_filter(self, digital_bandw, channel):
        """
        set_digital_filter(source self, double digital_bandw, int channel)

        Set digital filters (GFIR).

        Params: (digital_bandw, channel)
        """
        return _limesdr_swig.source_set_digital_filter(self, digital_bandw, channel)


    def set_gain(self, gain_dB, channel=0):
        """
        set_gain(source self, unsigned int gain_dB, int channel=0) -> unsigned int

        Set the combined gain value in dB

        Params: (gain_dB, channel)
        """
        return _limesdr_swig.source_set_gain(self, gain_dB, channel)


    def set_sample_rate(self, rate):
        """
        set_sample_rate(source self, double rate) -> double

        Set the same sample rate for both channels.

        Params: (rate)
        """
        return _limesdr_swig.source_set_sample_rate(self, rate)


    def set_oversampling(self, oversample):
        """
        set_oversampling(source self, int oversample)

        Set oversampling for both channels.

        Params: (oversample)
        """
        return _limesdr_swig.source_set_oversampling(self, oversample)


    def calibrate(self, bandw, channel=0):
        """
        calibrate(source self, double bandw, int channel=0)

        Perform device calibration.

        Params: (bandw, channel)
        """
        return _limesdr_swig.source_calibrate(self, bandw, channel)


    def set_buffer_size(self, size):
        """
        set_buffer_size(source self, uint32_t size)

        Set stream buffer size

        Params: (size)
        """
        return _limesdr_swig.source_set_buffer_size(self, size)

    __swig_destroy__ = _limesdr_swig.delete_source
    __del__ = lambda self: None
source_swigregister = _limesdr_swig.source_swigregister
source_swigregister(source)

def source_make(serial, channel_mode, filename):
    """
    source_make(std::string serial, int channel_mode, std::string const & filename) -> source_sptr

    Return a shared_ptr to a new instance of source.

    To avoid accidental use of raw pointers, source's constructor is private. limesdr::source::make is the public interface for creating new instances.

    Params: (serial, channel_mode, filename)
    """
    return _limesdr_swig.source_make(serial, channel_mode, filename)

class source_sptr(object):
    """Proxy of C++ boost::shared_ptr<(gr::limesdr::source)> class."""

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(boost::shared_ptr<(gr::limesdr::source)> self) -> source_sptr
        __init__(boost::shared_ptr<(gr::limesdr::source)> self, source p) -> source_sptr
        """
        this = _limesdr_swig.new_source_sptr(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __deref__(self):
        """__deref__(source_sptr self) -> source"""
        return _limesdr_swig.source_sptr___deref__(self)

    __swig_destroy__ = _limesdr_swig.delete_source_sptr
    __del__ = lambda self: None

    def make(self, serial, channel_mode, filename):
        """
        make(source_sptr self, std::string serial, int channel_mode, std::string const & filename) -> source_sptr

        Return a shared_ptr to a new instance of source.

        To avoid accidental use of raw pointers, source's constructor is private. limesdr::source::make is the public interface for creating new instances.

        Params: (serial, channel_mode, filename)
        """
        return _limesdr_swig.source_sptr_make(self, serial, channel_mode, filename)


    def set_center_freq(self, freq, chan=0):
        """
        set_center_freq(source_sptr self, double freq, size_t chan=0) -> double

        Set center frequency

        Params: (freq, chan)
        """
        return _limesdr_swig.source_sptr_set_center_freq(self, freq, chan)


    def set_antenna(self, antenna, channel=0):
        """
        set_antenna(source_sptr self, int antenna, int channel=0)

        Set which antenna is used

        Params: (antenna, channel)
        """
        return _limesdr_swig.source_sptr_set_antenna(self, antenna, channel)


    def set_nco(self, nco_freq, channel):
        """
        set_nco(source_sptr self, float nco_freq, int channel)

        Set NCO (numerically controlled oscillator). By selecting NCO frequency configure NCO. When NCO frequency is 0, NCO is off.

        Params: (nco_freq, channel)
        """
        return _limesdr_swig.source_sptr_set_nco(self, nco_freq, channel)


    def set_bandwidth(self, analog_bandw, channel=0):
        """
        set_bandwidth(source_sptr self, double analog_bandw, int channel=0) -> double

        Set analog filters.

        Params: (analog_bandw, channel)
        """
        return _limesdr_swig.source_sptr_set_bandwidth(self, analog_bandw, channel)


    def set_digital_filter(self, digital_bandw, channel):
        """
        set_digital_filter(source_sptr self, double digital_bandw, int channel)

        Set digital filters (GFIR).

        Params: (digital_bandw, channel)
        """
        return _limesdr_swig.source_sptr_set_digital_filter(self, digital_bandw, channel)


    def set_gain(self, gain_dB, channel=0):
        """
        set_gain(source_sptr self, unsigned int gain_dB, int channel=0) -> unsigned int

        Set the combined gain value in dB

        Params: (gain_dB, channel)
        """
        return _limesdr_swig.source_sptr_set_gain(self, gain_dB, channel)


    def set_sample_rate(self, rate):
        """
        set_sample_rate(source_sptr self, double rate) -> double

        Set the same sample rate for both channels.

        Params: (rate)
        """
        return _limesdr_swig.source_sptr_set_sample_rate(self, rate)


    def set_oversampling(self, oversample):
        """
        set_oversampling(source_sptr self, int oversample)

        Set oversampling for both channels.

        Params: (oversample)
        """
        return _limesdr_swig.source_sptr_set_oversampling(self, oversample)


    def calibrate(self, bandw, channel=0):
        """
        calibrate(source_sptr self, double bandw, int channel=0)

        Perform device calibration.

        Params: (bandw, channel)
        """
        return _limesdr_swig.source_sptr_calibrate(self, bandw, channel)


    def set_buffer_size(self, size):
        """
        set_buffer_size(source_sptr self, uint32_t size)

        Set stream buffer size

        Params: (size)
        """
        return _limesdr_swig.source_sptr_set_buffer_size(self, size)


    def history(self):
        """history(source_sptr self) -> unsigned int"""
        return _limesdr_swig.source_sptr_history(self)


    def declare_sample_delay(self, *args):
        """
        declare_sample_delay(source_sptr self, int which, int delay)
        declare_sample_delay(source_sptr self, unsigned int delay)
        """
        return _limesdr_swig.source_sptr_declare_sample_delay(self, *args)


    def sample_delay(self, which):
        """sample_delay(source_sptr self, int which) -> unsigned int"""
        return _limesdr_swig.source_sptr_sample_delay(self, which)


    def output_multiple(self):
        """output_multiple(source_sptr self) -> int"""
        return _limesdr_swig.source_sptr_output_multiple(self)


    def relative_rate(self):
        """relative_rate(source_sptr self) -> double"""
        return _limesdr_swig.source_sptr_relative_rate(self)


    def start(self):
        """start(source_sptr self) -> bool"""
        return _limesdr_swig.source_sptr_start(self)


    def stop(self):
        """stop(source_sptr self) -> bool"""
        return _limesdr_swig.source_sptr_stop(self)


    def nitems_read(self, which_input):
        """nitems_read(source_sptr self, unsigned int which_input) -> uint64_t"""
        return _limesdr_swig.source_sptr_nitems_read(self, which_input)


    def nitems_written(self, which_output):
        """nitems_written(source_sptr self, unsigned int which_output) -> uint64_t"""
        return _limesdr_swig.source_sptr_nitems_written(self, which_output)


    def max_noutput_items(self):
        """max_noutput_items(source_sptr self) -> int"""
        return _limesdr_swig.source_sptr_max_noutput_items(self)


    def set_max_noutput_items(self, m):
        """set_max_noutput_items(source_sptr self, int m)"""
        return _limesdr_swig.source_sptr_set_max_noutput_items(self, m)


    def unset_max_noutput_items(self):
        """unset_max_noutput_items(source_sptr self)"""
        return _limesdr_swig.source_sptr_unset_max_noutput_items(self)


    def is_set_max_noutput_items(self):
        """is_set_max_noutput_items(source_sptr self) -> bool"""
        return _limesdr_swig.source_sptr_is_set_max_noutput_items(self)


    def set_min_noutput_items(self, m):
        """set_min_noutput_items(source_sptr self, int m)"""
        return _limesdr_swig.source_sptr_set_min_noutput_items(self, m)


    def min_noutput_items(self):
        """min_noutput_items(source_sptr self) -> int"""
        return _limesdr_swig.source_sptr_min_noutput_items(self)


    def max_output_buffer(self, i):
        """max_output_buffer(source_sptr self, int i) -> long"""
        return _limesdr_swig.source_sptr_max_output_buffer(self, i)


    def set_max_output_buffer(self, *args):
        """
        set_max_output_buffer(source_sptr self, long max_output_buffer)
        set_max_output_buffer(source_sptr self, int port, long max_output_buffer)
        """
        return _limesdr_swig.source_sptr_set_max_output_buffer(self, *args)


    def min_output_buffer(self, i):
        """min_output_buffer(source_sptr self, int i) -> long"""
        return _limesdr_swig.source_sptr_min_output_buffer(self, i)


    def set_min_output_buffer(self, *args):
        """
        set_min_output_buffer(source_sptr self, long min_output_buffer)
        set_min_output_buffer(source_sptr self, int port, long min_output_buffer)
        """
        return _limesdr_swig.source_sptr_set_min_output_buffer(self, *args)


    def pc_noutput_items(self):
        """pc_noutput_items(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_noutput_items(self)


    def pc_noutput_items_avg(self):
        """pc_noutput_items_avg(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_noutput_items_avg(self)


    def pc_noutput_items_var(self):
        """pc_noutput_items_var(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_noutput_items_var(self)


    def pc_nproduced(self):
        """pc_nproduced(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_nproduced(self)


    def pc_nproduced_avg(self):
        """pc_nproduced_avg(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_nproduced_avg(self)


    def pc_nproduced_var(self):
        """pc_nproduced_var(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_nproduced_var(self)


    def pc_input_buffers_full(self, *args):
        """
        pc_input_buffers_full(source_sptr self, int which) -> float
        pc_input_buffers_full(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_input_buffers_full(self, *args)


    def pc_input_buffers_full_avg(self, *args):
        """
        pc_input_buffers_full_avg(source_sptr self, int which) -> float
        pc_input_buffers_full_avg(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_input_buffers_full_avg(self, *args)


    def pc_input_buffers_full_var(self, *args):
        """
        pc_input_buffers_full_var(source_sptr self, int which) -> float
        pc_input_buffers_full_var(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_input_buffers_full_var(self, *args)


    def pc_output_buffers_full(self, *args):
        """
        pc_output_buffers_full(source_sptr self, int which) -> float
        pc_output_buffers_full(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_output_buffers_full(self, *args)


    def pc_output_buffers_full_avg(self, *args):
        """
        pc_output_buffers_full_avg(source_sptr self, int which) -> float
        pc_output_buffers_full_avg(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_output_buffers_full_avg(self, *args)


    def pc_output_buffers_full_var(self, *args):
        """
        pc_output_buffers_full_var(source_sptr self, int which) -> float
        pc_output_buffers_full_var(source_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.source_sptr_pc_output_buffers_full_var(self, *args)


    def pc_work_time(self):
        """pc_work_time(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_work_time(self)


    def pc_work_time_avg(self):
        """pc_work_time_avg(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_work_time_avg(self)


    def pc_work_time_var(self):
        """pc_work_time_var(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_work_time_var(self)


    def pc_work_time_total(self):
        """pc_work_time_total(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_work_time_total(self)


    def pc_throughput_avg(self):
        """pc_throughput_avg(source_sptr self) -> float"""
        return _limesdr_swig.source_sptr_pc_throughput_avg(self)


    def set_processor_affinity(self, mask):
        """set_processor_affinity(source_sptr self, std::vector< int,std::allocator< int > > const & mask)"""
        return _limesdr_swig.source_sptr_set_processor_affinity(self, mask)


    def unset_processor_affinity(self):
        """unset_processor_affinity(source_sptr self)"""
        return _limesdr_swig.source_sptr_unset_processor_affinity(self)


    def processor_affinity(self):
        """processor_affinity(source_sptr self) -> std::vector< int,std::allocator< int > >"""
        return _limesdr_swig.source_sptr_processor_affinity(self)


    def active_thread_priority(self):
        """active_thread_priority(source_sptr self) -> int"""
        return _limesdr_swig.source_sptr_active_thread_priority(self)


    def thread_priority(self):
        """thread_priority(source_sptr self) -> int"""
        return _limesdr_swig.source_sptr_thread_priority(self)


    def set_thread_priority(self, priority):
        """set_thread_priority(source_sptr self, int priority) -> int"""
        return _limesdr_swig.source_sptr_set_thread_priority(self, priority)


    def name(self):
        """name(source_sptr self) -> std::string"""
        return _limesdr_swig.source_sptr_name(self)


    def symbol_name(self):
        """symbol_name(source_sptr self) -> std::string"""
        return _limesdr_swig.source_sptr_symbol_name(self)


    def input_signature(self):
        """input_signature(source_sptr self) -> io_signature_sptr"""
        return _limesdr_swig.source_sptr_input_signature(self)


    def output_signature(self):
        """output_signature(source_sptr self) -> io_signature_sptr"""
        return _limesdr_swig.source_sptr_output_signature(self)


    def unique_id(self):
        """unique_id(source_sptr self) -> long"""
        return _limesdr_swig.source_sptr_unique_id(self)


    def to_basic_block(self):
        """to_basic_block(source_sptr self) -> basic_block_sptr"""
        return _limesdr_swig.source_sptr_to_basic_block(self)


    def check_topology(self, ninputs, noutputs):
        """check_topology(source_sptr self, int ninputs, int noutputs) -> bool"""
        return _limesdr_swig.source_sptr_check_topology(self, ninputs, noutputs)


    def alias(self):
        """alias(source_sptr self) -> std::string"""
        return _limesdr_swig.source_sptr_alias(self)


    def set_block_alias(self, name):
        """set_block_alias(source_sptr self, std::string name)"""
        return _limesdr_swig.source_sptr_set_block_alias(self, name)


    def _post(self, which_port, msg):
        """_post(source_sptr self, swig_int_ptr which_port, swig_int_ptr msg)"""
        return _limesdr_swig.source_sptr__post(self, which_port, msg)


    def message_ports_in(self):
        """message_ports_in(source_sptr self) -> swig_int_ptr"""
        return _limesdr_swig.source_sptr_message_ports_in(self)


    def message_ports_out(self):
        """message_ports_out(source_sptr self) -> swig_int_ptr"""
        return _limesdr_swig.source_sptr_message_ports_out(self)


    def message_subscribers(self, which_port):
        """message_subscribers(source_sptr self, swig_int_ptr which_port) -> swig_int_ptr"""
        return _limesdr_swig.source_sptr_message_subscribers(self, which_port)

source_sptr_swigregister = _limesdr_swig.source_sptr_swigregister
source_sptr_swigregister(source_sptr)


source_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
source = source.make;

class sink(object):
    """Proxy of C++ gr::limesdr::sink class."""

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def make(serial, channel_mode, filename, length_tag_name):
        """
        make(std::string serial, int channel_mode, std::string const & filename, std::string const & length_tag_name) -> sink_sptr

        Return a shared_ptr to a new instance of sink.

        To avoid accidental use of raw pointers, sink's constructor is private. limesdr::sink::make is the public interface for creating new instances.

        Params: (serial, channel_mode, filename, length_tag_name)
        """
        return _limesdr_swig.sink_make(serial, channel_mode, filename, length_tag_name)

    make = staticmethod(make)

    def set_center_freq(self, freq, chan=0):
        """
        set_center_freq(sink self, double freq, size_t chan=0) -> double

        Set center frequency

        Params: (freq, chan)
        """
        return _limesdr_swig.sink_set_center_freq(self, freq, chan)


    def set_antenna(self, antenna, channel=0):
        """
        set_antenna(sink self, int antenna, int channel=0)

        Set which antenna is used

        Params: (antenna, channel)
        """
        return _limesdr_swig.sink_set_antenna(self, antenna, channel)


    def set_nco(self, nco_freq, channel):
        """
        set_nco(sink self, float nco_freq, int channel)

        Set NCO (numerically controlled oscillator). By selecting NCO frequency configure NCO. When NCO frequency is 0, NCO is off.

        Params: (nco_freq, channel)
        """
        return _limesdr_swig.sink_set_nco(self, nco_freq, channel)


    def set_bandwidth(self, analog_bandw, channel=0):
        """
        set_bandwidth(sink self, double analog_bandw, int channel=0) -> double

        Set analog filters.

        Params: (analog_bandw, channel)
        """
        return _limesdr_swig.sink_set_bandwidth(self, analog_bandw, channel)


    def set_digital_filter(self, digital_bandw, channel):
        """
        set_digital_filter(sink self, double digital_bandw, int channel)

        Set digital filters (GFIR).

        Params: (digital_bandw, channel)
        """
        return _limesdr_swig.sink_set_digital_filter(self, digital_bandw, channel)


    def set_gain(self, gain_dB, channel=0):
        """
        set_gain(sink self, unsigned int gain_dB, int channel=0) -> unsigned int

        Set the combined gain value in dB

        Params: (gain_dB, channel)
        """
        return _limesdr_swig.sink_set_gain(self, gain_dB, channel)


    def set_sample_rate(self, rate):
        """
        set_sample_rate(sink self, double rate) -> double

        Set the same sample rate for both channels.

        Params: (rate)
        """
        return _limesdr_swig.sink_set_sample_rate(self, rate)


    def set_oversampling(self, oversample):
        """
        set_oversampling(sink self, int oversample)

        Set oversampling for both channels.

        Params: (oversample)
        """
        return _limesdr_swig.sink_set_oversampling(self, oversample)


    def calibrate(self, bandw, channel=0):
        """
        calibrate(sink self, double bandw, int channel=0)

        Perform device calibration.

        Params: (bandw, channel)
        """
        return _limesdr_swig.sink_calibrate(self, bandw, channel)


    def set_buffer_size(self, size):
        """
        set_buffer_size(sink self, uint32_t size)

        Set stream buffer size

        Params: (size)
        """
        return _limesdr_swig.sink_set_buffer_size(self, size)

    __swig_destroy__ = _limesdr_swig.delete_sink
    __del__ = lambda self: None
sink_swigregister = _limesdr_swig.sink_swigregister
sink_swigregister(sink)

def sink_make(serial, channel_mode, filename, length_tag_name):
    """
    sink_make(std::string serial, int channel_mode, std::string const & filename, std::string const & length_tag_name) -> sink_sptr

    Return a shared_ptr to a new instance of sink.

    To avoid accidental use of raw pointers, sink's constructor is private. limesdr::sink::make is the public interface for creating new instances.

    Params: (serial, channel_mode, filename, length_tag_name)
    """
    return _limesdr_swig.sink_make(serial, channel_mode, filename, length_tag_name)

class sink_sptr(object):
    """Proxy of C++ boost::shared_ptr<(gr::limesdr::sink)> class."""

    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(boost::shared_ptr<(gr::limesdr::sink)> self) -> sink_sptr
        __init__(boost::shared_ptr<(gr::limesdr::sink)> self, sink p) -> sink_sptr
        """
        this = _limesdr_swig.new_sink_sptr(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __deref__(self):
        """__deref__(sink_sptr self) -> sink"""
        return _limesdr_swig.sink_sptr___deref__(self)

    __swig_destroy__ = _limesdr_swig.delete_sink_sptr
    __del__ = lambda self: None

    def make(self, serial, channel_mode, filename, length_tag_name):
        """
        make(sink_sptr self, std::string serial, int channel_mode, std::string const & filename, std::string const & length_tag_name) -> sink_sptr

        Return a shared_ptr to a new instance of sink.

        To avoid accidental use of raw pointers, sink's constructor is private. limesdr::sink::make is the public interface for creating new instances.

        Params: (serial, channel_mode, filename, length_tag_name)
        """
        return _limesdr_swig.sink_sptr_make(self, serial, channel_mode, filename, length_tag_name)


    def set_center_freq(self, freq, chan=0):
        """
        set_center_freq(sink_sptr self, double freq, size_t chan=0) -> double

        Set center frequency

        Params: (freq, chan)
        """
        return _limesdr_swig.sink_sptr_set_center_freq(self, freq, chan)


    def set_antenna(self, antenna, channel=0):
        """
        set_antenna(sink_sptr self, int antenna, int channel=0)

        Set which antenna is used

        Params: (antenna, channel)
        """
        return _limesdr_swig.sink_sptr_set_antenna(self, antenna, channel)


    def set_nco(self, nco_freq, channel):
        """
        set_nco(sink_sptr self, float nco_freq, int channel)

        Set NCO (numerically controlled oscillator). By selecting NCO frequency configure NCO. When NCO frequency is 0, NCO is off.

        Params: (nco_freq, channel)
        """
        return _limesdr_swig.sink_sptr_set_nco(self, nco_freq, channel)


    def set_bandwidth(self, analog_bandw, channel=0):
        """
        set_bandwidth(sink_sptr self, double analog_bandw, int channel=0) -> double

        Set analog filters.

        Params: (analog_bandw, channel)
        """
        return _limesdr_swig.sink_sptr_set_bandwidth(self, analog_bandw, channel)


    def set_digital_filter(self, digital_bandw, channel):
        """
        set_digital_filter(sink_sptr self, double digital_bandw, int channel)

        Set digital filters (GFIR).

        Params: (digital_bandw, channel)
        """
        return _limesdr_swig.sink_sptr_set_digital_filter(self, digital_bandw, channel)


    def set_gain(self, gain_dB, channel=0):
        """
        set_gain(sink_sptr self, unsigned int gain_dB, int channel=0) -> unsigned int

        Set the combined gain value in dB

        Params: (gain_dB, channel)
        """
        return _limesdr_swig.sink_sptr_set_gain(self, gain_dB, channel)


    def set_sample_rate(self, rate):
        """
        set_sample_rate(sink_sptr self, double rate) -> double

        Set the same sample rate for both channels.

        Params: (rate)
        """
        return _limesdr_swig.sink_sptr_set_sample_rate(self, rate)


    def set_oversampling(self, oversample):
        """
        set_oversampling(sink_sptr self, int oversample)

        Set oversampling for both channels.

        Params: (oversample)
        """
        return _limesdr_swig.sink_sptr_set_oversampling(self, oversample)


    def calibrate(self, bandw, channel=0):
        """
        calibrate(sink_sptr self, double bandw, int channel=0)

        Perform device calibration.

        Params: (bandw, channel)
        """
        return _limesdr_swig.sink_sptr_calibrate(self, bandw, channel)


    def set_buffer_size(self, size):
        """
        set_buffer_size(sink_sptr self, uint32_t size)

        Set stream buffer size

        Params: (size)
        """
        return _limesdr_swig.sink_sptr_set_buffer_size(self, size)


    def history(self):
        """history(sink_sptr self) -> unsigned int"""
        return _limesdr_swig.sink_sptr_history(self)


    def declare_sample_delay(self, *args):
        """
        declare_sample_delay(sink_sptr self, int which, int delay)
        declare_sample_delay(sink_sptr self, unsigned int delay)
        """
        return _limesdr_swig.sink_sptr_declare_sample_delay(self, *args)


    def sample_delay(self, which):
        """sample_delay(sink_sptr self, int which) -> unsigned int"""
        return _limesdr_swig.sink_sptr_sample_delay(self, which)


    def output_multiple(self):
        """output_multiple(sink_sptr self) -> int"""
        return _limesdr_swig.sink_sptr_output_multiple(self)


    def relative_rate(self):
        """relative_rate(sink_sptr self) -> double"""
        return _limesdr_swig.sink_sptr_relative_rate(self)


    def start(self):
        """start(sink_sptr self) -> bool"""
        return _limesdr_swig.sink_sptr_start(self)


    def stop(self):
        """stop(sink_sptr self) -> bool"""
        return _limesdr_swig.sink_sptr_stop(self)


    def nitems_read(self, which_input):
        """nitems_read(sink_sptr self, unsigned int which_input) -> uint64_t"""
        return _limesdr_swig.sink_sptr_nitems_read(self, which_input)


    def nitems_written(self, which_output):
        """nitems_written(sink_sptr self, unsigned int which_output) -> uint64_t"""
        return _limesdr_swig.sink_sptr_nitems_written(self, which_output)


    def max_noutput_items(self):
        """max_noutput_items(sink_sptr self) -> int"""
        return _limesdr_swig.sink_sptr_max_noutput_items(self)


    def set_max_noutput_items(self, m):
        """set_max_noutput_items(sink_sptr self, int m)"""
        return _limesdr_swig.sink_sptr_set_max_noutput_items(self, m)


    def unset_max_noutput_items(self):
        """unset_max_noutput_items(sink_sptr self)"""
        return _limesdr_swig.sink_sptr_unset_max_noutput_items(self)


    def is_set_max_noutput_items(self):
        """is_set_max_noutput_items(sink_sptr self) -> bool"""
        return _limesdr_swig.sink_sptr_is_set_max_noutput_items(self)


    def set_min_noutput_items(self, m):
        """set_min_noutput_items(sink_sptr self, int m)"""
        return _limesdr_swig.sink_sptr_set_min_noutput_items(self, m)


    def min_noutput_items(self):
        """min_noutput_items(sink_sptr self) -> int"""
        return _limesdr_swig.sink_sptr_min_noutput_items(self)


    def max_output_buffer(self, i):
        """max_output_buffer(sink_sptr self, int i) -> long"""
        return _limesdr_swig.sink_sptr_max_output_buffer(self, i)


    def set_max_output_buffer(self, *args):
        """
        set_max_output_buffer(sink_sptr self, long max_output_buffer)
        set_max_output_buffer(sink_sptr self, int port, long max_output_buffer)
        """
        return _limesdr_swig.sink_sptr_set_max_output_buffer(self, *args)


    def min_output_buffer(self, i):
        """min_output_buffer(sink_sptr self, int i) -> long"""
        return _limesdr_swig.sink_sptr_min_output_buffer(self, i)


    def set_min_output_buffer(self, *args):
        """
        set_min_output_buffer(sink_sptr self, long min_output_buffer)
        set_min_output_buffer(sink_sptr self, int port, long min_output_buffer)
        """
        return _limesdr_swig.sink_sptr_set_min_output_buffer(self, *args)


    def pc_noutput_items(self):
        """pc_noutput_items(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_noutput_items(self)


    def pc_noutput_items_avg(self):
        """pc_noutput_items_avg(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_noutput_items_avg(self)


    def pc_noutput_items_var(self):
        """pc_noutput_items_var(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_noutput_items_var(self)


    def pc_nproduced(self):
        """pc_nproduced(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_nproduced(self)


    def pc_nproduced_avg(self):
        """pc_nproduced_avg(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_nproduced_avg(self)


    def pc_nproduced_var(self):
        """pc_nproduced_var(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_nproduced_var(self)


    def pc_input_buffers_full(self, *args):
        """
        pc_input_buffers_full(sink_sptr self, int which) -> float
        pc_input_buffers_full(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_input_buffers_full(self, *args)


    def pc_input_buffers_full_avg(self, *args):
        """
        pc_input_buffers_full_avg(sink_sptr self, int which) -> float
        pc_input_buffers_full_avg(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_input_buffers_full_avg(self, *args)


    def pc_input_buffers_full_var(self, *args):
        """
        pc_input_buffers_full_var(sink_sptr self, int which) -> float
        pc_input_buffers_full_var(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_input_buffers_full_var(self, *args)


    def pc_output_buffers_full(self, *args):
        """
        pc_output_buffers_full(sink_sptr self, int which) -> float
        pc_output_buffers_full(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_output_buffers_full(self, *args)


    def pc_output_buffers_full_avg(self, *args):
        """
        pc_output_buffers_full_avg(sink_sptr self, int which) -> float
        pc_output_buffers_full_avg(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_output_buffers_full_avg(self, *args)


    def pc_output_buffers_full_var(self, *args):
        """
        pc_output_buffers_full_var(sink_sptr self, int which) -> float
        pc_output_buffers_full_var(sink_sptr self) -> pmt_vector_float
        """
        return _limesdr_swig.sink_sptr_pc_output_buffers_full_var(self, *args)


    def pc_work_time(self):
        """pc_work_time(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_work_time(self)


    def pc_work_time_avg(self):
        """pc_work_time_avg(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_work_time_avg(self)


    def pc_work_time_var(self):
        """pc_work_time_var(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_work_time_var(self)


    def pc_work_time_total(self):
        """pc_work_time_total(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_work_time_total(self)


    def pc_throughput_avg(self):
        """pc_throughput_avg(sink_sptr self) -> float"""
        return _limesdr_swig.sink_sptr_pc_throughput_avg(self)


    def set_processor_affinity(self, mask):
        """set_processor_affinity(sink_sptr self, std::vector< int,std::allocator< int > > const & mask)"""
        return _limesdr_swig.sink_sptr_set_processor_affinity(self, mask)


    def unset_processor_affinity(self):
        """unset_processor_affinity(sink_sptr self)"""
        return _limesdr_swig.sink_sptr_unset_processor_affinity(self)


    def processor_affinity(self):
        """processor_affinity(sink_sptr self) -> std::vector< int,std::allocator< int > >"""
        return _limesdr_swig.sink_sptr_processor_affinity(self)


    def active_thread_priority(self):
        """active_thread_priority(sink_sptr self) -> int"""
        return _limesdr_swig.sink_sptr_active_thread_priority(self)


    def thread_priority(self):
        """thread_priority(sink_sptr self) -> int"""
        return _limesdr_swig.sink_sptr_thread_priority(self)


    def set_thread_priority(self, priority):
        """set_thread_priority(sink_sptr self, int priority) -> int"""
        return _limesdr_swig.sink_sptr_set_thread_priority(self, priority)


    def name(self):
        """name(sink_sptr self) -> std::string"""
        return _limesdr_swig.sink_sptr_name(self)


    def symbol_name(self):
        """symbol_name(sink_sptr self) -> std::string"""
        return _limesdr_swig.sink_sptr_symbol_name(self)


    def input_signature(self):
        """input_signature(sink_sptr self) -> io_signature_sptr"""
        return _limesdr_swig.sink_sptr_input_signature(self)


    def output_signature(self):
        """output_signature(sink_sptr self) -> io_signature_sptr"""
        return _limesdr_swig.sink_sptr_output_signature(self)


    def unique_id(self):
        """unique_id(sink_sptr self) -> long"""
        return _limesdr_swig.sink_sptr_unique_id(self)


    def to_basic_block(self):
        """to_basic_block(sink_sptr self) -> basic_block_sptr"""
        return _limesdr_swig.sink_sptr_to_basic_block(self)


    def check_topology(self, ninputs, noutputs):
        """check_topology(sink_sptr self, int ninputs, int noutputs) -> bool"""
        return _limesdr_swig.sink_sptr_check_topology(self, ninputs, noutputs)


    def alias(self):
        """alias(sink_sptr self) -> std::string"""
        return _limesdr_swig.sink_sptr_alias(self)


    def set_block_alias(self, name):
        """set_block_alias(sink_sptr self, std::string name)"""
        return _limesdr_swig.sink_sptr_set_block_alias(self, name)


    def _post(self, which_port, msg):
        """_post(sink_sptr self, swig_int_ptr which_port, swig_int_ptr msg)"""
        return _limesdr_swig.sink_sptr__post(self, which_port, msg)


    def message_ports_in(self):
        """message_ports_in(sink_sptr self) -> swig_int_ptr"""
        return _limesdr_swig.sink_sptr_message_ports_in(self)


    def message_ports_out(self):
        """message_ports_out(sink_sptr self) -> swig_int_ptr"""
        return _limesdr_swig.sink_sptr_message_ports_out(self)


    def message_subscribers(self, which_port):
        """message_subscribers(sink_sptr self, swig_int_ptr which_port) -> swig_int_ptr"""
        return _limesdr_swig.sink_sptr_message_subscribers(self, which_port)

sink_sptr_swigregister = _limesdr_swig.sink_sptr_swigregister
sink_sptr_swigregister(sink_sptr)


sink_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id())
sink = sink.make;



