[erlang-questions] Generating skeleton linked-in driver code using an IDL?

Torbjorn Tornkvist tobbe@REDACTED
Fri Mar 6 09:58:07 CET 2009


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 )





More information about the erlang-questions mailing list