Added derive units to core
Derive units are now available in the core and has their relevant input values routed and outputs are looped back into the core router Fixed the dlpak manifest which had no signal descriptors
This commit is contained in:
+19
-10
@@ -52,7 +52,8 @@ logging.basicConfig(
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
signal_id: UUID = uuid4()
|
||||
signal_id_1: UUID = UUID("3f32cea3-d872-4c16-a0a2-54b57171aeb2")
|
||||
signal_id_2: UUID = UUID("6578ac37-99d1-410c-b3f7-d049339919b2")
|
||||
|
||||
|
||||
def monotonic_ms() -> int:
|
||||
@@ -117,13 +118,18 @@ def value_sender_thread(
|
||||
next_send_time += period
|
||||
|
||||
message = ValueBatch(values=[])
|
||||
for i in range(10):
|
||||
value = ValueDescriptor(
|
||||
signal_id=signal_id,
|
||||
value=2.0,
|
||||
timestamp=monotonic_ns(),
|
||||
)
|
||||
message.values.append(value)
|
||||
value1 = ValueDescriptor(
|
||||
signal_id=signal_id_1,
|
||||
value=2.0,
|
||||
timestamp=monotonic_ns(),
|
||||
)
|
||||
value2 = ValueDescriptor(
|
||||
signal_id=signal_id_2,
|
||||
value=1.0,
|
||||
timestamp=monotonic_ns(),
|
||||
)
|
||||
message.values.append(value1)
|
||||
message.values.append(value2)
|
||||
|
||||
future = asyncio.run_coroutine_threadsafe(
|
||||
send_message(
|
||||
@@ -205,8 +211,11 @@ async def perform_handshake(
|
||||
connector_version=CONNECTOR_VERSION.get_version(),
|
||||
signals=[
|
||||
SignalDescriptor(
|
||||
id=signal_id, name="Dummy signal", type="number", timeout_ms=5000
|
||||
)
|
||||
id=signal_id_1, name="Dummy signal 1", type="number", timeout_ms=5000
|
||||
),
|
||||
SignalDescriptor(
|
||||
id=signal_id_2, name="Dummy signal 2", type="number", timeout_ms=5000
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user