erl_interface

Kenneth Lundin kenneth@REDACTED
Fri May 17 11:14:46 CEST 2002


Regarding Erl_interface (the application) it provides 2 interfaces
erl_interface and ei (there is also 2 libraries with these names).
One big difference between R7B and R8B is that "ei" is now documented
and the interface that will be supported in the future.
The erl_interface functions are retained for backwards compatibility 
and they are changed to use the ei functions for the implementation.
During that change it is possible that some new errors have been
introduced
in the erl_interface part.

If the erl_interface part of erl_interface does not works as good in R8B
as it did in R7B we will of course correct it.
But for new usage we recommend that you use the "ei" part only.

/Kenneth (Product Manager of Erlang/OTP at Ericsson)

Vance Shipley wrote:
> 
> I can't help but interject at this point on the subject of message
> types in erl_interface.  It was asked what a zero length message would
> be.  The answer is that there are a number of message types and some
> of those messages don't have any payload.  An example is UNLINK.
> 
> I have previously reported that you can't determine message type with
> erl_interface in R8B.  It's supposed to be in the ErlMessage structure
> but it never gets set.
> 
> The good news is that if you use the new ei library it does work and
> I suppose that is all that is really necessary at this point.  All new
> work we are doing is based on ei and it works well.
> 
>         -Vance
> 
> 
> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Vance Shipley
> Sent: Tuesday, November 13, 2001 5:14 PM
> To: Erlang Questions
> Subject: ErlMessage emsg; emsg.type == 0
> 
> I'm having trouble with erl_interface on R8B.  I'm porting some
> code written with the erl_interface library, not ei standalone.
> 
> The examples in the tutorial don't work either.
> 
> cnode_s.c:
>   ErlMessage emsg;                         /* Incoming message */
> ...
>         got = erl_receive_msg(fd, buf, BUFSIZE, &emsg);
>         if (got == ERL_TICK) {
>         /* ignore */
>         } else if (got == ERL_ERROR) {
>                 loop = 0;
>         } else {
> 
>       if (emsg.type == ERL_REG_SEND) {
>       ...                               <-----  *** NOT REACHED ***
>       }
>     }
> 
> In all cases (emsg.type == 0).  If you ignore this there is in fact
> a valid message there, the rest of the structure has been filled in
> approriately, as far as I can tell.
> 
> typedef struct {
>   int type;
>   ETERM *msg;
>   ETERM *to;
>   ETERM *from;
>   char to_name[MAXREGLEN];
> } ErlMessage;
> 
> 
>         -Vance
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 579 5816

-- 
Kenneth Lundin              Ericsson Utvecklings AB
kenneth@REDACTED     ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 57 25 	    125 25 Älvsjö



More information about the erlang-questions mailing list