import os,sys
|
import queue
|
import time
|
from datetime import datetime
|
from typing import Union
|
|
from .MessageThreads import send_logs_tool
|
from ..microwave.servers import MicroWaveUDPThread
|
|
|
class micorwaveMannager(object):
|
|
def __init__(self,
|
MicrowaveHost:str,
|
MicrowavePort:int,
|
packet_threshold:Union[int, None],
|
timeusage_threshold:Union[int, None]
|
|
|
):
|
|
# microwave
|
self.MicrowaveHost = MicrowaveHost
|
self.MicrowavePort = MicrowavePort
|
# udp get
|
self.packet_threshold = packet_threshold
|
self.timeusage_threshold = timeusage_threshold
|
self.udp_queue = queue.Queue()
|
self.udp_get_stop = {"value":False}
|
self._udp_get_thread_name = "Thread-UDPGet"
|
# udp to pointcloud
|
|
|
def _udp_get_thread_launcher(self):
|
self._udp_get_thread = MicroWaveUDPThread(MicrowaveHost=self.MicrowaveHost,
|
MicrowavePort=self.MicrowavePort,
|
udp_queue=self.udp_queue,
|
udp_get_stop=self.udp_get_stop,
|
packet_threshold=self.packetThreshold,
|
timeusage_threshold=self.timeusage_threshold)
|
self._udp_get_thread.setDaemon(True)
|
self._udp_get_thread.setName(self._udp_get_thread_name)
|
|
|
def _udp2pointcloud_thread_launcher(self):
|
|
pass
|
|
|
|
|
|
|
|
|