[Top]
[Prev]
[Next]
[Bottom]
VSfpack/vsfcpak/vsfnpak
intn VSfpack(int32
vdata_id
, intn
action
, char *
fields_in_buf
, VOIDP
buf
, intn
buf_size
, intn
n_records
, char *
fields
, VOIDP
bufptrs
[])
vdata_id
IN:
Vata identifier returned from
VSattach
action
IN:
Action to be performed
fields_in_buf
IN:
Fields in
buf
to write to or read from the vdata
buf
IN/OUT:
Buffer for the vdata values
buf_size
IN:
Buffer size in bytes
n_records
IN:
Number of records to pack or unpack
fields
IN:
Names of the fields to be packed or unpacked. It may be a subset of the
fields_in_buf
. NULL stands for all fields in
buf
bufptrs
IN/OUT:
Array of pointers to the field buffers
Purpose
Packs field data into a buffer or unpacks buffered field data into vdata fields.
Return value
Returns SUCCEED (or 0) if successful, FAIL (or -1) otherwise..
Description
The calling program should supply the number of field buffers corresponding to the number of fields to be packed or unpacked and is responsible to allocate sufficient space for each buffer. This should be at least
n_records
*(total size of all fields specified in
fields_in_buf
) in length.
Valid values of
action
are: _HDF_VSPACK (or 0) which pack field values into
buf
, or _HDF_VSUNPACK (or 1) which unpacks vdata values into field buffers.
There are two Fortran-77 versions of
VSfpack
:
vsfnpak
and
vsfcpak
. The
vsfnpak
routine packs or unpacks a numeric field and
vsfcpak
a character type field. These routines pack one field at a time.
When
VSfpack
is called to pack field values into
buf
,
fields_in_buf
should contain all fields of the vdata. NULL can be used in C programs for
fields_in_buf
, a blank character ' ' in Fortran-77 programs. When
VSfpack
is called to unpack field values,
fields_in_buf
may be a subset of the vdata fields. NULL can be passed into
VSfpack
and the space character in
vsfnpak
and
vsfcpak
as the
fields_in_buf
parameter to specify all fields in the vdata.
If the
fields_in_buf
parameter is set to NULL, all fields in the vdata will be packed.
FORTRAN
integer function vsfnpak(vdata_id, action, fields_in_buf, buf, buf_size, n_records, fields, bufptrs)
integer vdata_id, action, buf, buf_size, n_records, bufptrs
character* (*) fields_in_buf, fields
integer function vsfcpak(vdata_id, action, fields_in_buf, buf, buf_size, n_records, fields, bufptrs)
integer vdata_id, action, buf, buf_size, n_records
character* (*) fields_in_buf, fields, bufptrs
[Top]
[Prev]
[Next]
[Bottom]
hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.