# {py:mod}`haniwers.v1.config.model`

```{py:module} haniwers.v1.config.model
```

```{autodoc2-docstring} haniwers.v1.config.model
:allowtitles:
```

## Module Contents

### Classes

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

* - {py:obj}`DeviceConfig <haniwers.v1.config.model.DeviceConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig
    :summary:
    ```
* - {py:obj}`SensorConfig <haniwers.v1.config.model.SensorConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig
    :summary:
    ```
* - {py:obj}`SamplerConfig <haniwers.v1.config.model.SamplerConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig
    :summary:
    ```
* - {py:obj}`DaqConfig <haniwers.v1.config.model.DaqConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig
    :summary:
    ```
* - {py:obj}`ScanConfig <haniwers.v1.config.model.ScanConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig
    :summary:
    ```
* - {py:obj}`MockerConfig <haniwers.v1.config.model.MockerConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig
    :summary:
    ```
* - {py:obj}`HaniwersConfig <haniwers.v1.config.model.HaniwersConfig>`
  - ```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig
    :summary:
    ```
````

### API

`````{py:class} DeviceConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.DeviceConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.__init__
```

````{py:attribute} label
:canonical: haniwers.v1.config.model.DeviceConfig.label
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.label
```

````

````{py:attribute} port
:canonical: haniwers.v1.config.model.DeviceConfig.port
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.port
```

````

````{py:attribute} baudrate
:canonical: haniwers.v1.config.model.DeviceConfig.baudrate
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.baudrate
```

````

````{py:attribute} timeout
:canonical: haniwers.v1.config.model.DeviceConfig.timeout
:type: float
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.timeout
```

````

````{py:method} validate_port(v)
:canonical: haniwers.v1.config.model.DeviceConfig.validate_port
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.validate_port
```

````

````{py:method} validate_baudrate(v)
:canonical: haniwers.v1.config.model.DeviceConfig.validate_baudrate
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.validate_baudrate
```

````

````{py:method} validate_timeout(v)
:canonical: haniwers.v1.config.model.DeviceConfig.validate_timeout
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.DeviceConfig.validate_timeout
```

````

`````

`````{py:class} SensorConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.SensorConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.__init__
```

````{py:attribute} id
:canonical: haniwers.v1.config.model.SensorConfig.id
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.id
```

````

````{py:attribute} name
:canonical: haniwers.v1.config.model.SensorConfig.name
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.name
```

````

````{py:attribute} label
:canonical: haniwers.v1.config.model.SensorConfig.label
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.label
```

````

````{py:attribute} step_size
:canonical: haniwers.v1.config.model.SensorConfig.step_size
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.step_size
```

````

````{py:attribute} threshold
:canonical: haniwers.v1.config.model.SensorConfig.threshold
:type: typing.Optional[int]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.threshold
```

````

````{py:attribute} start_threshold
:canonical: haniwers.v1.config.model.SensorConfig.start_threshold
:type: typing.Optional[int]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.start_threshold
```

````

````{py:attribute} num_steps
:canonical: haniwers.v1.config.model.SensorConfig.num_steps
:type: typing.Optional[int]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.num_steps
```

````

````{py:attribute} center
:canonical: haniwers.v1.config.model.SensorConfig.center
:type: typing.Optional[int]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.center
```

````

````{py:attribute} nsteps
:canonical: haniwers.v1.config.model.SensorConfig.nsteps
:type: typing.Optional[int]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.nsteps
```

````

````{py:method} validate_id(v)
:canonical: haniwers.v1.config.model.SensorConfig.validate_id
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_id
```

````

````{py:method} validate_name(v)
:canonical: haniwers.v1.config.model.SensorConfig.validate_name
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_name
```

````

````{py:method} validate_step_size(v)
:canonical: haniwers.v1.config.model.SensorConfig.validate_step_size
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_step_size
```

````

````{py:method} validate_center(v)
:canonical: haniwers.v1.config.model.SensorConfig.validate_center
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_center
```

````

````{py:method} validate_nsteps(v)
:canonical: haniwers.v1.config.model.SensorConfig.validate_nsteps
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_nsteps
```

````

````{py:method} convert_none_string(v)
:canonical: haniwers.v1.config.model.SensorConfig.convert_none_string
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.convert_none_string
```

````

````{py:method} validate_mode_exclusivity()
:canonical: haniwers.v1.config.model.SensorConfig.validate_mode_exclusivity

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.validate_mode_exclusivity
```

````

````{py:method} threshold_range() -> range
:canonical: haniwers.v1.config.model.SensorConfig.threshold_range

