Erlang, C, IC and asyncronous servers/clients

Jouni Ryno <>
Wed Feb 21 21:57:26 CET 2001


The current IC-system seems to generated code only for cases, were 
communication is initiated from only one side. I would need to port 
some older code, which used IG in more asynchronous way (yes, I know, 
it was not completely safe).

In detail I have
Erlang side                C side
raw telemetry    ->     data processing, packet detection
                        when packet found from raw telemetry
                 <-       packet_type_X
                 <-       packet_type_Y
                 <-         up to N packets

C-process receives binary chunks from Erlang, whenever it finds a 
valid, complete packet, it sends it to Erlang-process for further 
distribution. The catch is, there's n packets to generate, so simple 
function return values is not adequate.

At least the IC examples for C-server and -client don't allow this kind 
of two-way message sending.

So to put it simply, is there a way to do it ? 

(and yes, the I could the processing in Erlang, but we also have to 
give out source code for colleagues to analyze data later. Erlang is 
used in real time situation )



  Jouni Rynö                            mailto://Jouni.Ryno@fmi.fi/
                                        http://www.geo.fmi.fi/~ryno/
  Finnish Meteorological Institute      http://www.fmi.fi/
  Geophysical Research                  http://www.geo.fmi.fi/
  P.O.BOX 503                           Tel   (+358)-9-19294656
  FIN-00101 Helsinki                    GSM   (+358)-50-5302903
  Finland                               FAX   (+358)-9-19294603
  
  "It's just zeros and ones, it cannot be hard"







More information about the erlang-questions mailing list