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

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

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

## Module Contents

### Functions

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

* - {py:obj}`run_serial_threshold_scan <haniwers.v1.threshold.serial.run_serial_threshold_scan>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.serial.run_serial_threshold_scan
    :summary:
    ```
* - {py:obj}`scan_single_channel <haniwers.v1.threshold.serial.scan_single_channel>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.serial.scan_single_channel
    :summary:
    ```
* - {py:obj}`collect_events <haniwers.v1.threshold.serial.collect_events>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.serial.collect_events
    :summary:
    ```
* - {py:obj}`write_scan_results <haniwers.v1.threshold.serial.write_scan_results>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.serial.write_scan_results
    :summary:
    ```
* - {py:obj}`write_audit_log <haniwers.v1.threshold.serial.write_audit_log>`
  - ```{autodoc2-docstring} haniwers.v1.threshold.serial.write_audit_log
    :summary:
    ```
````

### Data

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

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

### API

````{py:data} __all__
:canonical: haniwers.v1.threshold.serial.__all__
:value: >
   ['ScanDataPoint', 'ThresholdOperation', 'ChannelScanResult', 'ScanResult', 'run_serial_threshold_sca...

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

````

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

```{autodoc2-docstring} haniwers.v1.threshold.serial.run_serial_threshold_scan
```
````

````{py:function} scan_single_channel(sensor_config: haniwers.v1.config.model.SensorConfig, device: typing.Any, project_config: haniwers.v1.config.model.HaniwersConfig, output_dir: pathlib.Path, max_retry: int = 3, operations_log: typing.Optional[typing.List[haniwers.v1.threshold.model.ThresholdOperation]] = None) -> haniwers.v1.threshold.model.ChannelScanResult
:canonical: haniwers.v1.threshold.serial.scan_single_channel

```{autodoc2-docstring} haniwers.v1.threshold.serial.scan_single_channel
```
````

````{py:function} collect_events(device: typing.Any, duration: float) -> int
:canonical: haniwers.v1.threshold.serial.collect_events

```{autodoc2-docstring} haniwers.v1.threshold.serial.collect_events
```
````

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

```{autodoc2-docstring} haniwers.v1.threshold.serial.write_scan_results
```
````

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

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