Back to home page

Enduro/X

 
 

    


0001 BVFTOS(3)
0002 =========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bvftos - Transfer data from UBF buffer to view (C structure)
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 int Bvftos(UBFH *'p_ub', char *'cstruct', char *'view');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 This function is used to transfer the data from UBF buffer 'p_ub' to VIEW structure 'cstruct'. 
0023 The view name is passed by 'view' argument. The name present by 'view' must be
0024 present in view object files. Configured by *VIEWDIR* and *VIEWFILES* environment
0025 variables.
0026 The view file (see *viewfile(5)* page), shall contain the mappings in 'UBF_NAME' column.
0027 If mapping is present (not "-"), the function will perform data transfer from corresponding
0028 UBF buffer to mapped C view field. The transfer is performed only in case if in
0029 column 'FLAGS' of view file the flag *S* is present, and flag *N* is not present.
0030 If UBF buffer have more occurrences that defined in 'COUNT' column of view file,
0031 then extra UBF occurrences are ignored. If occurrences are less than 'COUNT' specified
0032 in view, then those missing array elements are filled with 'NULL_VAL' value. If
0033 flag *C* is present, then count field will be initialized to number of elements
0034 transferred to structure. If *L* flag was present, then for *string* and *carray*
0035 elements, the number of bytes transferred to each array element is set.
0036 
0037 RETURN VALUE
0038 ------------
0039 On success, *Bvftos()* return zero; on error, -1 is returned, with *Berror* set to 
0040 indicate the error.
0041 
0042 ERRORS
0043 ------
0044 Note that *Bstrerror()* returns generic error message plus custom message with 
0045 debug info from last function call.
0046 
0047 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0048 
0049 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0050 
0051 *BBADFLD* Invalid field id passed.
0052 
0053 *BBADVIEW* View is not found, object file is defective or system error.
0054 
0055 *BVFSYNTAX* Defective object file.
0056 
0057 EXAMPLE
0058 -------
0059 See *atmitest/test040_typedview/viewunit1.c* for sample code.
0060 
0061 BUGS
0062 ----
0063 Report bugs to support@mavimax.com
0064 
0065 SEE ALSO
0066 --------
0067 *viewc(8)* *Bvstof(3)* *Bvsinit(3)* *Bvselinit(3)* *Bvnull(3)* *Bvopt(3)* *ex_env(5)*
0068 *viewfile(5)*
0069 
0070 COPYING
0071 -------
0072 (C) Mavimax, Ltd
0073