After you create dynamic model files, the class and property declarations must be compiled into a form that can be loaded by a Manager. The dynamic model compiler, dynmodel, is used to compile the modified model files.
The dynmodel compiler is located in the BASEDIR/smarts/bin/ directory.
The dynmodel command is used to invoke the dynamic model compiler on one or more files that contain model class definitions. The compiler checks the MODEL syntax but does not verify compatibility with other models, including name resolution. The dynamic model compiler generates a corresponding model file, for each input file, that can be loaded into a Manager. The generated files can be loaded by a Manager as part of the data model.
The syntax of the dynmodel command is:
dynmodel [<options>] <mdl-files>
where:
-
<options> may be in any order, but must precede the .mdl files. Options are defined in Command line options for the dynmodel command.
-
<mdl-files> specify one or more files, separated by a space.
option |
Description |
---|---|
-w |
Suppress generation of warning messages produced by the compiler. |
-Wb,ProblemMode |
Compile dynamic model files that have added or refined problems and symptoms. |
--help |
Prints the compiler’s command line options and then exits. |
--version |
Prints the compiler’s version information and then exits. |
--l10nsrc |
The base directory that holds locale source files.The default is l10nsrc. When dynmodel generates Resource Packages it incorporates files for each model based on <dir>/<pkg_id> where: <pkg_id> is the model filename less its extension, plus "_mm", and then truncated at 23 characters. This option must be used in conjuction with the --locales option.
Note:
This option is not available in the Service Assurance Manager. |
--locales |
A comma-delimited list of locales which correspond to localized text files to be incorporated into the Resource Package for model files. This option must be used in conjuction with the --locales option.
Note:
This option is not available in the Service Assurance Manager. |
In this example, the command line suppresses the generation of warning messages produced when compiling the mymodel.mdl file.
dynmodel -w mymodel.mdl
The dynmodel command creates the following files in the BASEDIR/smarts/model directory, where <modelname> is the name of a dynamic model. Files and directories generated by the dynmodel compiler describes the set of files that is created for each of the dynamic model files included on the command line.
Generated file or directory |
Description |
---|---|
<modelname>.ldm |
The version of the dynamic model that is loaded into a Domain Manager. |
<modelname>_mmbe.dat |
The Big Endian message file for the MODEL interface, attribute, and event descriptions |
<modelname>_mmle.dat |
The Little Endian message file for the MODEL interface, attribute, and event descriptions |
<modelname>_mm.txt |
The Resource Package source that contains MODEL text. |
<modelname>_mm |
A directory created for holding temporary files needed during the dynamic model compilation process.
Note:
Do not remove this directory. |
For example, the following commands compile the Asset.mdl and AssetUCS.mdl dynamic model files:
# cd BASEDIR /smarts/local/model # BASEDIR /smarts/bin/dynmodel Asset.mdl AssetUCS.mdl
When the Asset.mdl and AssetUCS.mdl dynamic model files are compiled, the following set of files and directories are produced:
-
Asset.ldm
-
Asset_mmbe.dat
-
Asset_mmle.dat
-
Asset_mm.txt
-
Asset_mm
-
AssetUCS.ldm
-
AssetUCS_mmbe.dat
-
AssetUCS_mmle.dat
-
AssetUCS_mm.txt
-
AssetUCS_mm
Asset.ldm is the version of the dynamic model file that can be loaded by a Manager. Likewise, AssetUCS.ldm is the version of the dynamic model file AssetUCS.mdlthat can be loaded by a Manager.