mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
add msg mode to plugin
This commit is contained in:
parent
b1cc765607
commit
48ecdd666c
|
|
@ -92,6 +92,9 @@ class Plugin:
|
|||
if bwPacket.get("mode") is "zvei":
|
||||
logging.debug("[%s] zvei()", self._pluginName)
|
||||
self.zvei(bwPacket)
|
||||
if bwPacket.get("mode") is "msg":
|
||||
logging.debug("[%s] msg()", self._pluginName)
|
||||
self.msg(bwPacket)
|
||||
except:
|
||||
self._alarmErrorCount += 1
|
||||
logging.exception("[%s] alarm error", self._pluginName)
|
||||
|
|
@ -161,6 +164,13 @@ class Plugin:
|
|||
@param bwPacket: bwPacket instance"""
|
||||
logging.warning("ZVEI not implemented in %s", self._pluginName)
|
||||
|
||||
def msg(self, bwPacket):
|
||||
"""!Called on MSG packet
|
||||
Must be inherit
|
||||
|
||||
@param bwPacket: bwPacket instance"""
|
||||
logging.warning("MSG not implemented in %s", self._pluginName)
|
||||
|
||||
def teardown(self):
|
||||
"""!Called after alarm
|
||||
Must be inherit"""
|
||||
|
|
|
|||
|
|
@ -51,7 +51,11 @@ class BoswatchPlugin(Plugin):
|
|||
"""!Called on ZVEI alarm
|
||||
|
||||
@param bwPacket: bwPacket instance"""
|
||||
pass
|
||||
|
||||
def msg(self, bwPacket):
|
||||
"""!Called on MSG packet
|
||||
|
||||
@param bwPacket: bwPacket instance"""
|
||||
|
||||
def teardown(self):
|
||||
"""!Called after alarm"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue