Parsing an Enhancement Stream

[This is preliminary documentation and subject to change.]

Parsing the enhancement stream determines whether a specific event is an announcement, trigger, or file transfer. This step is not required if you use ipsend.SendEvent to transmit the events.

If, however, you are using the ipsend.SendTrigger, ipsend.SendAnnouncement, and ipsend.SendFTSFile methods to transmit the stream, you must determine the type of each event before you transmit it.

Your application can parse and transmit individual events as demonstrated in the following function. This example assumes that a global instance of ipsend, isend, already exists and is connected to the outgoing IP stream objects.

Function SendThisEvent(e As IEnhEvent) As String
 
    If e.IsTrigger Then
 
        'Transmit the trigger
        '(For triggers, EnhEvent.Name contains the trigger data.)
        isend.SendTrigger e.Trigger + e.Name
 
    Else
 
        If e.IsAnnounce Then
            'Transmit the announcement
            '(For announcements, EnhEvent.Name contains the name and 
            ' path of the announcement file)
            isend.SendAnnouncement e.Name
        Else 
            'Transmit the file, using FTS
            '(For FTS events, EnhEvent.Name contains the 
            'source file name.)
            isend.SendFTSFile e.Name
        End If 
 
    End If
 
End Function
 

To use a function such as SendThisEvent in an application, you would create a timer routine that compares the starting time of the next event in an enhancement stream with the time elapsed during the current show. When the time for the event arrives, the timer routine calls SendThisEvent to broadcast the event.