User's Guide
Reference Manual
Release Notes
PDF
Top

Diameter
Reference Manual
Version 1.4.2

Expand All
Contract All

Table of Contents

- diameter
  - Top of manual page
  - add_transport/2
  - call/4
  - origin_state_id/0
  - remove_transport/2
  - service_info/2
  - services/0
  - session_id/1
  - start/0
  - start_service/2
  - stop/0
  - stop_service/1
  - subscribe/1
  - unsubscribe/1
- diameterc
- diameter_app
  - Top of manual page
  - Mod:peer_up/3
  - Mod:peer_down/3
  - Mod:pick_peer/4
  - Mod:prepare_request/3
  - Mod:prepare_retransmit/3
  - Mod:handle_answer/4
  - Mod:handle_error/4
  - Mod:handle_request/3
- diameter_codec
  - Top of manual page
  - decode/2
  - encode/2
- diameter_dict
- diameter_make
  - Top of manual page
  - codec/2
- diameter_transport
  - Top of manual page
  - Mod:start/3
- diameter_tcp
  - Top of manual page
  - start/3
- diameter_sctp
  - Top of manual page
  - start/3

# diameter_make

### MODULE

diameter_make

### MODULE SUMMARY

Diameter dictionary compilation.

### DESCRIPTION

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

The utility diameterc(1) provides an alternate compilation interface.

### EXPORTS

codec(Path::string(), [Opt]) -> ok | {error, Reason}

Compile a single dictionary file to Erlang source. 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, @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.

{name|prefix, string()}

  Transform the input dictionary before compilation, setting @name or @prefix to the specified string.

{inherits, string()}

  Transform the input dictionary before compilation, appending @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.

### BUGS

All options are string-valued. In particular, it is not currently possible to specify an @inherits module as an atom(), or a path as an arbitrary file:name()

### SEE ALSO

diameterc(1), diameter_dict(4)