Dataset Reader¶
- class ptp.reader.Reader(ds_file=None, infer_secs=False, no_pps=False, reverse_ms=True)[source]¶
Reader of data acquired through the testbed
Reads a log file containing timestamps acquired via serial communication with the testbed. Post-processes the timestamps following the same sequence that is adopted in PTP simulation and similarly saves reults into a list of dictionaries containing the same keys as produced by the simulation.
- check_progress(i_iter, n_iter)[source]¶
Check/print simulation progress
- Parameters
i_iter – Iteration index
n_iter – Numger of iterations
- process(data, pr_level=10)[source]¶
Process a set of timestamps
Apply the timestamps into a delay request-response mechanism object and use the latter to obtain PTP metrics.
- Parameters
data – dicitionary containing timestamp data
pr_level – logging level to be used when logging timestamps
- Returns
results dictionary containing PTP sync metrics