# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Machine state tracking for CNC milling.

Tracks the current or intended machine state at any point in a command
sequence, including power level (0.0–1.0), coolant mode, air assist,
head coolant, feed rate and rapid rate, active head UID, pulse
frequency, and pulse width. State objects are used by Ops to associate
machine parameters with moving commands and to detect rapid (non-power)
state changes.
"""

import builtins
import typing
__all__ = [
    "AirAssistMode",
    "CoolantMode",
    "HeadCoolantMode",
    "State",
]

@typing.final
class AirAssistMode:
    r"""
    Air assist mode for laser or CNC operations.
    
    Controls the air assist state: ``Off`` or ``On``.
    """
    OFF: AirAssistMode = AirAssistMode.OFF
    ON: AirAssistMode = AirAssistMode.ON
    @property
    def value(self) -> builtins.int: ...
    @property
    def name(self) -> builtins.str: ...
    def __eq__(self, other: builtins.object, /) -> builtins.bool: ...
    def __hash__(self) -> builtins.int: ...
    def __repr__(self) -> builtins.str: ...

@typing.final
class CoolantMode:
    r"""
    Coolant mode for CNC milling operations.
    
    Controls the coolant state: ``Off``, ``Flood``, or ``Mist``.
    """
    OFF: CoolantMode = CoolantMode.OFF
    FLOOD: CoolantMode = CoolantMode.FLOOD
    MIST: CoolantMode = CoolantMode.MIST
    @property
    def value(self) -> builtins.int: ...
    @property
    def name(self) -> builtins.str: ...
    def __eq__(self, other: builtins.object, /) -> builtins.bool: ...
    def __hash__(self) -> builtins.int: ...
    def __repr__(self) -> builtins.str: ...

@typing.final
class HeadCoolantMode:
    r"""
    Head coolant mode for laser or CNC operations.
    
    Controls the head coolant state: ``Off`` or ``On``.
    """
    OFF: HeadCoolantMode = HeadCoolantMode.OFF
    ON: HeadCoolantMode = HeadCoolantMode.ON
    @property
    def value(self) -> builtins.int: ...
    @property
    def name(self) -> builtins.str: ...
    def __eq__(self, other: builtins.object, /) -> builtins.bool: ...
    def __hash__(self) -> builtins.int: ...
    def __repr__(self) -> builtins.str: ...

@typing.final
class State:
    r"""
    The current state of a CNC machine.
    
    Tracks power level, coolant mode, air assist, head coolant,
    feed/rapid rates, active head UID, frequency, pulse width,
    spindle RPM, and coolant mode.
    """
    @property
    def power(self) -> builtins.float:
        r"""
        Laser power level (0.0 – 1.0 typically).
        """
    @power.setter
    def power(self, value: builtins.float) -> None: ...
    @property
    def feed_rate(self) -> typing.Optional[builtins.int]:
        r"""
        Cutting feed rate in mm/s (if set).
        """
    @feed_rate.setter
    def feed_rate(self, value: typing.Optional[builtins.int]) -> None: ...
    @property
    def rapid_rate(self) -> typing.Optional[builtins.int]:
        r"""
        Rapid (traverse) rate in mm/s (if set).
        """
    @rapid_rate.setter
    def rapid_rate(self, value: typing.Optional[builtins.int]) -> None: ...
    @property
    def active_head_uid(self) -> typing.Optional[builtins.str]:
        r"""
        UID of the active head (if set).
        """
    @active_head_uid.setter
    def active_head_uid(self, value: typing.Optional[builtins.str]) -> None: ...
    @property
    def frequency(self) -> typing.Optional[builtins.int]:
        r"""
        Laser pulse frequency in Hz (if set).
        """
    @frequency.setter
    def frequency(self, value: typing.Optional[builtins.int]) -> None: ...
    @property
    def pulse_width(self) -> typing.Optional[builtins.float]:
        r"""
        Laser pulse width in microseconds (if set).
        """
    @pulse_width.setter
    def pulse_width(self, value: typing.Optional[builtins.float]) -> None: ...
    @property
    def dwell_ms(self) -> typing.Optional[builtins.float]:
        r"""
        Dwell time in milliseconds (if set).
        """
    @dwell_ms.setter
    def dwell_ms(self, value: typing.Optional[builtins.float]) -> None: ...
    @property
    def spindle_rpm(self) -> typing.Optional[builtins.int]:
        r"""
        Spindle RPM (if set).
        """
    @spindle_rpm.setter
    def spindle_rpm(self, value: typing.Optional[builtins.int]) -> None: ...
    @property
    def coolant(self) -> typing.Optional[CoolantMode]:
        r"""
        Coolant mode (if set).
        """
    @coolant.setter
    def coolant(self, value: typing.Optional[CoolantMode]) -> None: ...
    @property
    def air_assist(self) -> typing.Optional[AirAssistMode]:
        r"""
        Air assist mode (if set).
        """
    @air_assist.setter
    def air_assist(self, value: typing.Optional[AirAssistMode]) -> None: ...
    @property
    def head_coolant(self) -> typing.Optional[HeadCoolantMode]:
        r"""
        Head coolant mode (if set).
        """
    @head_coolant.setter
    def head_coolant(self, value: typing.Optional[HeadCoolantMode]) -> None: ...
    def __new__(cls, power: builtins.float = 0.0, feed_rate: typing.Optional[builtins.int] = None, rapid_rate: typing.Optional[builtins.int] = None, active_head_uid: typing.Optional[builtins.str] = None, frequency: typing.Optional[builtins.int] = None, pulse_width: typing.Optional[builtins.float] = None, dwell_ms: typing.Optional[builtins.float] = None, spindle_rpm: typing.Optional[builtins.int] = None, coolant: typing.Optional[CoolantMode] = None, air_assist: typing.Optional[AirAssistMode] = None, head_coolant: typing.Optional[HeadCoolantMode] = None) -> State: ...
    def __repr__(self) -> builtins.str:
        r"""
        String representation like ``State(power=...)``.
        """
    def allow_rapid_change(self, target: State) -> builtins.bool:
        r"""
        Check whether the machine can transition from the current
        state to the *target* state without a ``SetPower`` command.
        
        :param target: The target state to compare against.
        :returns: True if the change is a rapid (non-power) change.
        :complexity: O(1)
        """

