EventQueueLimit Property

Public Property EventQueueLimit As Long

Summary

This property controls the maximum allowable size of the event queue within the API. If a nonzero maximum size is configured for the event queue (which is the default when a new connection is created), the API will enable events and queue any events that arrive while your event handler function is already busy processing an event. If a zero maximum size is configured, event processing will be disabled. This property only controls the behavior of the API. It does not affect anything on the actual ETH32 device.

Parameters

This property does not have any parameters.

Value

This property is a Long. Its value specifies the maximum number of events that are allowed to be queued by the API.

Remarks

Your event handler routine is called once for each event notification that is sent by the device. Events are processed one at a time and in the sequence that they are sent by the device. The event queue is used to store events that have arrived, but have not yet been sent to your event handler routine. This is particularly important if your event handler routine takes a significant time to execute.

If the event queue ever becomes full and more events arrive, the behavior of the API will depend on the current setting of the EventQueueMode Property.

Example
Private Sub example()
    
    ' Set up error handling for this routine
    On Error GoTo myerror
    
    Set dev = New Eth32
    
    ' .... Your code that establishes a connection here

    ' Configure the event queue to hold up to 1,000 events.
    ' If the queue is ever full and more events arrive, discard
    ' the new events.
    dev.EventQueueLimit = 1000
    dev.EventQueueMode = QUEUE_DISCARD_NEW

    Exit Sub
myerror:
    MsgBox "ETH32 error: " & dev.ErrorString(Err.Number)
End Sub
        
See Also

EnableEvent Method, EventQueueCurrentSize Property, EventQueueMode Property