mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
Merge branch 'develop' into process_manager
This commit is contained in:
commit
0c6044072a
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -7,11 +7,11 @@
|
|||
# by Bastian Schroll
|
||||
|
||||
# virtual environment
|
||||
\.venv/
|
||||
\venv/
|
||||
|
||||
# generated files
|
||||
log/
|
||||
_docu/
|
||||
docu/docs/api/html
|
||||
docu/site/
|
||||
|
||||
# Logo Photoshop file
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,19 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo " ____ ____ ______ __ __ __ _____ "
|
||||
echo " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ / "
|
||||
echo " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ < "
|
||||
echo " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ / "
|
||||
echo " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/ "
|
||||
echo " German BOS Information Script "
|
||||
echo " by Bastian Schroll "
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo.
|
||||
echo Run 'count lines of code' ...
|
||||
echo.
|
||||
cd ..
|
||||
_bin\win\cloc_1_72\cloc-1.72.exe . --exclude-lang=XML --exclude-dir=_docu,_config,_info,doxygen.ini --by-file-by-lang
|
||||
echo.
|
||||
echo.
|
||||
pause
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo " ____ ____ ______ __ __ __ _____ "
|
||||
echo " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ / "
|
||||
echo " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ < "
|
||||
echo " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ / "
|
||||
echo " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/ "
|
||||
echo " German BOS Information Script "
|
||||
echo " by Bastian Schroll "
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo.
|
||||
echo Build Doxygen Documentation
|
||||
echo.
|
||||
cd ..
|
||||
_bin\win\doxygen\doxygen.exe _gen/doxygen.ini
|
||||
echo.
|
||||
echo.
|
||||
pause
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
@echo off
|
||||
|
||||
cd ..
|
||||
if not exist "log/" mkdir log
|
||||
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo " ____ ____ ______ __ __ __ _____ "
|
||||
echo " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ / "
|
||||
echo " / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ < "
|
||||
echo " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ / "
|
||||
echo " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/ "
|
||||
echo " German BOS Information Script "
|
||||
echo " by Bastian Schroll "
|
||||
echo " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
|
||||
echo.
|
||||
echo BOSWatch 3 Unittest framework
|
||||
echo.
|
||||
echo Which test? [ENTER] for all
|
||||
echo Or name a specific test test_[###].py
|
||||
echo.
|
||||
|
||||
set /p test=Testcase:
|
||||
if "%test%" == "" (
|
||||
goto start
|
||||
) else (
|
||||
goto start_spec
|
||||
)
|
||||
|
||||
:start
|
||||
echo.
|
||||
python -m pytest -c "_gen/pytest.ini"
|
||||
echo.
|
||||
echo --- Hit any key to repeat ---
|
||||
pause
|
||||
cls
|
||||
goto start
|
||||
|
||||
:start_spec
|
||||
echo.
|
||||
python -m pytest test/test_%test%.py -c "_gen/pytest.ini"
|
||||
echo.
|
||||
echo --- Hit any key to repeat ---
|
||||
pause
|
||||
cls
|
||||
goto start_spec
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
## Generatoren
|
||||
Im Verzeichnis `_gen/` befinden sich Windows Batch-Scripte um bestimmt Aufgaben zu
|
||||
vereinfachen und zu automatisieren.
|
||||
|
||||
---
|
||||
|
||||
### cloc.bat
|
||||
`CLoC` steht für Count Lines of Code
|
||||
|
||||
Dieses Tool erstellt einen kurzen Report über die Anzahl der Dateien, Codezeilen,
|
||||
Kommentare und Leerzeilen sortiert nach jeweiliger Programmiersprache
|
||||
|
||||
---
|
||||
|
||||
### doxygen.bat
|
||||
Doxygen ist ein Dokumentationswerkzeug zum automatischen dokumentieren von Quellcode.
|
||||
|
||||
Nach dem ausführen wird der gesamte Quellcode geparst und eine HTML Dokumentation
|
||||
im Verzeichnis `_docu/html/` angelegt.
|
||||
|
||||
Die Konfigurations Datei für Doxygen findet sich unter `_gen/doxygen.ini`
|
||||
|
||||
---
|
||||
|
||||
### pytest.bat
|
||||
pytest ist ein Python Testframework
|
||||
|
||||
Damit ist es möglich, automatisierte Tests laufen zu lassen.
|
||||
Vorher müssen die benötigten Plugins welche unter `_info/requirements.txt` gelistet sind
|
||||
mittels `pip` installiert werden.
|
||||
|
||||
Nach dem Start kann man mit einem Druck auf `[ENTER]` direkt alle bekannten Tests
|
||||
laufen lassen, oder durch die Eingabe eines spezifischen Tests auch nur diesen
|
||||
ausführen. Die Tests werden dabei in zufälliger Reihenfolge abgearbeitet um auch
|
||||
Fehler durch Abhängigkeiten voneinander zu erfassen.
|
||||
|
||||
Die Testfälle befinden sich im Unterordner `test/`
|
||||
Einzeltests werden durch Eingabe des Namens ohne `test_` und `.py` aufgerufen.
|
||||
Zum Beispiel `decoder` statt `test_decoder.py`
|
||||
|
||||
Zusätzlich werden alle Quellcode Dateien mittels eines PEP8 Parsers auf die Einhaltung
|
||||
der Code-Sytel Vorgaben von Python hin untersucht und etwaige Fehler ausgegeben.
|
||||
|
||||
Vom Testverlauf wird ein Logfile erstellt welches in `log/test.log` befindet.
|
||||
|
||||
Die Konfigurationsdatei für pytest findet sich unter `_gen/pytest.ini`
|
||||
117
_info/LICENSE
117
_info/LICENSE
|
|
@ -1,117 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
|
||||
|
|
@ -22,6 +22,9 @@ import time
|
|||
logging.debug("- %s loaded", __name__)
|
||||
|
||||
# todo check function and document + write an test
|
||||
# todo maybe can be a module instead of a native boswatch piece
|
||||
# idea: maybe this can be a class with a register_wildcard() method
|
||||
# so the list with wildcards can be modified by other modules
|
||||
|
||||
|
||||
def replaceWildcards(message, bwPacket):
|
||||
|
|
@ -38,6 +41,7 @@ def replaceWildcards(message, bwPacket):
|
|||
"{SVERS}": bwPacket.getField("serverVersion"),
|
||||
"{SDATE}": bwPacket.getField("serverBuildDate"),
|
||||
"{SBRCH}": bwPacket.getField("serverBranch"),
|
||||
|
||||
# client
|
||||
"{CNAME}": bwPacket.getField("clientName"),
|
||||
"{CIP}": bwPacket.getField("clientIP"),
|
||||
|
|
@ -50,8 +54,6 @@ def replaceWildcards(message, bwPacket):
|
|||
"{TIMES}": bwPacket.getField("mode"),
|
||||
"{FREQ}": bwPacket.getField("frequency"),
|
||||
"{MODE}": bwPacket.getField("mode"),
|
||||
"{DESCS}": bwPacket.getField("descriptionShort"),
|
||||
"{DESCL}": bwPacket.getField("descriptionLong"),
|
||||
|
||||
# fms wildcards
|
||||
"{FMS}": bwPacket.getField("fms"),
|
||||
|
|
|
|||
11
build_docu.sh
Normal file
11
build_docu.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "clean api documentation"
|
||||
rm -r docu/docs/api/html
|
||||
echo "generate api documentation"
|
||||
doxygen docu/doxygen.ini
|
||||
|
||||
echo "build documentation"
|
||||
source ./venv/bin/activate
|
||||
python3 -m mkdocs build -f docu/mkdocs.yml
|
||||
deactivate
|
||||
|
|
@ -108,6 +108,9 @@ except: # pragma: no cover
|
|||
logging.exception("BOSWatch interrupted by an error")
|
||||
finally: # pragma: no cover
|
||||
|
||||
logging.debug("Starting shutdown routine")
|
||||
del bwRoutMan
|
||||
|
||||
try:
|
||||
bwServer.stop()
|
||||
except NameError:
|
||||
|
|
|
|||
|
|
@ -1 +1,32 @@
|
|||
## Changelog
|
||||
# <center>Changelog</center>
|
||||
---
|
||||
|
||||
## Version [2.9.0] - date
|
||||
|
||||
Functions implemented in initial version:
|
||||
|
||||
- Multithreaded Server/Client infrastructure for alarm handling
|
||||
- Client can auto fetch connection information over bradocast from server
|
||||
- Easy configuration with YAML file for all components
|
||||
- Simple module and plugin system to extend functionality
|
||||
- Alarmpacket routing system for flexible chains of modules nd plugins
|
||||
|
||||
### Modules
|
||||
- Mode filter to filter at specific packet types such as FMS, POCSAG, ZVEI or MSG packets
|
||||
|
||||
### Filter
|
||||
|
||||
|
||||
---
|
||||
|
||||
Zum schreiben des Changelog's siehe: [http://keepachangelog.com/de/1.0.0/](http://keepachangelog.com/de/1.0.0/)
|
||||
|
||||
<!--
|
||||
## Version [#.#.#] - date
|
||||
### Added
|
||||
### Changed
|
||||
### Deprecated
|
||||
### Removed
|
||||
### Fixed
|
||||
### Security
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
## Konfiguration
|
||||
# <center>Konfiguration</center>
|
||||
|
||||
Die Konfiguration von BOSWatch 3 ist im YAML Format abgelegt und wird nachfolgend beschrieben.
|
||||
Immer wenn für eine Einstellung ein **Default** Wert angegeben ist, muss diese Einstellung nicht
|
||||
zwingend in die Konfiguration eingetragen werden.
|
||||
|
||||
## Client
|
||||
|
||||
### Client
|
||||
Nachfolgend alle Paramater der Client Konfiguration
|
||||
|
||||
#### `client:`
|
||||
---
|
||||
### `client:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|name|Name zur Identifizierung der Client Instanz||
|
||||
|inputSource|Art der zu nutzenden Input Quelle (aktuell nur `sdr`)||
|
||||
|useBroadcast|Verbindungsdaten per Broadcast beziehen|no|
|
||||
|useBroadcast|Verbindungsdaten per [Broadcast](information/broadcast.md) beziehen|no|
|
||||
|
||||
#### `server:`
|
||||
---
|
||||
### `server:`
|
||||
Der Abschnitt `server:` wird nur genutzt, wenn `useBroadcast: no` gesetzt ist.
|
||||
Ansonsten wird versucht die Verbindungsdaten per Broadcast Paket direkt vom Server zu beziehen.
|
||||
|
||||
|
|
@ -24,10 +24,18 @@ Ansonsten wird versucht die Verbindungsdaten per Broadcast Paket direkt vom Serv
|
|||
|ip|IP Adresse des Servers|127.0.0.1|
|
||||
|port|Port des Sever|8080|
|
||||
|
||||
#### `inputSource:`
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
server:
|
||||
ip: 10.10.10.2
|
||||
port: 9123
|
||||
```
|
||||
|
||||
---
|
||||
### `inputSource:`
|
||||
Aktuell gibt es nur `sdr:` als Input Quelle
|
||||
|
||||
##### `sdr:`
|
||||
#### `sdr:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|device|rtl_fm Device ID|0|
|
||||
|
|
@ -36,7 +44,7 @@ Aktuell gibt es nur `sdr:` als Input Quelle
|
|||
|squelch|Einstellung der Rauschsperre|0|
|
||||
|gain|Verstärkung des Eingangssignals|100|
|
||||
|
||||
Bsp:
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
inputSource:
|
||||
sdr:
|
||||
|
|
@ -47,7 +55,8 @@ inputSource:
|
|||
gain: 100
|
||||
```
|
||||
|
||||
#### `decoder:`
|
||||
---
|
||||
### `decoder:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|fms|FMS Decoder|no|
|
||||
|
|
@ -57,44 +66,47 @@ inputSource:
|
|||
|poc2400|POCSAG Decoder (Bitrate 2400)|no|
|
||||
|
||||
---
|
||||
### Server
|
||||
## Server
|
||||
Nachfolgend alle Paramater der Server Konfiguration
|
||||
|
||||
#### `server:`
|
||||
### `server:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|port|Port auf dem der Server lauscht|8080
|
||||
|name|Name zur Identifizierung der Server Instanz||
|
||||
|useBroadcast|Verbindungsdaten per Broadcast Server bereitstellen|no|
|
||||
|
||||
#### `alarmRouter:`
|
||||
---
|
||||
### `alarmRouter:`
|
||||
Enthält eine Liste der Router Namen, welche bei einem Alarm direkt gestartet werden sollen.
|
||||
|
||||
Bsp:
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
alarmRouter:
|
||||
- Name des Routers
|
||||
- ein weiter Router
|
||||
```
|
||||
|
||||
#### `router:`
|
||||
Mit den Routern kann der Verarbeitungsweg eines Alarm-Paketes festgelegt werden.
|
||||
Diese werden als Liste angegeben
|
||||
---
|
||||
### `router:`
|
||||
Mit den Routern kann der Verarbeitungsweg eines Alarm-Paketes festgelegt werden. DEs können beliebig viele Router in Form einer Liste angegeben werden.
|
||||
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|name|Name des Routers||
|
||||
|route|Definiten des Routenverlaufs
|
||||
|
||||
Die einzelnen Routen werden wie folgt definiert
|
||||
#### `route:`
|
||||
|
||||
Jeder Router kann eine beliebige Anzahl einzelner Routenpunkte enthalten. Diese werden innerhalb des Routers sequentiel abgearbeitet. Mögliche Typen der Routenpunkte sind dabei ein Modul, ein Plugin oder ein anderer Router. Sie werden ebenfalls in Form einer Liste definiert.
|
||||
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|type|Art des Routenpunktes (`module`, `plugin`, `router`)||
|
||||
|name|Zu ladende Resource (vollständige Liste siehe !!!TBD!!!)||
|
||||
|config|Konfigurationseinstellungen des Routenpunktes||
|
||||
|type|Art des Routenpunktes (module, plugin, router)||
|
||||
|name|Zu ladende Resource (Siehe weiter unten)||
|
||||
|config|Konfigurationseinstellungen des Routenpunktes (Siehe weiter unten)||
|
||||
|
||||
Bsp:
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
router:
|
||||
- name: Router 1
|
||||
|
|
@ -107,22 +119,8 @@ router:
|
|||
```
|
||||
|
||||
---
|
||||
### Module
|
||||
Nachfolgend alle Paramater der Modul Konfigurationen
|
||||
#### `filter.modeFilter`
|
||||
## Module/Plugins
|
||||
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|allowed|Liste der erlaubten Paket Typen (`fms`, `zvei`, `pocsag`, `msg`)||
|
||||
|
||||
Bsp:
|
||||
```yaml
|
||||
config:
|
||||
allowed:
|
||||
- fms
|
||||
- zvei
|
||||
```
|
||||
|
||||
---
|
||||
### Plugins
|
||||
Nachfolgend alle Paramater der Plugin Konfigurationen
|
||||
|allowed|Liste der erlaubten Paket Typen `fms` `zvei` `pocsag`||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
## Eigenes Modul/Plugin schreiben
|
||||
# <center>Eigenes Modul/Plugin schreiben</center>
|
||||
|
||||
Um ein eigenes Modul oder Plugin zu schreiben, sollte man sich am besten zuerst einmal das das `template` im entsprechenden Ordner ansehen. Dies kann als Vorlage für das eigene Modul oder Plugin genutzt werden.
|
||||
|
||||
### Informationen anpassen
|
||||
- Dateikopf anpassen
|
||||
---
|
||||
## Allgemeine Informationen
|
||||
Im ersten Schritt sollte eine Kopie des jeweiligen Templates (Modul oder Plugin) erstellt werden. Nun sollten im Dateikopf die Angaben angepasst werden.
|
||||
|
||||
### Benötigte Methoden überschreiben
|
||||
#### Modul
|
||||
---
|
||||
## Benötigte Methoden überschreiben
|
||||
### Modul
|
||||
Die Modul Basisklasse bietet einige Methoden, welche vom Modul überschrieben werden können.
|
||||
|
||||
- `onLoad()` wird direkt beim Import des Moduls ausgeführt
|
||||
- `doWork(bwPacket)` wird bei der Ausführung aufgerufen
|
||||
- `onUnload()` wird beim Zerstören der Plugin Modul zum Programmende ausgeführt
|
||||
|
||||
#### Plugin
|
||||
### Plugin
|
||||
Die Plugin Basisklasse bietet einige Methoden, welche vom Plugin überschrieben werden können.
|
||||
|
||||
- `onLoad()` wird direkt beim Import des Plugins ausgeführt
|
||||
|
|
@ -25,15 +27,16 @@ Die Plugin Basisklasse bietet einige Methoden, welche vom Plugin überschrieben
|
|||
- `teardown()` wird nach jeder Ausführung gerufen
|
||||
- `onUnload()` wird beim Zerstören der Plugin Instanz zum Programmende ausgeführt
|
||||
|
||||
### Konfiguration
|
||||
#### Konfiguration anlegen
|
||||
---
|
||||
## Konfiguration
|
||||
### Konfiguration anlegen
|
||||
Jedes Modul oder Plugin wird in einem Router folgendermaßen deklariert:
|
||||
```yaml
|
||||
- type: module # oder 'plugin'
|
||||
name: template_module # Name der Python Datei (ohne .py)
|
||||
config: # config-Sektion
|
||||
option1: value 1
|
||||
option2: value 2
|
||||
option2:
|
||||
underOption1: value 21
|
||||
underOption2: value 22
|
||||
list:
|
||||
|
|
@ -42,33 +45,43 @@ Jedes Modul oder Plugin wird in einem Router folgendermaßen deklariert:
|
|||
```
|
||||
Eine entsprechende Dokumentation der Parameter ist in der Dokumentation der [Konfiguration](../config.md) zu hinterlegen.
|
||||
|
||||
#### Konfiguration verwenden
|
||||
Wird der Instanz eine Konfiguration übergeben wird diese in `self.config` abgelegt und kann folgendermaßen abgerufen werden:
|
||||
### Konfiguration verwenden
|
||||
Wird der Instanz eine Konfiguration übergeben wird diese in `self.config` abgelegt und kann wie folgt abgerufen werden:
|
||||
(Dies Ergebnisse beziehen sich auf das Konfigurationsbeispiel oben)
|
||||
|
||||
- `self.config.get("option1")` einzelnes Feld
|
||||
> `value 1`
|
||||
- `self.config.get("option2", "underOption1")` verschachteltes Feld (beliebig viele möglich)
|
||||
- Einzelnes Feld auslesen
|
||||
`self.config.get("option1")`
|
||||
> liefert `value 1`
|
||||
|
||||
- Verschachteltes Feld auslesen (beliebige tiefe möglich)
|
||||
`self.config.get("option2", "underOption1")`
|
||||
> liefert `value 21`
|
||||
- `self.config.get("notSet", default="defValue")` Es kann ein Default Wert angegeben werden
|
||||
|
||||
- Es kann ein Default Wert angegeben werden
|
||||
`self.config.get("notSet", default="defValue")`
|
||||
> liefert `defValue`
|
||||
- `for item in self.config.get(FIELD):` Über Listen kann iteriert werden
|
||||
|
||||
- Über Listen kann einfach iteriert werden
|
||||
`for item in self.config.get(FIELD):`
|
||||
> liefert ein Element je Iteration - hier `list 1` und `list 2`
|
||||
|
||||
Wird ein End-Wert ausgelesen, wird dieser direkt zurück gegeben.
|
||||
Sollten weitere Unterelemente oder eine Liste exisitieren wird erneut ein Objekt der Klasse `Config()` zurück gegeben, auf welches wiederum nach obigem Schema zugegriffen werden kann.
|
||||
|
||||
### Arbeiten mit dem bwPacket
|
||||
An das Modul bzw. Plugin wird eine Instanz eines BOSWatch-Packet Objekts übergeben.
|
||||
|
||||
---
|
||||
## Arbeiten mit dem bwPacket
|
||||
An das Modul bzw. Plugin wird eine Instanz eines BOSWatch-Paket Objekts übergeben.
|
||||
Aus dieser kann mittels `bwPacket.get(FIELDNAME)` das entsprechende Feld ausgelesen werden.
|
||||
|
||||
Mittels `bwPacket.set(FIELDNAME, VALUE)` kann es hinzugefügt/modifiziert werden.
|
||||
|
||||
Mittels `bwPacket.set(FIELDNAME, VALUE)` kann ein Wert hinzugefügt oder modifiziert werden.
|
||||
Eine Auflistung der bereitgestellten Informationen findet sich im entsprechenden [BOSWatch Paket](packet.md) Dokumentation.
|
||||
|
||||
#### Zu beachten bei Module
|
||||
Module können Pakete beliebig verändern.
|
||||
Diese Änderungen werden im Router entsprechend weitergeleitet.
|
||||
Bitte beachten:
|
||||
|
||||
- Selbst vom Modul hinzugefügte Felder **müssen** in der Modul Dokumentation unter `Paket Modifikation` aufgeführt werden.
|
||||
- Sollte ein Modul oder Plugin Felder benutzen, welche in einem anderen Modul erstellt werden, **muss** dies im Punkt `Abhänigkeiten` des jeweiligen Moduls oder Plugins zu dokumentieren.
|
||||
|
||||
### Zu beachten bei Module
|
||||
Module können Pakete beliebig verändern. Diese Änderungen werden im Router entsprechend weitergeleitet.
|
||||
|
||||
Mögliche Rückgabewerte eines Moduls:
|
||||
|
||||
|
|
@ -76,11 +89,16 @@ Mögliche Rückgabewerte eines Moduls:
|
|||
- `return None` Router fährt mit dem unveränderten bwPacket fort (Input = Output)
|
||||
- `return False` Router stopt sofort die Ausführung (zB. in Filtern verwendet)
|
||||
|
||||
#### Zu beachten bei Plugins
|
||||
### Zu beachten bei Plugins
|
||||
Plugins geben keine Pakete mehr zurück. Sie fungieren ausschließlich als Endpunkt.
|
||||
Die Plugin Basisklasse liefert intern immer ein `None` an den Router zurück,
|
||||
was zur weiteren Ausführung des Routers führt.
|
||||
was zur weiteren Ausführung des Routers mit dem original Paket führt. Daher macht es in Plugins keinen Sinn ein Paket zu modifizieren.
|
||||
|
||||
### Wildcards parsen (Plugin only)
|
||||
---
|
||||
## Richtiges Logging
|
||||
tbd ...
|
||||
|
||||
---
|
||||
## Wildcards parsen (Plugin only)
|
||||
Das parsen der Wildcars funktioniert komfortabel über die interne Methode `self.parseWildcards(MSG)`.
|
||||
Die Platzhalter der Wildcards findet man in der [BOSWatch Paket](packet.md) Dokumentation.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
## BOSWatch Packet Format
|
||||
# <center>BOSWatch Packet Format</center>
|
||||
|
||||
Ein BOSWatch Datenpaket wird in einem Python Dict abgebildet. In der nachfolgenden Tabelle sind die genutzten Felder abgebildet.
|
||||
|
||||
### Allgemeine Informationen
|
||||
|
||||
---
|
||||
## Allgemeine Informationen
|
||||
|Feldname|FMS|POCSAG|ZVEI|MSG|Wildcard|Beschreibung|
|
||||
|--------|:-:|:----:|:--:|:-:|--------|------------|
|
||||
|serverName|X|X|X|X|`{SNAME}`|Name der BOSWatch Server Instanz|
|
||||
|
|
@ -19,11 +19,9 @@ Ein BOSWatch Datenpaket wird in einem Python Dict abgebildet. In der nachfolgend
|
|||
|timestamp|X|X|X|X|`{TIMES}`||
|
||||
|frequency|X|X|X|X|`{FREQ}`||
|
||||
|mode|X|X|X|X|`{MODE}`|(fms, pocsag, zvei, msg)|
|
||||
|descriptionShort|X|X|X||`{DESCS}`|Kann aus optinalem CSV File geladen werden|
|
||||
|descriptionLong|X|X|X||`{DESCL}`|Kann aus optinalem CSV File geladen werden|
|
||||
|
||||
### Speziell für POCSAG
|
||||
|
||||
---
|
||||
## Speziell für POCSAG
|
||||
|Feldname|FMS|POCSAG|ZVEI|MSG|Wildcard|Beschreibung|
|
||||
|--------|:-:|:----:|:--:|:-:|--------|------------|
|
||||
|bitrate||X|||`{BIT}`||
|
||||
|
|
@ -32,14 +30,14 @@ Ein BOSWatch Datenpaket wird in einem Python Dict abgebildet. In der nachfolgend
|
|||
|subricText||X|||`{SRICT}`|(a, b, c, d)|
|
||||
|message||X||X|`{MSG}`|Kann außerdem für ein Message Paket genutzt werden|
|
||||
|
||||
### Speziell für ZVEI
|
||||
|
||||
---
|
||||
## Speziell für ZVEI
|
||||
|Feldname|FMS|POCSAG|ZVEI|MSG|Wildcard|Beschreibung|
|
||||
|--------|:-:|:----:|:--:|:-:|--------|------------|
|
||||
|tone|||X||`{TONE}`|5-Ton Sequenz nach ZVEI|
|
||||
|
||||
### Speziell für FMS
|
||||
|
||||
---
|
||||
## Speziell für FMS
|
||||
|Feldname|FMS|POCSAG|ZVEI|MSG|Wildcard|Beschreibung|
|
||||
|--------|:-:|:----:|:--:|:-:|--------|------------|
|
||||
|fms|X||||`{FMS}`||
|
||||
|
|
@ -54,7 +52,8 @@ Ein BOSWatch Datenpaket wird in einem Python Dict abgebildet. In der nachfolgend
|
|||
|vehicle|X||||`{VEC}`||
|
||||
|tacticalInfo|X||||`{TACI}`|(I, II, III, IV)|
|
||||
|
||||
### Weitere Wildcards
|
||||
---
|
||||
## Weitere Wildcards
|
||||
- `{BR}` - Zeilenumbruch `\r\n`
|
||||
- `{LPAR}` - öffnende Klammer `(`
|
||||
- `{RPAR}` - schließende Klammer `)`
|
||||
|
|
|
|||
1
docu/docs/img/broadcast.drawio
Normal file
1
docu/docs/img/broadcast.drawio
Normal file
|
|
@ -0,0 +1 @@
|
|||
<mxfile modified="2019-09-20T09:41:55.464Z" host="www.draw.io" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" etag="JWctItHCjYtE4wFsANak" version="11.2.9" pages="1"><diagram id="dOOvDc07wKykiP7z2FdT" name="Page-1">7Vpbb9owFP41PK6K49x4bGm3adrWakzaeJpMYsBdEiNjCuzXzybO1VBCExo2WlVqfGyf2N93bnbTg4No/YGh+ewLDXDYM41g3YO3PdMEwLPFHynZJBIHOolgykigBuWCIfmDldBQ0iUJ8KI0kFMacjIvC30ax9jnJRlijK7KwyY0LL91jqZYEwx9FOrSHyTgs0TqmW4u/4jJdJa+GTj9pCdC6WC1k8UMBXRVEMG7HhwwSnnyFK0HOJTgpbgk897v6c0WxnDM60zof3K/umN0jwfcur8fGeNvv27eKS1PKFyqDavF8k2KAKPLOMBSidGDN6sZ4Xg4R77sXQnOhWzGo1C0gHickDAc0JCy7Vw48Xzs+0K+4Iz+xoWesWdbtlSoFoAZx+u9OwMZXsLQMI0wZxsxRE2wHQWxsjFLbWKVEwYsNWRWIMtMhUgZyTRTneMoHhSUR8BqnhbWAGFvshNWx/fweNIOrMA8N1gdDdYhZmKPGrhi07yMYBmpmMa4AqsSoZBMY9H0BUhCMbyREBIRD65VR0SCQL5mJ2VlUpN3pmFjyyONuYpxEvmkrZYNWqCs6gm2VZOyUzHmaYwNiNzLG2G7faxzwqChcYMDkRFVkzI+o1Mao/Aul1ZQfFxG8xQz0cynfKZ0rnB9xJxv1CC05LTMPV4T/lNqu7JVa1TouV2rF20bm7QRi+0XJsnmqNiXT9u2NrU5TwCRKDxPsgCNLpmPn0u3KoJxxKaYPzewv9tsGA4RJ0/llbRuBEAPtAz7T9uqZkr8M/Xe3by1Gk+B7XTtn0BD/80/2/PP9Ihx0D+dTv1TL9sXYsl8Ob9g1zSMjl0TWDorOA4uL2pWixpgu11T099Hjbw3kNcTiKPLIajqO4KxegS5J0tr+gH59dPa4VRTSGLmUVmsfo46mHogbJh61NQHSuRBLHPavnEFCz+WVzIRCCvUJ+tUSorXTrresq25/bKiJClrirZmlG2vwVWMsa+WvUjXr8bm7l3f1IsZPRbEwbW8zJW4hmixIP7RnqtK1rRIHZXK190la5uFpdGwsCzQY+9gJ5U1DQIV64B2hfU9zqorciuKjHrhozWvr3ED255RGUcYVZZCQCl/5IeixhnkoDGadk1jLPyf4s0YGxijdwbFzX97Zjdh3dBqNSycmqU5qEWkizuzawfD7s/senU4ZhQFPlqc6z8pTsALtM7twG7qdylnUhTmMbGz/J1eNB2OeJ3mb7N6Q+e4L8vf2lWf41wBr5//Oq+bzm3NNgPC5McnpvF98NDLPkYhNL7cGGLCzmOI+5ox5B87A6Q3oofPAHaXMUS7qbSsl8WQajDSFJ04aEC9/PNRnMcK8SSjhRFTFiGpbYU2lxM8ALBL7GTBpGBl2amtYfAQzfyju4Te/NNFePcX</diagram></mxfile>
|
||||
BIN
docu/docs/img/broadcast.png
Normal file
BIN
docu/docs/img/broadcast.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -1,11 +1,11 @@
|
|||
# BOSWatch 3
|
||||
|
||||

|
||||
# <center>BOSWatch 3</center>
|
||||
---
|
||||
|
||||
<center></center>
|
||||
|
||||
**Es wird darauf hingewiesen, dass für die Teilnahme am BOS-Funk nur nach den Technischen Richtlinien der BOS zugelassene Funkanlagen verwendet werden dürfen.**
|
||||
**Der BOS-Funk ist ein nichtöffentlicher mobiler Landfunk. Privatpersonen gehören nicht zum Kreis der berechtigten Funkteilnehmer.** _(Quelle: TR-BOS)_
|
||||
|
||||
***
|
||||
---
|
||||
|
||||
**The intercept of the German BOS radio is strictly prohibited and will be prosecuted. The use is only permitted for authorized personnel.**
|
||||
31
docu/docs/information/broadcast.md
Normal file
31
docu/docs/information/broadcast.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# <center>Broadcast Service</center>
|
||||
|
||||
Durch den Broadcast Service haben CLients die Möglichkeit, automatisch den Server zu finden und sich mit diesem zu verbinden. Dazu stellt der Server die benötigten Verbinungsinformationen per Broadcast Service bereit.
|
||||
|
||||
**Hinweis:** *Server und Client müssen sich im selben Subnetz befinden.*
|
||||
|
||||
---
|
||||
## Aufbau
|
||||
|
||||
Der Broadcast Service besteht aus 2 Teilen - einem Server und einem Clienten.
|
||||
Nachfolgend soll der Ablauf einer Verbunding des Clienen zum Server mittels des Broadcast Services erklärt werden.
|
||||
|
||||
<center></center>
|
||||
|
||||
---
|
||||
## Ablauf
|
||||
|
||||
### Schritt 1 - Broadcast Server starten
|
||||
Im ersten Schritt wird auf dem Server ein zusätzlicher Broadcast Server in einem seperaten Thread gestartet. Dieser lauscht auf einem festgelegten Port auf UDP Broadcast Pakete. Nun kann eine beliebige Anzahl von Clienten mittels des Broadcast Services die Verbinundgdaten des Server abfragen.
|
||||
|
||||
### Schritt 2 - Broadcast durch Clienten
|
||||
Die Client Applikation startet nun zur Abfrage der Verbindungsdaten einen BC Clienten und sendet dort auf dem festgelegten Port ein Paket per UDP Boradcast. Der Inhalt des Paketes ist das Magic-Word `<BW3-Request>` und wird von allen im selben Subnetz vohandenen Gegenstellen empfangen. Nun wird auf eine Antwort des Broadcast Server mit den Verbindungsdaten gewartet.
|
||||
|
||||
### Schritt 3 - Verbindungsdaten senden
|
||||
Wird nun ein Broadcast Paket empfangen, prüft der BC Server die Daten auf das Magic-Word `<BW3-Request>`. Wird dieses erkannt, liest der Server die Absender-IP-Addresse aus dem Paket aus und sendet eine Antwort direkt an diesen Clienten. Dieses Antwortpaket sieht folgendermaßen aus: `<BW3-Result>;8080` wobei die `8080` hier den normalen TCP Kommunikationsport des Server darstellt.
|
||||
|
||||
### Schritt 4 - Verbindungsdaten empfangen
|
||||
Nachdem der Client das direkt an ihn gerichtete Paket mit den Verbindungsdaten vom Server empfangen hat, prüft er auf das Magic-Word `<BW3-Result>`. Ist dieses enthalten wird der Port für die TCP Verbundindung aus dem Paket extrahiert. Außerdem wird die IP-Addresse des Absenders aus dem Paket gelesen.
|
||||
Anschließend stehen dem Clienten die Verbindungsdaten des Servers zur Verfügung und er kann sich per TCP über den angegebenen Port mit dem BOSWatch Server verbindden um seine Alarmierungs-Pakete zu versenden.
|
||||
|
||||
Da der Broadcast Server in einem eigenen Thread, unabhängig vom Hauptprogram läuft, können ganz einfach weitere Clienten per Broadcast Service die Verbindungsdaten des Servers abrufen.
|
||||
34
docu/docs/modul/mode_filter.md
Normal file
34
docu/docs/modul/mode_filter.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# <center>Mode Filter</center>
|
||||
---
|
||||
|
||||
## Beschreibung
|
||||
Mit diesem Modul ist es Möglich, die Pakete auf bestimmte Modes (FMS, POCSAG, ZVEI) zu Filtern. Je nach Konfiguration werden Pakete eines bestimmten Modes im aktuellen Router weitergeleitet oder verworfen.
|
||||
|
||||
## Resource
|
||||
`filter.modeFilter`
|
||||
|
||||
## Konfiguration
|
||||
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|allowed|Liste der erlaubten Paket Typen `fms` `zvei` `pocsag` `msg`||
|
||||
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
- type: module
|
||||
name: filter.modeFilter
|
||||
config:
|
||||
allowed:
|
||||
- fms
|
||||
- pocsag
|
||||
```
|
||||
|
||||
---
|
||||
## Abhängigkeiten
|
||||
|
||||
- keine
|
||||
|
||||
---
|
||||
## Paket Modifikationen
|
||||
|
||||
- keine
|
||||
4
docu/docs/tbd.md
Normal file
4
docu/docs/tbd.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# <center>To be done ...</center>
|
||||
---
|
||||
|
||||
Hier existiert noch kein Inhalt, gerne kannst du uns aber Helfen die Dokumentation zu vervollständigen.
|
||||
|
|
@ -58,7 +58,7 @@ PROJECT_LOGO =
|
|||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = _docu
|
||||
OUTPUT_DIRECTORY = docu/docs/api/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
|
|
@ -92,6 +92,7 @@ ALLOW_UNICODE_NAMES = NO
|
|||
# The default value is: English.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
#German
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
|
|
@ -875,7 +876,9 @@ RECURSIVE = YES
|
|||
|
||||
EXCLUDE = bw_client.py \
|
||||
bw_server.py \
|
||||
_info/FileHead.template.py
|
||||
FileHead.template.py \
|
||||
venv \
|
||||
docu
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
|
|
@ -1,18 +1,36 @@
|
|||
site_name: BOSWatch3 Core
|
||||
site_author: Bastian Schroll & BW3 Dev team
|
||||
|
||||
repo_url: https://github.com/BOSWatch/BW3-Core
|
||||
edit_uri: edit/develop/docu/docs/
|
||||
|
||||
nav:
|
||||
# - BW3: index.md
|
||||
- Quick Start Guide: config.md
|
||||
# - Module: index.md
|
||||
# - Plugins: index.md
|
||||
- Entwickler:
|
||||
- Eigenes Modul/Plugin: develop/ModulPlugin.md
|
||||
- BOSWatch Packet Format: develop/packet.md
|
||||
# - BW3 Source Docu: /api/index.html
|
||||
- Quick Start:
|
||||
- Installation: tbd.md
|
||||
- Konfiguration: config.md
|
||||
# - BOSWatch benutzen: tbd.md
|
||||
# - Als Service einrichten: tbd.md
|
||||
- Informationen:
|
||||
# - Server/Cient Prinzip: tbd.md
|
||||
- Broadcast Service: information/broadcast.md
|
||||
# - Modul/Plugin Konzept: tbd.md
|
||||
# - Routing Mechanismus: tbd.md
|
||||
- Changelog: changelog.md
|
||||
- Module:
|
||||
- Mode Filter: modul/mode_filter.md
|
||||
- Plugins: tbd.md
|
||||
- Entwickler:
|
||||
- Eigenes Modul/Plugin schreiben: develop/ModulPlugin.md
|
||||
- BOSWatch Alarmpaket Format: develop/packet.md
|
||||
- BW3 Quellcode Dokumentation: api/html/index.html
|
||||
|
||||
|
||||
use_directory_urls: false
|
||||
|
||||
theme:
|
||||
name: mkdocs
|
||||
highlightjs: true
|
||||
hljs_style: github
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class BoswatchModule(Module):
|
|||
pass
|
||||
|
||||
def doWork(self, bwPacket):
|
||||
"""!start an rund of the module.
|
||||
"""!start an run of the module.
|
||||
|
||||
@param bwPacket: A BOSWatch packet instance
|
||||
@return bwPacket or False"""
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class BoswatchModule(Module):
|
|||
pass
|
||||
|
||||
def doWork(self, bwPacket):
|
||||
"""!start an rund of the module.
|
||||
"""!start an run of the module.
|
||||
|
||||
@param bwPacket: A BOSWatch packet instance
|
||||
@return bwPacket or False"""
|
||||
|
|
|
|||
3
some_old_stuff.txt
Normal file
3
some_old_stuff.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
python -m pytest -c "_gen/pytest.ini"
|
||||
_bin\win\doxygen\doxygen.exe _gen/doxygen.ini
|
||||
_bin\win\cloc_1_72\cloc-1.72.exe . --exclude-lang=XML --exclude-dir=_docu,_config,_info,doxygen.ini --by-file-by-lang
|
||||
Loading…
Reference in a new issue