[erlang-questions] Generating skeleton linked-in driver code using an IDL?
Michael Truog
mjtruog@REDACTED
Tue Mar 10 06:50:15 CET 2009
Torbjorn Tornkvist wrote:
> Michael Truog <mjtruog@REDACTED> writes:
>
>
>> 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
>>
>
> I think 'gepd' should live as a nice little project of its own (e.g at
> github.com).
>
> --Tobbe
> (Ps. it reminds me about old IG (may it rest in peace):
> http://www.tornkvist.org/gitweb?p=ig.git;a=summary )
>
My hope is that gepd can be:
- An efficient and easy way to integrate between Erlang and C/C++
- Reusable code that supports hot code swapping for port drivers and ports
So, I want gepd to do more than just generate interfaces, but grow to be
generic integration code for any C and C++ code.
The github address is:
http://github.com/okeuday/generic-erlang-port--driver-/tree/master
- Michael
More information about the erlang-questions
mailing list