UniPRT SDK  v1.0.0.0
com.UniPRT.Sdk.Mgmt.IMgmtMessenger Interface Reference
Inheritance diagram for com.UniPRT.Sdk.Mgmt.IMgmtMessenger:
com.UniPRT.Sdk.Mgmt.Messenger

Public Member Functions

int UnreadMsgCount ()
 Get number of unread messages received and waiting to be read. More...
 
MgmtMsg ReadNextMsg ()
 Read next message that may have been received asynchronously from printer. More...
 
String SendMsg (String command, String content, String TrackNo)
 Send a management command and data/content to printer. More...
 
String SendMsg (String command, String content)
 
MgmtMsg SendMsgAndWaitForResponse (String command, String content, int maxWaitTimeSecs)
 Send a management command and data/content to printer and wait for response maxWaitTimeSecs time. More...
 
MgmtMsg SendMsgAndWaitForResponse (String command, String content)
 
void SendMsgRaw (String dataToSend)
 Sends contents without any message formatting directly to printer. More...
 

Member Function Documentation

◆ ReadNextMsg()

MgmtMsg com.UniPRT.Sdk.Mgmt.IMgmtMessenger.ReadNextMsg ( )

Read next message that may have been received asynchronously from printer.

Implemented in com.UniPRT.Sdk.Mgmt.Messenger.

◆ SendMsg() [1/2]

String com.UniPRT.Sdk.Mgmt.IMgmtMessenger.SendMsg ( String  command,
String  content 
)

◆ SendMsg() [2/2]

String com.UniPRT.Sdk.Mgmt.IMgmtMessenger.SendMsg ( String  command,
String  content,
String  TrackNo 
)

Send a management command and data/content to printer.

The optional TrackNo is the field used in the JSON command structure sent to printer and can be used by caller to check for response from printer. If no TrackNo is provided, one is generated.

The return string is the TrackNo field used in the JSON message sent to the printer to allow caller to differentiate any response associated with the message sent by comparing the TrackNo field of any response received from printer.

Implemented in com.UniPRT.Sdk.Mgmt.Messenger.

◆ SendMsgAndWaitForResponse() [1/2]

MgmtMsg com.UniPRT.Sdk.Mgmt.IMgmtMessenger.SendMsgAndWaitForResponse ( String  command,
String  content 
)

◆ SendMsgAndWaitForResponse() [2/2]

MgmtMsg com.UniPRT.Sdk.Mgmt.IMgmtMessenger.SendMsgAndWaitForResponse ( String  command,
String  content,
int  maxWaitTimeSecs 
)

Send a management command and data/content to printer and wait for response maxWaitTimeSecs time.

Null object returned if no response received before timeout expired.
All messages are discarded until the response to the specific message sent is received. The discarded messages may include any unread/old messages waiting to be read prior to the call to this method.

Implemented in com.UniPRT.Sdk.Mgmt.Messenger.

◆ SendMsgRaw()

void com.UniPRT.Sdk.Mgmt.IMgmtMessenger.SendMsgRaw ( String  dataToSend)

Sends contents without any message formatting directly to printer.

This is for cases where data needs to be sent without any added management message formatting. If there is a special management message or data need to be sent in a port that is shared for both data and management, this would be used to send data directly to printer.

Implemented in com.UniPRT.Sdk.Mgmt.Messenger.

◆ UnreadMsgCount()

int com.UniPRT.Sdk.Mgmt.IMgmtMessenger.UnreadMsgCount ( )

Get number of unread messages received and waiting to be read.

Implemented in com.UniPRT.Sdk.Mgmt.Messenger.


The documentation for this interface was generated from the following file: