User`s guide
3: FMP DLI Functions
DC 900-1339H 51
link to transmit and receive data according to the current configuration settings. After
a link starts, data transmission can begin on the line.
For blocking I/O, a successful Start Link command returns zero, but you must call
dlRead to receive the DLI_PROT_RESP_BIND_ACK response indicating that the FMP soft-
ware has received a data set ready (DSR) signal from the remote end. The link is not
considered started until this signal is received; however, DSR can be ignored by using
certain settings of the modem control option (Section 4.11 on page 80). If you are using
non-blocking I/O, you must also make a
dlRead request to read the completion status.
An unsuccessful Start Link command can return one of the following error codes in the
dlRead pOptArgs.iICPStatus field (see Appendix C for error handling):
DLI_ICP_ERR_LINK_ACTIVE
The link is already started.
DLI_ICP_ERR_BAD_MODE
The function request is not available for the requested
access mode; see Table 2–2 on page 33.
DLI_ICP_ERR_BAD_PARMS
The parameter value(s) used for the function call are
illegal.
3.4.1.6 Stop Link Command
Use the dlWrite function with the pOptArgs.usProtCommand field set to
DLI_PROT_SEND_UNBIND and the pOptArgs.usICPCommand field set to
DLI_ICP_CMD_UNBIND to stop a link without ending your session with Freeway. This
command turns off the DTR modem control signal and shuts down the link transmitter
and receiver. A Stop Link command can be sent to a link that is active or already inac-
tive.
A call to
dlClose (described in the Freeway Data Link Interface Reference Guide) also
stops the link, but terminates the session as well. This is the normal method to termi-
nate a session at the end of a client application. The Stop Link command is useful for
temporarily stopping the link without terminating the session (for example, to recon-