X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevinst.cpp;h=b28fce08269f4c3f238d01c8fd016e5aecb560ec;hp=4480c43fdb995234cb516cd1127ab632e4949ffb;hb=ab4e1fcb5fc453c811d25038f872f3326f8f846e;hpb=8283c116efc6af0a1adc583be38ab711aa9f2cbb diff --git a/pv/devinst.cpp b/pv/devinst.cpp index 4480c43f..b28fce08 100644 --- a/pv/devinst.cpp +++ b/pv/devinst.cpp @@ -106,4 +106,17 @@ void DevInst::enable_probe(const sr_probe *probe, bool enable) assert(0); } +uint64_t DevInst::get_sample_limit() +{ + uint64_t sample_limit; + GVariant* gvar = get_config(NULL, SR_CONF_LIMIT_SAMPLES); + if (gvar != NULL) { + sample_limit = g_variant_get_uint64(gvar); + g_variant_unref(gvar); + } else { + sample_limit = 0U; + } + return sample_limit; +} + } // pv