[erlang-questions] How to convert erlang_pid structure into ErlDrvTermData?

27 views
Skip to first unread message

Zhemzhitsky Sergey

unread,
Aug 23, 2012, 8:48:08 AM8/23/12
to Erlang Questions

Hi guys,

 

I need to convert erlang_pid structure into ErlDrvTermData that will be passed to

driver_send_term(ErlDrvPort ix, ErlDrvTermData to, ErlDrvTermData* data, int len) function in linked-in driver.

 

Is it possible to achieve?

 

Best Regards,

Sergey

 

_______________________________________________________

 

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia.

If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp

 

Ahmed Omar

unread,
Aug 24, 2012, 8:28:56 AM8/24/12
to Zhemzhitsky Sergey, Erlang Questions
Hi Sergey, 
I think what you are looking for is
"This function returns the process id of the process that made the current call to the driver. The process id can be used withdriver_send_term to send back data to the caller". 
or
 

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


Sergey Zhemzhitsky

unread,
Aug 25, 2012, 6:39:19 AM8/25/12
to Ahmed Omar, Erlang Questions
Hello Ahmed,

Thanks a lot!
What I'd like to achieve is to send messages to any erlang process from a separate thread in a driver.
The only thing I was able to find is the following blog entry 
http://dudefrommangalore.blogspot.com/2009/03/rpc-from-erlang-linked-in-driver-port.html. According to the latest sources of the otp, this way should still be valid.

Regards,
Sergey

Reply all
Reply to author
Forward
0 new messages