Trigger proxy

I need information about sending a Trigger msg on node1 to the node2
Receive.

\


Sigma Automatisation Inc.
6, Patrice Cote C.P.130
Trois-Pistoles, QC G0L 4K0
Tel: 418-851-4254 Fax: 418-851-4580
Email: rparent@sigma-techno.com
Att: Roger Parent

Sigma Inc. <rparent@sigma-techno.com> wrote:

I need information about sending a Trigger msg on node1 to the node2
Receive.

The process that is going to receive the Trigger() [proxy]
message has to do something like the following:

proxy = qnx_proxy_attach(0,0,0,-1);
rem_proxy = qnx_proxy_rem_attach( 1, proxy );
msg.type = SEND_PROXY;
msg.proxy = rem_proxy;

Send( vc_to_process_on_node_1, &msg, NULL, sizeof(msg), 0 );

pid = Receive(…);
if( pid == proxy )
{
/* we got the proxy triggered remotely */
}

The process on node 1 will have to Receive() the above SEND_PROXY
message, extra the proxy from it, and Trigger() it.

Receive(0, &msg, sizeof(msg) );

if (msg.type == SEND_PROXY)
{ proxy_to_trigger = msg.proxy ; }

Trigger( proxy_to_trigger );

Note:
You can not attach a proxy to a process on another node – for
doing remote proxies, you can only attach a proxy to yourself,
then give the remote process a handle (remote proxy) for that
local proxy.

-David
QNX Training Department
dagibbs@qnx.com