Preparing search index...

    Interface NotificationsApi

    Plugin interface functions.

    Notifications REST API for further details.

    interface NotificationsApi {
        acknowledge(id: NotificationId): void;
        acknowledgeAll(): void;
        clear(id: NotificationId): void;
        getId(id: NotificationId): AlarmProperties | undefined;
        getPath(path: Path): Record<NotificationId, AlarmProperties>;
        list(): Record<NotificationId, AlarmProperties>;
        mob(message?: string): NotificationId;
        raise(options: AlarmRaiseOptions): NotificationId;
        silence(id: NotificationId): void;
        silenceAll(): void;
        update(id: NotificationId, options: AlarmUpdateOptions): void;
    }
    Index

    Notifications API

    • Acknowledge the alarm condition of the notification with the supplied identifier. Sets status.acknowledged = true Removes sound from method Note: Calling this method on a Notifications with a status of canAcknowledge = false will throw an Error

      Parameters

      Returns void

      app.notifications.acknowledge('9922c05a-2813-4995-ab72-33f8f2246ff7')
      
    • Clears the alarm from the notification with the supplied identifier by setting state = normal Note: Calling this method on a Notifications with a status of canClear = false will throw an Error

      Parameters

      Returns void

      app.notifications.clear('9922c05a-2813-4995-ab72-33f8f2246ff7')
      
    • Raise a Person Overboard (MOB) notification.

      Parameters

      • Optionalmessage: string

        Message to display or speak.

      Returns NotificationId

      Notification Identifier

      app.notifications.mob()

      // path = `notifications.mob.{notificationId}`
      app.notifications.mob('Crew member overboard!')
      
    • Raises a new notification and assigns an identifier.

      Parameters

      Returns NotificationId

      Notification Identifier

      app.notifications.raise({
      state: 'warn',
      message: 'Port engine temperature is higher than normal.'
      })

      // path = `notifications.{notificationId}`
      app.notifications.raise({
      state: 'warn',
      message: 'Port engine temperature is higher than normal.',
      path: 'propulsion.port.temperature'
      })
      app.notifications.raise({
      state: 'warn',
      message: 'Port engine temperature is higher than normal.',
      path: 'propulsion.port.temperature',
      idInPath: true
      })

      // path = `notifications.propulsion.port.temperature.{notificationId}`
    • Silence the alarm of the notification with the supplied identifier. Sets status.silenced = true Removes sound from method Note: Calling this method on a Notifications with a status of canSilence = false will throw an Error

      Parameters

      Returns void

      app.notifications.silence('9922c05a-2813-4995-ab72-33f8f2246ff7')