Options
All
  • Public
  • Public/Protected
  • All
Menu

A service that monitors the capture source for faces.

Hierarchy

  • DetectionServiceBase
    • DetectionService

Index

Constructors

constructor

Properties

Protected capture

capture: FaceCapture

The capture source.

Protected detectionInterval

detectionInterval: any

Result of "setInterval" on "DetectChanges".

lastStatus

lastStatus: Status = null

The last status that occured.

Protected resources

resources: AppResources

Common application resources.

Methods

AddStatus

  • AddStatus(statusType: StatusType, time?: Date, brightness: number, recognizedFaces?: Face[]): Promise<Status>
  • Inserts a status into the database.

    Parameters

    • statusType: StatusType

      Type of status that will be inserted.

    • Default value time: Date = new Date()

      Time at which the status occured.

    • brightness: number

      Brightness of the frame that was captured.

    • Default value recognizedFaces: Face[] = []

      Faces that were recognized during the status change.

    Returns Promise<Status>

DetectChanges

  • DetectChanges(options: DetectionOptions): Promise<any>
  • Attempts to recognize faces in a frame from the capture source.

    Parameters

    • options: DetectionOptions

      Options for detection.

    Returns Promise<any>

GetLastStatus

  • GetLastStatus(): Promise<Status>
  • Returns the last status that occured.

    Returns Promise<Status>

GetStatus

  • GetStatus(id: number): Promise<Status>
  • Retrieves a status by its ID.

    Parameters

    • id: number

    Returns Promise<Status>

IsDetectionRunning

  • IsDetectionRunning(): Promise<boolean>
  • Returns true if the "DetectChanges" loop is running.

    Returns Promise<boolean>

Protected LogStatusChange

  • LogStatusChange(status: Status): void
  • Logs the change of status to the console.

    Parameters

    • status: Status

      The new status that occured.

    Returns void

RPC_StartDetection

  • RPC_StartDetection(inputOptions: any): Promise<void>
  • Starts detection.

    Parameters

    • inputOptions: any

      Options for detection.

    Returns Promise<void>

StartDetection

  • StartDetection(options: DetectionOptions): Promise<void>
  • Starts detection.

    Parameters

    • options: DetectionOptions

    Returns Promise<void>

StatusHistory

  • StatusHistory(start?: Date, end?: Date): Promise<Status[]>
  • Retrieves all statuses between a given date range.

    Parameters

    • Optional start: Date

      Start date of the query.

    • Default value end: Date = new Date()

      End date of the query.

    Returns Promise<Status[]>

StopDetection

  • StopDetection(): void

addListener

  • addListener(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

emit

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

    • event: string | string[]
    • Rest ...values: any[]

    Returns boolean

emitAsync

  • emitAsync(event: string | string[], ...values: any[]): Promise<any[]>
  • Parameters

    • event: string | string[]
    • Rest ...values: any[]

    Returns Promise<any[]>

eventNames

  • eventNames(): string[]
  • Returns string[]

listeners

  • listeners(event: string | string[]): Listener[]
  • Parameters

    • event: string | string[]

    Returns Listener[]

listenersAny

  • listenersAny(): Listener[]
  • Returns Listener[]

many

  • many(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

off

  • off(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

offAny

  • offAny(listener: Listener): this
  • Parameters

    • listener: Listener

    Returns this

on

  • on(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

onAny

  • onAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

once

  • once(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependAny

  • prependAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

prependListener

  • prependListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependMany

  • prependMany(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

prependOnceListener

  • prependOnceListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

removeAllListeners

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

    • Optional event: string | eventNS

    Returns this

removeListener

  • removeListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

setMaxListeners

  • setMaxListeners(n: number): void
  • Parameters

    • n: number

    Returns void

Generated using TypeDoc