UniPRT 软件开发工具包 v2.0-.a (C++ 静态函式库)
 
载入中...
搜索中...
未找到
Discovery.cpp 文件参考
#include "Discovery.h"
Discovery.cpp 的引用(Include)关系图:

宏定义

#define MAX_THREADS   64
 

函数

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

变量

std::mutex g_listMutex
 

宏定义说明

◆ MAX_THREADS

#define MAX_THREADS   64

函数说明

◆ FreePrinterList()

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

释放字符串资源。

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

◆ FreePrinterList_IPv6()

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

释放字符串资源。

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

◆ GetPrinterList()

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

透过网络寻找打印机。

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

◆ GetPrinterList_IPv6()

std::vector< std::string > * 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>* linkLocal = GetPrinterList_IPv6("fe80::208:96ff:fe40:", "eth0", 1000);
std::vector<std::string>* global = GetPrinterList_IPv6("2001:b030:2219:c40:208:96ff:fe40:", "", 1000);
std::vector< std::string > * GetPrinterList_IPv6(std::string PREFIX, std::string INTERFACE_NAME, int responseTimeoutMs=2000)
透过 IPv6 网络寻找打印机。
Definition Discovery.cpp:141

变量说明

◆ g_listMutex

std::mutex g_listMutex