zerodds-py 1.0.0-rc.6

PyO3 bindings for the ZeroDDS DCPS API
Documentation
# SPDX-License-Identifier: Apache-2.0
# Auto-generated by `zerodds-idl-python`. Do not edit by hand.

from dataclasses import dataclass
from enum import IntEnum
from typing import List, TypeAlias
from zerodds.idl import idl_struct, idl_union, Array, Float64, Int32, Optional, String

class combo_Mode(IntEnum):
    MODE_IDLE = 0
    MODE_ACTIVE = 1
    MODE_FAULT = 2

combo_CurrentInAmpsType: TypeAlias = Float64

@idl_struct(typename="combo::Sample", extensibility="appendable")
@dataclass
class combo_Sample:
    seq: Int32
    value: Float64

combo_Reading = idl_union(
    typename="combo::Reading",
    discriminator=combo_Mode,
    cases={
        0: ("idleTicks", Int32),
        1: ("activeRate", Float64),
    },
    default=("faultCode", String),
    extensibility="appendable",
)

@idl_struct(typename="combo::Telemetry", extensibility="appendable")
@dataclass
class combo_Telemetry:
    unitId: Int32
    mode: combo_Mode
    batteryCurrent: combo_CurrentInAmpsType
    history: List[combo_Sample]
    reading: combo_Reading
    calibration: Optional[Float64]
    window: Array[Int32, 4]