file:name()'> dictionary file'> %also; %here; ]>
2012 2013 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. diameter_make(3) Anders Svensson diameter_make.xml
diameter_make Diameter dictionary compilation.

The function &codec; is used to compile a diameter &dictionary; into Erlang source. The resulting source implements the interface diameter required to encode and decode the dictionary's messages and AVP's.

The utility &man_compile; provides an alternate compilation interface.

codec(File :: iolist() | binary(), [Opt]) -> ok | {ok, Ret} | {error, Reason} Compile a dictionary file into Erlang source.

Compile a single dictionary file to Erlang source. The input File can be either a path or a literal dictionary, the occurrence of newline (ascii NL) or carriage return (ascii CR) identifying the latter. Opt can have the following types.

{include, string()}

Prepend the specified directory to the code path. Use to point at beam files compiled from inherited dictionaries, &dict_inherits; in a dictionary file creating a beam dependency, not an erl/hrl dependency.

Multiple include options can be specified.

{outdir, string()}

Write generated source to the specified directory. Defaults to the current working directory.

return

Return erl and hrl source as two iolists rather than writing them to the filesystem.

{name|prefix, string()}

Transform the input dictionary before compilation, setting &dict_name; or &dict_prefix; to the specified string.

{inherits, string()}

Transform the input dictionary before compilation, appending &dict_inherits; of the specified string.

Two forms of @inherits have special meaning:

{inherits, "-"}
{inherits, "Prev/Mod"}

The first has the effect of clearing any previous inherits, the second of replacing a previous inherits of Prev to one of Mod. This allows the semantics of the input dictionary to be changed without modifying the file itself.

Multiple inherits options can be specified.

Note that a dictionary's &dict_name;, together with the outdir option, determine the output paths when the return option is not specified. The &dict_name; of a literal input dictionary defaults to dictionary.

BUGS

All options are string-valued. In particular, it is not currently possible to specify an &dict_inherits; module as an atom(), or a path as an arbitrary &filename;

SEE ALSO

&man_compile;, &man_dict;