* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include "protocol.h"
#include <time.h>
#include <sys/timerfd.h>
sr_session_source_add_channel(sdi->session, devc->channel,
G_IO_IN | G_IO_ERR, 1000, bl_acme_receive_data, (void *)sdi);
- /* Send header packet to the session bus. */
std_session_send_df_header(sdi, LOG_PREFIX);
devc->start_time = g_get_monotonic_time();
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
- struct sr_datafeed_packet packet;
struct dev_context *devc;
(void)cb_data;
g_io_channel_unref(devc->channel);
devc->channel = NULL;
- /* Send last packet. */
- packet.type = SR_DF_END;
- sr_session_send(sdi, &packet);
+ std_session_send_df_end(sdi, LOG_PREFIX);
if (devc->samples_missed > 0)
- sr_warn("%d samples missed", devc->samples_missed);
+ sr_warn("%" PRIu64 " samples missed", devc->samples_missed);
return SR_OK;
}