| |
- plugins.base_plugin.MaukaPlugin(builtins.object)
-
- SemiF47Plugin
class SemiF47Plugin(plugins.base_plugin.MaukaPlugin) |
|
SemiF47Plugin(conf: config.MaukaConfig, exit_event)
This plugin subscribes to RMS windowed voltage and classifies Semi F47 violations. |
|
- Method resolution order:
- SemiF47Plugin
- plugins.base_plugin.MaukaPlugin
- builtins.object
Methods defined here:
- __init__(self, conf: config.MaukaConfig, exit_event)
- Initializes the base plugin
:param conf: Configuration dictionary
:param subscriptions: List of subscriptions this plugin should subscribe to
:param name: The name of this plugin
- on_message(self, topic, mauka_message)
- This gets called when a subscriber receives a message from a topic they are subscribed too.
This should be implemented in all subclasses.
:param topic: The topic this message is associated with
:param mauka_message: The message contents
Methods inherited from plugins.base_plugin.MaukaPlugin:
- debug(self, msg: str)
- Prints a debug message using this classes logger and formatted the plugin name.
:param msg: Message to print to debug.
- get_mongo_client(self)
- Returns an OPQ mongo client
:return: An OPQ mongo client
- get_status(self) -> str
- Return the status of this plugin
:return: The status of this plugin
- handle_self_message(self, message: str)
- Handles a self-message
:param message: The message to handle
- is_self_message(self, topic: str) -> bool
- Determines if this is a message directed at this plugin. I.e. the topic is the name of the plugin.
:param topic: Topic of the message
:return: If this is a self message or not
- produce(self, topic: str, mauka_message: mauka_pb2.MaukaMessage)
- Produces a message with a given topic to the system
:param topic: The topic to produce this message to
:param mauka_message: The message to produce
- run_plugin(self)
- This is the run loop for this plugin process
- start_heartbeat(self)
- This is a recursive function that acts as a heartbeat.
This function calls itself over-and-over on a timer to produce heartbeat messages. The interval can be
configured is the configuration file.
Data descriptors inherited from plugins.base_plugin.MaukaPlugin:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from plugins.base_plugin.MaukaPlugin:
- NAME = 'MaukaPlugin'
| |