For those that are interested, I found this on the site below in the nml
tutorial document...

For read()
. If a process reads a message from a non-queued buffer:
- the buffer is empty for that process
- other processes will still be able to read the message
. If a process reads a message from a queued buffer:
- that message is removed for all processes
- other processes will not be able to read the message
For peek()
- with respect to other processes, does not affect the buffer in any
way, queued or non-queued
. subsequently, other process write_if_read operations will fail
- with respect to this process:
. for a non-queued buffer, behaves just like a read
. for a queued buffer, subsequent peeks will return no message until
another read operation by any process


Emc.nml has the error buffer defined as queued, which makes sense because
you don't want to lose the error messages, but leaves me in a bit of a
pickle because, although peek() works well, it is a race condition between
me peeking and axis reading.


 

> -----Original Message-----
> From: Frank Tkalcevic [mailto:[email protected]] 
> Sent: Wednesday, 22 July 2009 1:47 PM
> To: 'EMC developers'
> Subject: RE: [Emc-developers] Shared memory errors
> 
> For everything you wanted to know about NML but were afraid 
> to ask.... 
> 
> http://www.isd.mel.nist.gov/projects/rcslib/NMLcpp.html
> 
> 
> 
> > -----Original Message-----
> > From: Jeff Epler [mailto:[email protected]]
> > Sent: Wednesday, 22 July 2009 8:51 AM
> > To: EMC developers
> > Subject: Re: [Emc-developers] Shared memory errors
> > 
> > On Wed, Jul 22, 2009 at 08:00:14AM +1000, Frank Tkalcevic wrote:
> > > I'm having another issue with reading messages from the
> > error channel.
> > > I've copied the code from shcom.cc where it will do a
> > read() from the
> > > error channel.  This is ok for my component, I receive
> > operator error
> > > messages, but axis is no longer receiving the messages -
> > I'm guessing
> > > there is only one message and I'm taking it.
> > 
> > That's basically right, as far as my understanding goes.
> > 
> > > I was thinking I can do a peek() of the message, but how 
> do I stop 
> > > peek()ing the same message over and over.  Or is there a
> > better way?  
> > > Or maybe I should ask - how does messaging and channels
> > work?  Is that documented?
> > 
> > No, it's not well documented, and we don't currently have a 
> developer 
> > who has expert knowledge of the nml layer.
> > 
> > There seems to be an 'id' field in each of the message 
> types, but it 
> > doesn't seem to be a sequence number or anything like that..
> > 
> > Jeff
> > 
> > --------------------------------------------------------------
> > ----------------
> > _______________________________________________
> > Emc-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/emc-developers
> > 
> 


------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to