From 265c88664b93f9069c86bf6c25e5d07b7f41d2dc Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 23 Sep 2013 10:31:21 +0200 Subject: Extend diameter_make:codec/2 Function can now take a literal dictionary as input, instead of a path, and can return results instead of writing them to the filesystem. --- lib/diameter/doc/src/diameter_make.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml index ec71251be1..2e69fca1ae 100644 --- a/lib/diameter/doc/src/diameter_make.xml +++ b/lib/diameter/doc/src/diameter_make.xml @@ -64,12 +64,15 @@ interface.

-codec(Path::string(), [Opt]) -> ok | {error, Reason} +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.

@@ -93,6 +96,13 @@ 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()}

@@ -127,6 +137,13 @@ 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.

+
-- cgit v1.2.3 From 6ddc5e7333ed60beca93a94d3ab0c302dcc472e2 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Fri, 29 Nov 2013 17:08:29 +0100 Subject: Fix documentation typos --- lib/diameter/doc/src/diameter.xml | 14 +++++++------- lib/diameter/doc/src/diameter_app.xml | 4 ++-- lib/diameter/doc/src/diameter_codec.xml | 8 ++++---- lib/diameter/doc/src/diameter_compile.xml | 4 ++-- lib/diameter/doc/src/diameter_dict.xml | 2 +- lib/diameter/doc/src/diameter_intro.xml | 4 ++-- lib/diameter/doc/src/diameter_make.xml | 2 +- lib/diameter/doc/src/diameter_sctp.xml | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml index db19fbb271..8740f7f4d2 100644 --- a/lib/diameter/doc/src/diameter.xml +++ b/lib/diameter/doc/src/diameter.xml @@ -575,7 +575,7 @@ The RFC 3539 watchdog state machine has transitioned into (up) or out of (down) the OKAY state. If a #diameter_packet{} is present in an up event -then there has been a capabilties exchange on a newly established +then there has been a capabilities exchange on a newly established transport connection and the record contains the received CER or CEA. Otherwise a connection has reestablished without the loss or connectivity.

@@ -584,7 +584,7 @@ connectivity.

Note that a single up or down event for a given peer corresponds to multiple &app_peer_up; or &app_peer_down; callbacks, one for each of the Diameter applications negotiated during -capablilities exchange. +capabilities exchange. That is, the event communicates connectivity with the peer as a whole while the callbacks communicate connectivity with respect to individual Diameter applications.

@@ -765,7 +765,7 @@ the application's &dictionary; file.

The capabilities advertised by a node must match its configured applications. In particular, application configuration must be matched by corresponding &capability; configuration, of -Application-Id AVP's in particular.

+*-Application-Id AVPs in particular.

@@ -804,7 +804,7 @@ Defaults to nodes.

Specifies a constant value H for the topmost 32-N bits of of 32-bit End-to-End and Hop-by-Hop identifiers generated -by the service, either explicity or as a return value of a function +by the service, either explicitly or as a return value of a function to be evaluated at &start_service;. In particular, an identifier Id is mapped to a new identifier as follows.

@@ -946,7 +946,7 @@ Applications not configured on the service in question are ignored.

The capabilities advertised by a node must match its configured applications. In particular, setting applications on a transport typically -implies having to set matching Application-Id AVP's in a +implies having to set matching *-Application-Id AVPs in a &capabilities; tuple.

@@ -956,7 +956,7 @@ implies having to set matching Application-Id AVP's in a {capabilities, [&capability;]}

-AVP's used to construct outgoing CER/CEA messages. +AVPs used to construct outgoing CER/CEA messages. Values take precedence over any specified on the service in question.

@@ -1661,7 +1661,7 @@ R_Flag}.

Note that watchdog, peer, apps, caps and port entries depend on connectivity with the peer and may not be present. -Note also that the statistics entry presents values acuumulated +Note also that the statistics entry presents values accumulated during the lifetime of the transport configuration.

diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml index e6c9cc9a90..0b6839dcb2 100644 --- a/lib/diameter/doc/src/diameter_app.xml +++ b/lib/diameter/doc/src/diameter_app.xml @@ -308,7 +308,7 @@ The return value {Peer, NewState} is only allowed if the Diameter application in question was configured with the &mod_application_opt; {call_mutates_state, true}. Otherwise, the State argument is always -the intial value as configured on the application, not any subsequent +the initial value as configured on the application, not any subsequent value returned by a &peer_up; or &peer_down; callback.

@@ -565,7 +565,7 @@ Equivalent to

where Avps sets the Origin-Host, Origin-Realm, the specified -Result-Code and (if the request contained one) Session-Id AVP's, and +Result-Code and (if the request contained one) Session-Id AVPs, and possibly Failed-AVP as described below.

diff --git a/lib/diameter/doc/src/diameter_codec.xml b/lib/diameter/doc/src/diameter_codec.xml index 4a77d5435b..9d26466b25 100644 --- a/lib/diameter/doc/src/diameter_codec.xml +++ b/lib/diameter/doc/src/diameter_codec.xml @@ -13,7 +13,7 @@

-2012 +20122013 Ericsson AB. All Rights Reserved. @@ -73,7 +73,7 @@ are defined in diameter.hrl, which can be included as follows.

-Application-specific records are definied in the hrl +Application-specific records are defined in the hrl files resulting from dictionary file compilation.

@@ -122,7 +122,7 @@ Fields have the following types.

Values in the AVP header, corresponding to AVP Code, the M flag, P -flags and Vendor-ID respectivelty. +flags and Vendor-ID respectively. A Vendor-ID other than undefined implies a set V flag.

@@ -222,7 +222,7 @@ header.

is_retransmitted = boolean()

-Values correspoding to the R(equest), P(roxiable), E(rror) +Values corresponding to the R(equest), P(roxiable), E(rror) and T(Potentially re-transmitted message) flags of the Diameter header.

diff --git a/lib/diameter/doc/src/diameter_compile.xml b/lib/diameter/doc/src/diameter_compile.xml index 6630019e5c..820bde6986 100644 --- a/lib/diameter/doc/src/diameter_compile.xml +++ b/lib/diameter/doc/src/diameter_compile.xml @@ -41,7 +41,7 @@ supplied. The diameterc utility 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.

+to encode and decode the dictionary's messages and AVPs.

The module &man_make; provides an alternate compilation interface.

@@ -83,7 +83,7 @@ Defaults to the current working directory.

-Supress erl and hrl generation, respectively.

+Suppress erl and hrl generation, respectively.

]]> diff --git a/lib/diameter/doc/src/diameter_dict.xml b/lib/diameter/doc/src/diameter_dict.xml index 8bf4a14240..4f51a12ebc 100644 --- a/lib/diameter/doc/src/diameter_dict.xml +++ b/lib/diameter/doc/src/diameter_dict.xml @@ -431,7 +431,7 @@ equivalent to specifying it with @avp_vendor_id.

Defines values of AVP Name having type Enumerated. Section content consists of names and corresponding integer values. Integer values can be prefixed with 0x to be interpreted as -hexidecimal.

+hexadecimal.

Note that the AVP in question can be defined in an inherited diff --git a/lib/diameter/doc/src/diameter_intro.xml b/lib/diameter/doc/src/diameter_intro.xml index 288ebc0c7c..6c1d1910d2 100644 --- a/lib/diameter/doc/src/diameter_intro.xml +++ b/lib/diameter/doc/src/diameter_intro.xml @@ -40,7 +40,7 @@ under the License. The diameter application is an implementation of the Diameter protocol as defined by &the_rfc;. It supports arbitrary Diameter applications by way of a -dictionary interface that allows messages and AVP's to be +dictionary interface that allows messages and AVPs to be defined and input into diameter as configuration. It has support for all roles defined in the RFC: client, server and agent. @@ -69,7 +69,7 @@ interface.

