I need information about sending a Trigger msg on node1 to the node2
Sigma Automatisation Inc.
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