SequencerClient

esw.ocs.api.client.SequencerClient
class SequencerClient(postClient: Transport[SequencerRequest], websocketClient: Transport[SequencerStreamRequest])(implicit ec: ExecutionContext) extends SequencerApi, SequencerServiceCodecs

Http Client for the sequencer

Value parameters

ec
  • execution context
postClient
  • a transport msocket.http.post.HttpPostTransport to communicate with http protocol
websocketClient
  • a transport msocket.http.ws.WebsocketTransport to communicate with websocket

Attributes

Graph
Supertypes
trait OcsCodecs
trait BasicCodecs
trait LocationCodecs
trait LocationCodecsBase
trait ParamCodecs
trait ParamCodecsBase
trait CommonCodecs
trait SequencerApi
trait SequencerCommandService
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

case class Timestamp(seconds: Long, nanos: Long)

Attributes

Inherited from:
CommonCodecs
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited types

type ArrayDec[T] = Decoder[Array[T]]

Attributes

Inherited from:
ParamCodecsBase
type ArrayEnc[T] = Encoder[Array[T]]

Attributes

Inherited from:
ParamCodecsBase

Value members

Concrete methods

Discards all the pending steps of the sequence and call the abort handler of the sequencer's script

Discards all the pending steps of the sequence and call the abort handler of the sequencer's script

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes
override def add(commands: List[SequenceCommand]): Future[OkOrUnhandledResponse]

Adds the given list of sequence commands at the end of the sequence

Adds the given list of sequence commands at the end of the sequence

Value parameters

commands
  • list of SequenceCommand to add in the sequence of sequencer

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes
override def addBreakpoint(id: Id): Future[GenericResponse]

Adds a breakpoint at the command of the given id in the sequence

Adds a breakpoint at the command of the given id in the sequence

Value parameters

id
  • runId of the command where breakpoint is to be added

Attributes

Returns

a esw.ocs.api.protocol.GenericResponse as a Future value

Definition Classes
override def delete(id: Id): Future[GenericResponse]

Deletes the command of the given id in the sequence

Deletes the command of the given id in the sequence

Value parameters

id
  • runId of the command which is to be deleted

Attributes

Returns

a esw.ocs.api.protocol.GenericResponse as a Future value

Definition Classes
override def diagnosticMode(startTime: UTCTime, hint: String): Future[DiagnosticModeResponse]

Sends command to the sequencer to call the diagnostic mode handler of the sequencer's script

Sends command to the sequencer to call the diagnostic mode handler of the sequencer's script

Value parameters

hint
  • String to support diagnostic data mode
startTime
  • time at which the diagnostic mode will take effect

Attributes

Returns

a esw.ocs.api.protocol.DiagnosticModeResponse as a Future value

Definition Classes
override def getSequence: Future[Option[StepList]]

Get the sequence in sequencer - current or last. If there is no sequence then None response is returned otherwise esw.ocs.api.models.StepList is returned as Some value

Get the sequence in sequencer - current or last. If there is no sequence then None response is returned otherwise esw.ocs.api.models.StepList is returned as Some value

Attributes

Returns

Option of esw.ocs.api.models.StepList as a Future value

Definition Classes
override def getSequenceComponent: Future[PekkoLocation]

Return the pekko location of sequence component where sequencer is running

Return the pekko location of sequence component where sequencer is running

Attributes

Returns

csw.location.api.models.PekkoLocation as a Future value

Definition Classes

Returns the current state of the sequencer (Idle, Loaded, Offline, Running, Processing)

Returns the current state of the sequencer (Idle, Loaded, Offline, Running, Processing)

Attributes

Returns

an esw.ocs.api.models.SequencerState as a Future value

Definition Classes

sends command to the sequencer to go in Offline state if it is in Online state

sends command to the sequencer to go in Offline state if it is in Online state

Attributes

Returns

a esw.ocs.api.protocol.GoOfflineResponse as a Future value

Definition Classes
override def goOnline(): Future[GoOnlineResponse]

sends command to the sequencer to go in Online state if it is in Offline state

sends command to the sequencer to go in Online state if it is in Offline state

Attributes

Returns

a esw.ocs.api.protocol.GoOnlineResponse as a Future value

Definition Classes
override def insertAfter(id: Id, commands: List[SequenceCommand]): Future[GenericResponse]

