org.dvb.dsmcc
Class NPTDiscontinuityEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.dvb.dsmcc.NPTStatusEvent
          extended by org.dvb.dsmcc.NPTDiscontinuityEvent
All Implemented Interfaces:
java.io.Serializable

public class NPTDiscontinuityEvent
extends NPTStatusEvent

Sent when an MHP terminal detects a permanent discontinuity in NPT as defined in the main body of the present document. This represents an error condition in the incoming broadcast.

This event shall be sent following a PCR discontinuity when the MHP terminal has enough information to determine that there will be an NPT discontinuity. If the NPTDiscontinuityEvent is because of invalid data in a new NPTReferenceDescriptor then the event will be generated when that new NPTReferenceDescriptor is detected by the MHP terminal. If the NPTDiscontinuityEvent is because no new NPTReferenceDescriptor is detected within the time allowed by the main body of the present document then it will be generated when that time interval has elapsed.

Since:
MHP 1.0.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
NPTDiscontinuityEvent(DSMCCStream source, long before, long after)
          Construct an event.
 
Method Summary
 long getFirstNPT()
          Return the first known stable value of NPT after the discontinuity
 long getLastNPT()
          Return the last known stable value of NPT before the discontinuity
 
Methods inherited from class org.dvb.dsmcc.NPTStatusEvent
getSource
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NPTDiscontinuityEvent

public NPTDiscontinuityEvent(DSMCCStream source,
                             long before,
                             long after)
Construct an event. The before and after values used shall be the values at the time when the receiver determined that a NPT discontinuity has happened. If the NPTDiscontinuityEvent is because of invalid data in a new NPTReferenceDescriptor then this is the time when that new descriptor was known to be invalid. If NPTDiscontinuityEvent is because of the absence of a new NPTReferenceDescriptor then this will be when the MHP terminal detects that the time interval allowed by the present document for such new descriptors has elapsed. Where an NPT value is unknown or cannot be computed, -1 shall be used.

Parameters:
source - the stream whose NPT suffered a discontinuity
before - the last NPT value detected before the discontinuity
after - the first NPT value detected after the discontinuity
Method Detail

getLastNPT

public long getLastNPT()
Return the last known stable value of NPT before the discontinuity

Returns:
an NPT value

getFirstNPT

public long getFirstNPT()
Return the first known stable value of NPT after the discontinuity

Returns:
an NPT value