DIAMETER Specialized CODEC
Tue Jul 28 14:18:28 CEST 2020
It's the same as the usual encode/decode in that they map between
terms and (mostly) binaries, or fail.
If you look at the generated modules for the dictionaries diameter
provides you can see how avp/3 mostly just ends up calling functions
in diameter_types, and if you look in that module you can see many
examples of how the functions map for the RFC data formats. @codecs
and @custom_types just replace calls to diameter_types with calls to
the module you specify.
Not obvious from the documentation though, you're right. The decoded
types of the RFC data formats for the usual encode/decode is described
under DATA TYPES in diameter_dict(3), but information about what
functions pointed at by @codecs or @custom_types should return is
> The diameter_dict documentation tells us we can specify a specialized
> second/encode function with @codec and @custom_types. Helpfully the
> arguments are described however no description of the return values is
> given. Anyone?
More information about the erlang-questions