Add a clock method to accept a peer delay estimate from a slave port.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-04-05 14:04:15 +02:00
parent d345ac5e4e
commit 806d1e9b77
2 changed files with 13 additions and 1 deletions

View File

@ -32,7 +32,6 @@
#include "port.h"
#include "servo.h"
#include "print.h"
#include "tmv.h"
#include "util.h"
#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);
}
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)
{
int i, j, k;

View File

@ -22,6 +22,7 @@
#include "ds.h"
#include "servo.h"
#include "tmv.h"
#include "transport.h"
#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,
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.
* @param c A pointer to a clock instance obtained with clock_create().