User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:manuals:viewc.8

viewc

Name

viewc — View file compiler

Synopsis

viewc [OPTIONS] viewfile1 viewfile2 … viewfileN

DESCRIPTION

viewc binary consume view files defined in format specified of viewfile(5). The view file describes the C structure which can be mapped to UBF buffer. The view file contains also the length of the STRING and CARRAY fields. Program does following steps:

  1. Generates C header file with structures according to the view file
  2. Calculates machine dependent the C field offset in the memory, calculates field lengths

To perform offset and size calculation, viewc generates small C program which is compiled by buildclient(8) Perl script. The generated temporary program is executed which updates the in-memory read view file. The view file is updated with platform specific data and the "object-file" is written to disk. The object file basically corresponds the same viewfile(5) format, except that additional meta data for each of the fields are encoded after the NULL column. Also some meta data are encoded in view file comments. The "object-file" can be used as original view file by viewc. In that case viewc will ignore the meta data and will produce new "object-file". Compiled view file gets extension .V, the generated header file in C language mode, gets extension .h. If source view file passed in command line for compilation contains the extension, for output files it is stripped off and only base name is used for target output files.

viewc must have access to cc (C Compiler).

ENVIRONMENT

CC
Optional environment variable indicating which C compiler to use. If parameter is not set, the cc command is used.
CFLAGS
Optional C flags to be passed to C compiler during the buildclient execution.

OPTIONS

[-L LD_LIBRARY_PATH]
Additional library path for dynamic libraries. This is needed during the compiled code execution, so that runtime can load dynamic libraries required by Enduro/X.
[-b BUILD_FLAGS]
Additional flags to be passed to cc command line. This can be used to pass additional include path, library path or libraries it self.
[-n]
Do not process UBF mapping during compilation of the view file. This can be useful in cases if the environment is not configured during the build time and field definition files are not accessible at the time.
[-d OUTPUT_DIRECTOR]
Optional flag for changing output directory where object file is generated. If parameter is not set, current directory is used.
[-C]
Reserved for future use.
[-m LANGUAGE_MODE]
Language mode for header file generation. Currently defined value is 0 - C lang, which is default value of the parameter.
[-h]
Print usage.

EXIT STATUS

0
Success
1
Failure

EXAMPLE

See atmitest/test040_typedview for sample usage.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd