Files
h3cx c0a3117be4 Completed initial API documentation and updated API to support derive unit
The initial API documentation is now complete and covers the whole Core
api ready for use

The underlying logic has been updated to correctly return derive unit
signals
2026-09-11 17:34:44 +02:00

12 lines
372 B
Python

from dynalab_core.protocols.packets.data import ValueDescriptor
from dynalab_core.protocols.packets.handshake import SignalDescriptor
def process(
a: ValueDescriptor, b: ValueDescriptor, r: SignalDescriptor
) -> ValueDescriptor:
val = ValueDescriptor(
signal_id=r.id, value=a.value * b.value, timestamp=max(a.timestamp, b.timestamp)
)
return val