If my io-net driver registers a custom message using message_attach() and
pulse_attach(), do I need to call the respective *_detach() in my shutdown,
or will io-net handle this for me?
Also, which codes for the message and pulse are available for my use within
io-net?
Thanks,
Shaun
Shaun Jackman <sjackman@nospam.vortek.com> wrote:
If my io-net driver registers a custom message using message_attach() and
pulse_attach(), do I need to call the respective *_detach() in my shutdown,
or will io-net handle this for me?
You have to detach it yourself.
Also, which codes for the message and pulse are available for my use within
io-net?
What do you mean? If you *_attach() use the dpp passed to you, then that
is io-net channel, any of your message/pulse arrived to that channel,
your function will be called…
-xtang
Thanks,
Shaun
Also, which codes for the message and pulse are available for my use
within
io-net?
What do you mean? If you *_attach() use the dpp passed to you, then that
is io-net channel, any of your message/pulse arrived to that channel,
your function will be called…
I meant which values are legal for the low/high parameters of
message_attach(), and which values are legal for the code parameter of
pulse_attach(). Does io-net use any that are reserved?
This is my server code:
pulse_attach( g_pDispatch, 0, 0, MessageHandler, NULL);
message_attach( g_pDispatch, NULL, nType, nType, MessageHandler, NULL);
How does my client connect to send the message?
int coid = open( “/dev/io-net/vn0”, O_RDWR);
MsgSend( coid, &msg, sizeof( msg), NULL, 0);
MsgSendPulse( coid, 10, 0, 123);
MsgSend() is working for me. My MessageHandler() gets called. But, the pulse
is not working. It seems to have sent alright, but my callback never gets
called.
Thanks,
Shaun
I found the source of my problem. The pulse code 0 wouldn’t work for me for
some reason. Although, pulse_attach() wasn’t failing; it was returning 0 as
expected. However, I tried pulse code 127 and everything works perfect now.
What pulse codes are reserved in io-net?
Thanks,
Shaun
Shaun Jackman <sjackman@nospam.vortek.com> wrote:
I found the source of my problem. The pulse code 0 wouldn’t work for me for
some reason. Although, pulse_attach() wasn’t failing; it was returning 0 as
expected. However, I tried pulse code 127 and everything works perfect now.
What pulse codes are reserved in io-net?
Look at the Lib reference for “pulse_attach()”, the “Flags” section.
-xtang
Thanks,
Shaun
I saw the MSG_FLAG_ALLOC_PULSE flag, but I want to use a known value so that
the client (in a separate process) can send it a known pulse to initiate the
conversation. I tried using _PULSE_CODE_MINAVAIL, but it didn’t
work._PULSE_CODE_MAXAVAIL did work however. So, it seems
_PULSE_CODE_MINAVAIL is used internally by io-net (I’m guessing).
Cheers,
Shaun
Xiaodan Tang <xtang@qnx.com> wrote in message
news:agnguk$5tt$1@nntp.qnx.com…
Shaun Jackman <> sjackman@nospam.vortek.com> > wrote:
I found the source of my problem. The pulse code 0 wouldn’t work for me
for
some reason. Although, pulse_attach() wasn’t failing; it was returning 0
as
expected. However, I tried pulse code 127 and everything works perfect
now.
What pulse codes are reserved in io-net?
Look at the Lib reference for “pulse_attach()”, the “Flags” section.
-xtang
Thanks,
Shaun