Back to home page

Enduro/X

 
 

    


0001 BGETS(3)
0002 ========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bgets - Get the field value converted to *BFLD_STRING*
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 int Bgets (UBFH *'p_ub', BFLDID 'bfldid', BFLDOCC 'occ', char *'buf');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 Function is used to get field data from UBF buffer. 'p_ub' is pointer to UBF buffer, 'bfldid' is field id, 'occ' is field occurrence at buffer, which needs to be read. 'buf' is buffer where to output the data, data is automatically converted to *BFDL_STRING*. It is assumed that space in 'buf' is large enougth to store the value.
0023 
0024 This is macro function and it invokes *CBget(3)* with field type *BFLD_STRING* and length 0.
0025 
0026 RETURN VALUE
0027 ------------
0028 On success, *Bgets()* return zero; on error, -1 is returned, with *Berror* set to indicate the error.
0029 
0030 ERRORS
0031 ------
0032 Note that *Bstrerror()* returns generic error message plus custom message with debug info from last function call.
0033 
0034 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0035 
0036 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0037 
0038 *BNOSPACE* No space in 'buf'.
0039 
0040 *BMALLOC* Failed to allocate type conversion buffer.
0041 
0042 *BBADFLD* Invalid field id passed.
0043 
0044 *BNOTPRES* Field not present.
0045 
0046 EXAMPLE
0047 -------
0048 See *ubftest/test_macro.c* for sample code.
0049 
0050 BUGS
0051 ----
0052 Report bugs to support@mavimax.com
0053 
0054 SEE ALSO
0055 --------
0056 *Bchg(3)* *Badd(3)* *CBadd(3)* *Bget(3)* *CBget(3)*
0057 
0058 COPYING
0059 -------
0060 (C) Mavimax, Ltd
0061