X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Flibsigrok-internal.h;h=589d0a4d00eb1e3b1533e4ae4c1c2ab5d435dbfd;hb=b6b4f03e404e06430eca810ad2bf7ccc84262b6e;hp=0af77db6c33e4dc41cd898b996631a058395a72c;hpb=c01bf34ca264b268fee2e71ab918c71d28dc3018;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 0af77db6..589d0a4d 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -401,6 +401,18 @@ struct sr_input_module { */ int (*end) (struct sr_input *in); + /** + * Reset the input module's input handling structures. + * + * Causes the input module to reset its internal state so that we can + * re-send the input data from the beginning without having to + * re-create the entire input module. + * + * @retval SR_OK Success. + * @retval other Negative error code. + */ + int (*reset) (struct sr_input *in); + /** * This function is called after the caller is finished using * the input module, and can be used to free any internal @@ -1258,4 +1270,23 @@ SR_PRIV gboolean sr_kern_packet_valid(const uint8_t *buf); SR_PRIV int sr_kern_parse(const uint8_t *buf, float *floatval, struct sr_datafeed_analog_old *analog, void *info); +/*--- sw_limits.c -----------------------------------------------------------*/ + +struct sr_sw_limits { + uint64_t limit_samples; + uint64_t limit_msec; + uint64_t samples_read; + uint64_t start_time; +}; + +SR_PRIV int sr_sw_limits_config_get(struct sr_sw_limits *limits, uint32_t key, + GVariant **data); +SR_PRIV int sr_sw_limits_config_set(struct sr_sw_limits *limits, uint32_t key, + GVariant *data); +SR_PRIV void sr_sw_limits_acquisition_start(struct sr_sw_limits *limits); +SR_PRIV gboolean sr_sw_limits_check(struct sr_sw_limits *limits); +SR_PRIV void sr_sw_limits_update_samples_read(struct sr_sw_limits *limits, + uint64_t samples_read); +SR_PRIV void sr_sw_limits_init(struct sr_sw_limits *limits); + #endif