Atmosphere Space Series - Log Font

在这里插入图片描述

------------------------------------ char1 ------------------------------------

                                                                                  
  $$$$              $$$$             $$   $$             $$               $$$$   
 $$  $$            $$  $$            $$$ $$$            $$$              $$  $$  
 $$                $$  $$            $$$$$$$             $$                 $$   
 $$                $$  $$            $$ $ $$             $$                $$    
 $$  $$            $$  $$            $$   $$             $$               $$     
  $$$$              $$$$             $$   $$           $$$$$$            $$$$$$  
                                                                                 

------------------------------------ char2 ------------------------------------

 $$$$$$$            $$$$$$            $$$$$$$             $$             $$$$$$$  
$$   $$            $$  $$            $  $  $             $$             $$   $$  
$$                 $$  $$            $  $  $             $$                  $$  
$$$               $$$  $$           $$  $  $            $$$             $$$$$$$  
$$$               $$$  $$           $$  $  $            $$$             $$$      
$$$  $$           $$$  $$           $$  $  $            $$$             $$$      
$$$$$$$           $$$$$$$           $$  $  $            $$$             $$$$$$$  
                                                                                 

------------------------------------ char3 ------------------------------------

    $$$$              $$$             $$   $$              $$              $$$$$  
  $$  $$            $$ $$            $$$ $$$             $$$             $$   $$ 
 $$                $$   $$           $$$$$$$              $$             $$   $$ 
 $$                $$   $$           $$ $ $$              $$                $$$  
 $$                $$   $$           $$   $$              $$              $$$    
  $$  $$            $$ $$            $$   $$              $$             $$   $$ 
   $$$$              $$$             $$   $$            $$$$$$           $$$$$$$ 
                                                                                 

------------------------------------ char4 ------------------------------------

    $$$               $$$              $$  $              $$               $$$$   
 $$$$$$             $$$$$             $$ $$             $$$              $$  $$  
 $$                $$  $$            $$$$$$            $$$$                  $$  
$$                $$   $$           $$$ $$$              $$                $$$   
$$   $$           $$   $$           $$   $$             $$               $$$     
$$  $$$           $$  $$            $$   $$             $$              $$$      
 $$$$              $$$$             $$   $$           $$$$$$$           $$$$$$$  
                                                                                 

------------------------------------ charact1 ------------------------------------

                                                                                  
                                                         $$              $$$$$$  
 $$$$$$            $$$$$$            $$  $$             $$$              $$  $$  
 $$  $$            $$  $$            $$$$$$            $$$$                  $$  
 $$                $$  $$            $$$$$$              $$               $$$$   
 $$  $$            $$  $$            $$ $$$              $$              $$      
 $$$$$$            $$$$$$            $$ $$$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ charact2 ------------------------------------

                                                                                  
                                                         $$               $$$$   
                                                        $$$              $$  $$  
  $$$$$             $$$$             $$  $$            $$$$                  $$  
 $$                $$  $$            $$$$$$              $$               $$$$   
 $$                $$  $$            $$  $$              $$              $$      
  $$$$$             $$$$             $$  $$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ charact3 ------------------------------------

                                                                                  
                                                           $$$             $$$$  
                                                          $$$             $$  $$ 
  $$$$$              $$$$$            $$  $$             $$$                 $$$ 
  $$                $$  $$           $$$$$$$              $$              $$$$   
 $$                $$  $$           $$   $$              $$              $$      
 $$$$$$            $$$$$            $$  $$            $$$$$$            $$$$$$$  
                                                                                 

