-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from Schrolli91/new_version
Prepare for new Version
- Loading branch information
Showing
16 changed files
with
218 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,9 @@ | |
*.log | ||
config.ini | ||
log/ | ||
|
||
\.project | ||
|
||
\.pydevproject | ||
|
||
\.settings/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ sudo: required | |
branches: | ||
only: | ||
- master | ||
- beta | ||
- develop | ||
|
||
before_script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
multicastAlarm is the function to enable BOSwatch to work in networks that optimise the transmission of POCSAG telegrams | ||
@author: Fabian Kessler | ||
@requires: Configuration has to be set in the config.ini | ||
""" | ||
|
||
import logging # Global logger | ||
import time # timestamp for multicastAlarm | ||
|
||
from includes import globalVars # Global variables | ||
|
||
# | ||
# ListStructure [0..n] = (Data, TimeStamp) | ||
# | ||
multiList = [] | ||
|
||
def newEntrymultiList(data): | ||
""" | ||
add entry to multi alarm list and remove old entries | ||
@return: nothing | ||
""" | ||
global multiList | ||
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 = [] | ||
logging.debug("delimiter RIC received - buffer cleared") | ||
else: | ||
multiList.append([data, timestamp]) | ||
logging.debug("Added %s to multiList", data['ric']) | ||
# check for old entries in multiList | ||
for (xData, xTimestamp) in multiList[:]: | ||
if xTimestamp < timestamp-globalVars.config.getint("multicastAlarm", "multicastAlarm_ignore_time"): | ||
multiList.remove([xData, xTimestamp]) | ||
logging.debug("RIC %s removed - %s sec. older than current timestamp", xData['ric'], xTimestamp-timestamp) | ||
|
||
|
||
def multicastAlarmExec(freq, data): | ||
""" | ||
call alarmHandler for every entry in multiList | ||
@return: nothing | ||
""" | ||
logging.debug("data before update from multiList: %s", data) | ||
for (xData, _) in multiList: | ||
#update data with values multiList | ||
data['ric'] = xData['ric'] | ||
data['function'] = xData['function'] | ||
data['functionChar'] = xData['functionChar'] | ||
data['description'] = xData['description'] | ||
logging.debug("data after update from multiList: %s", data) | ||
try: | ||
from includes import alarmHandler | ||
alarmHandler.processAlarmHandler("POC", freq, data) | ||
except: | ||
logging.error("processing alarm failed") | ||
logging.debug("processing alarm failed", exc_info=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.