Click or drag to resize

Model Compiler

Home
Introduction

This topic describes the default OPC Foundation SDK UA Model Compiler tool, which is used during the model build process.

Model compiler

OPC UA Model Compiler is a tool, which generates classes that implement a UA information model. It is a tool supplied by the OPC Foundation and it is a default compiler in OPC UA Address Space Model Designer. Below there is a description of OPC UA ModelCompiler Command line:

ModelCompiler.exe -d <filepath> -c[g] <filepath> -o[i] <directorypath> [-oe <directorypath>

ModelCompiler.exe -d2 <filepath> -c[g] <filepath> -o[i] <directorypath> [-oe <directorypath>

-? Prints this help text

-d The path to the XML file which contains the UA information model

-d2 The path to the XML file which contains the UA information model. New version of code generator is used (option -stack forces to use -d2 switch)

-c Path to the CSV file which contains unique identifiers for the types defined in the UA information model

-cg Generates the unique identifier CSV file instead of reading it (used instead of the -c option)

-o Output directory (used instead of the -oi and -oe options)

-oi Output directory for the classes used by the server

-oe Output directory for classes that can be used by a client or a server (i.e. datatypes)

-o2 Analogy to –oe but enforces splitting of generated C# files

-id The start identifier

-ansic

-stack

-useXmlInitializers

-console The output goes to the standard error output (console) instead of error window

Verification

A validator verifies consistency of the model and creates suitable values for optional information. Once the model is validated it can be passed to a generator which creates different types of code or documentation.

See Also