Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _api_route

_api_route: string

API Route of the service

Protected _initialised

_initialised: boolean = false

Whether the service has initialised or not

Protected _intervals

_intervals: {}

Store for named intervals

Type declaration

  • [name: string]: number

Protected _last_total

_last_total: number = 0

Total number of items returned by the last index query

Protected _name

_name: string

Display name of the service

Protected _observers

_observers: {}

Map of observables for state variables

Type declaration

  • [key: string]: Observable<any>

Protected _promises

_promises: {}

Map of promises for Service

Type declaration

  • [key: string]: Promise<any>

Protected _subjects

_subjects: {}

Map of state variables for Service

Type declaration

  • [key: string]: BehaviorSubject<any> | Subject<any>

Protected _subscribers

_subscribers: {}

Map of poll subscribers for API endpoints

Type declaration

  • [key: string]: Subscriber<any>

Protected _subscriptions

_subscriptions: {}

Store for named subscription unsub callbacks

Type declaration

  • [name: string]: Subscription | (() => void)

Protected _timers

_timers: {}

Store for named timers

Type declaration

  • [name: string]: number

Protected _total

_total: number = 0

Total number of items returned by the last basic index query

Protected http

Accessors

api_route

  • get api_route(): string

initialised

  • get initialised(): boolean

last_total

  • get last_total(): number

total

  • get total(): number

Methods

add

Protected clearInterval

  • clearInterval(name: string): void

Protected clearTimeout

  • clearTimeout(name: string): void

count

  • count(id: string, module: string): Promise<{ count: number }>
  • Occurances of a particular type of module in the given system

    Parameters

    • id: string

      System ID

    • module: string

      Class name of the Module e.g. Display, Lighting etc.

    Returns Promise<{ count: number }>

delete

  • delete(id: string, query_params?: HashMap): Promise<void>

destroy

  • destroy(): void

execute

  • execute(id: string, module: string, index?: number, args?: any[]): Promise<HashMap>
  • Execute a function of the given system module

    Parameters

    • id: string

      System ID

    • module: string

      Class name of the Module e.g. Display, Lighting etc.

    • Default value index: number = 1

      Module index. Defaults to 1

    • Default value args: any[] = []

      Array of arguments to pass to the executed method

    Returns Promise<HashMap>

functionList

Protected interval

  • interval(name: string, fn: () => void, delay?: number): void
  • Creates a named interval

    Parameters

    • name: string

      Name of the interval

    • fn: () => void

      Callback function for the interval

        • (): void
        • Returns void

    • Default value delay: number = 300

      Callback delay

    Returns void

poll

Protected process

query

remove

  • remove(id: string, module_id: string): Promise<void>

show

start

  • start(id: string): Promise<void>

state

  • state(id: string, module: string, index?: number, lookup?: undefined | string): Promise<HashMap>
  • Get the state of the given system module

    Parameters

    • id: string

      System ID

    • module: string

      Class name of the Module e.g. Display, Lighting etc.

    • Default value index: number = 1

      Module index. Defaults to 1

    • Optional lookup: undefined | string

      Status variable of interest. If set it will return only the state of this variable

    Returns Promise<HashMap>

stop

  • stop(id: string): Promise<void>

stopPoll

  • stopPoll(id?: undefined | string, query_params?: HashMap): void

Protected subscription

  • subscription(name: string, unsub: Subscription | (() => void)): void

task

  • task<U>(id: string, task_name: string, form_data?: HashMap, method?: "post" | "get"): Promise<U>

Protected timeout

  • timeout(name: string, fn: () => void, delay?: number): void
  • Creates a named timer

    Parameters

    • name: string

      Name of the timer

    • fn: () => void

      Callback function for the timer

        • (): void
        • Returns void

    • Default value delay: number = 300

      Callback delay

    Returns void

types

  • types(id: string): Promise<HashMap<number>>

Protected unsub

  • unsub(name: string): void

update

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc