Пример #1
0
class CartesianLocation(betterproto.Message):
    """ECEF-compatible cartesian coordinates."""

    # X, Y, and Z coordinates in meters.
    x_m: float = betterproto.double_field(1)
    y_m: float = betterproto.double_field(2)
    z_m: float = betterproto.double_field(3)
Пример #2
0
class AzElOrientation(betterproto.Message):
    # Azimuth angle in degrees.
    azimuth_deg: float = betterproto.double_field(1)
    # Elevation angle in degrees.
    elevation_deg: float = betterproto.double_field(2)
    # Rotation around boresight in degrees.
    rotation_deg: float = betterproto.double_field(3)
Пример #3
0
class Wgs84Location(betterproto.Message):
    # Latitude in degrees, between +/- 90.
    latitude_deg: float = betterproto.double_field(1)
    # Longitude in degrees, between +/- 180.
    longitude_deg: float = betterproto.double_field(2)
    # Altitude in meters, from the surface of the WGS-84 ellipsoid.
    altitude_m: float = betterproto.double_field(3)
Пример #4
0
class YprOrientation(betterproto.Message):
    # Yaw angle around z-axis.
    yaw_deg: float = betterproto.double_field(1)
    # Pitch angle around y-axix.
    pitch_deg: float = betterproto.double_field(2)
    # Roll angle around x-axis.
    roll_deg: float = betterproto.double_field(3)
Пример #5
0
class Location(betterproto.Message):
    """Basic asset information"""

    lat: float = betterproto.double_field(1)
    lng: float = betterproto.double_field(2)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #6
0
class AzElOrientation(betterproto.Message):
    """TLS connectivity aspect"""

    azimuth_deg: float = betterproto.double_field(1)
    elevation_deg: float = betterproto.double_field(2)
    rotation_deg: float = betterproto.double_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #7
0
class Wgs84Location(betterproto.Message):
    """Configurable device aspect"""

    latitude_deg: float = betterproto.double_field(1)
    longitude_deg: float = betterproto.double_field(2)
    altitude_m: float = betterproto.double_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #8
0
 class TestMessage2(betterproto.Message):
     some_int: int = betterproto.int32_field(1)
     some_double: float = betterproto.double_field(2)
     some_str: str = betterproto.string_field(3)
     some_bool: bool = betterproto.bool_field(4)
     some_default_int: int = betterproto.int32_field(5)
     some_default_double: float = betterproto.double_field(6)
     some_default_str: str = betterproto.string_field(7)
     some_default_bool: bool = betterproto.bool_field(8)
Пример #9
0
class CartesianLocation(betterproto.Message):
    """Aspect for tracking device mastership"""

    x_m: float = betterproto.double_field(1)
    y_m: float = betterproto.double_field(2)
    z_m: float = betterproto.double_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #10
0
class YprOrientation(betterproto.Message):
    """Aspect for ad-hoc properties"""

    yaw_deg: float = betterproto.double_field(1)
    pitch_deg: float = betterproto.double_field(2)
    roll_deg: float = betterproto.double_field(3)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #11
0
class ScaledTrigger(betterproto.Message):
    # If the resource pressure is greater than this value, the trigger will be in
    # the :ref:`scaling <arch_overview_overload_manager-triggers-state>` state
    # with value `(pressure - scaling_threshold) / (saturation_threshold -
    # scaling_threshold)`.
    scaling_threshold: float = betterproto.double_field(1)
    # If the resource pressure is greater than this value, the trigger will enter
    # saturation.
    saturation_threshold: float = betterproto.double_field(2)
Пример #12
0
class DoubleRange(betterproto.Message):
    """
    Specifies the double start and end of the range using half-open interval
    semantics [start, end).
    """

    # start of the range (inclusive)
    start: float = betterproto.double_field(1)
    # end of the range (exclusive)
    end: float = betterproto.double_field(2)
Пример #13
0
class Location(betterproto.Message):
    # Legacy Geographical location; expected value type of "location" aspect
    lat: float = betterproto.double_field(1)
    lng: float = betterproto.double_field(2)
    wgs84: "Wgs84Location" = betterproto.message_field(3, group="ext")
    cartesian: "CartesianLocation" = betterproto.message_field(4, group="ext")

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.lat:
            warnings.warn("Location.lat is deprecated", DeprecationWarning)
        if self.lng:
            warnings.warn("Location.lng is deprecated", DeprecationWarning)
Пример #14
0
class Location(betterproto.Message):
    """Basic asset information"""

    lat: float = betterproto.double_field(1)
    lng: float = betterproto.double_field(2)
    wgs84: "Wgs84Location" = betterproto.message_field(3, group="ext")
    cartesian: "CartesianLocation" = betterproto.message_field(4, group="ext")

    def __post_init__(self) -> None:
        super().__post_init__()
        if self.lat:
            warnings.warn("Location.lat is deprecated", DeprecationWarning)
        if self.lng:
            warnings.warn("Location.lng is deprecated", DeprecationWarning)
