User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:bvopt.3

bvopt

Name

Bvopt — Change the view field options

Synopsis

#include <ubf.h>

int Bvopt(char *cname, int option, char *view);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Function is used to change the field options for loaded view. This affects only the runtime session and after the program reboot the flags are read from object files. Flags that can be changed in the view are related to data copy to/from UBF buffer. The field name is specified into cname, the view name is specified in the view field. Function is thread safe (i.e. to threads can call the Bvopt concurrently, but last one will take an effect).

The option field can take following values (constants from ubf.h):

  1. B_FTOS - same as S flag in view file. One way copy from UBF to struct, i.e. this field will participate in Bvftos(3).
  2. B_STOF - same as F flag in view file. One way copy from struct to UBF buffer. This field will participate in Bvstof(3).
  3. B_OFF - same as N flag in view file. Field will not participate in the Bvftos(3) or Bvstof(3) operations.
  4. B_BOTH - sames as both flags F and S set, field will participate in Bvftos(3) and Bvstof(3).

RETURN VALUE

On success, Bvftos() return zero; on error, -1 is returned, with Berror set to indicate the error.

ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BEINVAL Invalid value passed to function, parameters are NULL or invalid option.

BNOCNAME Invalid cname specified (field not found).

BBADVIEW View is not found, object file is defective or system error.

EXAMPLE

See atmitest/test040_typedview/viewunit1.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd