interface SequencerService {
    abortSequence(): Promise<OkOrUnhandledResponse>;
    add(commands: SequenceCommand[]): Promise<OkOrUnhandledResponse>;
    addBreakpoint(id: string): Promise<GenericResponse>;
    delete(id: string): Promise<GenericResponse>;
    diagnosticMode(
        startTime: Date,
        hint: string,
    ): Promise<DiagnosticModeResponse>;
    getSequence(): Promise<Option<StepList>>;
    getSequencerState(): Promise<SequencerState>;
    goOffline(): Promise<GoOfflineResponse>;
    goOnline(): Promise<GoOnlineResponse>;
    insertAfter(
        id: string,
        commands: SequenceCommand[],
    ): Promise<GenericResponse>;
    isAvailable(): Promise<boolean>;
    isOnline(): Promise<boolean>;
    loadSequence(sequence: Sequence): Promise<OkOrUnhandledResponse>;
    operationsMode(): Promise<OperationsModeResponse>;
    pause(): Promise<PauseResponse>;
    prepend(commands: SequenceCommand[]): Promise<OkOrUnhandledResponse>;
    query(runId: string): Promise<SubmitResponse>;
    queryFinal(
        runId: string,
        timeoutInSeconds: number,
    ): Promise<SubmitResponse>;
    removeBreakpoint(id: string): Promise<RemoveBreakpointResponse>;
    replace(id: string, commands: SequenceCommand[]): Promise<GenericResponse>;
    reset(): Promise<OkOrUnhandledResponse>;
    resume(): Promise<OkOrUnhandledResponse>;
    startSequence(): Promise<SubmitResponse>;
    stop(): Promise<OkOrUnhandledResponse>;
    submit(sequence: Sequence): Promise<SubmitResponse>;
    submitAndWait(
        sequence: Sequence,
        timeoutInSeconds: number,
    ): Promise<SubmitResponse>;
    subscribeSequencerState(): (
        onStateChange: (sequencerStateResponse: SequencerStateResponse) => void,
        onError?: (error: ServiceError) => void,
        onClose?: () => void,
    ) => Subscription;
}

Methods

  • Queries the response of the sequence of given id and returns the final SubmitResponse If sequence is not finished it waits till the given timeout

    Parameters

    • runId: string

      runId of the sequence

    • timeoutInSeconds: number

      timeout within which result is expected.

    Returns Promise<SubmitResponse>

    SubmitResponse as Promise

  • Submit the given sequence to the sequencer and waits until sequence execution completed and returns the final SubmitResponse

    Parameters

    • sequence: Sequence

      sequence to run on the sequencer

    • timeoutInSeconds: number

      timeout within which result is expected.

    Returns Promise<SubmitResponse>

    SubmitResponse as Promise

  • Subscribes to the changes in state of sequencer which includes SequencerState (i.e Idle, Loaded, etc) and current StepList. The callback will be called with new SequencerStateResponse on state change and returns a subscription to unsubscribe.

    Returns (
        onStateChange: (sequencerStateResponse: SequencerStateResponse) => void,
        onError?: (error: ServiceError) => void,
        onClose?: () => void,
    ) => Subscription

    Subscription