Add a clock method to accept a peer delay estimate from a slave port.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
d345ac5e4e
commit
806d1e9b77
6
clock.c
6
clock.c
|
@ -32,7 +32,6 @@
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "servo.h"
|
#include "servo.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "tmv.h"
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#define FAULT_RESET_SECONDS 15
|
#define FAULT_RESET_SECONDS 15
|
||||||
|
@ -411,6 +410,11 @@ void clock_path_delay(struct clock *c, struct timespec req, struct timestamp rx,
|
||||||
pr_debug("path delay %10lld %10lld", c->path_delay, pd);
|
pr_debug("path delay %10lld %10lld", c->path_delay, pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clock_peer_delay(struct clock *c, tmv_t ppd)
|
||||||
|
{
|
||||||
|
c->path_delay = ppd;
|
||||||
|
}
|
||||||
|
|
||||||
void clock_remove_fda(struct clock *c, struct port *p, struct fdarray fda)
|
void clock_remove_fda(struct clock *c, struct port *p, struct fdarray fda)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
8
clock.h
8
clock.h
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "ds.h"
|
#include "ds.h"
|
||||||
#include "servo.h"
|
#include "servo.h"
|
||||||
|
#include "tmv.h"
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
|
||||||
#define MAX_PORTS 8
|
#define MAX_PORTS 8
|
||||||
|
@ -128,6 +129,13 @@ struct PortIdentity clock_parent_identity(struct clock *c);
|
||||||
void clock_path_delay(struct clock *c, struct timespec req, struct timestamp rx,
|
void clock_path_delay(struct clock *c, struct timespec req, struct timestamp rx,
|
||||||
Integer64 correction);
|
Integer64 correction);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provide the estimated peer delay from a slave port.
|
||||||
|
* @param c The clock instance.
|
||||||
|
* @param ppd The peer delay as measured on a slave port.
|
||||||
|
*/
|
||||||
|
void clock_peer_delay(struct clock *c, tmv_t ppd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Poll for events and dispatch them.
|
* Poll for events and dispatch them.
|
||||||
* @param c A pointer to a clock instance obtained with clock_create().
|
* @param c A pointer to a clock instance obtained with clock_create().
|
||||||
|
|
Loading…
Reference in New Issue