Print Data
Sending print data to the server.
ti_set_print_data
Send print data to the server.
client: Client handle.
data: Binary print data buffer.
data_len: Data length in bytes.
index: Print data sequence number (provided by the business layer, used for deduplication / ordering control).
is_static: 0 = normal data (one-time print), non-zero = static data (repeatedly printing the same content). Static data is cached by the server to optimize repeated transfers.
Returns:
TI_OK— sent successfullyReturns:
TI_ERR_NOT_CONNECTED— not connectedReturns:
TI_ERR_INVALID_ARG— client / data is NULL or data_len is 0Returns:
TI_ERR_SERVER— the server rejected the data
Example:
uint8_t print_data[] = { 0x1B, 0x40, ... };
int rc = ti_set_print_data(cli, print_data, sizeof(print_data), 0, 0);
if (rc == TI_OK) {
printf("Sent successfully\n");
}