bindings: Add Output::format()
authorMartin Ling <martin-git@earth.li>
Sun, 30 Dec 2018 03:01:21 +0000 (04:01 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Sun, 30 Dec 2018 13:10:13 +0000 (14:10 +0100)
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp

index 12ab2c2..8316b9b 100644 (file)
@@ -1661,6 +1661,11 @@ Output::~Output()
        check(sr_output_free(_structure));
 }
 
+shared_ptr<OutputFormat> Output::format()
+{
+       return _format;
+}
+
 string Output::receive(shared_ptr<Packet> packet)
 {
        GString *out;
index b8cae54..9fc5061 100644 (file)
@@ -1016,6 +1016,8 @@ public:
        /** Update output with data from the given packet.
         * @param packet Packet to handle. */
        string receive(shared_ptr<Packet> packet);
+       /** Output format in use for this output */
+       shared_ptr<OutputFormat> format();
 private:
        Output(shared_ptr<OutputFormat> format, shared_ptr<Device> device);
        Output(shared_ptr<OutputFormat> format,