hey @pradeeban Sir
When write() sends data over ZMQ, it sends val directly:
ZMQ path (line ~244)
zmq_p.send_json_with_retry(val) # Sends raw val — no simtime prefix
But when writing to file, it prepends simtime:
File path (line ~315)
data_to_write = [simtime + delta] + _to_native(val) # Prepends simtime
Meanwhile, read() always expects inval[0] to be simtime:
simtime = max(simtime, current_simtime_from_file) # Assumes inval[0] is simtime
return inval[1:] # Returns everything after simtime
Impact: A study with a ZMQ writer → file reader (or vice versa) will:
- Interpret the first data value as simtime (data corruption)
- Return one fewer data element than expected
- Silently produce wrong results
This makes mixed ZMQ/file topologies fundamentally broken.