add recvplot3
This commit is contained in:
parent
ecb4b4e819
commit
3ec06830e7
@ -272,7 +272,7 @@ def device_recvplot():
|
|||||||
host_host_ts_last = host_host_ts
|
host_host_ts_last = host_host_ts
|
||||||
|
|
||||||
@device.command('recvplot2')
|
@device.command('recvplot2')
|
||||||
def device_recvplot():
|
def device_recvplot2():
|
||||||
ctx = zmq.Context()
|
ctx = zmq.Context()
|
||||||
pull = ctx.socket(zmq.PULL)
|
pull = ctx.socket(zmq.PULL)
|
||||||
pull.connect(C.live_push_socket)
|
pull.connect(C.live_push_socket)
|
||||||
@ -284,6 +284,28 @@ def device_recvplot():
|
|||||||
print((host_host_ts - host_host_ts_last) / 10 ** 6, flush=True)
|
print((host_host_ts - host_host_ts_last) / 10 ** 6, flush=True)
|
||||||
host_host_ts_last = host_host_ts
|
host_host_ts_last = host_host_ts
|
||||||
|
|
||||||
|
@device.command('recvplot3')
|
||||||
|
def device_recvplot3():
|
||||||
|
ctx = zmq.Context()
|
||||||
|
pull = ctx.socket(zmq.PULL)
|
||||||
|
pull.connect(C.live_push_socket)
|
||||||
|
last_ts = 0
|
||||||
|
first = True
|
||||||
|
host_host_ts_last = time.time_ns()
|
||||||
|
while True:
|
||||||
|
b = pull.recv()
|
||||||
|
host_host_ts = time.time_ns()
|
||||||
|
|
||||||
|
seq, encoder, host_ts, device_ts_low, device_ts_high, buffer = b2t(b)
|
||||||
|
ts = host_ts
|
||||||
|
if first:
|
||||||
|
last_ts = ts
|
||||||
|
first = False
|
||||||
|
continue
|
||||||
|
print((ts - last_ts) / 10 ** 6,(host_host_ts - host_host_ts_last) / 10 ** 6, flush=True)
|
||||||
|
last_ts = ts
|
||||||
|
host_host_ts_last = host_host_ts
|
||||||
|
|
||||||
@device.command('recvplotdiff')
|
@device.command('recvplotdiff')
|
||||||
def device_recvplotdiff():
|
def device_recvplotdiff():
|
||||||
ctx = zmq.Context()
|
ctx = zmq.Context()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user