]> sigrok.org Git - libsigrok.git/commitdiff
bindings: Add Output::format()
authorMartin Ling <redacted>
Sun, 30 Dec 2018 03:01:21 +0000 (04:01 +0100)
committerUwe Hermann <redacted>
Sun, 30 Dec 2018 13:10:13 +0000 (14:10 +0100)
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp

index 12ab2c294abb6d62ae31acdfb74c60b5ead2e58b..8316b9bd1944c7a3c37ab77f111f50f6a154fcf3 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 b8cae54518aa302496a64162a11a05a482fc73a5..9fc5061c07e16fb596ebcebaf5d8a823ef0916ad 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,