Packages

  • package root
    Definition Classes
    root
  • package csw
    Definition Classes
    root
  • package alarm
    Definition Classes
    csw
  • package client

    This module implements an Alarm Service responsible for updating and managing alarms for a component.

    Alarm Service

    This module implements an Alarm Service responsible for updating and managing alarms for a component. Alarm service comes in two flavours. One provides admin level management like reset alarm, subscribe to alarm, etc. And other provides component level api e.g. set the severity of an alarm.

    An alarm is uniquely identified within the component with csw.alarm.models.Key.AlarmKey. The alarm key is composed of a csw.prefix.models.Subsystem, component name, alarm name.

    Example: Alarm Service
    val alarmServiceFactory                    = new AlarmServiceFactory()
    val alarmService: AlarmService             = alarmServiceFactory.makeClientApi(locationService)
    val alarmAdminService: AlarmAdminService   = alarmServiceFactory.makeAdminApi(locationService)

    Using above code, you can create instance of csw.alarm.api.scaladsl.AlarmService or csw.alarm.api.scaladsl.AlarmAdminService.

    Example: Alarm Service

    Alarm Service provides asynchronous API to set the severity of an alarm

    val alarmKey = AlarmKey(NFIRAOS, "trombone", "tromboneAxisLowLimitAlarm")
    
    val foo: Future[Done] = async {
       await(clientAPI.setSeverity(alarmKey, Okay))
    }

    Complete guide of usage of different API's provided by AlarmService is available at: https://tmtsoftware.github.io/csw/services/alarm.html

    Definition Classes
    alarm
  • package internal
    Definition Classes
    client
  • AlarmRefreshActorFactory
  • AlarmServiceFactory
c

csw.alarm.client

AlarmServiceFactory

class AlarmServiceFactory extends AnyRef

Factory to create AlarmService

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AlarmServiceFactory
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AlarmServiceFactory()

    A java helper to construct AlarmServiceFactory

  2. new AlarmServiceFactory(redisClient: RedisClient = RedisClient.create())

Value Members

  1. def jMakeClientApi(host: String, port: Int, system: ActorSystem[_]): IAlarmService

    Creates csw.alarm.api.javadsl.IAlarmService instance for non admin users using host and port of alarm server

    Creates csw.alarm.api.javadsl.IAlarmService instance for non admin users using host and port of alarm server

    host

    of the alarm server

    port

    on which alarm server is running

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.javadsl.IAlarmService

  2. def jMakeClientApi(locationService: ILocationService, system: ActorSystem[_]): IAlarmService

    Creates csw.alarm.api.javadsl.IAlarmService instance for non admin users using csw.location.api.javadsl.ILocationService

    locationService

    instance which will be used to resolve the location of alarm server

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.javadsl.IAlarmService

  3. def makeAdminApi(host: String, port: Int)(implicit system: ActorSystem[_]): AlarmAdminService

    Creates csw.alarm.api.scaladsl.AlarmAdminService instance for admin users using host port of alarm server

    Creates csw.alarm.api.scaladsl.AlarmAdminService instance for admin users using host port of alarm server

    host

    of the alarm server

    port

    on which alarm server is running

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.scaladsl.AlarmAdminService

  4. def makeAdminApi(locationService: LocationService)(implicit system: ActorSystem[_]): AlarmAdminService

    Creates csw.alarm.api.scaladsl.AlarmAdminService instance for admin users using csw.location.api.scaladsl.LocationService

    locationService

    instance which will be used to resolve the location of alarm server

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.scaladsl.AlarmAdminService

  5. def makeClientApi(host: String, port: Int)(implicit system: ActorSystem[_]): AlarmService

    Creates csw.alarm.api.scaladsl.AlarmService instance for non admin users using host and port of alarm server

    Creates csw.alarm.api.scaladsl.AlarmService instance for non admin users using host and port of alarm server

    host

    of the alarm server

    port

    on which alarm server is running

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.scaladsl.AlarmService

  6. def makeClientApi(locationService: LocationService)(implicit system: ActorSystem[_]): AlarmService

    Creates csw.alarm.api.scaladsl.AlarmService instance for non admin users using csw.location.api.scaladsl.LocationService

    locationService

    instance which will be used to resolve the location of alarm server

    system

    an actor system required for underlying actors

    returns

    an instance of csw.alarm.api.scaladsl.AlarmService