Skip to content

Commit

Permalink
Merge pull request #370 from f-kessler/develop
Browse files Browse the repository at this point in the history
Clear buffer after multicastAlarm_ric received
  • Loading branch information
Schrolli91 authored Aug 16, 2018
2 parents 95262e0 + cf7e8ea commit 9ad6da6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
##### Changed
- multicastAlarm Plugin - RICs die von multicastAlarm genutzt werden, müssen nicht mehr in der config bei allow_ric bzw. filter_range_start/filter_range_end berücksichtigt werden. [#357](https://github.com/Schrolli91/BOSWatch/pull/357)
- FFAgent Plugin - Debug Logging für die alarmHeaders eingebaut zwecks Troubleshooting [#354](https://github.com/Schrolli91/BOSWatch/pull/354)
- multicastAlarm Plugin - Buffer nach jedem Alarm löschen - erlaubt in kombination mit "doubleFilter_check_msg" die Verwendung in Netzen, die zwischen multicastAlarm RICs auch normale Alarme senden. #370(https://github.com/Schrolli91/BOSWatch/pull/370)
##### Deprecated
##### Removed
##### Fixed
Expand Down
2 changes: 1 addition & 1 deletion config/config.template.ini
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ multicastAlarm = 0
# time limit for alarms that do not belong to the multicastAlarm sequence in seconds
multicastAlarm_ignore_time = 15

# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence) (can be empty)
# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence). Needs to be empty if multicastAlarms are interrupted by normal alarms.
multicastAlarm_delimiter_ric =

# multicastAlarm RIC that is used to send the text message
Expand Down
4 changes: 3 additions & 1 deletion includes/multicastAlarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def newEntrymultiList(data):
timestamp = int(time.time())
# multicastAlarm processing if enabled and delimiter RIC has been received
if data['ric'] == globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric"):
multiList = []
del multiList[:]
logging.debug("delimiter RIC received - buffer cleared")
else:
multiList.append([data, timestamp])
Expand Down Expand Up @@ -61,3 +61,5 @@ def multicastAlarmExec(freq, data):
except:
logging.error("processing alarm failed")
logging.debug("processing alarm failed", exc_info=True)
del multiList[:]
logging.debug("multicastAlarm finished - buffer cleared")

0 comments on commit 9ad6da6

Please sign in to comment.