Ecrdownload - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

ecrDownload

This function downloads the APP/OS (uncompressed or compressed ECR format)
from the ECR.
short result = ecrDownload(char *version, void (*dspCallback) (char *),
void (*ecrDnldEnd) (int));
The ECR download functionality operates as a separate thread as its own process
after the ecrDownload() function is called. This function call will return
immediately after the process is started so the application can perform other tasks
and System Mode is still functional.
The version argument contains the application and parameter versions in the form
of 8 characters (4 for application and 4 for parameter) AAAAPPPP. The operating
system uses the version information to set the O4683 configuration variable upon
completion of a successful download. A TO4684 variable is created at the
beginning of the download. Upon completion of a successful download, the
O4683 variable is created with the value of the TO4683 variable and TO4683 is
deleted.
If the application passes a NULL or a NULL terminated string for version, the
operating system will wait for an ONLINE message from the ECR before starting
the download.
The (*dspCallback)(char *) argument is a pointer to a function that is a
callback. It is utilized whenever there is data to be displayed on the M
terminal screen. The application can pass in a callback function pointer that will
handle how the data is displayed.
This function has the capability to expand any file downloaded that may have
been archived or compressed with the Linux "tar" command prior to ECR
conversion with the "pclancnv" utility. The expand utility checks if the download file
is of a tar format. If so, then it expands the archive in the users home directory.
Permissions and ownership are then changed on every file and directory
contained within the archive that are not owned by "root – userid 0".
This function calls the application's callback specified in the
(*ecrDnldEnd)(int) function pointer argument, with the return code. It is
required that the application pass in a valid callback function pointer to be called
when the download ends. This is the only way the application gets notification of a
successful or unsuccessful download.
The application can call the function ecrDnldCancel() anytime to cancel the
current download.
Prototype
ecrDownload()
D
x
800 series
X
M
800 S
P
ERIES
ROGRAMMERS
D
EVICE
RIVERS
ecrDownload
111
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents