Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TOCFetcher

Hierarchy

  • EventEmitter
    • TOCFetcher

Index

Constructors

constructor

Properties

Private crazyflie

crazyflie: Crazyflie

crc

crc: number

fetched

fetched: boolean = false

length

length: number

maxOperations

maxOperations: number

maxPackets

maxPackets: number

port

port: number

toc

toc: TOC = new TOC()

type

type: TOC_TYPES

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

cachePath

  • get cachePath(): string

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

cacheTOC

  • cacheTOC(crc: number, items: TOCItem[]): Promise<void>

clearCache

  • clearCache(): Promise<void>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

Private fetchRemainingTOCItems

  • fetchRemainingTOCItems(): Promise<void>
  • Loop through all TOC ids and see if we already have it. If not, retrieve it.

    Returns Promise<void>

Private fetchTOCItem

  • fetchTOCItem(id: number): Promise<Object>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getTOCCache

getTOCFromCache

  • getTOCFromCache(crc: number): Promise<TOC>
  • Get TOC from cache according to cyclic redundancy check (checksum) value Will return null if no crc in cache

    Parameters

    • crc: number

    Returns Promise<TOC>

handleTOCInfo

  • handleTOCInfo(data: Buffer): Promise<void>

handleTOCItem

  • handleTOCItem(data: Buffer): Promise<void>

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

start

  • start(): Promise<TOC>

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc