exopy.measurement.monitors.text_monitor.plugin module

Plugin managing the preferences of the TextMonitor such as rules.

class exopy.measurement.monitors.text_monitor.plugin.TextMonitorPlugin[source]

Bases: exopy.utils.plugin_tools.HasPreferencesPlugin

Plugin managing the preferences of the TextMonitor.

default_rules

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

rule_types

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

rules

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

start()[source]

Start the plugin life-cycle.

stop()[source]

Stop the plugin and clear all ressources.

build_rule(name_or_config)[source]

Build rule from a dict.

Parameters

name_or_config (unicode|dict) – Name of the rule to build or dict containing the infos to build the rule from scratch.

Returns

rule – New rule properly initialized.

Return type

BaseRule | None

get_rule_type(rule_type_id)[source]

Access the class corresponding to a given id.

get_rule_view(rule)[source]

CReate a view corresponding to the given object.

save_rule(rule)[source]

Add a rule present on a plugin to the saved rules.

create_monitor(default=False)[source]

Create a new monitor.

Parameters

default (bool, optionnal) – Whether or not to add the default rules to the new monitor.

Returns

monitor – New text monitor.

Return type

TextMonitor