mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
20 lines
370 B
Python
Executable file
20 lines
370 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import csv
|
|
import sys
|
|
import villas.human as vh
|
|
|
|
# check if called correctly
|
|
if len(sys.argv) != 1:
|
|
sys.exit('Usage: %s < IN_FILE > OUT_FILE' % sys.argv[0])
|
|
|
|
with sys.stdin as f:
|
|
reader = csv.reader(f, delimiter='\t')
|
|
|
|
for row in reader:
|
|
m = vh.Message.parse(row)
|
|
|
|
if m.ts == None or m.ts.offset == None:
|
|
continue
|
|
|
|
print(m.ts.offset)
|