UDF PROGRAMMERS MANUAL

BuildMatrix (1) UDF PROGRAMMERS MANUAL BuildMatrix (1)
NAME BuildMatrix

SYNOPSIS

#include "libbase_udf.h"
ByTe_2 BuildMatrix (u_ByTe_4 Key, ByTe_1 *Ex, u_ByTe_2 vN, void *UDF, ByTe_2 sN, ByTe_1 Fwd, struct MatrixData *Md);

INPUT DEFINITIONS

Key - UDF data key
Ex - UDF file extension
vN - UDF version number
UDF - pointer to general UDF data structure
sN - sensor from which matrix is to be built
Fwd - forward flag
0 - do not forward to the next matrix when complete
1 - forward to the next matrix when complete
Md - pointer to a variable of type struct MatrixData

DESCRIPTION BuildMatrix assembles a matrix from sN within the UDF source identified with Key and Ver. UDF is used in assembling the matrix which is returned in the Md structure. Fwd is used to indicate if on the next call to BuildMatrix the next matrix is to be retrieved. If the sensors under Key are not matrix sensors then the routine will return with an error.

Multiple matrices can be retrieved from a UDF definition by setting Fwd to 0 and rotating sN through the matrix sensors to be retrieved. When retrieving the last matrix Fwd must be set to 1. NOTE: This only works if the matrices are not spread over multiple UDF data records. When this is the case the matrices must be retrieved individually with each matrix having its own vN.

Under normal conditions Ext should be set to a NULL string. Setting Ext to a non-NULL string will cause the file_pos routine to attempt to use the appropriate named UDF header and data files but with the string .Ext appended to it. The file must exist in the current working directory.

RETURN VALUE

RETURN VALUE On success, ALL_OKAY is returned, otherwise an error code is returned.

ERRORS NOT_MATRIX_UDF UDF sensors are not defined to be of type matrix DREC_NOT_FILLED No opened file (file_open not called?) DREC_NO_FILES No opened file: file_open not called LOS_STATUS No more data in data file NEXT_FILE_STATUS Data is in next data file

APPLICABLE FORMATS UDF V2.2, IDFS V2.1

RESTRICTIONS None.

SEE ALSO MatrixData (1S) CreateMatStruc (1) BuildImage (1)

UDF V2.2 Sept 1, 2000 UDF V2.2

TOC HOME