bindings: Add new Context::create_end_packet() method.
This commit is contained in:
parent
62bd644f55
commit
a9ed2eb069
|
@ -377,6 +377,14 @@ shared_ptr<Packet> Context::create_analog_packet(
|
||||||
return shared_ptr<Packet>{new Packet{nullptr, packet}, default_delete<Packet>{}};
|
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)
|
shared_ptr<Session> Context::load_session(string filename)
|
||||||
{
|
{
|
||||||
return shared_ptr<Session>{
|
return shared_ptr<Session>{
|
||||||
|
|
|
@ -287,6 +287,8 @@ public:
|
||||||
vector<shared_ptr<Channel> > channels,
|
vector<shared_ptr<Channel> > channels,
|
||||||
const float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
const float *data_pointer, unsigned int num_samples, const Quantity *mq,
|
||||||
const Unit *unit, vector<const QuantityFlag *> mqflags);
|
const Unit *unit, vector<const QuantityFlag *> mqflags);
|
||||||
|
/** Create an end packet. */
|
||||||
|
shared_ptr<Packet> create_end_packet();
|
||||||
/** Load a saved session.
|
/** Load a saved session.
|
||||||
* @param filename File name string. */
|
* @param filename File name string. */
|
||||||
shared_ptr<Session> load_session(string filename);
|
shared_ptr<Session> load_session(string filename);
|
||||||
|
|
Loading…
Reference in New Issue