Options
All
  • Public
  • Public/Protected
  • All
Menu

A Event Service API provides client side methods to interact with the event server.

interface

Hierarchy

  • EventService

Index

Methods

  • pSubscribe(subsystem: "AOESW" | "APS" | "CIS" | "CLN" | "CRYO" | "CSW" | "DMS" | "DPS" | "ENC" | "ESEN" | "ESW" | "HNDL" | "HQ" | "IRIS" | "LGSF" | "M1COAT" | "M1CS" | "M1S" | "M2COAT" | "M2S" | "M3S" | "MODHIS" | "NFIRAOS" | "OSS" | "REFR" | "SCMS" | "SER" | "SOSS" | "STR" | "SUM" | "TCS" | "TINS" | "WFOS" | "Container", maxFrequency?: number, pattern?: string): (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription
  • This API subscribes to events of all the EventKeys specified using a Subsystem and a pattern to match the remaining Event Key and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

    Parameters

    • subsystem: "AOESW" | "APS" | "CIS" | "CLN" | "CRYO" | "CSW" | "DMS" | "DPS" | "ENC" | "ESEN" | "ESW" | "HNDL" | "HQ" | "IRIS" | "LGSF" | "M1COAT" | "M1CS" | "M1S" | "M2COAT" | "M2S" | "M3S" | "MODHIS" | "NFIRAOS" | "OSS" | "REFR" | "SCMS" | "SER" | "SOSS" | "STR" | "SUM" | "TCS" | "TINS" | "WFOS" | "Container"

      subscription to be made under the subsystem

    • Optional maxFrequency: number

      the frequency with which events are to be received (in Hz)

    • Optional pattern: string

      optional pattern to match against the event key.supported glob-style patterns

                         - h?llo subscribes to hello, hallo and hxllo
      - h*llo subscribes to hllo and heeeello
      - h[ae]llo subscribes to hello and hallo, but not hillo

    Returns (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription

      • This API subscribes to events of all the EventKeys specified using a Subsystem and a pattern to match the remaining Event Key and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

        Parameters

        • onEvent: (event: Event) => void

          the function which gets triggered on receiving an event

            • Parameters

              Returns void

        • Optional onError: (error: ServiceError) => void

          a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

        • Optional onClose: () => void

          a optional close callback which gets called when the connection is closed.

            • (): void
            • Returns void

        Returns Subscription

        Subscription

  • publish(event: Event): Promise<"Done">
  • This API subscribes to multiple eventKeys and receive events at every frequency and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

    Parameters

    • eventKeys: Set<EventKey>

      Set of event keys to be subscribed.

    • Optional maxFrequency: number

      the frequency with which events are to be received (in Hz)

    Returns (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription

      • This API subscribes to multiple eventKeys and receive events at every frequency and return subscription handle which can be used as a kill switch. It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

        Parameters

        • onEvent: (event: Event) => void

          the function which gets triggered on receiving an event

            • Parameters

              Returns void

        • Optional onError: (error: ServiceError) => void

          a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

        • Optional onClose: () => void

          a optional close callback which gets called when the connection is closed.

            • (): void
            • Returns void

        Returns Subscription

        Subscription

  • subscribeObserveEvents(maxFrequency?: number): (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription
  • This API subscribes to all observe events It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

    Parameters

    • Optional maxFrequency: number

      the frequency with which events are to be received (in Hz)

    Returns (onEvent: (event: Event) => void, onError?: (error: ServiceError) => void, onClose?: () => void) => Subscription

    Subscription

      • This API subscribes to all observe events It takes callback function which gets triggered when ever the events are received. The latest events available for the given Event Keys will be received first.

        Parameters

        • onEvent: (event: Event) => void

          the function which gets triggered on receiving an Observe Event

            • Parameters

              Returns void

        • Optional onError: (error: ServiceError) => void

          a optional error callback which gets called on receiving error. it can be Parsing error or a Runtime error [for ex. Gateway exception]

        • Optional onClose: () => void

          a optional close callback which gets called when the connection is closed.

            • (): void
            • Returns void

        Returns Subscription

        Subscription

Generated using TypeDoc