Package org.yamcs.protobuf.activities
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
callMethod
(com.google.protobuf.Descriptors.MethodDescriptor method, T ctx, com.google.protobuf.Message request, Observer<com.google.protobuf.Message> future) final Observer<com.google.protobuf.Message>
callMethod
(com.google.protobuf.Descriptors.MethodDescriptor method, T ctx, Observer<com.google.protobuf.Message> future) abstract void
cancelActivity
(T ctx, CancelActivityRequest request, Observer<ActivityInfo> observer) Cancel an ongoing activityabstract void
completeManualActivity
(T ctx, CompleteManualActivityRequest request, Observer<ActivityInfo> observer) Mark an ongoing activity as completed.abstract void
getActivity
(T ctx, GetActivityRequest request, Observer<ActivityInfo> observer) Get an activityabstract void
getActivityLog
(T ctx, GetActivityLogRequest request, Observer<GetActivityLogResponse> observer) Get the activity logfinal com.google.protobuf.Descriptors.ServiceDescriptor
final com.google.protobuf.Message
getRequestPrototype
(com.google.protobuf.Descriptors.MethodDescriptor method) final com.google.protobuf.Message
getResponsePrototype
(com.google.protobuf.Descriptors.MethodDescriptor method) abstract void
listActivities
(T ctx, ListActivitiesRequest request, Observer<ListActivitiesResponse> observer) List activitiesabstract void
listExecutors
(T ctx, ListExecutorsRequest request, Observer<ListExecutorsResponse> observer) List available executorsabstract void
listScripts
(T ctx, ListScriptsRequest request, Observer<ListScriptsResponse> observer) List scripts available for activities of type SCRIPTabstract void
startActivity
(T ctx, StartActivityRequest request, Observer<ActivityInfo> observer) Start an activity The request body allows for the execution of arbitrary activities.abstract void
subscribeActivities
(T ctx, SubscribeActivitiesRequest request, Observer<ActivityInfo> observer) Receive activity updatesabstract void
subscribeActivityLog
(T ctx, SubscribeActivityLogRequest request, Observer<ActivityLogInfo> observer) Receive activity log updatesabstract void
subscribeGlobalStatus
(T ctx, SubscribeGlobalStatusRequest request, Observer<GlobalActivityStatus> observer) Receive activity status updates
-
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 interfaceApi<T>
-
getRequestPrototype
public final com.google.protobuf.Message getRequestPrototype(com.google.protobuf.Descriptors.MethodDescriptor method) - Specified by:
getRequestPrototype
in interfaceApi<T>
-
getResponsePrototype
public final com.google.protobuf.Message getResponsePrototype(com.google.protobuf.Descriptors.MethodDescriptor method) - Specified by:
getResponsePrototype
in interfaceApi<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 interfaceApi<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 interfaceApi<T>
-