While a service typically implements a single Diameter node (as identified by an Origin-Host AVP), transports can themselves be -associated with capabilities AVP's so that a single service can be +associated with capabilities AVPs so that a single service can be used to implement more than one Diameter node.

diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml index ec71251be1..83ef42552a 100644 --- a/lib/diameter/doc/src/diameter_make.xml +++ b/lib/diameter/doc/src/diameter_make.xml @@ -51,7 +51,7 @@ under the License. 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.

+to encode and decode the dictionary's messages and AVPs.

The utility &man_compile; provides an alternate compilation diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml index 5fe14b1ef6..2be77e3dfd 100644 --- a/lib/diameter/doc/src/diameter_sctp.xml +++ b/lib/diameter/doc/src/diameter_sctp.xml @@ -90,7 +90,7 @@ Options raddr and rport specify the remote address and port for a connecting transport and not valid for a listening transport: the former is required while latter defaults to 3868 if unspecified. -Mupltiple raddr options can be specified, in which case the +Multiple raddr options can be specified, in which case the connecting transport in question attempts each in sequence until an association is established.

-- cgit v1.2.3 From abea7186dd2590a0283396e94cf03dfb087277e5 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Fri, 29 Nov 2013 18:44:41 +0100 Subject: Rename reconnect_timer -> connect_timer The former was misleading since the timer only applies to initial connection attempts, reconnection attempts being governed by watchdog_timer. The name is a historic remnant from a (dark, pre-OTP) time in which RFC 3539 was followed less slavishly than it is now, and the timer actually did apply to reconnection attempts. Note that connect_timer corresponds to RFC 6733 Tc, while watchdog_timer corresponds to RFC 3539 TwInit. The latter RFC makes clear that TwInit should apply to reconnection attempts. It's less clear if only RFC 6733 is read. Note also that reconnect_timer is still accepted for backwards compatibility. It would be possible to add an option to make reconnect_timer behave strictly as the name suggests (ie. ignore RFC 3539 and interpret RFC 6733 at face value; something that has some value for testing at least) but no such option is implemented in this commit. --- lib/diameter/doc/src/diameter.xml | 64 +++++++++++++-------------- lib/diameter/doc/src/diameter_soc_rfc6733.xml | 2 +- lib/diameter/doc/src/seealso.ent | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml index db19fbb271..06278d1a55 100644 --- a/lib/diameter/doc/src/diameter.xml +++ b/lib/diameter/doc/src/diameter.xml @@ -599,7 +599,7 @@ Opts = [&transport_opt;]

A connecting transport is attempting to establish/reestablish a -transport connection with a peer following &reconnect_timer; or +transport connection with a peer following &connect_timer; or &watchdog_timer; expiry.

@@ -1022,13 +1022,43 @@ The number of milliseconds after which a transport process having an established transport connection will be terminated if the expected capabilities exchange message (CER or CEA) is not received from the peer. For a connecting transport, the timing of reconnection attempts is -governed by &watchdog_timer; or &reconnect_timer; expiry. +governed by &watchdog_timer; or &connect_timer; expiry. For a listening transport, the peer determines the timing.

Defaults to 10000.

+ +{connect_timer, Tc} + +
+Tc = &dict_Unsigned32;
+
+ +

+For a connecting transport, the &the_rfc; Tc timer, in milliseconds. +Note that this timer determines the frequency with which a transport +will attempt to establish an initial connection with its peer +following transport configuration: once an initial connection has been +established it's &watchdog_timer; that determines the frequency of +reconnection attempts, as required by RFC 3539.

+ +

+For a listening transport, the timer specifies the time after which a +previously connected peer will be forgotten: a connection after this time is +regarded as an initial connection rather than a reestablishment, +causing the RFC 3539 state machine to pass to state OKAY rather than +REOPEN. +Note that these semantics are not governed by the RFC and +that a listening transport's &connect_timer; should be greater +than its peer's Tw plus jitter.

