Fw: How To Use Erlang Driver Queue
Thu Feb 9 09:26:37 CET 2006
The driver queue has _nothing_ to do with erlang messages to and from
the driver. It is a driver-internal queue that the driver can use to
hold data that is not yet ready to deliver to erlang, one example is
partial messages read from the network. The driver queue is an ErlIOVec,
so it can be sent to the emulator with driver_outputv, after which it
should probably be cleared with driver_deq.
The thing with the driver queue, the reason for having an API at all, is
that the driver will not be closed (even if port_close/1 is called on
the erlang side) as long as there is data in the queue.
Hope this helps!
Sanjaya Vitharana wrote:
> Hi .... All,
> I have sent this mail to the community last month. But not a single
> reply received.
> Referring to the documentation in erl_driver it says "Also, the driver
> queue is an ErlIOVec."
> So, If any one can show me knows how to use the Erlang Driver Queue
> (ErlIOVec) to get Driver Side Events to emulator, it will be a great help.
> Thanks in advance,
> Sanjaya Vitharana
> ----- Original Message -----
> *From:* Sanjaya Vitharana <mailto:>
> *To:* <mailto:>
> *Sent:* Monday, 09 January 2006 01:13 pm
> *Subject:* How To Use Erlang Driver Queue
> How to use Erlang Driver Queue (ErlIOVec) to get Driver Side Events to
> I have tried with driver_output_term(...). But it's not work in the
> way i want, specially when I try to get the driverside events to emulator.
> Can't we use the driver_enq(...) function to directly put the messages
> to the queue, & get it from the emulator ? If it is possible, i'd like
> to know how this can be done.
> I have tried with driver_enq(...) to put the data, but don't receiced
> any event to the emulator. One thing I noted is, when stop the driver
> it calls flush. It seems the data I put into the queue was there till
> I stop the driver.
> I don't know i'm going in a proper way or not. So need any guidence
> from expert, because the documentation seems to be not enough to for
> this topic.
> Thanks in advance
> Sanjaya Vitharana
More information about the erlang-questions