UniPRT 软件开发工具包 v2.0-DLL (C++)
 
载入中...
搜索中...
未找到
Discovery.cpp 文件参考
#include "pch.h"
#include "framework.h"
#include "Discovery.h"
#include "NetworkDiscover.h"
#include <vector>
#include <string>
#include <windows.h>
#include <thread>
#include <mutex>
#include <sstream>
#include <iostream>
#include <atomic>
Discovery.cpp 的引用(Include)关系图:

宏定义

#define MAX_THREADS   64
 

函数

std::vector< std::string > *__stdcall GetPrinterList (Brand brand=Brand::ALL, int responseTimeoutMs=2000)
 透过网络寻找打印机。
 
void __stdcall FreePrinterList (std::vector< std::string > *pList)
 释放字符串资源。
 
std::vector< std::string > *__stdcall GetPrinterList_IPv6 (std::string PREFIX, std::string INTERFACE_NAME, int responseTimeoutMs=2000)
 透过 IPv6 网络寻找打印机。
 
void __stdcall FreePrinterList_IPv6 (std::vector< std::string > *pList)
 释放字符串资源。
 

变量

CDiscoveryApp theApp
 
std::mutex g_listMutex
 

宏定义说明

◆ MAX_THREADS

#define MAX_THREADS   64

函数说明

◆ FreePrinterList()

void __stdcall FreePrinterList ( std::vector< std::string > * pList)

释放字符串资源。

参数
[in]pList: 字符串资源
返回
程序代码
FreePrinterList(pPrinterList);
void __stdcall FreePrinterList(std::vector< std::string > *pList)
释放字符串资源。
Definition Discovery.cpp:171

◆ FreePrinterList_IPv6()

void __stdcall FreePrinterList_IPv6 ( std::vector< std::string > * pList)

释放字符串资源。

参数
[in]pList: 字符串资源
返回
程序代码
void __stdcall FreePrinterList_IPv6(std::vector< std::string > *pList)
释放字符串资源。
Definition Discovery.cpp:306

◆ GetPrinterList()

std::vector< std::string > *__stdcall GetPrinterList ( Brand brand = Brand::ALL,
int responseTimeoutMs = 2000 )

透过网络寻找打印机。

参数
[in]brand: 设置打印机品牌, Brand::ALL, Brand::TSCBrand::PTX
[in]responseTimeoutMs: 响应的暂停时间,单位: ms
返回
std::vector<std::string>*
程序代码
std::vector<std::string>* pPrinterList = GetPrinterList(Brand::ALL, 3000);
std::vector< std::string > *__stdcall GetPrinterList(Brand brand=Brand::ALL, int responseTimeoutMs=2000)
透过网络寻找打印机。
Definition Discovery.cpp:127

◆ GetPrinterList_IPv6()

std::vector< std::string > *__stdcall GetPrinterList_IPv6 ( std::string PREFIX,
std::string INTERFACE_NAME,
int responseTimeoutMs = 2000 )

透过 IPv6 网络寻找打印机。

参数
[in]PREFIX: IPv6 前缀,会以 ping IP 作法搜寻最后 16 bits 的 IP 组合
[in]INTERFACE_NAME: 平台界面 ID
[in]responseTimeoutMs: 响应的暂停时间,单位: ms
返回
std::vector<std::string>*
程序代码
std::vector<std::string>* foundIPs = GetPrinterList_IPv6("fe80::208:96ff:fe40:", "35", 1000); // Link-Local
std::vector<std::string>* foundIPs = GetPrinterList_IPv6("2001:b030:2219:c40:208:96ff:fe40:", "", 1000); // Global
std::vector< std::string > *__stdcall GetPrinterList_IPv6(std::string PREFIX, std::string INTERFACE_NAME, int responseTimeoutMs=2000)
透过 IPv6 网络寻找打印机。
Definition Discovery.cpp:224

变量说明

◆ g_listMutex

std::mutex g_listMutex

◆ theApp

CDiscoveryApp theApp