A/D resource manager

Hello!

I am writing a Analog-to-Digital converter (10 channels @ 16bit) resource
manager.

The client must poll (read()) the resource manager all the time in order to
get the data from it.

How can the resource manager “inform” the client
as soon as the data are ready without waiting for its polling? Because some
critical data must be processed immediately
by the client.



Thanks.

Jun

Jun <junhot@hotmail.com> wrote:

Hello!

I am writing a Analog-to-Digital converter (10 channels @ 16bit) resource
manager.

The client must poll (read()) the resource manager all the time in order to
get the data from it.

How can the resource manager “inform” the client
as soon as the data are ready without waiting for its polling? Because some
critical data must be processed immediately
by the client.

Look at the ionotify() library from the client side, and the
iofunc_notify*() stuff from the server side for a “standard” way
of handling this.

Or, roll your own… MsgDeliverEvent() to send a pulse to the client
when it needs to get & deal with the data is the usual way of handling
this.

-David

QNX Training Services
I do not answer technical questions by email.

I wrote a resource manager for an A/D for QNX4 many years ago. Here was the
plan.

I client process would “register” with the resource manager. The
regestration process would indicate channel numbers, minimum and maximum
thresholds and a proxy number. If a threshold was reached a proxy (would be
a pulse in RTP) was sent to the client. Then the client would poll the
server to find out the exact new values for any channels necessary.

The threshold concept was import to reduce IPC traffic. If a channel was
indicating .42 volts currently you may say don’t wake me unless it gets to
…40 or .44. That way you don’t have to be woken up due to insignificant
fluctuations in input voltage.

In my design, when a threshold was reached the client has to send a new
registration message. Otherwise the client might get flooded with messages
once a threshold is solidly reached.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“Jun” <junhot@hotmail.com> wrote in message news:9vqehh$s30$1@inn.qnx.com

Hello!

I am writing a Analog-to-Digital converter (10 channels @ 16bit) resource
manager.

The client must poll (read()) the resource manager all the time in order
to
get the data from it.

How can the resource manager “inform” the client
as soon as the data are ready without waiting for its polling? Because
some
critical data must be processed immediately
by the client.



Thanks.

Jun