+ +

+Defaults to 30000 for a connecting transport and 60000 for a listening +transport.

+
+ {disconnect_cb, &evaluable;} @@ -1145,36 +1175,6 @@ See &man_tcp; for the behaviour of that module.

- -{reconnect_timer, Tc} - -
-Tc = &dict_Unsigned32;
-
- -

-For a connecting transport, the &the_rfc; Tc timer, in milliseconds. -Note that this timer determines the frequency with which a transport -will attempt to establish a connection with its peer only before -an initial connection is established: once there is an initial -connection it's &watchdog_timer; that determines the -frequency of reconnection attempts, as required by RFC 3539.

- -

-For a listening transport, the timer specifies the time after which a -previously connected peer will be forgotten: a connection after this time is -regarded as an initial connection rather than a reestablishment, -causing the RFC 3539 state machine to pass to state OKAY rather than -REOPEN. -Note that these semantics are not governed by the RFC and -that a listening transport's &reconnect_timer; should be greater -than its peer's Tw plus jitter.

- -

-Defaults to 30000 for a connecting transport and 60000 for a listening -transport.

-
- {spawn_opt, [term()]} diff --git a/lib/diameter/doc/src/diameter_soc_rfc6733.xml b/lib/diameter/doc/src/diameter_soc_rfc6733.xml index 8d85569650..deb4d05b0f 100644 --- a/lib/diameter/doc/src/diameter_soc_rfc6733.xml +++ b/lib/diameter/doc/src/diameter_soc_rfc6733.xml @@ -1272,7 +1272,7 @@ during capabilities exchange.)

The frequency of reconnection attempts is configured with the -&mod_transport_opt; reconnect_timer and +&mod_transport_opt; connect_timer and watchdog_timer.

diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent
index 76b9823f79..3ec13477ab 100644
--- a/lib/diameter/doc/src/seealso.ent
+++ b/lib/diameter/doc/src/seealso.ent
@@ -66,7 +66,7 @@ significant.
 disconnect_cb'>
 transport_config'>
 transport_module'>
-reconnect_timer'>
+connect_timer'>
 watchdog_timer'>
 
 
-- 
cgit v1.2.3


From fce38d77ec95261ec7ae3694d0b5db91f1cb39c2 Mon Sep 17 00:00:00 2001
From: Anders Svensson 
Date: Sat, 30 Nov 2013 20:02:12 +0100
Subject: Generate diameterc.1, not diameter_compile.1

---
 lib/diameter/doc/src/diameter_compile.xml | 149 ------------------------------
 lib/diameter/doc/src/diameterc.xml        | 149 ++++++++++++++++++++++++++++++
 lib/diameter/doc/src/files.mk             |   2 +-
 lib/diameter/doc/src/ref_man.xml          |   4 +-
 4 files changed, 152 insertions(+), 152 deletions(-)
 delete mode 100644 lib/diameter/doc/src/diameter_compile.xml
 create mode 100644 lib/diameter/doc/src/diameterc.xml

(limited to 'lib/diameter/doc/src')

diff --git a/lib/diameter/doc/src/diameter_compile.xml b/lib/diameter/doc/src/diameter_compile.xml
deleted file mode 100644
index 820bde6986..0000000000
--- a/lib/diameter/doc/src/diameter_compile.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-
-dictionary file'>
-  
-  
-  %also;
-  %here;
-]>
-
-
-
- -20112013 -Ericsson AB. All Rights Reserved. - - - -The program may be used and/or copied only with the written permission -from Ericsson AB, or in accordance with the terms and conditions -stipulated in the agreement/contract under which the program has been -supplied. - - - -diameterc(1) - - - - - -diameter_compile.xml -
- -diameterc -] ]]> - - - -

-The diameterc utility 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 AVPs.

