mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
first yaml test
This commit is contained in:
parent
18d7a0db6f
commit
b1a3a68e35
49
config/client.yaml
Normal file
49
config/client.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# ____ ____ ______ __ __ __ _____
|
||||
# / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ /
|
||||
# / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ <
|
||||
# / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ /
|
||||
#/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/
|
||||
# German BOS Information Script
|
||||
# by Bastian Schroll
|
||||
|
||||
client:
|
||||
name: "BW3 Client"
|
||||
inputSource: "stick"
|
||||
|
||||
server:
|
||||
- name: "Server one"
|
||||
ip: "127.0.0.1"
|
||||
port: 8080
|
||||
|
||||
- name: "Server two"
|
||||
ip: "11.12.13.14"
|
||||
port: 5000
|
||||
|
||||
# stick or audio
|
||||
inputSource:
|
||||
stick:
|
||||
device: 0
|
||||
frequency: "85.000M"
|
||||
PPMError: 0
|
||||
Squelch: 0
|
||||
Gain: 100
|
||||
audio:
|
||||
|
||||
decoder:
|
||||
fms: yes
|
||||
zvei: yes
|
||||
poc512: yes
|
||||
poc1200: yes
|
||||
poc2400: yes
|
||||
|
||||
doubleFilter:
|
||||
- name: "Filter one"
|
||||
MaxEntry: 30
|
||||
IgnoreTime: 10
|
||||
CheckMsg: no
|
||||
- name: "Filter two"
|
||||
MaxEntry: 30
|
||||
IgnoreTime: 10
|
||||
CheckMsg: no
|
||||
|
||||
28
yaml_test.py
Normal file
28
yaml_test.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""!
|
||||
____ ____ ______ __ __ __ _____
|
||||
/ __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ /
|
||||
/ __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ <
|
||||
/ /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ /
|
||||
/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/
|
||||
German BOS Information Script
|
||||
by Bastian Schroll
|
||||
"""
|
||||
|
||||
import yaml
|
||||
import pprint
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
with open('config/client.yaml') as f:
|
||||
# use safe_load instead load
|
||||
dataMap = yaml.safe_load(f)
|
||||
|
||||
pp.pprint(dataMap)
|
||||
|
||||
|
||||
#print(dataMap["decoder"]["fms"])
|
||||
|
||||
for server in dataMap["server"]:
|
||||
print(server["ip"])
|
||||
|
||||
Loading…
Reference in a new issue