```{autodoc2-docstring} haniwers.v1.config.model.SensorConfig.threshold_range
```

````

`````

`````{py:class} SamplerConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.SamplerConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.__init__
```

````{py:attribute} mode
:canonical: haniwers.v1.config.model.SamplerConfig.mode
:type: str
:value: >
   'count_based'

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.mode
```

````

````{py:attribute} duration
:canonical: haniwers.v1.config.model.SamplerConfig.duration
:type: typing.Optional[float]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.duration
```

````

````{py:attribute} label
:canonical: haniwers.v1.config.model.SamplerConfig.label
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.label
```

````

````{py:attribute} workspace
:canonical: haniwers.v1.config.model.SamplerConfig.workspace
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.workspace
```

````

````{py:attribute} filename_prefix
:canonical: haniwers.v1.config.model.SamplerConfig.filename_prefix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.filename_prefix
```

````

````{py:attribute} filename_suffix
:canonical: haniwers.v1.config.model.SamplerConfig.filename_suffix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.filename_suffix
```

````

````{py:attribute} events_per_file
:canonical: haniwers.v1.config.model.SamplerConfig.events_per_file
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.events_per_file
```

````

````{py:attribute} number_of_files
:canonical: haniwers.v1.config.model.SamplerConfig.number_of_files
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.number_of_files
```

````

````{py:attribute} stream_mode
:canonical: haniwers.v1.config.model.SamplerConfig.stream_mode
:type: bool
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.stream_mode
```

````

````{py:attribute} suppress_threshold
:canonical: haniwers.v1.config.model.SamplerConfig.suppress_threshold
:type: int
:value: >
   1000

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.suppress_threshold
```

````

````{py:attribute} max_retry
:canonical: haniwers.v1.config.model.SamplerConfig.max_retry
:type: int
:value: >
   3

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.max_retry
```

````

````{py:method} validate_mode(v)
:canonical: haniwers.v1.config.model.SamplerConfig.validate_mode
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.validate_mode
```

````

````{py:method} validate_positive_int(v)
:canonical: haniwers.v1.config.model.SamplerConfig.validate_positive_int
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.validate_positive_int
```

````

````{py:method} validate_duration(v)
:canonical: haniwers.v1.config.model.SamplerConfig.validate_duration
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.validate_duration
```

````

````{py:method} validate_threshold(v)
:canonical: haniwers.v1.config.model.SamplerConfig.validate_threshold
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.SamplerConfig.validate_threshold
```

````

`````

`````{py:class} DaqConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.DaqConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.__init__
```

````{py:attribute} label
:canonical: haniwers.v1.config.model.DaqConfig.label
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.label
```

````

````{py:attribute} workspace
:canonical: haniwers.v1.config.model.DaqConfig.workspace
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.workspace
```

````

````{py:attribute} filename_prefix
:canonical: haniwers.v1.config.model.DaqConfig.filename_prefix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.filename_prefix
```

````

````{py:attribute} filename_suffix
:canonical: haniwers.v1.config.model.DaqConfig.filename_suffix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.filename_suffix
```

````

````{py:attribute} events_per_file
:canonical: haniwers.v1.config.model.DaqConfig.events_per_file
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.events_per_file
```

````

````{py:attribute} number_of_files
:canonical: haniwers.v1.config.model.DaqConfig.number_of_files
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.number_of_files
```

````

````{py:attribute} stream_mode
:canonical: haniwers.v1.config.model.DaqConfig.stream_mode
:type: bool
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.stream_mode
```

````

````{py:method} validate_positive_int(v)
:canonical: haniwers.v1.config.model.DaqConfig.validate_positive_int
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.validate_positive_int
```

````

````{py:method} model_post_init(__context)
:canonical: haniwers.v1.config.model.DaqConfig.model_post_init

```{autodoc2-docstring} haniwers.v1.config.model.DaqConfig.model_post_init
```

````

`````

`````{py:class} ScanConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.ScanConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.__init__
```

````{py:attribute} label
:canonical: haniwers.v1.config.model.ScanConfig.label
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.label
```

````

````{py:attribute} workspace
:canonical: haniwers.v1.config.model.ScanConfig.workspace
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.workspace
```

````

````{py:attribute} filename_prefix
:canonical: haniwers.v1.config.model.ScanConfig.filename_prefix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.filename_prefix
```

````

````{py:attribute} filename_suffix
:canonical: haniwers.v1.config.model.ScanConfig.filename_suffix
:type: str
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.filename_suffix
```

````

