]> sigrok.org Git - pulseview.git/blobdiff - pv/data/signalbase.hpp
Use getter for the conversion type instead of a local copy
[pulseview.git] / pv / data / signalbase.hpp
index 468a2032812cba3b7611f1d6cf5dcfa718fe0bc5..a2d23244f0e1d007aad79543f909fce796c8ab0c 100644 (file)
@@ -55,11 +55,11 @@ class SignalBase : public QObject
 
 public:
        enum ChannelType {
-               AnalogChannel = 1,
-               LogicChannel,
-               DecodeChannel,
-               A2LChannel,  // Analog converted to logic, joint representation
-               MathChannel
+               AnalogChannel = 1, ///< Analog data
+               LogicChannel,  ///< Logic data
+               DecodeChannel, ///< Protocol Decoder channel using libsigrokdecode
+               A2LChannel,    ///< Analog converted to logic, joint representation
+               MathChannel    ///< Virtual channel generated by math operations
        };
 
        enum ConversionType {
@@ -157,6 +157,11 @@ public:
         */
        shared_ptr<pv::data::Logic> logic_data() const;
 
+       /**
+        * Queries the kind of conversion performed on this channel.
+        */
+       ConversionType get_conversion_type() const;
+
        /**
         * Changes the kind of conversion performed on this channel.
         */
@@ -209,7 +214,7 @@ protected:
        ChannelType channel_type_;
        shared_ptr<pv::data::SignalData> data_;
        shared_ptr<pv::data::SignalData> converted_data_;
-       int conversion_type_;
+       ConversionType conversion_type_;
 
        std::thread conversion_thread_;
        atomic<bool> conversion_interrupt_;