Пример #15
0
class PickStats(betterproto.Message):
    mu_r: float = betterproto.double_field(1)
    mu_g: float = betterproto.double_field(2)
    mu_b: float = betterproto.double_field(3)
    perc_r: float = betterproto.double_field(4)
    perc_g: float = betterproto.double_field(5)
    perc_b: float = betterproto.double_field(6)
    sigma_r: float = betterproto.double_field(7)
    sigma_g: float = betterproto.double_field(8)
    sigma_b: float = betterproto.double_field(9)
    num_pixels: int = betterproto.int32_field(10)
    pick_name: str = betterproto.string_field(11)
Пример #16
0
class CellConnection(betterproto.Message):
    """CellConnection represents UE cell connection."""

    id: str = betterproto.string_field(1)
    signal_strength: float = betterproto.double_field(2)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #17
0
class EndpointLoadMetricStats(betterproto.Message):
    # Name of the metric; may be empty.
    metric_name: str = betterproto.string_field(1)
    # Number of calls that finished and included this metric.
    num_requests_finished_with_metric: int = betterproto.uint64_field(2)
    # Sum of metric values across all calls that finished with this metric for
    # load_reporting_interval.
    total_metric_value: float = betterproto.double_field(3)
Пример #18
0
class Ue(betterproto.Message):
    imsi: int = betterproto.uint64_field(1)
    type: str = betterproto.string_field(2)
    position: "Point" = betterproto.message_field(4)
    rotation: int = betterproto.uint32_field(5)
    serving_tower: int = betterproto.uint64_field(7)
    serving_tower_strength: float = betterproto.double_field(8)
    tower1: int = betterproto.uint64_field(9)
    tower1_strength: float = betterproto.double_field(10)
    tower2: int = betterproto.uint64_field(11)
    tower2_strength: float = betterproto.double_field(12)
    tower3: int = betterproto.uint64_field(13)
    tower3_strength: float = betterproto.double_field(14)
    crnti: int = betterproto.uint32_field(15)
    admitted: bool = betterproto.bool_field(16)
    metrics: "UeMetrics" = betterproto.message_field(17)
    rrc_state: int = betterproto.uint32_field(18)
Пример #19
0
class DoubleRules(betterproto.Message):
    """DoubleRules describes the constraints applied to `double` values"""

    # Const specifies that this field must be exactly the specified value
    const: float = betterproto.double_field(1)
    # Lt specifies that this field must be less than the specified value,
    # exclusive
    lt: float = betterproto.double_field(2)
    # Lte specifies that this field must be less than or equal to the specified
    # value, inclusive
    lte: float = betterproto.double_field(3)
    # Gt specifies that this field must be greater than the specified value,
    # exclusive. If the value of Gt is larger than a specified Lt or Lte, the
    # range is reversed.
    gt: float = betterproto.double_field(4)
    # Gte specifies that this field must be greater than or equal to the
    # specified value, inclusive. If the value of Gte is larger than a specified
    # Lt or Lte, the range is reversed.
    gte: float = betterproto.double_field(5)
    # In specifies that this field must be equal to one of the specified values
    in_: List[float] = betterproto.double_field(6)
    # NotIn specifies that this field cannot be equal to one of the specified
    # values
    not_in: List[float] = betterproto.double_field(7)
    # IgnoreEmpty specifies that the validation rules of this field should be
    # evaluated only if the field is not empty
    ignore_empty: bool = betterproto.bool_field(8)
Пример #20
0
class DoubleMatcher(betterproto.Message):
    """Specifies the way to match a double value."""

    # If specified, the input double value must be in the range specified here.
    # Note: The range is using half-open interval semantics [start, end).
    range: "__v3__.DoubleRange" = betterproto.message_field(1, group="match_pattern")
    # If specified, the input double value must be equal to the value specified
    # here.
    exact: float = betterproto.double_field(2, group="match_pattern")
Пример #21
0
class ProbabilitySampler(betterproto.Message):
    """
    Sampler that tries to uniformly sample traces with a given probability. The
    probability of sampling a trace is equal to that of the specified
    probability.
    """

    # The desired probability of sampling. Must be within [0.0, 1.0].
    sampling_probability: float = betterproto.double_field(1)
Пример #22
0
class AttributeValue(betterproto.Message):
    """The value of an Attribute."""

    # A string up to 256 bytes long.
    string_value: "TruncatableString" = betterproto.message_field(
        1, group="value")
    # A 64-bit signed integer.
    int_value: int = betterproto.int64_field(2, group="value")
    # A Boolean value represented by `true` or `false`.
    bool_value: bool = betterproto.bool_field(3, group="value")
    # A double value.
    double_value: float = betterproto.double_field(4, group="value")
Пример #23
0
class EndpointLoadMetricStats(betterproto.Message):
    """
    [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
    """

    # Name of the metric; may be empty.
    metric_name: str = betterproto.string_field(1)
    # Number of calls that finished and included this metric.
    num_requests_finished_with_metric: int = betterproto.uint64_field(2)
    # Sum of metric values across all calls that finished with this metric for
    # load_reporting_interval.
    total_metric_value: float = betterproto.double_field(3)
