Archived
Added deprecation message to README
This commit is contained in:
@@ -1 +1,4 @@
|
||||
# dynalab-protocol
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The DynaLab protocol has moved to the [DynaLab Core](https://git.h3cx.dev/Exergie/dynalab-core) library, it can be found under the `dynalab_core.protocols` python module and documentation about the protocol can be found there
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
|
||||
# Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from dynalab_protocol.models import SignalDescriptor
|
||||
|
||||
|
||||
class DLConf(BaseModel):
|
||||
name: str = "default_config"
|
||||
signals: list[SignalDescriptor] = []
|
||||
@@ -28,6 +28,13 @@ class SignalDescriptor(BaseModel):
|
||||
type: Literal["number", "binary"]
|
||||
min_value: float | None = None
|
||||
max_value: float | None = None
|
||||
unit: str | None = None
|
||||
|
||||
|
||||
class ValueDescriptor(BaseModel):
|
||||
type: Literal["value_descriptor"] = "value_descriptor"
|
||||
signal_id: UUID
|
||||
value: float
|
||||
|
||||
|
||||
class DynaLabHello(BaseModel):
|
||||
@@ -72,6 +79,11 @@ class Heartbeat(BaseModel):
|
||||
|
||||
|
||||
ProtocolMessage = Annotated[
|
||||
DynaLabHello | ConnectorHello | HandshakeAccepted | HandshakeRejected | Heartbeat,
|
||||
DynaLabHello
|
||||
| ConnectorHello
|
||||
| HandshakeAccepted
|
||||
| HandshakeRejected
|
||||
| Heartbeat
|
||||
| ValueDescriptor,
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user