SERVICE FUNCTIONS
svcZontalkRcv()
M
X
800 SERIES PROGRAMMERS GUIDE 159
svcZontalkRcv()
svcZontalkRcv() allows an application to perform a LOCAL DL/Zontalk/
VeriTalk download. The application must open and configure the port prior to
calling this function.
The application will receive a callback when the download has completed (on
success of failure). Another callback is provided to pass messages from the
server. The function zontalkCancel() can be called at any time to cancel the
download.
Prototype
result = svcZontalkRcv(int port, void(*dspCallback)(char *msg), unsigned
char type, void(*endCallback)(inti result);
int result;
Parameters
svcZontalkRcv() supports and will process three environment variables when
performing a download. They are:
NOTE
svcZontalkRcv()is a threaded function and will return immediately. The return
code will be < 0 if the download could not be initialized.
port Communication port where the download will be received.
COM1,COM2 or COM3 may be specified.
dspCallback Callback function that will be called when an information/status
message is received from the Zontalk/DL server. A string will be
passed to the callback function with the null terminated server.
type
endCallback Callback function that will be called when the download has
completed successfully or failed. An integer will be passed to the
callback function with the result code. Values < 0 indicate failure.
ZT Specifies the terminal ID. Will be set to the terminal id specified and will
be used in the client sign-on packet with the server. Only the first eight
characters are valid and used in the sign-on packet.
ZA Specifies the application ID. Will be set to the application ID specified
and will be used in the client sign-on packet with the server. Only the
first eight characters are valid and used in the sign-on packet.
F Full download
P Partial download