Пример #24
0
class Ue(betterproto.Message):
    imsi: int = betterproto.uint64_field(1)
    type: str = betterproto.string_field(2)
    position: "Point" = betterproto.message_field(4)
    rotation: int = betterproto.uint32_field(5)
    serving_tower: int = betterproto.uint64_field(7)
    serving_tower_strength: float = betterproto.double_field(8)
    tower1: int = betterproto.uint64_field(9)
    tower1_strength: float = betterproto.double_field(10)
    tower2: int = betterproto.uint64_field(11)
    tower2_strength: float = betterproto.double_field(12)
    tower3: int = betterproto.uint64_field(13)
    tower3_strength: float = betterproto.double_field(14)
    crnti: int = betterproto.uint32_field(15)
    admitted: bool = betterproto.bool_field(16)
    metrics: "UeMetrics" = betterproto.message_field(17)
    rrc_state: int = betterproto.uint32_field(18)
    five_qi: int = betterproto.int32_field(19)
    ueid: "UeIdentity" = betterproto.message_field(20)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #25
0
class HistogramBucketSettings(betterproto.Message):
    """
    Specifies a matcher for stats and the buckets that matching stats should
    use.
    """

    # The stats that this rule applies to. The match is applied to the original
    # stat name before tag-extraction, for example
    # `cluster.exampleclustername.upstream_cx_length_ms`.
    match: "___type_matcher_v3__.StringMatcher" = betterproto.message_field(1)
    # Each value is the upper bound of a bucket. Each bucket must be greater than
    # 0 and unique. The order of the buckets does not matter.
    buckets: List[float] = betterproto.double_field(2)
Пример #26
0
class AnyValue(betterproto.Message):
    """
    AnyValue is used to represent any type of attribute value. AnyValue may
    contain a primitive value such as a string or integer or it may contain an
    arbitrary nested object containing arrays, key-value lists and primitives.
    """

    string_value: str = betterproto.string_field(1, group="value")
    bool_value: bool = betterproto.bool_field(2, group="value")
    int_value: int = betterproto.int64_field(3, group="value")
    double_value: float = betterproto.double_field(4, group="value")
    array_value: "ArrayValue" = betterproto.message_field(5, group="value")
    kvlist_value: "KeyValueList" = betterproto.message_field(6, group="value")
    bytes_value: bytes = betterproto.bytes_field(7, group="value")
Пример #27
0
class TileValue(betterproto.Message):
    """
    Variant type encoding The use of values is described in section 4.1 of the
    specification
    """

    # Exactly one of these values must be present in a valid message
    string_val: str = betterproto.string_field(1, group="val")
    float_val: float = betterproto.float_field(2, group="val")
    double_val: float = betterproto.double_field(3, group="val")
    int_val: int = betterproto.int64_field(4, group="val")
    uint_val: int = betterproto.uint64_field(5, group="val")
    sint_val: int = betterproto.sint64_field(6, group="val")
    bool_val: bool = betterproto.bool_field(7, group="val")
Пример #28
0
class Position(betterproto.Message):
    """A position."""

    # Degrees North, in the WGS-84 coordinate system.
    latitude: float = betterproto.float_field(1)
    # Degrees East, in the WGS-84 coordinate system.
    longitude: float = betterproto.float_field(2)
    # Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
    # This can be the compass bearing, or the direction towards the next stop or
    # intermediate location. This should not be direction deduced from the
    # sequence of previous positions, which can be computed from previous data.
    bearing: float = betterproto.float_field(3)
    # Odometer value, in meters.
    odometer: float = betterproto.double_field(4)
    # Momentary speed measured by the vehicle, in meters per second.
    speed: float = betterproto.float_field(5)
Пример #29
0
class OrbitData(betterproto.Message):
    epoch: datetime = betterproto.message_field(1)
    inclination_deg: float = betterproto.double_field(2)
    raan_deg: float = betterproto.double_field(3)
    e: float = betterproto.double_field(4)
    argument_deg: float = betterproto.double_field(5)
    anomaly_deg: float = betterproto.double_field(6)
    mean_motion: float = betterproto.double_field(7)

    def __post_init__(self) -> None:
        super().__post_init__()
Пример #30
0
class Cell(betterproto.Message):
    ecgi: int = betterproto.uint64_field(1)
    location: "Point" = betterproto.message_field(3)
    sector: "Sector" = betterproto.message_field(4)
    color: str = betterproto.string_field(5)
    max_ues: int = betterproto.uint32_field(6)
    neighbors: List[int] = betterproto.uint64_field(7)
    # The cell transmit power in decibels
    tx_power_db: float = betterproto.double_field(8)
    # crntis maps a ue's name to its crnti
    crnti_map: Dict[int,
                    int] = betterproto.map_field(9, betterproto.TYPE_UINT32,
                                                 betterproto.TYPE_UINT64)
    crnti_index: int = betterproto.uint32_field(10)
    port: int = betterproto.uint32_field(11)

    def __post_init__(self) -> None:
        super().__post_init__()