return shared_ptr<Packet>{new Packet{nullptr, packet}, default_delete<Packet>{}};
}
+shared_ptr<Packet> Context::create_end_packet()
+{
+ auto packet = g_new(struct sr_datafeed_packet, 1);
+ packet->type = SR_DF_END;
+ return shared_ptr<Packet>{new Packet{nullptr, packet},
+ default_delete<Packet>{}};
+}
+
shared_ptr<Session> Context::load_session(string filename)
{
return shared_ptr<Session>{
vector<shared_ptr<Channel> > channels,
const float *data_pointer, unsigned int num_samples, const Quantity *mq,
const Unit *unit, vector<const QuantityFlag *> mqflags);
+ /** Create an end packet. */
+ shared_ptr<Packet> create_end_packet();
/** Load a saved session.
* @param filename File name string. */
shared_ptr<Session> load_session(string filename);