aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/doc/src/diameter_make.xml
blob: da6124310e7422dcef3d5fbfb9e7d869a18aea2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd" [
  <!ENTITY filename
  '<seealso marker="kernel:file#type-name">file:name()</seealso>'>
  <!ENTITY dictionary
  '<seealso marker="diameter_dict">dictionary file</seealso>'>
  <!ENTITY % also SYSTEM "seealso.ent" >
  <!ENTITY % here SYSTEM "seehere.ent" >
  %also;
  %here;
]>

<erlref>
<header>
<copyright>
<year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
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.

</legalnotice>

<title>diameter_make(3)</title>
<prepared>Anders Svensson</prepared>
<responsible></responsible>
<docno></docno>
<approved></approved>
<checked></checked>
<date></date>
<rev></rev>
<file>diameter_make.xml</file>
</header>

<module>diameter_make</module>
<modulesummary>Diameter dictionary compilation.</modulesummary>

<description>

<p>
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.</p>

<p>
The utility &man_compile; provides an alternate compilation
interface.</p>

</description>

<!-- ===================================================================== -->

<funcs>

<func>
<name>codec(Path::string(), [Opt]) -> ok | {error, Reason}</name>
<fsummary>Compile a dictionary file into Erlang source.</fsummary>
<desc>

<p>
Compile a single dictionary file to Erlang source.
<c>Opt</c> can have the following types.</p>

<taglist>

<tag><c>{include, Dir::string()}</c></tag>
<item>
<p>
Prepend the specified directory to the code path.
Use to point at beam files compiled from inherited dictionaries,
<c>&dict_inherits;</c> in a dictionary file creating a beam
dependency, not an erl/hrl dependency.</p>

<p>
Multiple <c>include</c> options can be specified.</p>
</item>

<tag><c>{outdir, Dir::string()}</c></tag>
<item>
<p>
Write generated source to the specified directory.
Defaults to the current working directory.</p>
</item>

<tag><c>{name|prefix, string()}</c></tag>
<item>
<p>
Set <c>&dict_name;</c> or <c>&dict_prefix;</c> to the specified
string.
Overrides any setting in the file itself.</p>
</item>

<tag><c>{inherits, Mod::string()}</c></tag>
<item>
<p>
Append &dict_inherits; of the specified module.
Specifying <c>"-"</c> has the effect of discarding clearing any
previous inherits, both in the dictionary file and on the options
list.</p>

<p>
Multiple <c>inherits</c> options can be specified.</p>
</item>

</taglist>

</desc>
</func>

</funcs>

<!-- ===================================================================== -->

<section>
<title>BUGS</title>

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

</section>

<!-- ===================================================================== -->

<section>
<title>SEE ALSO</title>

<p>
&man_compile;, &man_dict;</p>

</section>

</erlref>