DeviceController defines a subset of functions to interact with a phc device. Enables mocking.
| 78 | |
| 79 | // DeviceController defines a subset of functions to interact with a phc device. Enables mocking. |
| 80 | type DeviceController interface { |
| 81 | Time() (time.Time, error) |
| 82 | setPinFunc(index uint, pf int, ch uint) error |
| 83 | setPTPPerout(req *PtpPeroutRequest) error |
| 84 | File() *os.File |
| 85 | AdjFreq(freq float64) error |
| 86 | Step(offset time.Duration) error |
| 87 | Read(buf []byte) (int, error) |
| 88 | Fd() uintptr |
| 89 | extTTSRequest(req *PtpExttsRequest) error |
| 90 | } |
| 91 | |
| 92 | // PPSPoller represents a device which can be polled for PPS events |
| 93 | type PPSPoller interface { |
no outgoing calls
no test coverage detected
searching dependent graphs…