Subject: RE: [Megaco] EventsDescriptor and EventsBufferDescriptor

From: "Rosen, Brian" <[email-masked]>
Date: Mon, 24 Sep 2001 14:17:49 -0400

> 1) MGC sends EventsDescriptor asking to listen to off hook event
> 2) MGC sends EventsBufferDescriptor asking to buffer off hook and on
> hook events
> 3) MGC sends EventBufferControl equals LockStep to MG.
> 4) MG detects off hook.
> 
> Now what the MG is supposed to do (to buffer the event or to send a
> notify immediately to the MGC) ?
The easiest answer to your question is to assume that there are no
events in the EventBuffer.  In that case, you Notify immediately.

The next easiest answer is to assume that EventBufferControl was equal to
"Off" prior to step 1.  Then you have the same answer, as the EventBuffer
would be empty prior to step 1.

I think, as written, that this answers your question.  However, we can
go on.....

It's normal to have the same event in the EventBufferDescriptor and
the EventDescriptor.  If the event occurs when the EventBuffer is
empty, you get an immediate Notify.  If the event occurs when the
EventBuffer is not empty, the fact that it's in EventBufferDescriptor
means that it will be buffered.  The fact that it's also in EventsDescriptor
doesn't matter.  When you loaded the EventDescriptor in step 1, you get ONE
zero or one Notifies.  The MG looks at the first (earliest) event to see
if it's in the EventDescriptor.  If it is, it Notifies it.  If it isn't,
it tosses the event and looks at the next one.  If it's in the 
EventsDescriptor, it Notifies it.  If it isn't, it tosses it. Repeat.
The point is you get ONE Notify per loading of EventsDescriptor.

Basically, EventBufferDescriptor controls what goes into the buffer
when it is not empty.  Whatever the state of the EventBufferDescriptor
is at the time the event is detected determines if it goes in the buffer.
EventsDescriptor controls what gets notified when events come out of
the buffer.  Whatever the state of EventsDescriptor is at the time events
are being processed out of the buffer determines whether the event is
Notified or ignored.

If EventBufferControl is OFF when Events occur, it doesn't matter what
the state of EventBufferDescriptor is, events are processed immediately.
If EventBufferControl is LOCKSTEP, then it doesn't matter what the
state of EventDescriptor is IFF the buffer is not empty.  In that case,
only EventBufferDescriptor controls what goes into the buffer.
Similarly, it doesn't matter what the state of EventBufferDescriptor is
when the MG is processing events out of the buffer - only the state of
EventsDescriptor matters.

Brian

_______________________________________________
Megaco mailing list
[email-masked]
http://www1.ietf.org/mailman/listinfo/megaco