tsc_LabelPrinter

This class provides access to the label printer potentially connected to Trimble Access.

Currently the only supported printer is the ZebraP4T.

Use this class to get an instance of this printer and to instantiate labels when can be edited and then returned to the printer object for printing.

Construction

static tsc_StringList GetKnownPrinters();
Request a list of all the supported printers, this will include a '*' entry indicating the default do-not-care-which-printer choice.

static tsc_LabelPrinter* GetLabelPrinter (const char* printerByName);
Request the printer by name ("ZebraP4T"), or default ("*").  Will return NULL if the printer cannot be found.

Destruction

virtual ~tsc_LabelPrinter();

Public Methods

virtual bool IsConfigured ();
Is the printer configured and/or licensed to connect and print?

virtual tsc_PrinterLabel* InstantiateNewLabel ();
Generate a new label for editing. Users must delete this when they are finished withthe object.

virtual tsc_String PrinterId ();
Get the name of this printer, e.g. "ZebraP4T".

virtual tsc_String PrinterCommandLanguage ();
Get the protocol this printer, e.g. "ZPL2".

virtual bool Open ();
Open a channel to the printer. May block while the channel is being established.  Note that the Bluetooth channel will timeout when it is idle.

virtual void Close ();
Close the channel to the printer, may block while queued data is being sent.

virtual bool Initialise  (const char* userInitString = NULL);
Initialise printer after opening, required before printing any labels or commands.

virtual bool WriteRawData (const char* data);
Write raw commands to the printer.

virtual bool PrintLabel (tsc_PrinterLabel* label);
Write a label to the printer, see tsc_PrinterLabel for more details.