# {py:mod}`haniwers.v1.threshold.parallel`

```{py:module} haniwers.v1.threshold.parallel
```

```{autodoc2-docstring} haniwers.v1.threshold.parallel
:allowtitles:
```

## Module Contents

### Functions

````{list-table}
:class: autosummary longtable
:align: left

* - {py:obj}`append_scan_results <haniwers.v1.threshold.parallel.append_scan_results>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel.append_scan_results
    :summary:
    ```
* - {py:obj}`write_audit_log <haniwers.v1.threshold.parallel.write_audit_log>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel.write_audit_log
    :summary:
    ```
* - {py:obj}`_generate_threshold_values <haniwers.v1.threshold.parallel._generate_threshold_values>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel._generate_threshold_values
    :summary:
    ```
* - {py:obj}`_apply_threshold_with_retry <haniwers.v1.threshold.parallel._apply_threshold_with_retry>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel._apply_threshold_with_retry
    :summary:
    ```
* - {py:obj}`run_parallel_threshold_scan <haniwers.v1.threshold.parallel.run_parallel_threshold_scan>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel.run_parallel_threshold_scan
    :summary:
    ```
````

### Data

````{list-table}
:class: autosummary longtable
:align: left

* - {py:obj}`__all__ <haniwers.v1.threshold.parallel.__all__>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.parallel.__all__
    :summary:
    ```
````

### API

````{py:data} __all__
:canonical: haniwers.v1.threshold.parallel.__all__
:value: >
   ['ParallelScanResult', 'run_parallel_threshold_scan']

```{autodoc2-docstring} haniwers.v1.threshold.parallel.__all__
```

````

````{py:function} append_scan_results(channel: int, data_points: typing.List[haniwers.v1.threshold.model.ScanDataPoint], output_dir: pathlib.Path) -> str
:canonical: haniwers.v1.threshold.parallel.append_scan_results

```{autodoc2-docstring} haniwers.v1.threshold.parallel.append_scan_results
```
````

````{py:function} write_audit_log(operations: typing.List[haniwers.v1.threshold.model.ThresholdOperation], output_dir: pathlib.Path) -> str
:canonical: haniwers.v1.threshold.parallel.write_audit_log

```{autodoc2-docstring} haniwers.v1.threshold.parallel.write_audit_log
```
````

````{py:function} _generate_threshold_values(sensor_configs: typing.Dict[int, haniwers.v1.config.model.SensorConfig], step: int) -> typing.Dict[int, int]
:canonical: haniwers.v1.threshold.parallel._generate_threshold_values

```{autodoc2-docstring} haniwers.v1.threshold.parallel._generate_threshold_values
```
````

````{py:function} _apply_threshold_with_retry(device: typing.Any, channel: int, threshold: int, max_retry: int = 3) -> bool
:canonical: haniwers.v1.threshold.parallel._apply_threshold_with_retry

```{autodoc2-docstring} haniwers.v1.threshold.parallel._apply_threshold_with_retry
```
````

````{py:function} run_parallel_threshold_scan(config: haniwers.v1.config.model.HaniwersConfig, device: typing.Any, max_retry: int = 3) -> haniwers.v1.threshold.model.ParallelScanResult
:canonical: haniwers.v1.threshold.parallel.run_parallel_threshold_scan

```{autodoc2-docstring} haniwers.v1.threshold.parallel.run_parallel_threshold_scan
```
````
