FreeDATA/tnc/static.py

123 lines
2.4 KiB
Python
Raw Normal View History

2020-12-23 16:48:54 +00:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 23 11:13:57 2020
@author: DJ2LS
Here we are saving application wide variables and stats, which have to be accessed everywhere.
2022-05-09 00:41:49 +00:00
Not nice, suggestions are appreciated :-)
2020-12-23 16:48:54 +00:00
"""
VERSION = '0.4.0-alpha'
2021-07-09 17:26:02 +00:00
# DAEMON
DAEMONPORT = 3001
TNCSTARTED = False
TNCPROCESS = 0
2021-02-16 13:23:57 +00:00
# Operator Defaults
MYCALLSIGN = b'AA0AA'
MYCALLSIGN_CRC = b'A'
DXCALLSIGN = b'AA0AA'
DXCALLSIGN_CRC = b'A'
MYGRID = b''
DXGRID = b''
2021-02-19 08:50:04 +00:00
SSID_LIST = [] # ssid list we are responding to
2022-03-19 11:42:10 +00:00
LOW_BANDWITH_MODE = False
2021-03-12 13:14:36 +00:00
# ---------------------------------
2021-02-16 13:23:57 +00:00
# Server Defaults
HOST = "0.0.0.0"
2021-02-16 13:23:57 +00:00
PORT = 3000
SOCKET_TIMEOUT = 1 # seconds
2021-03-12 13:14:36 +00:00
# ---------------------------------
SERIAL_DEVICES = []
# ---------------------------------
PTT_STATE = False
2022-01-07 11:55:03 +00:00
TRANSMITTING = False
HAMLIB_VERSION = '0'
HAMLIB_PTT_TYPE = 'RTS'
HAMLIB_DEVICE_NAME = 'RIG_MODEL_DUMMY_NOVFO'
HAMLIB_DEVICE_PORT = '/dev/ttyUSB0'
HAMLIB_SERIAL_SPEED = '9600'
HAMLIB_PTT_PORT = '/dev/ttyUSB0'
HAMLIB_STOP_BITS = '1'
HAMLIB_DATA_BITS = '8'
HAMLIB_HANDSHAKE = 'None'
HAMLIB_RADIOCONTROL = 'direct'
HAMLIB_RIGCTLD_IP = '127.0.0.1'
HAMLIB_RIGCTLD_PORT = '4532'
2022-05-09 00:41:49 +00:00
2021-05-29 20:18:11 +00:00
HAMLIB_FREQUENCY = 0
HAMLIB_MODE = ''
2021-05-29 21:19:50 +00:00
HAMLIB_BANDWITH = 0
2021-03-12 13:14:36 +00:00
# -------------------------
2020-12-23 16:48:54 +00:00
# FreeDV Defaults
2021-03-16 15:37:23 +00:00
SNR = 0
FREQ_OFFSET = 0
2021-08-06 20:09:16 +00:00
SCATTER = []
ENABLE_SCATTER = False
2022-03-31 10:45:44 +00:00
ENABLE_FSK = False
RESPOND_TO_CQ = False
2021-03-12 13:14:36 +00:00
# ---------------------------------
2020-12-23 16:48:54 +00:00
2021-03-12 13:14:36 +00:00
# Audio Defaults
2022-03-31 19:13:30 +00:00
TX_AUDIO_LEVEL = 50
AUDIO_INPUT_DEVICES = []
AUDIO_OUTPUT_DEVICES = []
AUDIO_INPUT_DEVICE = -2
AUDIO_OUTPUT_DEVICE = -2
BUFFER_OVERFLOW_COUNTER = [0,0,0,0,0]
2021-03-09 15:45:27 +00:00
AUDIO_RMS = 0
FFT = [0]
ENABLE_FFT = False
2022-02-15 17:10:14 +00:00
CHANNEL_BUSY = None
# ARQ PROTOCOL VERSION
ARQ_PROTOCOL_VERSION = 1
2021-09-26 15:51:11 +00:00
# ARQ statistics
ARQ_BYTES_PER_MINUTE_BURST = 0
2021-03-17 10:22:06 +00:00
ARQ_BYTES_PER_MINUTE = 0
2021-09-11 07:21:22 +00:00
ARQ_BITS_PER_SECOND_BURST = 0
2021-09-26 15:51:11 +00:00
ARQ_BITS_PER_SECOND = 0
ARQ_COMPRESSION_FACTOR = 0
2021-08-14 18:00:32 +00:00
ARQ_TRANSMISSION_PERCENT = 0
ARQ_SPEED_LEVEL = 0
2021-08-14 18:00:32 +00:00
TOTAL_BYTES = 0
2021-02-24 15:47:52 +00:00
#CHANNEL_STATE = 'RECEIVING_SIGNALLING'
TNC_STATE = 'IDLE'
ARQ_STATE = False
ARQ_SESSION = False
ARQ_SESSION_STATE = 'disconnected' # disconnected, connecting, connected, disconnecting, failed
# BEACON STATE
BEACON_STATE = False
BEACON_PAUSE = False
2021-09-26 15:51:11 +00:00
2020-12-30 17:16:32 +00:00
# ------- RX BUFFER
RX_BUFFER = []
2021-10-17 15:01:21 +00:00
RX_MSG_BUFFER = []
2021-09-26 15:51:11 +00:00
RX_BURST_BUFFER = []
RX_FRAME_BUFFER = b''
#RX_BUFFER_SIZE = 0
2020-12-26 10:02:14 +00:00
2021-03-11 19:04:31 +00:00
# ------- HEARD STATIOS BUFFER
HEARD_STATIONS = []
# ------- INFO MESSAGE BUFFER
INFO = []
2022-03-19 11:42:10 +00:00
# ------- CODEC2 SETTINGS
TUNING_RANGE_FMIN = -50.0
2022-05-09 00:41:49 +00:00
TUNING_RANGE_FMAX = 50.0