integer function fdds_writem(out_bin, out_tag, in_bin, in_tag, in_buf, count)
out_tag is a field tag, previously obtained eg. from fdds_member. It specifies a tag associated with out_bin. This provides a scale factor for count. If out_tag is zero (nominal), it defaults to the SEQUENCE (trace type) associated with out_bin.
In_bin is a binary tag, previously obtained from fdds_open. It specifies an input binary stream.
in_tag is a field tag, previously obtained eg. rom fdds_member. It specifies a type associated with in_bin. This provides a scale factor for count. If in_tag is zero (nominal), it defaults to the SEQUENCE (trace type) associated with in_bin.
Data is written from in_buf. The minimum size is count times the size of in_tag.
The return value is the number of types actually mapped and written. EOF is returned, if an error occurred before any transfer.
#include <fdds.h>
integer in_bin, out_bin
integer out_buf(*)
...
! write 10 traces from type buffer
j = fdds_writem(out_bin, 0, in_bin, 0, out_buf, 10)
In free-format F90:
#include <f90dds.h>
integer in_bin, out_bin
integer out_buf(*)
...
! write 10 traces from type buffer
j = fdds_writem(out_bin, 0, in_bin, 0, out_buf, 10)
Using the DDS module:
(Note that the DDS module requires that data arrays passed to I/O
functions be 1 dimensional.)
use dds
integer :: in_bin, out_bin, nsmp, ntrc, itrc
real, allocatable :: buffer(:,:)
allocate(buffer(nsmp, ntrc))
! write 10 traces from type buffer
do itrc=1,10
ier = fdds_writem(out_bin, 0, in_bin, 0, buffer(:,itrc), 1)
enddo
fdds_readm
fdds_write
fdds_map