UniPRT SDK  v2.0.0.1
com.UniPRT.Sdk.Json.PrinterUtil 類別 參考文件

提供常用服務,使之儘可能以「一行代碼」的方式完成。 更多...

靜態私有方法(Static Private Methods)

static boolean PingResponded (String ip, int timeoutSecs)
 使用位於 fileLocation 的文件通過 password 和連接 commDescriptor 在指定的 timeoutMins 分鐘內更新打印機固件。 更多...
 
static boolean PingStoppedResponding (String ip, int timeoutSecs)
 

詳細描述

提供常用服務,使之儘可能以「一行代碼」的方式完成。

\~English @brief
  Commmonly used services that allow for "one liner" or as close to "one liner" service as possible.

@details
  Services such as sending a print job, getting printer status.

@remarks
  @todo <b>Todo: Raul Update! </b> Clean this up and remove "under construction" signs. \n
  This is where the services that can be achieved with __one liners__ go. \n
  For example:
    - 1.) Get printer hardware info. Is this the right hardware to send print job to ?
    - 2.) Get printer status (online, offline, fault, etc).  Is it ready for me to send print job ?
    - 3.) Download new firmware here ?

@section Examples
@anchor refToPrinterUtilExample
@include PrinterUtilSnippet.java

@section Output

...

Output

包含發送打印任務、獲取打印機狀態等服務。

備註
待辦事項:
Todo: Raul Update! 清理此部分並移除「施工中」的標記。
這裡是可以用__一行代碼__達成的服務。
例如:
  • 1.) 獲取打印機硬件资讯。這是合適的硬件來發送打印任務嗎?
  • 2.) 獲取打印機狀態(在線、離線、故障等)。它準備好接收打印任務了嗎?
  • 3.) 在此下載新固件?

範例

輸出

...

輸出

函式成員說明文件

◆ PingResponded()

static boolean com.UniPRT.Sdk.Json.PrinterUtil.PingResponded ( String  ip,
int  timeoutSecs 
)
staticprivate

使用位於 fileLocation 的文件通過 password 和連接 commDescriptor 在指定的 timeoutMins 分鐘內更新打印機固件。

如果成功將固件發送到打印機則返回 true,否則返回 false。
請注意,在軟件更新過程中不應關閉打印機,更新可能需要幾分鐘時間。
例如,commDescriptor 可以是打印機的 IP 地址,例如 "192.168.1.101"

◆ PingStoppedResponding()

static boolean com.UniPRT.Sdk.Json.PrinterUtil.PingStoppedResponding ( String  ip,
int  timeoutSecs 
)
staticprivate

此類別(class) 文件是由下列檔案中產生: