Subject: Event Handling updated

From: Chip Sharp <[email-masked]>
Date: Sun, 13 Feb 2000 03:36:49 -0500

The following is in a TD submitted to SG16 based on the discussion on the 
megaco list.

In order to bring closure to the event handling discussion, the following 
changes are suggested to the event handling mechanism:

Change eventbufferflag to EventBufferControl and make enumerated instead of 
Boolean.  Define the following values

·    Off:  This is the present “Off” in TD33.

·    Process:  As “Off”, except when being loaded, all events in the event 
buffer will be processed according to the new EventsDescriptor rather than 
being discarded.  This emulates the "process" parameter as in Red Bank TD58.

·    LockStep: As “Process”, except that following any Notify, no 
subsequent Notifies will be issued until a new Events Descriptor is loaded. 
In the interim between the Notify and when a new Events Descriptor is 
loaded, any new events specified in the EventBuffer descriptor are 
buffered. Only one Notify is issued per loading of Events Descriptor.  This 
is the present “On” in TD33.  It also emulates the "Step-by-Step" parameter 
of TD58.

·    Gated: As Lockstep, except all events in the event buffer are first 
discarded upon loading. In other words, the event buffer is cleared and 
then LockStep operation is performed.

There was one more change suggested and that was the addition of an 
"Accumulate" flag in the EventsDescriptor per event.  This would tell the 
MG to accumulate that event in an accumulate list instead of notifying 
it.  It is felt that this can be added in later work on H.248 with the 
default of OFF if not included (to maintain backward compatibility.  In 
order to support experimental use of the Accumulate flag, it is proposed 
that extensions be allowed in the EventsDescriptor.

This proposal requires very little change to TD33.

The intention of these modifications are to bring event handling to closure 
in V1 and allow it to be enhanced in v2 if enhancement is needed.
Proposed Changes

Global:
Change EventBufferFlag to EventBufferControl throughout the document.

Modify Section 7.1.9 as follows:

3rd Paragraph,  modify as shown below (with change bars):

The MG shall send a Notify command to the MGC when it detects an event in 
the Events Descriptor.  If EventBufferControl is set to “LockStep”, 
following detection of such an event, normal handling of events is 
suspended, and any event found in the EventBuffer Descriptor which is 
subsequently detected is added to the end of a FIFO queue, along with the 
time that it was detected.   A command containing an Events Descriptor 
which is received  when the EventBufferControl is set to LockStep  causes 
the following sequence to be executed:
1.   The first event in the FIFO queue is examined.  If it is in the Events 
listed in the new events descriptor, the MG shall send a Notify command to 
the MGC and remove the event from the FIFO queue.  The time stamp of the 
Notify shall be the time the event was actually detected.
      2.   If the event is not in the new Events Descriptor, it shall be 
discarded.
      3.   If the queue is empty, the sequence shall be stopped, and normal 
event processing shall be resumed.  If there are any events remaining in 
the queue, the sequence repeats.

Modify Fourth paragraph as follows:

If EventBufferControl  is set to off when the new Events Descriptor is 
received, the queue is flushed, and no events are added to it.  The default 
state of EventBufferControl is off.

Add the following paragraphs after the 4th paragraph:

If EventBufferControl is set to Process, when the EventDescriptor is being 
loaded, all events in the event buffer will be processed according to the 
new EventsDescriptor rather than being discarded.  In other words, the MG 
loops through steps 1 through 3 until either the queue is empty or the MG 
receives a new eventsdescriptor.  The MG doesn't wait for a new 
EventsDescriptor before processing the next event.

If EventBufferControl is set to Process, when the EventDescriptor is being 
loaded, all events in the event buffer will be processed according to the 
new EventsDescriptor rather than being discarded.  In other words, the MG 
loops through steps 1 through 3 until either the queue is empty or the MG 
receives a new eventsdescriptor.  The MG doesn't wait for a new 
EventsDescriptor before processing the next event.

If EventBufferControl is set to Gated, when the EventDescriptor is being 
loaded, the MG acts the same as if it was set to LockStep, except it 
discards any events in the queue.

Miscellaneous modifications to Section 7.1.9:

In the old paragraph 5, in the sentence starting: "When KeepActive is 
specified in the event, ..."  change "event" to "EventsDescriptor."

In old paragraph 6, in the sentence starting "An event can include an 
Embedded Signals descriptor..." change "event" to "EventsDescriptor."

In Section A.2,  change the ASN.1 for TerminationStateDescriptor to:

TerminationStateDescriptor ::= SEQUENCE
{
      propertyParms       SEQUENCE OF PropertyParm,
      eventBufferControl  OPTIONAL,
      serviceState        ServiceState OPTIONAL,
      ...
}

Add the following ASN.1 after TerminationStateDescriptor:

eventBuffer ::= ENUMERATED
{
      Off (0),
      process(1),
      LockStep(2),
      Gated (3),
      ...
}

In Section B.2, change the production for EventBufferFlag to:

eventBufferControl  = BufferToken EQUAL ("OFF" / ProcessToken /
                       LockStepToken / GatedToken )

In Section B.2,  add the following productions for tokens:
  GatedToken                 = ("Gated"                 / "GA")
  LockStepToken              = ("LockStep")             / "SP")
  ProcessToken               = ("Process"               / "PC")

Support NetAid!  http://www.netaid.org
--------------------------------------------------
Chip Sharp                 Consulting Engineering
Cisco Systems              Telco Bio-region
Reality - Love it or Leave it.          	
--------------------------------------------------