July 2021
21
Python V3.6.5 Sample Application Code
Packet Processor
"""
Main file for Baker Packet Protocol Receiver
There are three classes that make up this application:
•
BPPReader_GUI
This provides the GUI if invoked. If the application is not invoked with the GUI, then this class is unused.
•
BPPReader
This is the packet processing. It is invoked whether the GUI is invoked or not. If the GUI is not present, then the ouput is to the command line.
•
Fletcher32_16
Provides the Fletcher32_16 algorithm
Jon Busenkell
Version 1
02/01/2019
"""
import sys
sys.path.insert(0, '../Common')
import os
import time
import traceback
from numpy import *
import numpy.core._dtype_ctypes
import re
import threading
import _thread
import asyncio
from BPPReader_GUI import *
from Fletcher32_16 import *
from CultivoSerialize import Serialize
from FileHandling import *
comport=""
class BPPReader(threading.Thread):