# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: blickfeld/core_processing/config/demo_recording.proto, blickfeld/core_processing/config/health.proto, blickfeld/core_processing/config/point_cloud.proto
# plugin: python-betterproto
from dataclasses import dataclass

import blickfeld_qb2.betterproto as betterproto
import blickfeld_qb2.betterproto.lib.google.protobuf as betterproto_lib_google_protobuf

from .. import data as _data__


class DemoRecording(betterproto.Enum):
    """
    Demo recording which can be replayed instead of the real sensor data. This
    is also used for virtual devices which have no physical sensing unit.
    WARNING: The recordings are still preliminary. The demo test data concept
    will be refactored soon.
    """

    DEMO_RECORDING_UNSPECIFIED = 0
    """No demo recoding is specified"""

    DEMO_RECORDING_HIGH_RESOLUTION = 1
    """High resolution recording in the office with 200 + 30 scanlines"""

    DEMO_RECORDING_HIGH_FRAME_RATE = 2
    """High resolution recording in the office with 30 + 30 scanlines"""


class PointCloudFilterSorting(betterproto.Enum):
    """
    Configure sorting of return candidates. The sorting is always descending
    thus the higher the value is, the lower is the return id.
    """

    SORTING_UNSPECIFIED = 0
    """No sorting specified."""

    SORTING_INTENSITY = 1
    """Sort returns by intensity (integral of return pulse)."""

    SORTING_REFLECTIVITY = 2
    """
    Sort returns by reflectivity (range-compensated intensity). This can
    improve the SNR as closer points are getting a lower weight.
    """

    SORTING_RANGE = 3
    """
    Sort returns by range. This can improve the SNR for outdoor applications
    with rain and snow.
    """


@dataclass(eq=False, repr=False)
class Health(betterproto.Message):
    """Configuration parameters for the health message"""

    point_rate_lower_limit: int = betterproto.uint32_field(1)
    """
    Set the point rate lower limit. If the point rate is lower than this limit,
    the device is considered to be covered.
    """

    point_cloud_alignment_deviation_norm_upper_limit: float = betterproto.float_field(2)
    """The limit to detect the alignment has changed."""

    point_cloud_reference_alignment: "_data__.Acceleration" = betterproto.message_field(
        3
    )
    """Set the point cloud reference alignment."""


@dataclass(eq=False, repr=False)
class PointCloud(betterproto.Message):
    """Configuration parameters for the point cloud"""

    pass


@dataclass(eq=False, repr=False)
class PointCloudFilter(betterproto.Message):
    """Filter configuration which can be applied on point cloud frames."""

    maximum_returns_per_point: int = betterproto.uint32_field(1)
    """
    Set maximum number of returns per point. By default, secondary returns are
    disabled. Set this, e.g. to 2, to enable secondary returns.
    """

    sorting: "PointCloudFilterSorting" = betterproto.enum_field(3)
    """
    Select sorting method for return candidates. The default sorting is by
    intensity.
    """

    minimum_reflectivity: int = betterproto.uint32_field(4)
    """
    Set lower threshold for reflectivity. This can be tuned to improve the SNR
    when low-reflectivity targets have a lower priority.
    """
