File

src/app/data/alarm-config.ts

Description

Stores the displaying configuration of an Alarm

Index

Properties
Accessors

Constructor

constructor(attributes: Object)

Builds a new AlarmConfig instance

Parameters :
Name Type Optional Description
attributes Object No

a dictionary containing the attributes to create the object

Properties

Public alarm_id
Type : string

ID of the associated Alarm

Public children
Type : []
Default value : []

List of children Alarm

Public custom_name
Type : string

Custom name to display the Alarm

Public group
Type : string

Group of the alarm, in order to classify it for views that require some sort of classification of Alarms

Public placemark
Type : string

ID to map the Alarm to a location on a map

Public type
Type : string

Type associated to the Alarm, used to decide how to display the alarm

Public view
Type : string

View where the alarm is displayed Alarm

Accessors

name
getname()
export class AlarmConfig {

  /** ID of the associated {@link Alarm} */
  public alarm_id: string;

  /** Custom name to display the {@link Alarm} */
  public custom_name: string;

  /** Type associated to the {@link Alarm}, used to decide how to display the alarm */
  public type: string;

  /** View where the alarm is displayed {@link Alarm} */
  public view: string;

  /** List of children {@link Alarm} */
  public children = [];

  /** ID to map the {@link Alarm} to a location on a map */
  public placemark: string;

  /** Group of the alarm, in order to classify it for views that require some sort of classification of {@link Alarm}s */
  public group: string;

  /**
  * Builds a new AlarmConfig instance
  *
  * @param {Object} attributes a dictionary containing the attributes to
  * create the object
  */
  constructor(attributes: Object = {}) {
    Object.assign(this, attributes);
  }

  public get name(): string {
    if (this.custom_name) {
      return this.custom_name;
    } else {
      return this.alarm_id;
    }
  }

}

result-matching ""

    No results matching ""