Package org.yamcs.http.api
Class ActivitiesApi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelActivity
(Context ctx, CancelActivityRequest request, Observer<ActivityInfo> observer) Cancel an ongoing activityvoid
completeManualActivity
(Context ctx, CompleteManualActivityRequest request, Observer<ActivityInfo> observer) Mark an ongoing activity as completed.void
getActivity
(Context ctx, GetActivityRequest request, Observer<ActivityInfo> observer) Get an activityvoid
getActivityLog
(Context ctx, GetActivityLogRequest request, Observer<GetActivityLogResponse> observer) Get the activity logvoid
listActivities
(Context ctx, ListActivitiesRequest request, Observer<ListActivitiesResponse> observer) List activitiesvoid
listExecutors
(Context ctx, ListExecutorsRequest request, Observer<ListExecutorsResponse> observer) List available executorsvoid
listScripts
(Context ctx, ListScriptsRequest request, Observer<ListScriptsResponse> observer) List scripts available for activities of type SCRIPTvoid
startActivity
(Context ctx, StartActivityRequest request, Observer<ActivityInfo> observer) Start an activity The request body allows for the execution of arbitrary activities.void
subscribeActivities
(Context ctx, SubscribeActivitiesRequest request, Observer<ActivityInfo> observer) Receive activity updatesvoid
subscribeActivityLog
(Context ctx, SubscribeActivityLogRequest request, Observer<ActivityLogInfo> observer) Receive activity log updatesvoid
subscribeGlobalStatus
(Context ctx, SubscribeGlobalStatusRequest request, Observer<GlobalActivityStatus> observer) Receive activity status updatesMethods inherited from class org.yamcs.protobuf.activities.AbstractActivitiesApi
callMethod, callMethod, getDescriptorForType, getRequestPrototype, getResponsePrototype
-
Constructor Details
-
ActivitiesApi
public ActivitiesApi()
-
-
Method Details
-
listExecutors
public void listExecutors(Context ctx, ListExecutorsRequest request, Observer<ListExecutorsResponse> observer) Description copied from class:AbstractActivitiesApi
List available executors
- Specified by:
listExecutors
in classAbstractActivitiesApi<Context>
-
listActivities
public void listActivities(Context ctx, ListActivitiesRequest request, Observer<ListActivitiesResponse> observer) Description copied from class:AbstractActivitiesApi
List activities
- Specified by:
listActivities
in classAbstractActivitiesApi<Context>
-
getActivity
Description copied from class:AbstractActivitiesApi
Get an activity
- Specified by:
getActivity
in classAbstractActivitiesApi<Context>
-
getActivityLog
public void getActivityLog(Context ctx, GetActivityLogRequest request, Observer<GetActivityLogResponse> observer) Description copied from class:AbstractActivitiesApi
Get the activity log
- Specified by:
getActivityLog
in classAbstractActivitiesApi<Context>
-
startActivity
public void startActivity(Context ctx, StartActivityRequest request, Observer<ActivityInfo> observer) Description copied from class:AbstractActivitiesApi
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" } }
- Specified by:
startActivity
in classAbstractActivitiesApi<Context>
-
cancelActivity
public void cancelActivity(Context ctx, CancelActivityRequest request, Observer<ActivityInfo> observer) Description copied from class:AbstractActivitiesApi
Cancel an ongoing activity
- Specified by:
cancelActivity
in classAbstractActivitiesApi<Context>
-
completeManualActivity
public void completeManualActivity(Context ctx, CompleteManualActivityRequest request, Observer<ActivityInfo> observer) Description copied from class:AbstractActivitiesApi
Mark an ongoing activity as completed. This method may only be used with manual activities.
- Specified by:
completeManualActivity
in classAbstractActivitiesApi<Context>
-
subscribeGlobalStatus
public void subscribeGlobalStatus(Context ctx, SubscribeGlobalStatusRequest request, Observer<GlobalActivityStatus> observer) Description copied from class:AbstractActivitiesApi
Receive activity status updates
- Specified by:
subscribeGlobalStatus
in classAbstractActivitiesApi<Context>
-
subscribeActivities
public void subscribeActivities(Context ctx, SubscribeActivitiesRequest request, Observer<ActivityInfo> observer) Description copied from class:AbstractActivitiesApi
Receive activity updates
- Specified by:
subscribeActivities
in classAbstractActivitiesApi<Context>
-
subscribeActivityLog
public void subscribeActivityLog(Context ctx, SubscribeActivityLogRequest request, Observer<ActivityLogInfo> observer) Description copied from class:AbstractActivitiesApi
Receive activity log updates
- Specified by:
subscribeActivityLog
in classAbstractActivitiesApi<Context>
-
listScripts
public void listScripts(Context ctx, ListScriptsRequest request, Observer<ListScriptsResponse> observer) Description copied from class:AbstractActivitiesApi
List scripts available for activities of type SCRIPT
- Specified by:
listScripts
in classAbstractActivitiesApi<Context>
-