exopy.measurement.monitors.base_monitor module¶
Base classes for all monitors.
-
class
exopy.measurement.monitors.base_monitor.
BaseMonitor
[source]¶ Bases:
exopy.measurement.base_tool.BaseMeasureTool
Base class for all monitors.
-
monitored_entries
¶ List of database entries which should be observed
-
start
()[source]¶ Start the activity of the monitor.
When this method is called the monitor is already observing the engine and connected to its view.
-
stop
()[source]¶ Stop the activity of the monitor.
When this method is invoked the monitor is no longer observing the engine.
-
refresh_monitored_entries
(entries=None)[source]¶ Refresh all the entries of the monitor.
- Parameters
entries (
dict[unicode]
,optionnal
) – Dict of the database entries to consider, if empty the already known entries will be used. Entries should be specified using their full path.
-
handle_database_entries_change
(news)[source]¶ Handle a modification of the database entries.
- Parameters
news (
tuple|list
) – Modification passed as a tuple (‘added’, path, value) for creation, as (‘renamed’, old, new, value) in case of renaming, (‘removed’, old) in case of deletion or as a list of such tuples.
-
handle_database_node_change
(news)[source]¶ Handle a modification of the database nodes.
- Parameters
news (
tuple|list
) – Modification passed as a tuple (‘added’, path, name, node) for creation or as (‘renamed’, path, old, new) in case of renaming of the related node, as (‘removed’, path, old) in case of deletion or as a list of such tuples.
-
process_news
(news)[source]¶ Handle news received from the engine.
This method will be connected to the news signal of the engine when the measurement is started. The value received will be a tuple containing the name of the updated database entry and its new value.
This method is susceptible to be called in a thread that is not the GUI thread. Any update of members that are connected to the view should be done using enaml.application.deferred_call/schedule.
-
-
class
exopy.measurement.monitors.base_monitor.
BaseMonitorItem
(parent=None, **kwargs)[source]¶ Bases:
enaml.widgets.dock_item.DockItem
Base class for the view associated with a monitor.
-
monitor
¶ Reference to the monitor driving this view. This is susceptible to change during the lifetime of the widget.
-
float_default
¶ Should this item be made floating by default.
-
-
class
exopy.measurement.monitors.base_monitor.
Monitor
(parent=None, **kwargs)[source]¶ Bases:
exopy.measurement.base_tool.BaseToolDeclaration
A declarative class for defining a measurement monitor contribution.
Monitor object can be contributed as extensions child to the ‘monitors’ extension point of the ‘exopy.measurement’ plugin.