Inserts the given list of sequence commands after the command of given id in the sequence

Inserts the given list of sequence commands after the command of given id in the sequence

Value parameters

commands
  • list of SequenceCommand to be inserted
id
  • runId of command after which the given list of commands is to be inserted

Attributes

Returns

a esw.ocs.api.protocol.GenericResponse as a Future value

Definition Classes
override def isAvailable: Future[Boolean]

Checks if sequencer is in Idle state

Checks if sequencer is in Idle state

Attributes

Returns

boolean as a Future value

Definition Classes
override def isOnline: Future[Boolean]

Checks if sequencer is in Online(any state except Offline) state

Checks if sequencer is in Online(any state except Offline) state

Attributes

Returns

boolean as a Future value

Definition Classes
override def loadSequence(sequence: Sequence): Future[OkOrUnhandledResponse]

Loads the given sequence to the sequencer. If the sequencer is in Idle or Loaded state then esw.ocs.api.protocol.Ok response is returned otherwise esw.ocs.api.protocol.Unhandled response is returned

Loads the given sequence to the sequencer. If the sequencer is in Idle or Loaded state then esw.ocs.api.protocol.Ok response is returned otherwise esw.ocs.api.protocol.Unhandled response is returned

Value parameters

sequence

to run on the sequencer

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes

Sends command to the sequencer to call the operations mode handler of the sequencer's script

Sends command to the sequencer to call the operations mode handler of the sequencer's script

Attributes

Returns

a esw.ocs.api.protocol.OperationsModeResponse as a Future value

Definition Classes
override def pause: Future[PauseResponse]

Pauses the running sequence

Pauses the running sequence

Attributes

Returns

an esw.ocs.api.protocol.PauseResponse as a Future value

Definition Classes
override def prepend(commands: List[SequenceCommand]): Future[OkOrUnhandledResponse]

Prepends the given list of sequence commands in the sequence

Prepends the given list of sequence commands in the sequence

Value parameters

commands
  • list of SequenceCommand to add in the sequence of sequencer

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes
override def query(runId: Id): Future[SubmitResponse]

Query for the result of the sequence which was submitted to get a csw.params.commands.CommandResponse.SubmitResponse as a Future. Query allows checking to see if the long-running sequence is completed without waiting as with queryFinal.

Query for the result of the sequence which was submitted to get a csw.params.commands.CommandResponse.SubmitResponse as a Future. Query allows checking to see if the long-running sequence is completed without waiting as with queryFinal.

Value parameters

runId

of the sequence under execution

Attributes

Returns

a csw.params.commands.CommandResponse.SubmitResponse as a Future value

Definition Classes
SequencerCommandService
override def queryFinal(runId: Id)(implicit timeout: Timeout): Future[SubmitResponse]

Query for the final result of a long running sequence which was sent through submit

Query for the final result of a long running sequence which was sent through submit

Value parameters

runId

of the sequence under execution

timeout

max-time to wait for a final response

Attributes

Returns

a final csw.params.commands.CommandResponse.SubmitResponse as a Future value

Definition Classes
SequencerCommandService

Removes a breakpoint from the command of the given id in the sequence

Removes a breakpoint from the command of the given id in the sequence

Value parameters

id
  • runId of command where breakpoint is

Attributes

Returns

a esw.ocs.api.protocol.GenericResponse as a Future value

Definition Classes
override def replace(id: Id, commands: List[SequenceCommand]): Future[GenericResponse]

Replaces the command of the given id with the given list of sequence commands in the sequence

Replaces the command of the given id with the given list of sequence commands in the sequence

Value parameters

commands
  • list of SequenceCommand to replace with
id
  • runId of command which is to be replaced

Attributes

Returns

a esw.ocs.api.protocol.GenericResponse as a Future value

Definition Classes

Resets the sequence by discarding all the pending steps of the sequence

Resets the sequence by discarding all the pending steps of the sequence

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes

Resumes the paused sequence

Resumes the paused sequence

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes
override def startSequence(): Future[SubmitResponse]

Starts the loaded sequence in the sequencer. If the sequencer is loaded then a csw.params.commands.CommandResponse.Started response is returned If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned

Starts the loaded sequence in the sequencer. If the sequencer is loaded then a csw.params.commands.CommandResponse.Started response is returned If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned

Attributes

Returns

