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
12 lines
372 B
Python
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
|