Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Using pulses within the resource Manager Framework: (3 Items)
   
Using pulses within the resource Manager Framework  
Hi,

we're currently designing our system architecture.
We'd like one application to talk to another by accessing the applications's virtual /dev/app-ctrl device (i.e. resource
 manager concept).
Is it possible to send pulses across this device?
How will this all fit with the resource manager framework?

Greetings,
 Marc
RE: Using pulses within the resource Manager Framework  
Hi,

what exactly do you mean by "send pulses across this device" ?

You can send pulses to the resource manager and handle them;
this is described in the docs under
  QNX Neutrino RTOS / Programmer's Guide / Writing a Resource Manager /
Handling private messages and pulses 
or online:
 
http://www.qnx.com/developers/docs/6.3.2/neutrino/prog/resmgr.html#HANDL
ING_PRIVATE_MSG

To have the resource manager send a pulse to the client, use
 MsgDeliverEvent() .  See:
  QNX Neutrino RTOS / Library reference / M / MsgDeliverEvent(),
MsgDeliverEvent_r()
 
http://www.qnx.com/developers/docs/6.4.0/neutrino/lib_ref/m/msgdeliverev
ent.html

Can you elaborate a bit on your specific use case?

Regards,
- Thomas

> -----Original Message-----
> From: Marc Roessler [mailto:community-noreply@qnx.com] 
> Sent: 15 December 2008 11:08
> To: ostech-core_os
> Subject: Using pulses within the resource Manager Framework
> 
> Hi,
> 
> we're currently designing our system architecture.
> We'd like one application to talk to another by accessing the 
> applications's virtual /dev/app-ctrl device (i.e. resource 
> manager concept).
> Is it possible to send pulses across this device?
> How will this all fit with the resource manager framework?
> 
> Greetings,
>  Marc
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post18581
> 
> 
Re: RE: Using pulses within the resource Manager Framework  
Well, by "sending pulses across a device" i mean exactly that ;)
I'll elabroate a bit..

Application A is the master
Application B is the slave
The design is inherently asynchronous - this is not our typical "write one block of data and return" like in the driver 
cookbooks, but rather "switch to mode X and continue processing in this mode infinitely (even if A dies).. and wake me 
in case any errors occur along the way"

B creates /dev/B-ctrl
A opens /dev/B-ctrl and sends commands to B (MsgSend/MsgReceive)
In order for B to signal to A asynchronously (e.g. for errors/status changes), I planned for B to send a pulse to A... 
but not via a different channel, but also via this already opened channel (/dev/B-ctrl).
But the problem is i really don't see any easy and clean way to do this in the resource manager framework... of course 
you can hook your read and write and devctl handlers here and there... but pulses, asynchronously?

Is synchronous messageing the right choice here anyway? You know that old joke with the multi-purpose-tool "hammer" and 
all the nails.. 

Greetings,
 Marc