FTAM/9000 Programmer's Guide
Chapter 8 317
Transferring HP FTAM/9000 Data
Reading Data
ft_rdataqos()
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_rdataqos (src_connection_id, dest_connection_id,
des_requested, return_event_name, inout_dcb)
Connection_id src_connection_id;
Connection_id dest_connection_id;
Uint16 des_requested;
Local_event_name return_event_name;
struct Ft_rdata_out_dcb **inout_dcb;
Use ft_rdataqos() to receive the data you requested on ft_read(). Issuing
ft_rdataqos() controls the number of data elements you read (i.e.,
controls the flow of information). You may have to call ft_rdataqos()
several times to read the entire contents of a file. The information
returns in the inout_dcb->data_unit parameter.
Since FTAM-1, FTAM-3, and INTAP-1 files contain only single FADUs,
you must read the entire file. You can read individual FADUs within
FTAM-2 files. (Refer to the “FTAM Data Structures” chapter for
Ft_data_unit information.)
• Both ft_rdataqos() and ft_rdata() perform the same function.
However, ft_rdataqos() is used if QOS is set to 1 or 2 while ft_rdata()
is used if QOS is set to 0. Also, in ft_rdataqos(), both the source and
destination connection_ids are passed while in ft_rdata(), only one
connection_id is passed.
• Invoke ft_rdataqos() in the Data Transfer regime after invoking
ft_read(); you do not move to another regime.
• The des_requested parameter specifies the maximum number of data
elements you want to receive.
• During ft_connect(), you must negotiate the FT_FU_READ
functional_units to use ft_rdataqos().
• If the inout_dcb->data_unit->structure_id equals FT_DATA_END,
you reached the end of the file.
• If the inout_dcb->data_unit->structure_id equals FT_CANCEL_IND,
the responder cancelled the data transfer. Call ft_rcancel() to respond
to the cancel indication; do not send another ft_rdataqos().