pull/66/head
Konstantin Gründger 2019-09-07 16:26:32 +02:00
rodzic 8446140bce
commit 226a8239fa
4 zmienionych plików z 26 dodań i 4 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
# CHANGELOG
## unreleased
## 0.9.5: - 2019-09-07
- parser: fixed telnet parser
## 0.9.4: - 2019-06-10

Wyświetl plik

@ -20,7 +20,7 @@ pip install ogn-client
## Example Usage
Parse APRS/OGN packet.
### Parse APRS/OGN packet.
```
from ogn.parser import parse
@ -30,7 +30,7 @@ beacon = parse("FLRDDDEAD>APRS,qAS,EDER:/114500h5029.86N/00956.98E'342/049/A=005
reference_timestamp=datetime(2015, 07, 31, 12, 34, 56))
```
Connect to OGN and display all incoming beacons.
### Connect to OGN and display all incoming beacons.
```
from ogn.client import AprsClient
@ -53,5 +53,26 @@ except KeyboardInterrupt:
client.disconnect()
```
### Connect to telnet console and display all decoded beacons.
```
from ogn.client import TelnetClient
from ogn.parser.telnet_parser import parse
def process_beacon(raw_message):
beacon = parse(raw_message)
if beacon:
print(beacon)
client = TelnetClient()
client.connect()
try:
client.run(callback=process_beacon)
except KeyboardInterrupt:
print('\nStop ogn gateway')
client.disconnect()
```
## License
Licensed under the [AGPLv3](LICENSE).

Wyświetl plik

@ -1 +1,2 @@
from ogn.client.client import AprsClient # noqa: F401
from ogn.client.client import TelnetClient # noqa: F401

Wyświetl plik

@ -4,7 +4,7 @@ APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS = 14580
APRS_APP_NAME = 'python-ogn-client'
PACKAGE_VERSION = '0.9.3'
PACKAGE_VERSION = '0.9.5'
APRS_APP_VER = PACKAGE_VERSION[:3]
APRS_KEEPALIVE_TIME = 240