an initial csw.params.commands.CommandResponse.SubmitResponse as a Future value

Definition Classes
override def stop(): Future[OkOrUnhandledResponse]

Discards all the pending steps of the sequence and call the stop handler of the sequencer's script

Discards all the pending steps of the sequence and call the stop handler of the sequencer's script

Attributes

Returns

an esw.ocs.api.protocol.OkOrUnhandledResponse as a Future value

Definition Classes
override def submit(sequence: Sequence): Future[SubmitResponse]

Submit the given sequence to the sequencer. If the sequencer is idle, the provided sequence is loaded in the sequencer and execution of the sequence starts immediately, and a csw.params.commands.CommandResponse.Started response is returned If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned

Submit the given sequence to the sequencer. If the sequencer is idle, the provided sequence is loaded in the sequencer and execution of the sequence starts immediately, and a csw.params.commands.CommandResponse.Started response is returned If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned

Value parameters

sequence

to run on the sequencer

Attributes

Returns

an initial csw.params.commands.CommandResponse.SubmitResponse as a Future value

Definition Classes
SequencerCommandService
override def submitAndWait(sequence: Sequence)(implicit timeout: Timeout): Future[SubmitResponse]

Submit the given sequence to the sequencer and wait for the final response if the sequence was successfully csw.params.commands.CommandResponse.Started. If the sequencer is idle, the provided sequence will be submitted to the sequencer and the final response will be returned. If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned.

Submit the given sequence to the sequencer and wait for the final response if the sequence was successfully csw.params.commands.CommandResponse.Started. If the sequencer is idle, the provided sequence will be submitted to the sequencer and the final response will be returned. If the sequencer is already running another sequence, an csw.params.commands.CommandResponse.Invalid response is returned.

Value parameters

sequence

to run on the sequencer

timeout

max-time to wait for a final response

Attributes

Returns

a final csw.params.commands.CommandResponse.SubmitResponse as a Future value

Definition Classes
SequencerCommandService
override def subscribeSequencerState(): Source[SequencerStateResponse, Subscription]

Subscribes to the changes in state of sequencer which includes SequencerState (i.e Idle, Loaded, etc) and current StepList.

Subscribes to the changes in state of sequencer which includes SequencerState (i.e Idle, Loaded, etc) and current StepList.

Attributes

Returns

a stream of current states with SequencerStateResponse as the materialized value which can be used to stop the subscription

Definition Classes

Inherited fields

lazy protected val commandResponseCodecValue: Codec[CommandResponse]

Attributes

Inherited from:
ParamCodecsBase
lazy val coordCodecValue: Codec[Coord]

Attributes

Inherited from:
ParamCodecsBase
lazy protected val locationCodecValue: Codec[Location]

Attributes

Inherited from:
LocationCodecsBase

Attributes

Inherited from:
OcsCodecsBase

Implicits

Inherited implicits

implicit lazy val angleCodec: Codec[Angle]

Attributes

