mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2025-12-31 13:50:34 +01:00
Merge branch 'develop' into beta for release
Conflicts: install.sh
This commit is contained in:
commit
db82f91552
|
|
@ -13,15 +13,15 @@ before_script:
|
|||
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main"
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq wget python2.7
|
||||
# - wget https://raw.githubusercontent.com/thejockel/BOSWatch/develop/install.sh
|
||||
- wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/master/install.sh
|
||||
|
||||
- wget https://raw.githubusercontent.com/Schrolli91/BOSWatch/${TRAVIS_BRANCH}/install.sh
|
||||
- chmod +x install.sh
|
||||
- cat /etc/os-release
|
||||
- echo ${TRAVIS_BRANCH}
|
||||
- sudo ./install.sh -b ${TRAVIS_BRANCH} -r no
|
||||
- sudo ./install.sh -b ${TRAVIS_BRANCH}
|
||||
|
||||
env:
|
||||
- module=bash
|
||||
- module=base
|
||||
- module=mysql
|
||||
- module=httpRequest
|
||||
|
||||
|
|
|
|||
118
Konzept.md
Normal file
118
Konzept.md
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
# BOSWatch 3.0
|
||||
============
|
||||
|
||||
|
||||
Verpacken der Funktionalitäten in Klassen um OOP-Grundsätze zu erreichen.
|
||||
|
||||
|
||||
|
||||
## Dekodierung und Auswertung trennen.
|
||||
|
||||
### Client:
|
||||
- reine Dekodierung mittels rtl-fm und multimon
|
||||
- Keine Filter usw. nur die Dekoder, Daten verpacken, verschicken
|
||||
- per TCP Socket an den Server
|
||||
|
||||
### Server:
|
||||
- Empfängt die TCP Socket Pakete der einzelnen Clients
|
||||
- Durch doubleFiltering fallen doppelt eingehende Alarme der Clienten sowieso raus
|
||||
- Danach Filterung usw. dann call an die plugins
|
||||
|
||||
|
||||
|
||||
## Konfiguration:
|
||||
- Alle Einstellungen in INI File
|
||||
- Einziges Argument beim Start des Clienten ist der Name der INI (-v -q -t sollen auch bleiben)
|
||||
- So werden mehrere Sticks auf einem Rechner einfach möglich ohne BOSWatch Ordner kopieren zu müssen
|
||||
|
||||
### Client:
|
||||
|
||||
```
|
||||
[Server]
|
||||
IP = 127.0.0.1
|
||||
PORT = 23
|
||||
|
||||
[Client]
|
||||
Name = BOSWatch Client 1
|
||||
LogDir = log/
|
||||
|
||||
[Stick]
|
||||
device = 0
|
||||
Frequency = 85...M
|
||||
PPMError = 0
|
||||
Squelch = 0
|
||||
gain = 100
|
||||
|
||||
[Decoder]
|
||||
FMS = 0
|
||||
ZVEI = 0
|
||||
POC512 = 0
|
||||
POC1200 = 1
|
||||
POC2400 = 0
|
||||
```
|
||||
|
||||
### Server:
|
||||
```
|
||||
[Server]
|
||||
PORT = 23
|
||||
|
||||
[Filter]
|
||||
...
|
||||
|
||||
[Plugins]
|
||||
MySQL = 1
|
||||
template = 0
|
||||
...
|
||||
```
|
||||
|
||||
### Plugin:
|
||||
- Konfigurations Datei für Plugin mit in den Plugin Ordner
|
||||
- Plugin läd bei Bedarf seine Config selbst, die geht BOSWatch ja nichts an
|
||||
- Aktuell wird eine ewig lange Config geladen, obwohl 90% der Plugins nicht genutzt werden
|
||||
|
||||
|
||||
|
||||
## Filterung
|
||||
Ein Vernünftiges Filterkonzept sollte aufgestellt werden, welches bei POC, FMS und ZVEI gleichermaßen funktioniert
|
||||
und daher nicht 3 mal implementiert erden muss.
|
||||
|
||||
|
||||
|
||||
## Versions Überprüfung
|
||||
|
||||
über die LIB sched.py - https://docs.python.org/3/library/sched.html - können Zeitgesteuerte Events gestartet werden.
|
||||
Dies kann zur Überprüfung einer neuen Software version verwendet werden.
|
||||
information des Nutzers muss noch überlegt werden - evtl als "Alarm" absetzen über normalen Plugin weg.
|
||||
|
||||
|
||||
|
||||
## Code Dokumentation
|
||||
Dokumentiert werden sollten alle Funktion und Klassen in Doxygen gerechter Notation.
|
||||
Genaue Erklärung und Bennenung der Tags in der Doxygen Hilfe
|
||||
```
|
||||
class Hello:
|
||||
## @brief Short description.
|
||||
# Longer description.
|
||||
#
|
||||
# @param self
|
||||
# @param name Another Parameter
|
||||
# @return value Returns a Value
|
||||
|
||||
def __init__(self, name):
|
||||
## @brief Constructor
|
||||
# Longer description optinal.
|
||||
#
|
||||
# @param self
|
||||
# @param name Another Parameter
|
||||
dosomething(12)
|
||||
|
||||
def dosomething(self, x):
|
||||
## @brief Do something
|
||||
# Longer description for do something.
|
||||
#
|
||||
# @param self
|
||||
# @param x Another Parameter
|
||||
# @return value Returns a 0
|
||||
dosomethingelse
|
||||
return 0
|
||||
```
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
|beta|[](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=4213030)|[](https://travis-ci.org/Schrolli91/BOSWatch)|
|
||||
|develop|[](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[](https://travis-ci.org/Schrolli91/BOSWatch)|
|
||||
|
||||
|
||||
**Unterstützung gesucht**
|
||||
|
||||
Zur Weiterentwicklung des Programms benötigen wir Deine Mithilfe - bitte melde dich per Issue, wenn du Anwender in einem verschlüsselten POCSAG-Netz und im (legalen) Besitz des dazugehörigen Schlüssels bist.
|
||||
|
|
|
|||
|
|
@ -377,13 +377,13 @@ try:
|
|||
rawMmOut.close()
|
||||
else:
|
||||
logging.debug("start testing")
|
||||
testFile = open(globalVars.script_path+"/testdata/testdata.txt","r")
|
||||
testFile = open(globalVars.script_path+"/citest/testdata.txt","r")
|
||||
for testData in testFile:
|
||||
if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]):
|
||||
logging.info("Testdata: %s", testData.rstrip(' \t\n\r'))
|
||||
from includes import decoder
|
||||
decoder.decode(freqConverter.freqToHz(args.freq), testData)
|
||||
time.sleep(1)
|
||||
#time.sleep(1)
|
||||
logging.debug("test finished")
|
||||
|
||||
except KeyboardInterrupt:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
bospath=/opt/boswatch/
|
||||
bospath=/opt/boswatch
|
||||
|
||||
echo $module
|
||||
# ----------------------------------------------------------------------------------------------------------------------------------
|
||||
# base Tests
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ Global variables
|
|||
"""
|
||||
|
||||
# version info
|
||||
versionNr = "2.1"
|
||||
buildDate = "2016/11/20"
|
||||
versionNr = "2.2-beta"
|
||||
buildDate = "2016/02/23"
|
||||
|
||||
# Global variables
|
||||
config = 0
|
||||
|
|
|
|||
23
install.sh
23
install.sh
|
|
@ -6,11 +6,17 @@ function exitcodefunction {
|
|||
module=$3
|
||||
|
||||
if [ $errorcode -ne "0" ]; then
|
||||
echo "Action: $action on $module failed." >> $boswatchpath/install/setup_log.txt
|
||||
echo "Exitcode: $errorcode" >> $boswatchpath/install/setup_log.txt
|
||||
echo ""
|
||||
echo "Action: $action on $module failed."
|
||||
echo "Exitcode: $errorcode"
|
||||
echo ""
|
||||
echo " -> If you want to open an Issue at https://github.com/Schrolli91/BOSWatch/issues"
|
||||
echo " please post the logfile, located at $boswatchpath/install/setup_log.txt"
|
||||
exit 1
|
||||
else
|
||||
echo "Action: $action on $module ok."
|
||||
echo "Action: $action on $module ok." >> $boswatchpath/install/setup_log.txt
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +44,6 @@ echo "Caution, script does not install a webserver with PHP and MySQL"
|
|||
echo "So you have to make up manually if you want to use MySQL support"
|
||||
|
||||
boswatchpath=/opt/boswatch
|
||||
mkdir -p $boswatchpath
|
||||
reboot=false
|
||||
|
||||
for (( i=1; i<=$#; i=$i+2 )); do
|
||||
|
|
@ -47,24 +52,22 @@ for (( i=1; i<=$#; i=$i+2 )); do
|
|||
eval arg2=\$$t
|
||||
|
||||
case $arg in
|
||||
-r|--reboot)
|
||||
case $arg2 in
|
||||
y|yes) reboot=true ;;
|
||||
n|no) reboot=false ;;
|
||||
*) echo "Please use y/yes or n/no for reboot" ; exit 1 ;;
|
||||
esac ;;
|
||||
-r|--reboot) reboot=true ;;
|
||||
|
||||
-b|--branch)
|
||||
case $arg2 in
|
||||
dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;;
|
||||
beta) echo " !!! WARNING: you are using the BETA BRANCH !!! "; branch=beta ;;
|
||||
dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;;
|
||||
beta) echo " !!! WARNING: you are using the BETA BRANCH !!! "; branch=beta ;;
|
||||
*) branch=master ;;
|
||||
esac ;;
|
||||
|
||||
-p|--path) echo " !!! WARNING: you install BOSWATCH to alternative path !!! "; boswatchpath=$arg2 ;;
|
||||
|
||||
*) echo "Internal error!" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
mkdir -p $boswatchpath
|
||||
mkdir -p $boswatchpath/install
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ To actually use this script, put BOSWatch where you want (recommend `/usr/local/
|
|||
and make sure it is executable (e.g. `sudo chmod 755 boswatch.py`).
|
||||
Edit the init script accordingly. Copy it into /etc/init.d using e.g. `sudo cp boswatch.sh /etc/init.d`.
|
||||
Make sure the script is executable (chmod again) and make sure that it has UNIX line-endings.
|
||||
After creating this new daemon it's neccessary to do a `sudo systemctl daemon-reload` in order to make it findable.
|
||||
|
||||
At this point you should be able to start BOSWatchcd ~/srt using the command `sudo /etc/init.d/boswatch.sh start`,
|
||||
check its status with the `sudo /etc/init.d/boswatch.sh status` argument and stop it with `sudo /etc/init.d/boswatch.sh stop`.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
### END INIT INFO
|
||||
|
||||
# Change the next 3 lines to suit where you install your script and what you want to call it
|
||||
DIR=/usr/local/bin/BOSWatch
|
||||
DIR=/opt/boswatch/BOSWatch
|
||||
DAEMON=$DIR/boswatch.py
|
||||
DAEMON_NAME=boswatch
|
||||
|
||||
|
|
|
|||
7
testdata/rt_fm errors.txt
vendored
7
testdata/rt_fm errors.txt
vendored
|
|
@ -1,7 +0,0 @@
|
|||
Error Messages from RTL_FM
|
||||
|
||||
fprintf(stderr, "Signal caught, exiting!\n");
|
||||
fprintf(stderr, "Failed to open rtlsdr device #%d.\n", dongle.dev_index);
|
||||
fprintf(stderr, "Failed to open %s\n", output.filename);
|
||||
fprintf(stderr, "\nUser cancel, exiting...\n");
|
||||
fprintf(stderr, "\nLibrary error %d, exiting...\n", r);
|
||||
Loading…
Reference in a new issue