Questions tagged [erl-interface]
9 questions
6
votes
2 answers
erlang: ei_get_type() : where are the defined constants for the 'type' field?
I am trying to use ei_get_type() (ei) but I am having trouble finding where the 'type' field is documented. I've looked in ei.h but all I could find was a list of constants starting with "ERL_".
#define ERL_SMALL_INTEGER_EXT 'a'
#define…

jldupont
- 93,734
- 56
- 203
- 318
4
votes
1 answer
Threaded Erlang C-Node(cnode) Interoperability howto?
I am at a point in my Erlang development where I need to create a C-Node (see link for C-Node docs). The basic implementation is simple enough, however, there is a huge hole in the doc.
The code implements a single threaded client and server.…

Richard
- 10,122
- 10
- 42
- 61
4
votes
1 answer
How to properly free an erlang term
In the example erlang port program
tuplep = erl_decode(buf);
fnp = erl_element(1, tuplep);
argp = erl_element(2, tuplep);
...
erl_free_compound(tuplep);
erl_free_term(fnp);
erl_free_term(argp);
Both erl_free_compound and erl_free_term are used for…

alienfromouterspace
- 307
- 4
- 15
3
votes
1 answer
Can I get Erlang OTP behaviors in C Nodes?
For example, right now I have a C Node (call it CN) which connects to an erlang node (call it EN) and uses a RPC to use OTP behaviors. Hence, to send an event from CN to an event manager on EN I connect CN to EN and do
args = erl_format("[data_man,…

bias
- 1,467
- 3
- 19
- 39
2
votes
1 answer
Implementing process linking in an Erlang C node
I know that monitoring a "process" on a C Node is not supported, but if I try to call link for a pid originating from a C Node on an Erlang node, my C Node first gets an ERL_LINK message and then few moments later an ERL_EXIT message since obviously…

Jaka
- 1,205
- 12
- 19
1
vote
0 answers
Erl_eterm doc and erl_interface.h information conflict?
I do not understand the following between erl_eterm and erl_interface.h
In erl_eterm the following are described as:
ETERM *ERL_PID_NODE(t)
ETERM *ERL_PID_NODE_UTF8(t)
ETERM *ERL_PORT_NODE(t)
ETERM *ERL_PORT_NODE_UTF8(t)
Where as in erl_interface.h…

alienfromouterspace
- 307
- 4
- 15
1
vote
1 answer
erl_interface linker error
I need to use erl_interface in my C-program. There is Erlang R15B01 on Debian Wheezy.
I just do the following (for example).
// main.c
#include
#include
int main() {
erl_init(NULL,0);
return 0;
}
Then i say:
cc…

Viacheslav Kovalev
- 1,745
- 12
- 17
0
votes
2 answers
Send message to GenServer from C
How do I send a message to a remote Elixir GenServer and then receive the results of the call using the C Erlang Interface?
I want to run something in C analogous to
{result1, result2} = GenServer.call(MyModule.NodeName, {:dothing, "blah"})
Here's…

Ian Hunter
- 9,466
- 12
- 61
- 77
0
votes
2 answers
AccessViolation when calling unmanaged dll
When calling an unmanaged Dll from a c# application I get an AccessViolationException. The strange thing is that the exported function has no arguments, so the problem is not in the Marshalling of data. The function gets no argument and just returns…

Paralife
- 6,116
- 8
- 38
- 64