X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fcxx%2Finclude%2Flibsigrokcxx%2Flibsigrokcxx.hpp;h=3bebdd234936c246b7a559ad3569ce509d79629a;hb=HEAD;hp=7467d6cf38af8e34e83d4500fef9fdbfd6380891;hpb=6c6dd7328a83f7beb7280d57cc5e255294aba2fc;p=libsigrok.git diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index 7467d6cf..3bebdd23 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -78,6 +78,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS #include G_GNUC_END_IGNORE_DEPRECATIONS +#include #include #include #include @@ -273,7 +274,7 @@ public: std::shared_ptr create_user_device( std::string vendor, std::string model, std::string version); /** Create a header packet. */ - std::shared_ptr create_header_packet(Glib::TimeVal start_time); + std::shared_ptr create_header_packet(Glib::DateTime start_time); /** Create a meta packet. */ std::shared_ptr create_meta_packet( std::map config); @@ -710,7 +711,7 @@ public: /* Feed version number. */ int feed_version() const; /* Start time of this session. */ - Glib::TimeVal start_time() const; + Glib::DateTime start_time() const; private: explicit Header(const struct sr_datafeed_header *structure); ~Header(); @@ -790,9 +791,22 @@ public: /** Samples are stored in big-endian order. */ bool is_bigendian() const; /** - * Number of significant digits after the decimal point if positive, - * or number of non-significant digits before the decimal point if negative - * (refers to the value we actually read on the wire). + * Number of significant digits after the decimal point, if positive. + * When negative, exponent with reversed polarity that is necessary to + * express the value with all digits without a decimal point. + * Refers to the value we actually read on the wire. + * + * Examples: + * + * | On the wire | Exponential notation | Exp. not. (normalized) | digits | + * |-------------|----------------------|------------------------|--------| + * | 12.34 MOhm | 1.234 * 10^7 Ohm | 1234 * 10^4 Ohm | -4 | + * | 1.2345 MOhm | 1.2345 * 10^6 Ohm | 12345 * 10^2 Ohm | -2 | + * | 123.4 kOhm | 1.234 * 10^5 Ohm | 1234 * 10^2 Ohm | -2 | + * | 1234 Ohm | 1.234 * 10^3 Ohm | 1234 * 10^0 Ohm | 0 | + * | 12.34 Ohm | 1.234 * 10^1 Ohm | 1234 * 10^-2 Ohm | 2 | + * | 0.0123 Ohm | 1.23 * 10^-2 Ohm | 123 * 10^-4 Ohm | 4 | + * | 1.234 pF | 1.234 * 10^-12 F | 1234 * 10^-15 F | 15 | */ int digits() const; /** TBD */