Message Passing?

Hi all,

Newbie QNX’er here…

I need some form of messaging between two Neutrino processes I have.
What’s the simplest form to use? My messaging requirements are very
light - only small amounts of data to be shuffled around (dozen or so
bytes). Both processes are running on same node. Synchronous calls are
perfectly fine for my use.

I’ve started looking at the mq_() family, Msg(), shared mem etc but
would like some experienced recommendations.

Any help, code snippets etc would be appreciated.

Cheers,
Gavin.

Gavin Maxwell <gkm@healey.com.au> wrote:

Hi all,

Newbie QNX’er here…

I need some form of messaging between two Neutrino processes I have.
What’s the simplest form to use? My messaging requirements are very
light - only small amounts of data to be shuffled around (dozen or so
bytes). Both processes are running on same node. Synchronous calls are
perfectly fine for my use.

I’ve started looking at the mq_() family, Msg(), shared mem etc but
would like some experienced recommendations.

Look at name_attach() and name_open() for finding the processes and
channels and the MsgSend()/MsgReceive()/MsgReply() family of functions
for doing the message passing.

-David

QNX Training Services
dagibbs@qnx.com

You wouldn’t happen to have any snippets laying around would you?

Cheers,
Gavin.

ps. You guys have the fastest customer response times I’ve ever
encountered!! :slight_smile:

David Gibbs wrote:

Gavin Maxwell <> gkm@healey.com.au> > wrote:
Hi all,

Newbie QNX’er here…

I need some form of messaging between two Neutrino processes I have.
What’s the simplest form to use? My messaging requirements are very
light - only small amounts of data to be shuffled around (dozen or so
bytes). Both processes are running on same node. Synchronous calls are
perfectly fine for my use.

I’ve started looking at the mq_() family, Msg(), shared mem etc but
would like some experienced recommendations.

Look at name_attach() and name_open() for finding the processes and
channels and the MsgSend()/MsgReceive()/MsgReply() family of functions
for doing the message passing.

-David

QNX Training Services
dagibbs@qnx.com

Never mind - found some in the online docs. RTFM! :slight_smile:

Gavin.

Gavin Maxwell wrote:

You wouldn’t happen to have any snippets laying around would you?

Cheers,
Gavin.

ps. You guys have the fastest customer response times I’ve ever
encountered!! > :slight_smile:

David Gibbs wrote:

Gavin Maxwell <> gkm@healey.com.au> > wrote:
Hi all,

Newbie QNX’er here…

I need some form of messaging between two Neutrino processes I have.
What’s the simplest form to use? My messaging requirements are very
light - only small amounts of data to be shuffled around (dozen or so
bytes). Both processes are running on same node. Synchronous calls are
perfectly fine for my use.

I’ve started looking at the mq_() family, Msg(), shared mem etc but
would like some experienced recommendations.

Look at name_attach() and name_open() for finding the processes and
channels and the MsgSend()/MsgReceive()/MsgReply() family of functions
for doing the message passing.

-David

QNX Training Services
dagibbs@qnx.com

Gavin Maxwell <gkm@healey.com.au> wrote:

You wouldn’t happen to have any snippets laying around would you?

Take a look at the online docs for name_attach() – this includes
a client server example with all the functions I mentioned.

-David

QNX Training Services
dagibbs@qnx.com

I don’t understand where ChannelCreate/Destroy fits into that
scenario… is it required?

Gavin.

David Gibbs wrote:

Gavin Maxwell <> gkm@healey.com.au> > wrote:
You wouldn’t happen to have any snippets laying around would you?

Take a look at the online docs for name_attach() – this includes
a client server example with all the functions I mentioned.

-David

QNX Training Services
dagibbs@qnx.com

Gavin Maxwell <gkm@healey.com.au> wrote:

I don’t understand where ChannelCreate/Destroy fits into that
scenario… is it required?

name_attach() does a ChannelCreate() for you, under the covers.

name_detach() does a ChannelDestroy() for you.

name_open() does a ConnectAttach() for you.

-David

QNX Training Services
dagibbs@qnx.com

Beautiful! Thanks David, your bloods worth bottling! :slight_smile:

Cheers,
Gavin.

David Gibbs wrote:

Gavin Maxwell <> gkm@healey.com.au> > wrote:
I don’t understand where ChannelCreate/Destroy fits into that
scenario… is it required?

name_attach() does a ChannelCreate() for you, under the covers.

name_detach() does a ChannelDestroy() for you.

name_open() does a ConnectAttach() for you.

-David

QNX Training Services
dagibbs@qnx.com

Gavin Maxwell <gkm@healey.com.au> wrote:

Beautiful! Thanks David, your bloods worth bottling! > :slight_smile:

That’s what the vampires keep saying, but I’m trying to eat a lot
of garlic to keep them away.

-David

QNX Training Services
dagibbs@qnx.com