Class AbstractActivitiesApi<T>

java.lang.Object
org.yamcs.protobuf.activities.AbstractActivitiesApi<T>
All Implemented Interfaces:
Api<T>
Direct Known Subclasses:
ActivitiesApi, ActivitiesApiClient

@Generated(value="org.yamcs.protoc.ServiceGenerator", date="2024-05-02T10:05:24.893842676Z") public abstract class AbstractActivitiesApi<T> extends Object implements Api<T>
  • Constructor Details

    • AbstractActivitiesApi

      public AbstractActivitiesApi()
  • Method Details

    • listActivities

      public abstract void listActivities(T ctx, ListActivitiesRequest request, Observer<ListActivitiesResponse> observer)
        List activities
       
    • getActivity

      public abstract void getActivity(T ctx, GetActivityRequest request, Observer<ActivityInfo> observer)
        Get an activity
       
    • getActivityLog

      public abstract void getActivityLog(T ctx, GetActivityLogRequest request, Observer<GetActivityLogResponse> observer)
        Get the activity log
       
    • startActivity

      public abstract void startActivity(T ctx, StartActivityRequest request, Observer<ActivityInfo> observer)
        Start an activity
       
        The request body allows for the execution of arbitrary activities.
        The following activity types are included in the core Yamcs module:
       
        .. rubric:: Command
       
        Execute a single command
       
        ``type`` (string)
            Set to ``COMMAND``.
       
        ``args`` (map)
            Map accepting the following options:
       
            ``command``
                **Required.** Qualified name of a command
       
            ``args`` (map)
                Named arguments, if the command requires any
       
            ``extra`` (map)
                Extra command options
       
            ``processor`` (string)
                Optional processor name. If not provided, Yamcs defaults
                to any processor it can find with commanding enabled.
       
        Example:
       
        .. code-block:: json
       
            {
                "type": "COMMAND",
                "args": {
                    "command": "/YSS/SIMULATOR/SWITCH_VOLTAGE_ON",
                    "args": {
                        "voltage_num": 3
                    },
                    "processor": "realtime"
                }
            }
       
        .. rubric:: Command Stack
       
        Execute a command stack
       
        ``type`` (string)
            Set to ``COMMAND_STACK``.
       
        ``args`` (map)
            Map accepting the following options:
       
            ``bucket``
                **Required.** The name of the bucket containg the stack
       
            ``stack``
                **Required.** The name of the stack object inside the bucket
       
            ``processor`` (string)
                Optional processor name. If not provided, Yamcs defaults
                to any processor it can find with commanding enabled.
       
        Example:
       
        .. code-block:: json
       
            {
                "type": "COMMAND_STACK",
                "args": {
                    "bucket": "mybucket",
                    "stack": "mystack.ycs",
                    "processor": "realtime"
                }
            }
       
        .. rubric:: Script
       
        Run a script
       
        ``type`` (string)
            Set to ``SCRIPT``.
        ``args`` (map)
            Map accepting the following options:
       
            ``script``
                **Required.** Script identifier.
       
                This should be the relative path to an executable file in one of the
                search locations. When unconfigured, the default search location is
                :file:`etc/scripts/` relative to the Yamcs working directory.
       
            ``args`` (string or string[])
                Script arguments
       
            ``processor`` (string)
                If provided, this information is passed to the script in an environment
                variable ``YAMCS_PROCESSOR``.
       
        Example:
       
        .. code-block:: json
       
            {
                "type": "SCRIPT",
                "args": {
                    "script": "simulate_los.py",
                    "args": "--duration 60",
                    "processor": "realtime"
                }
            }
       
    • cancelActivity

      public abstract void cancelActivity(T ctx, CancelActivityRequest request, Observer<ActivityInfo> observer)
        Cancel an ongoing activity
       
    • completeManualActivity

      public abstract void completeManualActivity(T ctx, CompleteManualActivityRequest request, Observer<ActivityInfo> observer)
        Mark an ongoing activity as completed.
       
        This method may only be used with manual activities.
       
    • subscribeGlobalStatus

      public abstract void subscribeGlobalStatus(T ctx, SubscribeGlobalStatusRequest request, Observer<GlobalActivityStatus> observer)
        Receive activity status updates
       
    • subscribeActivities

      public abstract void subscribeActivities(T ctx, SubscribeActivitiesRequest request, Observer<ActivityInfo> observer)
        Receive activity updates
       
    • subscribeActivityLog

      public abstract void subscribeActivityLog(T ctx, SubscribeActivityLogRequest request, Observer<ActivityLogInfo> observer)
        Receive activity log updates
       
    • listExecutors

      public abstract void listExecutors(T ctx, ListExecutorsRequest request, Observer<ListExecutorsResponse> observer)
        List available executors
       
    • listScripts

      public abstract void listScripts(T ctx, ListScriptsRequest request, Observer<ListScriptsResponse> observer)
        List scripts available for activities of type SCRIPT
       
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface Api<T>
    • getRequestPrototype

      public final com.google.protobuf.Message getRequestPrototype(com.google.protobuf.Descriptors.MethodDescriptor method)
      Specified by:
      getRequestPrototype in interface Api<T>
    • getResponsePrototype

      public final com.google.protobuf.Message getResponsePrototype(com.google.protobuf.Descriptors.MethodDescriptor method)
      Specified by:
      getResponsePrototype in interface Api<T>
    • callMethod

      public final void callMethod(com.google.protobuf.Descriptors.MethodDescriptor method, T ctx, com.google.protobuf.Message request, Observer<com.google.protobuf.Message> future)
      Specified by:
      callMethod in interface Api<T>
    • callMethod

      public final Observer<com.google.protobuf.Message> callMethod(com.google.protobuf.Descriptors.MethodDescriptor method, T ctx, Observer<com.google.protobuf.Message> future)
      Specified by:
      callMethod in interface Api<T>