wu_xinjun
2022-06-16 14cc8f11a79fabec83f3c5754af45583fb4edcd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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