------------------------------------ charact4 ------------------------------------

                                                                                  
                                                         $$              $$$$$$  
                                                        $$$                 $$$  
 $$$$$$            $$$$$$            $$  $$              $$                 $$$  
 $$$               $$  $$            $$$$$$              $$              $$$$$$  
 $$$               $$ $$$            $$ $$$            $$$$$$            $$      
 $$$$$$            $$$$$$            $$ $$$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ charact5 ------------------------------------

                                                                                  
                                                         $$               $$$$   
                                                        $$$              $$ $$$  
  $$$$$             $$$$             $$  $$            $$$$                 $$$  
 $$$               $$  $$            $$$$$$              $$               $$$$   
 $$$               $$  $$            $$  $$            $$$$$$            $$$     
  $$$$$             $$$$             $$  $$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ charact6 ------------------------------------

                                                                                  
                                                         $$               $$$$   
  $$$$              $$$$             $$  $$             $$$              $$  $$  
 $$                $$  $$            $$$$$$            $$$$                  $$  
 $$                $$  $$            $$$$$$              $$               $$$$   
 $$                $$  $$            $$  $$              $$              $$      
  $$$$              $$$$             $$  $$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ characte ------------------------------------

                                                                                  
                                                         $$              $$$$$$  
                                                        $$$              $$  $$  
 $$$$$$            $$$$$$            $$  $$            $$$$                  $$  
 $$                $$  $$            $$$$$$              $$               $$$$   
 $$                $$  $$            $$  $$              $$              $$      
 $$$$$$            $$$$$$            $$  $$            $$$$$$            $$$$$$  
                                                                                 

------------------------------------ chartr ------------------------------------

                                  
                                 
  $$     $     $$   $   $    $$  
 $ $    $ $    $$  $$   $   $  $ 
$      $   $   $$  $$   $      $ 
$      $   $   $ $$ $   $     $  
 $ $    $ $    $ $$ $   $    $ $ 
  $$     $     $$$ $$   $   $$$$ 
                                 
                                 

------------------------------------ chartri ------------------------------------

                                       
                                      
  $$$     $$$     $   $$    $     $$  
 $  $    $   $    $$  $    $$    $  $ 
$       $    $    $$ $$     $       $ 
$       $    $    $$ $$     $     $$  
$  $    $   $    $ $$ $     $    $  $ 
 $$$     $$$     $$$ $$    $$   $$$$  
                                      
                                      

usb_event_callback_handler

def usb_event_callback_handler(eventPort, eventInfo, eventType):
    if eventType == 0x2025:
        context = ' ---%4s%s' % ('', devicePort)
        XBanner.line('-')
        XBanner.printText(context)
        XBanner.line('-')
    if eventType == 0x8000:
        context = ' <<<%4s%s' % ('', devicePort)
        XBanner.line('<')
        XBanner.printText(context)
        XBanner.line('<')
    if eventType == 0x8004:
        context = ' %s%4s>>>' % (devicePort, '')
        XBanner.line('>')
        XBanner.printText(context)
        XBanner.line('>')
    return 0

PyQT DLL Process

def process():
    coreEvent = XCoreEvent.loadDll()
    if True:
        eventCallback = CallbackType(XCoreEvent.usb_event_callback_handler)
        coreEvent.RegisterCallback(eventCallback)
    if True:
        result = coreEvent.StartMonitoring()
        print('StartMonitoring DLL invoked', result)

        try:
            i, maximum = 0, (50 * 1000)
            for i in range(maximum):
                time.sleep(0.001)
        except Exception as e:
            print("Exiting...")

在这里插入图片描述
SerialList & SerialIsValid

CORE_EVENT_API BOOL WINAPI SerialList(LPSTR dataBuff, UINT buffSize) {
	std::vector<std::string> myList = EnumerateComPorts();

	std::string alpha;
	for (auto& one : myList) {
		alpha.append(one).append(";");
	}
	if (!alpha.empty() && alpha.back() == ';') {
		alpha.pop_back();
	}
	memset(dataBuff, 0x00, buffSize);
	memcpy(dataBuff, alpha.c_str(), alpha.size());

	return TRUE;
}

CORE_EVENT_API BOOL WINAPI SerialIsValid(LPSTR portName) {
	HANDLE hComm = CreateFileA(
		portName,
		GENERIC_READ | GENERIC_WRITE,
		0,
		NULL,
		OPEN_EXISTING,
		0,
		NULL
	);

	if (hComm != INVALID_HANDLE_VALUE) {
		CloseHandle(hComm);
		return TRUE;
	}
	return FALSE;
}
def todoE():
    coreEvent = XCoreEvent.loadDll()
    if True:
        alpha = XCoreEvent.listSerial()
        for one in alpha:
            logLine()
            portName = one
            bytesData = portName.encode()
            result = coreEvent.SerialIsValid(bytesData)
            if result:
                XBanner.printText('%s : connected' % (portName))
            else:
                XBanner.printText('%s : opened' % (portName))
        logLine()

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值