Implemented the initial offline processing implementation, with dependency layer building and ordered processing Processing is still single threaded and unoptimized so it can take some time to complete, the next step is to move from a single threaded design to a ThreadPoolExecutor that splits up the buffer into a set number of chunks for processing
10 lines
329 B
Python
10 lines
329 B
Python
from dynalab_core.protocols.packets.data import ValueDescriptor
|
|
from dynalab_core.protocols.packets.handshake import SignalDescriptor
|
|
|
|
|
|
def process2(a: ValueDescriptor, r: SignalDescriptor) -> ValueDescriptor:
|
|
val = ValueDescriptor(
|
|
signal_id=r.id, value=a.value * a.value, timestamp=a.timestamp
|
|
)
|
|
return val
|