Constructs a `PhcReader` struct using the specified PHC device file and PHC CEB file path. Should not be called directly - used by autoconfiguration function.
(phc_device_file: File, phc_clock_error_bound_path: PathBuf)
| 94 | impl PhcReader { |
| 95 | /// Constructs a `PhcReader` struct using the specified PHC device file and PHC CEB file path. |
| 96 | /// Should not be called directly - used by autoconfiguration function. |
| 97 | pub fn new(phc_device_file: File, phc_clock_error_bound_path: PathBuf) -> Self { |
| 98 | let ptp_reader = PtpReader::new(&phc_device_file); |
| 99 | let ceb_reader = PhcClockErrorBoundReader::new(phc_clock_error_bound_path); |
| 100 | Self { |
| 101 | _phc_device_file: phc_device_file, |
| 102 | ptp_reader, |
| 103 | ceb_reader, |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | /// Retrieves a timestamp from the PHC device. |