````{py:attribute} events_per_file
:canonical: haniwers.v1.config.model.ScanConfig.events_per_file
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.events_per_file
```

````

````{py:attribute} number_of_files
:canonical: haniwers.v1.config.model.ScanConfig.number_of_files
:type: int
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.number_of_files
```

````

````{py:attribute} stream_mode
:canonical: haniwers.v1.config.model.ScanConfig.stream_mode
:type: bool
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.stream_mode
```

````

````{py:attribute} duration
:canonical: haniwers.v1.config.model.ScanConfig.duration
:type: float
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.duration
```

````

````{py:attribute} suppress_threshold
:canonical: haniwers.v1.config.model.ScanConfig.suppress_threshold
:type: int
:value: >
   1000

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.suppress_threshold
```

````

````{py:attribute} max_retry
:canonical: haniwers.v1.config.model.ScanConfig.max_retry
:type: int
:value: >
   3

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.max_retry
```

````

````{py:method} validate_positive_int(v)
:canonical: haniwers.v1.config.model.ScanConfig.validate_positive_int
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.validate_positive_int
```

````

````{py:method} validate_duration(v)
:canonical: haniwers.v1.config.model.ScanConfig.validate_duration
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.validate_duration
```

````

````{py:method} validate_threshold(v)
:canonical: haniwers.v1.config.model.ScanConfig.validate_threshold
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.validate_threshold
```

````

````{py:method} model_post_init(__context)
:canonical: haniwers.v1.config.model.ScanConfig.model_post_init

```{autodoc2-docstring} haniwers.v1.config.model.ScanConfig.model_post_init
```

````

`````

`````{py:class} MockerConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.MockerConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.__init__
```

````{py:attribute} label
:canonical: haniwers.v1.config.model.MockerConfig.label
:type: typing.Optional[str]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.label
```

````

````{py:attribute} csv_path
:canonical: haniwers.v1.config.model.MockerConfig.csv_path
:type: typing.Optional[pathlib.Path]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.csv_path
```

````

````{py:attribute} shuffle
:canonical: haniwers.v1.config.model.MockerConfig.shuffle
:type: bool
:value: >
   False

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.shuffle
```

````

````{py:attribute} speed
:canonical: haniwers.v1.config.model.MockerConfig.speed
:type: float
:value: >
   1.0

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.speed
```

````

````{py:attribute} jitter
:canonical: haniwers.v1.config.model.MockerConfig.jitter
:type: float
:value: >
   0.0

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.jitter
```

````

````{py:attribute} loop
:canonical: haniwers.v1.config.model.MockerConfig.loop
:type: bool
:value: >
   True

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.loop
```

````

````{py:method} validate_path(v)
:canonical: haniwers.v1.config.model.MockerConfig.validate_path
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.MockerConfig.validate_path
```

````

`````

`````{py:class} HaniwersConfig(/, **data: typing.Any)
:canonical: haniwers.v1.config.model.HaniwersConfig

Bases: {py:obj}`pydantic.BaseModel`

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig
```

```{rubric} Initialization
```

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.__init__
```

````{py:attribute} device
:canonical: haniwers.v1.config.model.HaniwersConfig.device
:type: haniwers.v1.config.model.DeviceConfig
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.device
```

````

````{py:attribute} sampler
:canonical: haniwers.v1.config.model.HaniwersConfig.sampler
:type: typing.Optional[haniwers.v1.config.model.SamplerConfig]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.sampler
```

````

````{py:attribute} daq
:canonical: haniwers.v1.config.model.HaniwersConfig.daq
:type: typing.Optional[haniwers.v1.config.model.DaqConfig]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.daq
```

````

````{py:attribute} scan
:canonical: haniwers.v1.config.model.HaniwersConfig.scan
:type: typing.Optional[haniwers.v1.config.model.ScanConfig]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.scan
```

````

````{py:attribute} sensors
:canonical: haniwers.v1.config.model.HaniwersConfig.sensors
:type: typing.Dict[str, haniwers.v1.config.model.SensorConfig]
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.sensors
```

````

````{py:attribute} mocker
:canonical: haniwers.v1.config.model.HaniwersConfig.mocker
:type: haniwers.v1.config.model.MockerConfig
:value: >
   None

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.mocker
```

````

````{py:method} validate_config_format()
:canonical: haniwers.v1.config.model.HaniwersConfig.validate_config_format

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.validate_config_format
```

````

````{py:method} from_toml(path: pathlib.Path) -> haniwers.v1.config.model.HaniwersConfig
:canonical: haniwers.v1.config.model.HaniwersConfig.from_toml
:classmethod:

```{autodoc2-docstring} haniwers.v1.config.model.HaniwersConfig.from_toml
```

````

`````
