]> sigrok.org Git - pulseview.git/blobdiff - pv/data/signalbase.hpp
SignalBase: Prevent race condition for memory access
[pulseview.git] / pv / data / signalbase.hpp
index f646a40dcc24f7255822b6f4a9584a4f721c92b6..89bfc25298369bf1431e3fa05f325bba1abd0e74 100644 (file)
@@ -112,6 +112,9 @@ public:
                DynamicPreset = 0  ///< Conversion uses calculated values
        };
 
+       static const QColor AnalogSignalColors[8];
+       static const QColor LogicSignalColors[10];
+
 private:
        static const int ColorBGAlpha;
        static const uint64_t ConversionBlockSize;
@@ -128,6 +131,11 @@ public:
         */
        shared_ptr<sigrok::Channel> channel() const;
 
+       /**
+        * Returns whether this channel is generated or a channel associated with the device.
+        */
+       bool is_generated() const;
+
        /**
         * Returns enabled status of this channel.
         */
@@ -334,7 +342,6 @@ public:
 #endif
 
        virtual void save_settings(QSettings &settings) const;
-
        virtual void restore_settings(QSettings &settings);
 
        void start_conversion(bool delayed_start=false);
@@ -346,10 +353,10 @@ private:
        uint8_t convert_a2l_schmitt_trigger(float lo_thr, float hi_thr,
                float value, uint8_t &state);
 
-       void convert_single_segment_range(AnalogSegment *asegment,
-               LogicSegment *lsegment, uint64_t start_sample, uint64_t end_sample);
-       void convert_single_segment(pv::data::AnalogSegment *asegment,
-               pv::data::LogicSegment *lsegment);
+       void convert_single_segment_range(shared_ptr<AnalogSegment> asegment,
+               shared_ptr<LogicSegment> lsegment, uint64_t start_sample, uint64_t end_sample);
+       void convert_single_segment(shared_ptr<AnalogSegment> asegment,
+               shared_ptr<LogicSegment> lsegment);
        void conversion_thread_proc();
 
        void stop_conversion();