reset frame machine correctly

This commit is contained in:
DJ2LS 2021-03-10 09:12:49 +01:00 committed by GitHub
parent 26e17b8a8e
commit 1d5d50a868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View file

@ -204,9 +204,11 @@ def arq_data_received(data_in):
static.ARQ_FRAME_BOF_RECEIVED = False
static.ARQ_FRAME_EOF_RECEIVED = False
static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME = 0
static.ARQ_RX_N_CURRENT_ARQ_FRAME = 0
static.TNC_STATE = 'IDLE'
static.ARQ_SEND_KEEP_ALIVE = True
static.ARQ_READY_FOR_DATA = False
logging.info("DATA ["+ str(static.MYCALLSIGN, 'utf-8') + "]<< >>["+ str(static.DXCALLSIGN, 'utf-8') + "] [BER."+str(static.BER)+"]")
else:

View file

@ -81,7 +81,19 @@ def arq_reset_frame_machine():
static.TX_N_RETRIES = 0
static.ARQ_N_SENT_FRAMES = 0
static.ARQ_TX_N_FRAMES_PER_BURST = 0
static.TNC_STATE = b'IDLE'
static.ARQ_TX_N_CURRENT_ARQ_FRAME = 0
static.ARQ_TX_N_TOTAL_ARQ_FRAMES = 0
static.ARQ_TX_N_CURRENT_ARQ_FRAME = 0
static.ARQ_RX_N_CURRENT_ARQ_FRAME = 0
static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME = 0
static.ARQ_FRAME_BOF_RECEIVED = False
static.ARQ_FRAME_EOF_RECEIVED = False
static.TNC_STATE = 'IDLE'
static.ARQ_SEND_KEEP_ALIVE = True
static.CHANNEL_STATE = 'RECEIVING_SIGNALLING'
static.ARQ_READY_FOR_DATA = False

View file

@ -124,7 +124,7 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
asyncio.run(data_handler.arq_transmit(data_out))
###asyncio.run(asyncbg.call(data_handler.arq_transmit, data_out))
print("die funktion läuft weiter...")
#print("die funktion läuft weiter...")
#data_handler.arq_transmit(data_out)
#TRANSMIT_ARQ = threading.Thread(target=data_handler.transmit, args=[data_out], name="TRANSMIT_ARQ")
#TRANSMIT_ARQ.start()
@ -166,8 +166,8 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
"TX_N_MAX_RETRIES": str(static.TX_N_MAX_RETRIES),
"ARQ_TX_N_FRAMES_PER_BURST": str(static.ARQ_TX_N_FRAMES_PER_BURST),
"ARQ_TX_N_BURSTS": str(static.ARQ_TX_N_BURSTS),
"ARQ_TX_N_CURRENT_ARQ_FRAME": str(static.ARQ_TX_N_CURRENT_ARQ_FRAME),
"ARQ_TX_N_TOTAL_ARQ_FRAMES": str(static.ARQ_TX_N_TOTAL_ARQ_FRAMES),
"ARQ_TX_N_CURRENT_ARQ_FRAME": str(int.from_bytes(bytes(static.ARQ_TX_N_CURRENT_ARQ_FRAME), "big")),
"ARQ_TX_N_TOTAL_ARQ_FRAMES": str(int.from_bytes(bytes(static.ARQ_TX_N_TOTAL_ARQ_FRAMES), "big")),
"ARQ_RX_FRAME_N_BURSTS": str(static.ARQ_RX_FRAME_N_BURSTS),
"ARQ_RX_N_CURRENT_ARQ_FRAME": str(static.ARQ_RX_N_CURRENT_ARQ_FRAME),
"ARQ_N_ARQ_FRAMES_PER_DATA_FRAME": str(static.ARQ_N_ARQ_FRAMES_PER_DATA_FRAME )