From: Martin Ling Date: Sun, 30 Dec 2018 03:01:21 +0000 (+0100) Subject: bindings: Add Output::format() X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ea7a83a437e60168d396fac20ff1eda04a06d100;p=libsigrok.git bindings: Add Output::format() --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 12ab2c29..8316b9bd 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1661,6 +1661,11 @@ Output::~Output() check(sr_output_free(_structure)); } +shared_ptr Output::format() +{ + return _format; +} + string Output::receive(shared_ptr packet) { GString *out; diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index b8cae545..9fc5061c 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -1016,6 +1016,8 @@ public: /** Update output with data from the given packet. * @param packet Packet to handle. */ string receive(shared_ptr packet); + /** Output format in use for this output */ + shared_ptr format(); private: Output(shared_ptr format, shared_ptr device); Output(shared_ptr format,