Constructs an SGD DO command and sends it to the printer. This method waits for a maximum of
maxTimeoutForRead milliseconds for any data to be received. Once some data has been received it
waits until no more data is available within timeToWaitForMoreData milliseconds. This method returns
the SGD value associated with setting without the surrounding quotes.
Namespace:
ZSDK_API.SgdAssembly: ZSDK_API (in ZSDK_API.dll) Version: 1.1.123.0
Syntax
C# |
---|
public static string DO( string setting, string value, ZebraPrinterConnection printerConnection, int maxTimeoutForRead, int timeToWaitForMoreData ) |
Visual Basic (Declaration) |
---|
Public Shared Function DO ( _ setting As String, _ value As String, _ printerConnection As ZebraPrinterConnection, _ maxTimeoutForRead As Integer, _ timeToWaitForMoreData As Integer _ ) As String |
Parameters
- setting
- Type: System..::.String
The SGD setting.
- value
- Type: System..::.String
The setting's value.
- printerConnection
- Type: ZSDK_API.Comm..::.ZebraPrinterConnection
The connection to send the command to.
- maxTimeoutForRead
- Type: System..::.Int32
The maximum time, in milliseconds, to wait for a response from the printer.
- timeToWaitForMoreData
- Type: System..::.Int32
The maximum time, in milliseconds, to wait in between reads after the initial data is received.
Return Value
The response from the SGD DO command.Exceptions
Exception | Condition |
---|---|
ZSDK_API.ApiException..::.ZebraPrinterConnectionException | If an I/O error occurs. |
ZSDK_API.ApiException..::.ZebraGeneralException | If there is an issue writing to the printer. |