mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
sources: give access to sourcestats instance
Give access to the sourcestats instance and remove all functions that just translated to SST calls.
This commit is contained in:
31
sources.h
31
sources.h
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "ntp.h"
|
||||
#include "reports.h"
|
||||
#include "sourcestats.h"
|
||||
|
||||
/* Size of the source reachability register */
|
||||
#define SOURCE_REACH_BITS 8
|
||||
@@ -73,18 +74,8 @@ extern void SRC_ResetInstance(SRC_Instance instance);
|
||||
/* Function to change the sources's reference ID and IP address */
|
||||
extern void SRC_SetRefid(SRC_Instance instance, uint32_t ref_id, IPAddr *addr);
|
||||
|
||||
/* Function to get the range of frequencies, relative to the given
|
||||
source, that we believe the local clock lies within. The return
|
||||
values are in terms of the number of seconds fast (+ve) or slow
|
||||
(-ve) relative to the source that the local clock becomes after a
|
||||
given amount of local time has elapsed.
|
||||
|
||||
Suppose the initial offset relative to the source is U (fast +ve,
|
||||
slow -ve) and a time interval T elapses measured in terms of the
|
||||
local clock. Then the error relative to the source at the end of
|
||||
the interval should lie in the interval [U+T*lo, U+T*hi]. */
|
||||
|
||||
extern void SRC_GetFrequencyRange(SRC_Instance instance, double *lo, double *hi);
|
||||
/* Function to get access to the sourcestats instance */
|
||||
extern SST_Stats SRC_GetSourcestats(SRC_Instance instance);
|
||||
|
||||
/* This function is called by one of the source drivers when it has
|
||||
a new sample that is to be accumulated.
|
||||
@@ -143,19 +134,6 @@ extern void SRC_ReselectSource(void);
|
||||
/* Set reselect distance */
|
||||
extern void SRC_SetReselectDistance(double distance);
|
||||
|
||||
/* Predict the offset of the local clock relative to a given source at
|
||||
a given local cooked time. Positive indicates local clock is FAST
|
||||
relative to reference. */
|
||||
extern double SRC_PredictOffset(SRC_Instance inst, struct timespec *when);
|
||||
|
||||
/* Return the minimum peer delay amongst the previous samples
|
||||
currently held in the register */
|
||||
extern double SRC_MinRoundTripDelay(SRC_Instance inst);
|
||||
|
||||
/* This routine determines if a new sample is good enough that it should be
|
||||
accumulated */
|
||||
extern int SRC_IsGoodSample(SRC_Instance inst, double offset, double delay, double max_delay_dev_ratio, double clock_error, struct timespec *when);
|
||||
|
||||
extern void SRC_DumpSources(void);
|
||||
extern void SRC_ReloadSources(void);
|
||||
extern void SRC_RemoveDumpFiles(void);
|
||||
@@ -170,7 +148,4 @@ extern int SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report, struc
|
||||
|
||||
extern SRC_Type SRC_GetType(int index);
|
||||
|
||||
extern int SRC_Samples(SRC_Instance inst);
|
||||
|
||||
#endif /* GOT_SOURCES_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user