Avena Webapp API - v0.0.1
    Preparing search index...

    Class ScanMessageQueue

    Per-channel FIFO of received messages waiting for the next UI tick.

    Every message is kept, in arrival order, up to maxPerChannel. Only when a channel's queue is full (the page could not decode for a long time, for example while the tab was in the background and timers were throttled) is the oldest message dropped; each drop is counted in droppedMessages so the page can show it.

    Index

    Constructors

    Properties

    droppedMessages: Map<number, number> = ...

    Messages dropped per channel because the queue was full. Never reset by drains.

    maxPerChannel: number = 2000

    Largest number of messages held per channel.

    queues: Map<number, QueuedScanMessage[]> = ...

    Methods

    • Drops every queued message and resets the drop counters.

      Returns void

    • Drops the queued messages and the drop counter of one channel, for a channel that starts over (for example after it is selected again).

      Parameters

      • channel: number

      Returns void

    • Removes and returns the oldest queued messages of a channel, oldest first.

      Parameters

      • channel: number
      • max: number = Number.POSITIVE_INFINITY

        Most messages to take; the rest stay queued, in order, for the next call. Default: all of them.

      Returns QueuedScanMessage[]

    • Adds a message to the end of a channel's queue, dropping the oldest when full.

      Parameters

      Returns boolean

      false if an older message had to be dropped.

    • Number of messages waiting for a channel.

      Parameters

      • channel: number

      Returns number