

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: blickfeld/beam_deflection_control/data/health.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 ...base import data as __base_data__


@dataclass(eq=False, repr=False)
class Health(betterproto.Message):
    """
    Health message containing information about operation, status and error of
    a beam deflection controller.
    """

    state: "__base_data__.HealthState" = betterproto.enum_field(1)
    """High-level state of module"""

    state_reason: str = betterproto.string_field(2)
    """Reason for given state. Is not set if state is OK."""

    stats: "HealthStats" = betterproto.message_field(6)
    """Stats giving basic information about the mirror operation"""


@dataclass(eq=False, repr=False)
class HealthStats(betterproto.Message):
    """
    This message defines the stats that can be retrieved from a beam deflection
    controller.
    """

    time: float = betterproto.float_field(1)
    """Time in seconds since last operation start."""

    control_effort: float = betterproto.float_field(9)
    """
    Control effort usage. Relative value indicating how much of the maximum
    available effort is currently used to control the deflection mirror.
    """
