make_sil_dir_pro

- create a server instrumentation library working directory

 

SYNOPSIS 

  make_sil_dir_pro [--split] module-name 0*(extra-parms)

Recommended Usage:

  make_sil_dir_pro --split module-name --sil-get2 --sil-edit2


DESCRIPTION

make_sil_dir_pro is a script to create a server instrumentation library (SIL) root work directory, for a specific YANG module.


If the --split parameter is present, then the SIL code generated will be split in 'YumaPro' files and 'User' files. A YumaPro SIL file or external definition begins with the prefix 'y_'. A User SIL file or external definition begins with the prefix 'u_'. This parameter is now required. Using this script without this parameter will cause a deprecation warning to be printed. The old style code will still be generated.


Zero or more extra-parms additional parameters may be present to specify additional parameters to pass to the YANG compiler program. Almost any parameter accepted by the yangdump-sdk program can be added at the end as an extra parameter. The --module and --sil-bundle parameters cannot be added as extra params.


There are some CLI parameters that directly affect SIL code generation that can be used as extra parms. These parameters are:


--sil-edit2 If present, then the 2nd generation 'edit' functions will be generated for SIL or SIL-SA modes instead of first generation 'edit' functions. This parameter is now required. A deprecation warning will be generated if it is not used. The deprecated EDIT1 callbacks will still be generated.



--sil-get2 If present, then the 2nd generation 'get' functions will be generated for SIL or SIL-SA modes instead of first generation 'get' functions. This parameter is now required. A deprecation warning will be generated if it is not used. The deprecated GET11 callbacks will still be generated.



--sil-include=filename The name of an include file to inject into C files when the conversion format is equal to 'c' or 'yc'. An include statement will be generated for each instance of this parameter, in the order these parameters are given. Zero or more instances of this parameter are allowed.


The include statements will be generated after the system <include> statement and general YumaPro include statements, but before the YANG module specific include statements.


--sil-nmda If present, then the 2nd generation NMDA 'get' functions will be generated for SIL or SIL-SA modes, if code generation is being requested. Ignored otherwise. The GET2 callbacks will be generated with extra NMDA specific code for config=true data nodes. It is an error if sil-nmda is selected but sil-get2 is not selected.


The SIL code can be regenerated without calling this script by invoking 'make code' from the 'src' directory.


The following directories and files would be created if the command 'make_sil_dir_pro test' was called from the directory ~/work (without the --split option):


 THIS MODE IS NOW DEPRECATED. DO NOT USE.

 ~/work/test/ -+
               |
               + bin/
               |
               + lib/
               |
               + Makefile
               |
               + output/html   (*** doxygen generates this directory ***)
               |
               + src/ -+
                       |
                       + Makefile
                       |
                       + test.c   (*** Developer edits this file ***)
                       |
                       + test.h


In --split mode, the Yuma files never need to be edited. All the code that needs device instrumentation is contained in the User SIL C file.


The SIL code can be regenerated without calling this script by invoking 'make splitcode' from the 'src' directory.


The following directories and files would be created if the command 'make_sil_dir_pro --split test' was called from the directory ~/work:

 ~/work/test/ -+
               |
               + bin/
               |
               + lib/
               |
               + output/html   (*** doxygen generates this directory ***)
               |
               + Makefile
               |
               + src/ -+
                       |
                       + Makefile
                       |
                       + u_test.c   (*** Developer edits this file ***)
                       |
                       + u_test.h
                       |
                       + y_test.c
                       |
                       + y_test.h


The doxygen program should be installed, so the HTML documentation can be used.


The 'make doc' command in the root directory will run doxygen and generate the output/html directory contents.


The 'make opendoc' command will launch the default browser to view the doxygen documentation in the output/html directory. It must be run after the 'make doc' command.


The 'make' command in the root or 'src' directory will attempt to compile the C files and produce a library called root/lib/lib<module-name>.so. (e.g. /work/test/lib/libtest.so).


The 'make install' command in the root or 'src' directory will attempt to install the library file for the module in the YumaPro library directory (e.g., /usr/lib/yumapro).

 

USAGE

This script must be called from the parent directory where the SIL root work directory should be created. The 'module-name' parameter will be used for the name of the directory created. It must match a module in the normal module search path for the SIL code to be generated.

 

SEE ALSO

make_sil_sa_dir,  make_sil_bundle,  make_sil_sa_bundle