Purchase & Pricing
.Net CF C# or VB.Net:
Reading Data from Special-Purpose
addition to the standard writing (printing) of data to printers, AsciiCE2 supports reading data from
specialized printers, . This
gives developers opportunities to support special-purpose printers which
might include data readers such as magnetic-card and smart card readers.
AsciiCE2's data reading capabilities are generic in nature, so it is the
responsibility of the application to use AsciiCE2's write functions to
send appropriate commands to the printer that will trigger the printer to
send data back. Note: AsciiCE and PrinterCE use an infrared protocol
called IRLPT to communicate with IR printers, so AsciiCE can only read
data from devices that can send using the IRLPT protocol.
following provides a brief outline of the steps involved in using AsciiCE2
to read data from a printer. Refer to AsciiCE2
documentation here for full details on the commands.
SelectPortEx to enable data reading from the printer. SelectPortEx (an
extension to SelectPort) establishes a communication link to the
printer (IR or Serial). If the ReadBufferSize
parameter is non-zero, it causes AsciiCE2 to create a read-thread with
a read-buffer that is "ReadBufferSize" bytes long. The
read-thread will watch for any data received from the printer and save
it in the ReadBuffer until your application is ready to use it.
any of AsciiCE2's "write" methods ("Write", "WriteVar"
or "Text") to instruct the printer to perform whatever tasks
(such as read a magnetic card swipe) are necessary to gather data and
begin sending via the established IR or serial port.
any of AsciiCE2's "read" methods ("Read", "ReadChar",
"ReadString", "ReadVar", or "ReadStringVar")
to read data sent from the printer. "Read" (for C++ or MFC)
and "ReadVar" (for eVB) provide special functionality to
support timeouts (in case data isn't received in some specified amount
of time) and several simple data handling operations.
the data (or handle timeout or other errors) then close the AsciiCE2