[erlang-questions] Generating skeleton linked-in driver code using an IDL?
Michael Truog
mjtruog@REDACTED
Fri Mar 6 06:50:51 CET 2009
Jani Hakala wrote:
> ...
>
> I have looked at some of the code generation tools that are supposed
> to help developing linked-in drivers. They (ETDK, DryvErl and the
> proposed Foreign Function Interface) seem to focus on how to call
> C-functions. I would be more interested about a tool that could be
> used to define message structures and operations supported by a
> linked-in driver. Those operations would call C/C++ functions in a way
> that would not be visible outside the driver (facade pattern).
>
> ...
I created the Generic Erlang Port Driver to have an easy way to
automatically generate a port driver or port for C or C++. The code
generation does not rely on an idl file but instead uses
boost::preprocess to use macros. The code is still in development, but
should provide another way of creating port drivers automatically. The
port drivers are generated only with usage of outputv, for efficiency.
The message structure is determined from basic types passed with the
native byte order. A facade pattern could easily be added as an
interface to the port driver. You can find the code here:
http://forum.trapexit.org/viewtopic.php?p=44406#44406
-Michael
More information about the erlang-questions
mailing list