- -

-The module &man_make; provides an alternate compilation interface.

- -
- -
-USAGE - - - -] ]]> - -

-Compile a single dictionary file to Erlang source. -Valid options are as follows.

- - -]]> - -

-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 -i options can be specified.

-
- -]]> - -

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

-
- - - - -

-Suppress erl and hrl generation, respectively.

-
- -]]> -]]> - -

-Transform the input dictionary before compilation, setting -&dict_name; or &dict_prefix; to the specified -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.

-
- -
- -
-
- -
- - - -
-EXIT STATUS - -

-Returns 0 on success, non-zero on failure.

- -
- - - -
-SEE ALSO - -

-&man_make;, &man_dict;

- -
- -
diff --git a/lib/diameter/doc/src/diameterc.xml b/lib/diameter/doc/src/diameterc.xml new file mode 100644 index 0000000000..039f4f9cdd --- /dev/null +++ b/lib/diameter/doc/src/diameterc.xml @@ -0,0 +1,149 @@ + +dictionary file'> + + + %also; + %here; +]> + + +
+ +20112013 +Ericsson AB. All Rights Reserved. + + + +The program may be used and/or copied only with the written permission +from Ericsson AB, or in accordance with the terms and conditions +stipulated in the agreement/contract under which the program has been +supplied. + + + +diameterc(1) + + + + + +diameterc.xml +
+ +diameterc +] ]]> + + + +

+The diameterc utility 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 AVPs.

+ +

+The module &man_make; provides an alternate compilation interface.

+ +
+ +
+USAGE + + + +] ]]> + +

+Compile a single dictionary file to Erlang source. +Valid options are as follows.

+ + +]]> + +

+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 -i options can be specified.

+
+ +]]> + +

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

+
+ + + + +

+Suppress erl and hrl generation, respectively.

+
+ +]]> +]]> + +

+Transform the input dictionary before compilation, setting +&dict_name; or &dict_prefix; to the specified +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.

+
+ +
+ +
+
+ +
+ + + +
+EXIT STATUS + +

+Returns 0 on success, non-zero on failure.

+ +
+ + + +
+SEE ALSO + +

+&man_make;, &man_dict;

+ +
+ +
diff --git a/lib/diameter/doc/src/files.mk b/lib/diameter/doc/src/files.mk index 510786a7fb..6e8b1f9068 100644 --- a/lib/diameter/doc/src/files.mk +++ b/lib/diameter/doc/src/files.mk @@ -21,7 +21,7 @@ XML_APPLICATION_FILES = \ ref_man.xml XML_REF1_FILES = \ - diameter_compile.xml + diameterc.xml XML_REF3_FILES = \ diameter.xml \ diff --git a/lib/diameter/doc/src/ref_man.xml b/lib/diameter/doc/src/ref_man.xml index 4b99fe716d..1095887144 100644 --- a/lib/diameter/doc/src/ref_man.xml +++ b/lib/diameter/doc/src/ref_man.xml @@ -6,7 +6,7 @@
2011 -2012 +2013 Ericsson AB. All Rights Reserved. @@ -39,7 +39,7 @@ applications on top of the Diameter protocol.

- + -- cgit v1.2.3 From 743773a87e24db2ba0f0222bcf4dcaba7ae7adcf Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 10 Oct 2013 10:47:45 +0200 Subject: Document diameter_make:format/1 and diameter_make:flatten/1 --- lib/diameter/doc/src/diameter_make.xml | 78 ++++++++++++++++++++++++++++------ lib/diameter/doc/src/seealso.ent | 2 + 2 files changed, 68 insertions(+), 12 deletions(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml index 2e69fca1ae..c8c0f2fbc7 100644 --- a/lib/diameter/doc/src/diameter_make.xml +++ b/lib/diameter/doc/src/diameter_make.xml @@ -64,19 +64,48 @@ interface.

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

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

+Opt determines the format of the results and whether they are +written to file or returned, and can have the following types.

+parse | forms | erl | hrl | beam + +

+Specifies an output format. +Whether the output is returned or written to file depends on whether +or not option return is specified. +When written to file, the resulting file(s) will have extensions +.D, .F, .erl, .hrl and .beam +respectively, basenames defaulting to dictionary if the input +dictionary is literal and does not specify &dict_name;. +When returned, results are returned in the Out list in the +order specified. +Format options default to erl and hrl (in this order) if +unspecified.

+ +

+The parsed format is an internal representation that can be +passed to &format; and &flatten;, while the forms format is +only intended for debugging purposes. +Output for the erl and hrl formats are returned as +iolists, while the beam format returns a {module(), +binary()} tuple.

+ +
+ {include, string()}

@@ -93,14 +122,15 @@ Multiple include options can be specified.

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

+Defaults to the current working directory. +Has no effect if option return is specified.

return

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

+Return results in a {ok, [Out]} tuple instead of writing to +file and returning ok.

{name|prefix, string()} @@ -118,7 +148,7 @@ Transform the input dictionary before compilation, appending &dict_inherits; of the specified string.

-Two forms of @inherits have special meaning:

+Two forms have special meaning:

 {inherits, "-"}
@@ -147,6 +177,34 @@ The &dict_name; of a literal input dictionary defaults to
 
 
 
+
+
+
+format(Parsed) -> iolist()
+Format a parsed dictionary.
+
+

+Turns a parsed dictionary, as returned by &codec;, back into the +dictionary format.

+
+
+ + + + +flatten(Parsed) -> term() +Flatten a parsed dictionary. + + +

+Reconstitute a parsed dictionary, as returned by &codec;, without +using &dict_inherits;. +That is, construct an equivalent dictionary in which all AVP's are +definined in the dictionary itself. +The return value is also a parsed dictionary.

+
+
+ @@ -155,11 +213,7 @@ The &dict_name; of a literal input dictionary defaults to 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;

- +Unrecognized options are silently ignored.

diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent index 76b9823f79..d3305853af 100644 --- a/lib/diameter/doc/src/seealso.ent +++ b/lib/diameter/doc/src/seealso.ent @@ -115,6 +115,8 @@ significant. diameter_make:codec/2'> +diameter_make:format/1'> +diameter_make:flatten/1'> -- cgit v1.2.3 From 2eb76ba556b8775cffc94eac26b448eac70af267 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 1 Dec 2013 14:19:27 +0100 Subject: Return compilable forms instead of beam That is, preprocessed forms that can be passed to compile:forms/1,2. --- lib/diameter/doc/src/diameter_make.xml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml index c8c0f2fbc7..68780b1e05 100644 --- a/lib/diameter/doc/src/diameter_make.xml +++ b/lib/diameter/doc/src/diameter_make.xml @@ -1,5 +1,7 @@ compile:forms/2'> file:name()'> -parse | forms | erl | hrl | beam +parse | forms | erl | hrl

Specifies an output format. Whether the output is returned or written to file depends on whether or not option return is specified. When written to file, the resulting file(s) will have extensions -.D, .F, .erl, .hrl and .beam +.D, .F, .erl, and .hrl respectively, basenames defaulting to dictionary if the input dictionary is literal and does not specify &dict_name;. -When returned, results are returned in the Out list in the -order specified. +When returned, results are in the order of the corresponding format +options. Format options default to erl and hrl (in this order) if unspecified.

-The parsed format is an internal representation that can be -passed to &format; and &flatten;, while the forms format is -only intended for debugging purposes. -Output for the erl and hrl formats are returned as -iolists, while the beam format returns a {module(), -binary()} tuple.

+The parse format is an internal representation that can be +passed to &flatten; and &format;, while the forms format can be +passed to &compile_forms2;. +The erl and hrl formats are returned as +iolists.

-- cgit v1.2.3