This member of RFAuxPort Object is supported on Windows Mobile, Windows CE, Palm, and DOS.
The QueryPort Method lets you query a RF device’s serial port for input. You may also use the QueryPort Method to send data to the RF device’s serial port.
VB
pszResponse = object.QueryPort (nPort, nStart, nEnd, nMaxLength, nTimeout, pszRequest)
VC++
HRESULT hr = object->QueryPort(short nPort, short nStart, short nEnd, short nMaxLength, short nTimeout, LPCTSTR pszRequest, LPCTSTR *pszResponse);
Return Value
pszResponse |
Any returned response received from the RF device’s serial port. |
Parameters
nPort |
The communicating serial port of the RF device. The possible values are: WLCOM1 - Com port 1 WLCOM2 - Com port 2 |
nStart |
The starting character for returned data that is framed. Any data received prior to the starting character will be discarded. Enter the decimal equivalent of the ASCII character you wish to designate as the starting character of a data frame. If WLNOCHAR is entered, no starting character will be defined. |
nEnd |
The ending character for returned data that is framed. Input will terminate immediately after the ending character is received. Enter the decimal equivalent of the ASCII character you wish to designate as the ending character of a data frame. If WLNOCHAR is entered, no ending character will be defined. A ending character may be defined without a starting character. |
nMaxLength |
The maximum number of characters that may be received before input is automatically returned from the serial port query. If WLNOMAXLENGTH is entered, no maximum length will be enforced. |
nTimeout |
The maximum amount of time (in seconds) that may pass before input is automatically returned from the serial port query. If WLWAITFOREVER is entered, no timeout value will be enforced. If zero (0) is entered any data that is immediately available will be read and returned. |
pszRequest |
Data which will be sent to the serial port before any query input is returned. Set this value to null if you do not wish to send data to the serial port before it is queried. The pszRequest field is often useful for sending data to devices which require a triggering event before responding, such as a scale. |
Remarks
A serial port must first be configured using the ConfigurePort Method before the port may be queried for input using the QueryPort Method. This method may also be used with RF based printers when greater control over communications is required.
Example
See RFAuxPort Samples.
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other