mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-21 06:03:50 +00:00
commit
436e5e46ab
7 changed files with 103 additions and 15 deletions
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: [Schrolli91] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
67
.github/workflows/codeql-analysis.yml
vendored
Normal file
67
.github/workflows/codeql-analysis.yml
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ develop, master ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ develop ]
|
||||||
|
schedule:
|
||||||
|
- cron: '33 03 * * 5'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'python' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
11
README.md
11
README.md
|
|
@ -2,10 +2,19 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
**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.**
|
**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)_
|
**Der BOS-Funk ist ein nichtöffentlicher mobiler Landfunk. Privatpersonen gehören nicht zum Kreis der berechtigten Funkteilnehmer.** _(Quelle: TR-BOS)_
|
||||||
|
|
||||||
|
### Documentation: [https://docs.boswatch.de](https://docs.boswatch.de)
|
||||||
|
|
||||||
|
Wenn dir dieses Projekt gefällt, gib uns bitte einen **STAR**
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
**The intercept of the German BOS radio is strictly prohibited and will be prosecuted. The use is only permitted for authorized personnel.**
|
**The intercept of the German BOS radio is strictly prohibited and will be prosecuted. The use is only permitted for authorized personnel.**
|
||||||
|
|
||||||
|
If you like this project, please give us a **STAR**
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import threading
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from boswatch.utils import paths
|
from boswatch.utils import paths
|
||||||
from boswatch.processManager import ProcessManager
|
from boswatch.processManager import ProcessManager
|
||||||
|
from boswatch.decoder.decoder import Decoder
|
||||||
|
|
||||||
logging.debug("- %s loaded", __name__)
|
logging.debug("- %s loaded", __name__)
|
||||||
|
|
||||||
|
|
@ -61,10 +62,11 @@ class InputBase(ABC):
|
||||||
logging.debug("input thread stopped")
|
logging.debug("input thread stopped")
|
||||||
|
|
||||||
def addToQueue(self, data):
|
def addToQueue(self, data):
|
||||||
"""!Adds alarm data to the queue for further processing during boswatch client"""
|
"""!Decode and add alarm data to the queue for further processing during boswatch client"""
|
||||||
self._inputQueue.put_nowait((data, time.time()))
|
bwPacket = Decoder.decode(data)
|
||||||
logging.debug("Add received data to queue")
|
if bwPacket is not None:
|
||||||
print(data)
|
self._inputQueue.put_nowait((bwPacket, time.time()))
|
||||||
|
logging.debug("Added received data to queue")
|
||||||
|
|
||||||
def getDecoderInstance(self, decoderConfig, StdIn):
|
def getDecoderInstance(self, decoderConfig, StdIn):
|
||||||
mmProc = ProcessManager(str(decoderConfig.get("path", default="multimon-ng")), textMode=True)
|
mmProc = ProcessManager(str(decoderConfig.get("path", default="multimon-ng")), textMode=True)
|
||||||
|
|
|
||||||
11
bw_client.py
11
bw_client.py
|
|
@ -46,12 +46,12 @@ logging.debug("Import BOSWatch modules")
|
||||||
from boswatch.configYaml import ConfigYAML
|
from boswatch.configYaml import ConfigYAML
|
||||||
from boswatch.network.client import TCPClient
|
from boswatch.network.client import TCPClient
|
||||||
from boswatch.network.broadcast import BroadcastClient
|
from boswatch.network.broadcast import BroadcastClient
|
||||||
from boswatch.decoder.decoder import Decoder
|
|
||||||
from boswatch.utils import header
|
from boswatch.utils import header
|
||||||
from boswatch.utils import misc
|
from boswatch.utils import misc
|
||||||
from boswatch.inputSource.sdrInput import SdrInput
|
from boswatch.inputSource.sdrInput import SdrInput
|
||||||
from boswatch.inputSource.lineInInput import LineInInput
|
from boswatch.inputSource.lineInInput import LineInInput
|
||||||
from boswatch.inputSource.pulseaudioInput import PulseAudioInput
|
from boswatch.inputSource.pulseaudioInput import PulseAudioInput
|
||||||
|
from boswatch.decoder.decoder import Decoder # for test mode
|
||||||
|
|
||||||
header.logoToLog()
|
header.logoToLog()
|
||||||
header.infoToLog()
|
header.infoToLog()
|
||||||
|
|
@ -106,7 +106,8 @@ try:
|
||||||
for testData in testFile:
|
for testData in testFile:
|
||||||
if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]):
|
if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]):
|
||||||
logging.info("Testdata: %s", testData.rstrip(' \t\n\r'))
|
logging.info("Testdata: %s", testData.rstrip(' \t\n\r'))
|
||||||
inputQueue.put_nowait((testData.rstrip(' \t\n\r'), time.time()))
|
bwPacket = Decoder.decode(testData.rstrip(' \t\n\r'))
|
||||||
|
inputQueue.put_nowait((bwPacket, time.time()))
|
||||||
logging.debug("finished reading testdata")
|
logging.debug("finished reading testdata")
|
||||||
|
|
||||||
bwClient = TCPClient()
|
bwClient = TCPClient()
|
||||||
|
|
@ -123,13 +124,9 @@ try:
|
||||||
data = inputQueue.get()
|
data = inputQueue.get()
|
||||||
logging.info("get data from queue (waited %0.3f sec.)", time.time() - data[1])
|
logging.info("get data from queue (waited %0.3f sec.)", time.time() - data[1])
|
||||||
logging.debug("%s packet(s) still waiting in queue", inputQueue.qsize())
|
logging.debug("%s packet(s) still waiting in queue", inputQueue.qsize())
|
||||||
|
bwPacket = data[0]
|
||||||
bwPacket = Decoder.decode(data[0])
|
|
||||||
inputQueue.task_done()
|
inputQueue.task_done()
|
||||||
|
|
||||||
if bwPacket is None:
|
|
||||||
continue
|
|
||||||
|
|
||||||
bwPacket.printInfo()
|
bwPacket.printInfo()
|
||||||
misc.addClientDataToPacket(bwPacket, bwConfig)
|
misc.addClientDataToPacket(bwPacket, bwConfig)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ Mit diesem Modul können einem Alarmpaket beliebige Beschreibungen in Abhänigke
|
||||||
## Konfiguration
|
## Konfiguration
|
||||||
Informationen zum Aufbau eines [BOSWatch Pakets](../develop/packet.md)
|
Informationen zum Aufbau eines [BOSWatch Pakets](../develop/packet.md)
|
||||||
|
|
||||||
|
**Achtung:** Zahlen welche führende Nullen entahlten müssen in Anführungszeichen gesetzt werden Bsp. `'0012345'`
|
||||||
|
|
||||||
|Feld|Beschreibung|Default|
|
|Feld|Beschreibung|Default|
|
||||||
|----|------------|-------|
|
|----|------------|-------|
|
||||||
|scanField|Feld des BW Pakets welches geprüft werden soll||
|
|scanField|Feld des BW Pakets welches geprüft werden soll||
|
||||||
|
|
@ -40,7 +42,7 @@ Informationen zum Aufbau eines [BOSWatch Pakets](../develop/packet.md)
|
||||||
descriptions:
|
descriptions:
|
||||||
- for: 12345
|
- for: 12345
|
||||||
add: FF DescriptorTest
|
add: FF DescriptorTest
|
||||||
- for: 45678
|
- for: '05678' # führende Nullen in '' !
|
||||||
add: FF TestDescription
|
add: FF TestDescription
|
||||||
- scanField: status
|
- scanField: status
|
||||||
descrField: fmsStatDescr
|
descrField: fmsStatDescr
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# for pip to install all needed
|
# for pip to install all needed
|
||||||
# called with 'pip -r requirements.txt'
|
# called with 'pip install -r requirements.txt'
|
||||||
|
|
||||||
pyyaml
|
pyyaml
|
||||||
|
|
||||||
# for documentation generating
|
# for documentation generating
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue