# Path: ogn/client/settings.py
# APRS_SERVER_HOST = 'aprs.glidernet.org'
# APRS_SERVER_PORT_FULL_FEED = 10152
# APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS = 14580
# APRS_APP_NAME = 'python-ogn-client'
# PACKAGE_VERSION = '1.2.1'
# APRS_APP_VER = PACKAGE_VERSION[:3]
# APRS_KEEPALIVE_TIME = 240
# TELNET_SERVER_HOST = 'localhost'
# TELNET_SERVER_PORT = 50001


import socket
import logging
from time import time, sleep
from ogn.client import settings



def create_aprs_login(user_name, pass_code, app_name, app_version, aprs_filter=None):
    if not aprs_filter:
        return "user {} pass {} vers {} {}\n".format(user_name, pass_code, app_name, app_version)
    else:
        return "user {} pass {} vers {} {} filter {}\n".format(user_name, pass_code, app_name, app_version, aprs_filter)


class AprsClient:

# Path: ogn/client/settings.py
# APRS_SERVER_HOST = 'aprs.glidernet.org'
# APRS_SERVER_PORT_FULL_FEED = 10152
# APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS = 14580
# APRS_APP_NAME = 'python-ogn-client'
# PACKAGE_VERSION = '1.2.1'
# APRS_APP_VER = PACKAGE_VERSION[:3]
# APRS_KEEPALIVE_TIME = 240
# TELNET_SERVER_HOST = 'localhost'
# TELNET_SERVER_PORT = 50001


# Path: ogn/client/client.py
import socket
import logging
from time import time, sleep
from ogn.client import settings




def create_aprs_login(user_name, pass_code, app_name, app_version, aprs_filter=None):
    if not aprs_filter:
        return "user {} pass {} vers {} {}\n".format(user_name, pass_code, app_name, app_version)
    else:
        return "user {} pass {} vers {} {} filter {}\n".format(user_name, pass_code, app_name, app_version, aprs_filter)


class AprsClient:

    def __init__(self, aprs_user, aprs_filter='', settings=settings):