2020-12-23 16:48:54 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
Created on Wed Dec 23 11:13:57 2020
|
|
|
|
|
2021-01-06 12:17:17 +00:00
|
|
|
@author: DJ2LS
|
2020-12-23 16:48:54 +00:00
|
|
|
"""
|
|
|
|
|
2021-01-05 14:03:41 +00:00
|
|
|
|
2020-12-23 16:48:54 +00:00
|
|
|
# FreeDV Defaults
|
2021-01-06 12:17:17 +00:00
|
|
|
|
2021-01-20 21:51:14 +00:00
|
|
|
FREEDV_DATA_MODE = 12
|
|
|
|
FREEDV_SIGNALLING_MODE = 12
|
2021-01-06 12:17:17 +00:00
|
|
|
|
2021-01-20 21:51:14 +00:00
|
|
|
FREEDV_DATA_BYTES_PER_FRAME = 0
|
|
|
|
FREEDV_DATA_PAYLOAD_PER_FRAME = 0
|
|
|
|
FREEDV_SIGNALLING_BYTES_PER_FRAME = 0
|
|
|
|
FREEDV_SIGNALLING_PAYLOAD_PER_FRAME = 0
|
2020-12-23 16:48:54 +00:00
|
|
|
|
|
|
|
# Server Defaults
|
|
|
|
HOST = "localhost"
|
|
|
|
PORT = 3000
|
|
|
|
|
|
|
|
|
|
|
|
#AUdio Defaults
|
|
|
|
AUDIO_INPUT_DEVICE = 1
|
|
|
|
AUDIO_OUTPUT_DEVICE = 1
|
|
|
|
TX_SAMPLE_STATE = None
|
|
|
|
RX_SAMPLE_STATE = None
|
2021-01-07 08:28:26 +00:00
|
|
|
|
2021-01-20 21:51:14 +00:00
|
|
|
AUDIO_SAMPLE_RATE_RX = 44100
|
|
|
|
AUDIO_SAMPLE_RATE_TX = 44100
|
2021-01-07 08:28:26 +00:00
|
|
|
MODEM_SAMPLE_RATE = 8000 #8000
|
2021-01-06 12:17:17 +00:00
|
|
|
AUDIO_FRAMES_PER_BUFFER = 2048
|
2020-12-23 16:48:54 +00:00
|
|
|
AUDIO_CHANNELS = 1
|
2020-12-25 21:55:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
#TNC DEFAULTS
|
2021-01-06 12:17:17 +00:00
|
|
|
# ARQ
|
2020-12-26 10:02:14 +00:00
|
|
|
TX_N_MAX_RETRIES = 3
|
2021-01-20 21:51:14 +00:00
|
|
|
TX_N_RETRIES = 0
|
2021-01-20 22:42:45 +00:00
|
|
|
|
|
|
|
|
2020-12-26 10:02:14 +00:00
|
|
|
|
2021-01-20 21:51:14 +00:00
|
|
|
ARQ_TX_N_FRAMES_PER_BURST = 0
|
|
|
|
ARQ_TX_N_BURSTS = 0
|
|
|
|
|
2020-12-28 14:20:51 +00:00
|
|
|
ARQ_PAYLOAD_PER_FRAME = 0
|
|
|
|
ARQ_ACK_WAITING_FOR_ID = 0
|
2020-12-29 20:21:28 +00:00
|
|
|
ARQ_RX_BURST_BUFFER = []
|
|
|
|
ARQ_RX_FRAME_BUFFER = []
|
2020-12-30 17:16:32 +00:00
|
|
|
ARQ_RX_FRAME_N_BURSTS = 0
|
2021-01-06 12:17:17 +00:00
|
|
|
ARQ_ACK_PAYLOAD_PER_FRAME = 0
|
2021-01-20 22:42:45 +00:00
|
|
|
ARQ_ACK_RECEIVED = 0
|
|
|
|
ARQ_ACK_TIMEOUT = 0
|
|
|
|
ARQ_ACK_TIMEOUT_SECONDS = 10.0
|
2021-01-06 12:17:17 +00:00
|
|
|
|
2020-12-29 20:21:28 +00:00
|
|
|
FRAME_CRC = b''
|
2021-01-20 21:51:14 +00:00
|
|
|
FRAME_BOF = b'\xAA\xAA'
|
|
|
|
FRAME_EOF = b'\xFF\xFF'
|
2020-12-28 14:20:51 +00:00
|
|
|
|
2021-01-02 08:41:58 +00:00
|
|
|
ARQ_N_SENT_FRAMES = 0
|
|
|
|
|
|
|
|
|
2021-01-20 13:31:28 +00:00
|
|
|
# ARQ STATES:
|
|
|
|
# IDLE
|
|
|
|
# RECEIVING_DATA
|
|
|
|
# SENDING_DATA
|
|
|
|
# RECEIVING_ACK
|
|
|
|
# SENDING_ACK
|
2021-01-20 22:42:45 +00:00
|
|
|
# ACK_RECEIVED
|
2021-01-20 13:31:28 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2021-01-20 21:51:14 +00:00
|
|
|
ARQ_STATE = 'RECEIVING_DATA'
|
2020-12-30 17:16:32 +00:00
|
|
|
|
2020-12-26 10:02:14 +00:00
|
|
|
# ------- TX BUFFER
|
|
|
|
TX_BUFFER_SIZE = 0
|
2021-01-20 21:51:14 +00:00
|
|
|
TX_BUFFER = []
|
2020-12-30 17:16:32 +00:00
|
|
|
# ------- RX BUFFER
|
|
|
|
RX_BUFFER = []
|
2021-01-20 21:51:14 +00:00
|
|
|
RX_BUFFER_SIZE = 0
|
2020-12-26 10:02:14 +00:00
|
|
|
|