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
12 lines
354 B
Python
12 lines
354 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=a.timestamp
|
|
)
|
|
return val
|