Inherited from:
ParamCodecsBase
implicit def arrayDataCodec[T : ArrayDec]: Codec[ArrayData[T]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val bytesDec: Decoder[Array[Byte]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val bytesEnc: Encoder[Array[Byte]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val charDec: Decoder[Char]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val charEnc: Encoder[Char]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val characterDec: Decoder[Character]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val characterEnc: Encoder[Character]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val choiceCodec: Codec[Choice]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val commandIssueCodecValue: Codec[CommandIssue]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val commandNameCodec: Codec[CommandName]

Attributes

Inherited from:
ParamCodecsBase
implicit def commandResponseCodec[T <: CommandResponse]: Codec[T]

Attributes

Inherited from:
ParamCodecs
implicit lazy val componentIdCodec: Codec[ComponentId]

Attributes

Inherited from:
LocationCodecsBase
implicit def connectionCodec[C <: Connection]: Codec[C]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val connectionInfoCodec: Codec[ConnectionInfo]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val controlCommandCodec: Codec[ControlCommand]

Attributes

Inherited from:
ParamCodecsBase
implicit def coordCodec[T <: Coord]: Codec[T]

Attributes

Inherited from:
ParamCodecs
implicit lazy val currentStateCodecValue: Codec[CurrentState]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val doneCodec: Codec[Done]

Attributes

Inherited from:
BasicCodecs
implicit def eitherCodec[E : Decoder, S : Decoder]: Codec[Either[E, S]]

Attributes

Inherited from:
BasicCodecs
implicit def enumCodec[T <: EnumEntry : Enum]: Codec[T]

Attributes

Inherited from:
CommonCodecs
implicit lazy val eventCodec: Codec[Event]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val eventNameCodec: Codec[EventName]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val finiteDurationCodec: Codec[FiniteDuration]

Attributes

Inherited from:
CommonCodecs
implicit val flatAdtEncoding: AdtEncodingStrategy

Attributes

Inherited from:
CommonCodecs
implicit lazy val getStatusResponseCodec: Codec[GetStatusResponse]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val idCodec: Codec[Id]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val instantDec: Decoder[Instant]

Attributes

Inherited from:
CommonCodecs
implicit lazy val instantEnc: Encoder[Instant]

Attributes

Inherited from:
CommonCodecs
implicit lazy val javaByteArrayDec: Decoder[Array[Byte]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val javaByteArrayEnc: Encoder[Array[Byte]]

Attributes

Inherited from:
ParamCodecsBase

Attributes

Inherited from:
OcsCodecsBase
implicit def locationCodec[T <: Location]: Codec[T]

Attributes

Inherited from:
LocationCodecs
implicit def matrixDataCodec[T : ArrayDec]: Codec[MatrixData[T]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val metadataCodec: Codec[Metadata]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val networkType: Codec[NetworkType]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val obsIdCodec: Codec[ObsId]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val obsModeCodec: Codec[ObsMode]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val okOrUnhandledCodec: Codec[OkOrUnhandled]

Attributes

Inherited from:
OcsCodecsBase
implicit def paramCodec[T : ArrayDec]: Codec[Parameter[T]]

Attributes

Inherited from:
ParamCodecsBase
implicit def paramCoreCodec[T : ArrayDec]: Codec[ParamCore[T]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val paramDecExistential: Decoder[Parameter[_]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val paramEncExistential: Encoder[Parameter[_]]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val prefixCodec: Codec[Prefix]

Attributes

Inherited from:
CommonCodecs
implicit lazy val properMotionCodec: Codec[ProperMotion]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val registrationCodec: Codec[Registration]

Attributes

Inherited from:
LocationCodecsBase
implicit def responseCodec[T <: EswSequencerResponse]: Codec[T]

Attributes

Inherited from:
OcsCodecs
implicit lazy val resultCodec: Codec[Result]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val scriptErrorCodec: Codec[ScriptError]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val sequenceCodec: Codec[Sequence]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val sequenceCommandCodec: Codec[SequenceCommand]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val sequencerPostRequestErrorProtocol: ErrorProtocol[SequencerRequest]

Attributes

Inherited from:
SequencerServiceCodecs
implicit lazy val sequencerPostRequestValue: Codec[SequencerRequest]

Attributes

Inherited from:
SequencerServiceCodecs
implicit lazy val sequencerStateCodec: Codec[SequencerState]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val sequencerWebsocketErrorProtocol: ErrorProtocol[SequencerStreamRequest]

Attributes

Inherited from:
SequencerServiceCodecs

Attributes

Inherited from:
SequencerServiceCodecs
implicit lazy val stateNameCodec: Codec[StateName]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val stateVariableCodecValue: Codec[StateVariable]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val stepCodec: Codec[Step]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val stepListCodec: Codec[StepList]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val stepStatusCodec: Codec[StepStatus]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val tagCodec: Codec[Tag]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val taiTimeCodec: Codec[TAITime]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val timeoutInSecondsCodec: Codec[Timeout]

Attributes

Inherited from:
BasicCodecs
implicit lazy val trackingEventCodec: Codec[TrackingEvent]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val uriCodec: Codec[URI]

Attributes

Inherited from:
LocationCodecsBase
implicit lazy val utcTimeCodec: Codec[UTCTime]

Attributes

Inherited from:
ParamCodecsBase
implicit lazy val variationCodec: Codec[Variation]

Attributes

Inherited from:
OcsCodecsBase
implicit lazy val variationInfoCodec: Codec[VariationInfo]

Attributes

Inherited from:
OcsCodecsBase
implicit def waCodec[T : ArrayDec]: Codec[ArraySeq[T]]

Attributes

Inherited from:
ParamCodecsBase