Appendix B – SDK NCL-API and Port Server_____________________ Boomer-III User Manual & Integrator’s Guide
Copyright Wavenet Technology © October 2003
100
BM310012WT04
Input
:
usSduTag
Pointer to a word where the SDU tag can be stored
szHostId
Pointer to a buffer specifying the Host identity. The Host ID is
typically 3 bytes in length for DataTac systems. The NCL API will
truncate Host ID’s longer than NCL_MAX_UH_LEN (63) bytes in
length.
ucIdLen
Total length of the session ID
ucData
Pointer to the data to be sent
iDatLen
Length of the data to be sent
bResend
Resend flag must be set to false, except if the packet of data is
being re-sent due to a failure of the previous send. Setting the
flag to true prevents the possibility of receiving duplicate packets
at the server application. This flag
cannot
be used for resending
data prior to the previous packet.
Output:
Return value = 0
Operation was successful
Return value
≠
0
Operation failed. Value specifies the error type
usSduTag
Pointer to a word containing a reference of the corresponding
SDU tag which was generated by the NCL API for this command
to the RPM.
Receive Data From RPM
Applications can call this function to obtain data sent from the RPM.
This applies to both event and response type data from the RPM. Note
this is the only way to obtain response data originating from the RPM
as a result of issuing commands to it by means of other API functions
described in this document. The return code of all API functions
issuing commands to the modem only provides feedback about the
posted command. It does not guarantee delivery to the RPM. It is thus
imperative for applications to use ‘nclReceiveData()’ to obtain
feedback directly from the RPM on commands sent to it. Responses to
commands are asynchronous meaning multiple commands can be
issued to the RPM before the application needs to look at all the
responses. This is the reason why every command provides the
application with a copy of the unique SDU tag generated for the
command. Every response message contains the same SDU tag of its
associated command. The VDD uses the SDU tag to route response
messages to the originating application (client). The
‘nclReceiveData()’ function provides the SDU tag of the response
message. Applications can use these tags to tie up responses with
previously sent commands. One notable exception exist when the SDU
tag is equal to 65535 (FFFF hexadecimal). Only event messages
contain an SDU tag equal to 65535. The received event/ response
messages will be represented as an array of bytes which must be typed
cast to a structure identified by returned structure ID.