BW3-Core/plugin/template_plugin.py

81 lines
2 KiB
Python
Raw Permalink Normal View History

2018-01-14 16:28:11 +01:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
r"""!
2018-01-14 16:28:11 +01:00
____ ____ ______ __ __ __ _____
/ __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ /
/ __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ <
/ /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ /
/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/
German BOS Information Script
by Bastian Schroll
2021-01-08 20:35:00 +01:00
@file: template_plugin.py
2018-01-14 16:28:11 +01:00
@date: 14.01.2018
@author: Bastian Schroll
@description: Template Plugin File
"""
import logging
2019-10-28 21:20:05 +01:00
from plugin.pluginBase import PluginBase
2018-01-14 16:28:11 +01:00
# ###################### #
# Custom plugin includes #
# ###################### #
2018-01-14 16:28:11 +01:00
logging.debug("- %s loaded", __name__)
2019-10-28 21:27:15 +01:00
class BoswatchPlugin(PluginBase):
r"""!Description of the Plugin"""
def __init__(self, config):
r"""!Do not change anything here!"""
2019-03-09 12:19:09 +01:00
super().__init__(__name__, config) # you can access the config class on 'self.config'
2018-01-14 16:28:11 +01:00
def onLoad(self):
r"""!Called by import of the plugin
2020-02-19 14:20:56 +01:00
Remove if not implemented"""
2018-01-14 20:06:31 +01:00
pass
2018-01-14 16:28:11 +01:00
def setup(self):
r"""!Called before alarm
2020-02-19 14:20:56 +01:00
Remove if not implemented"""
2018-01-14 20:06:31 +01:00
pass
def fms(self, bwPacket):
r"""!Called on FMS alarm
2018-01-14 20:06:31 +01:00
2020-02-19 14:20:56 +01:00
@param bwPacket: bwPacket instance
Remove if not implemented"""
2018-01-14 20:06:31 +01:00
pass
2018-01-14 16:28:11 +01:00
2018-01-14 20:06:31 +01:00
def pocsag(self, bwPacket):
r"""!Called on POCSAG alarm
2018-01-14 16:28:11 +01:00
2020-02-19 14:20:56 +01:00
@param bwPacket: bwPacket instance
Remove if not implemented"""
2018-01-14 20:06:31 +01:00
pass
def zvei(self, bwPacket):
r"""!Called on ZVEI alarm
2018-01-14 20:06:31 +01:00
2020-02-19 14:20:56 +01:00
@param bwPacket: bwPacket instance
Remove if not implemented"""
2019-10-25 12:12:40 +02:00
pass
2018-02-22 08:28:02 +01:00
def msg(self, bwPacket):
r"""!Called on MSG packet
2018-02-22 08:28:02 +01:00
2020-02-19 14:20:56 +01:00
@param bwPacket: bwPacket instance
Remove if not implemented"""
2019-10-25 12:12:40 +02:00
pass
2018-01-14 16:28:11 +01:00
def teardown(self):
r"""!Called after alarm
2020-02-19 14:20:56 +01:00
Remove if not implemented"""
2018-01-14 20:06:31 +01:00
pass
2018-01-14 16:28:11 +01:00
def onUnload(self):
r"""!Called by destruction of the plugin
2020-02-19 14:20:56 +01:00
Remove if not implemented"""
2018-01-14 16:28:11 +01:00
pass