OpenAPI: Enable async start

This commit is contained in:
2026-04-27 14:36:05 +02:00
parent 3cf20fb946
commit 4c88a92dc0
14 changed files with 301 additions and 65 deletions
+1
View File
@@ -160,6 +160,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**trigger_post**](docs/DefaultApi.md#trigger_post) | **POST** /trigger | Send soft trigger to the detector
*DefaultApi* | [**version_get**](docs/DefaultApi.md#version_get) | **GET** /version | Get Jungfraujoch version of jfjoch_broker
*DefaultApi* | [**wait_till_done_post**](docs/DefaultApi.md#wait_till_done_post) | **POST** /wait_till_done | Wait for acquisition done
*DefaultApi* | [**wait_until_running_post**](docs/DefaultApi.md#wait_until_running_post) | **POST** /wait_until_running | Wait for acquisition running
*DefaultApi* | [**xfel_event_code_get**](docs/DefaultApi.md#xfel_event_code_get) | **GET** /xfel/event_code | Return XFEL event codes for the current data acquisition
*DefaultApi* | [**xfel_pulse_id_get**](docs/DefaultApi.md#xfel_pulse_id_get) | **GET** /xfel/pulse_id | Return XFEL pulse IDs for the current data acquisition
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
**spot_finding** | **bool** | Enable spot finding and save spots | [optional] [default to True]
**max_spot_count** | **int** | Maximum number of spots that are saved/used for indexing; spots with highest intensity are selected | [optional] [default to 250]
**detect_ice_rings** | **bool** | Flag spots as ice rings and reduce their effect on indexing | [optional]
**async_start** | **bool** | When set to true, `/start` will not wait for detector and Jungfraujoch to be ready for the measurement. | [optional] [default to False]
**xray_fluorescence_spectrum** | [**DatasetSettingsXrayFluorescenceSpectrum**](DatasetSettingsXrayFluorescenceSpectrum.md) | | [optional]
## Example
+76 -2
View File
@@ -63,6 +63,7 @@ Method | HTTP request | Description
[**trigger_post**](DefaultApi.md#trigger_post) | **POST** /trigger | Send soft trigger to the detector
[**version_get**](DefaultApi.md#version_get) | **GET** /version | Get Jungfraujoch version of jfjoch_broker
[**wait_till_done_post**](DefaultApi.md#wait_till_done_post) | **POST** /wait_till_done | Wait for acquisition done
[**wait_until_running_post**](DefaultApi.md#wait_until_running_post) | **POST** /wait_until_running | Wait for acquisition running
[**xfel_event_code_get**](DefaultApi.md#xfel_event_code_get) | **GET** /xfel/event_code | Return XFEL event codes for the current data acquisition
[**xfel_pulse_id_get**](DefaultApi.md#xfel_pulse_id_get) | **GET** /xfel/pulse_id | Return XFEL pulse IDs for the current data acquisition
@@ -3493,8 +3494,9 @@ Start detector
Start data acquisition.
Detector must be in `Idle` state.
Doesn't run calibration procedure.
When the function returns, detector is ready to accept soft/TTL triggers.
Default behavior is for the call to block until detector is ready to accept soft/TTL triggers.
However, this behavior can be changed by settings `async_start` to true in the request body,
in which case the call will return immediately and one needs to use `/wait_until_running` to ensure detector is ready to run.
### Example
@@ -4009,6 +4011,78 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **wait_until_running_post**
> wait_until_running_post(timeout=timeout)
Wait for acquisition running
Block execution of external script till detector and Jungfraujoch are ready to collect data.
To not block web server for a indefinite period of time, the procedure is provided with a timeout.
Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection.
### Example
```python
import jfjoch_client
from jfjoch_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:5232
# See configuration.py for a list of all supported configuration parameters.
configuration = jfjoch_client.Configuration(
host = "http://localhost:5232"
)
# Enter a context with an instance of the API client
with jfjoch_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jfjoch_client.DefaultApi(api_client)
timeout = 60 # int | Timeout in seconds (0 == immediate response) (optional) (default to 60)
try:
# Wait for acquisition running
api_instance.wait_until_running_post(timeout=timeout)
except Exception as e:
print("Exception when calling DefaultApi->wait_until_running_post: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**timeout** | **int**| Timeout in seconds (0 == immediate response) | [optional] [default to 60]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Detector in `Measuring` state | - |
**400** | Timeout parameter out of bounds | - |
**500** | Error within Jungfraujoch code - see output message. | - |
**502** | Detector is inactive mode | - |
**504** | Timeout reached, need to restart operation | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **xfel_event_code_get**
> List[int] xfel_event_code_get()