Provide methods to obtain a clock's parent and time properties data sets.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
da17f75359
commit
7dbdf2985c
10
clock.c
10
clock.c
|
@ -287,6 +287,11 @@ void clock_install_fda(struct clock *c, struct port *p, struct fdarray fda)
|
|||
}
|
||||
}
|
||||
|
||||
struct parentDS *clock_parent_ds(struct clock *c)
|
||||
{
|
||||
return &c->dad;
|
||||
}
|
||||
|
||||
struct PortIdentity clock_parent_identity(struct clock *c)
|
||||
{
|
||||
return c->dad.parentPortIdentity;
|
||||
|
@ -422,6 +427,11 @@ enum servo_state clock_synchronize(struct clock *c,
|
|||
return state;
|
||||
}
|
||||
|
||||
struct timePropertiesDS *clock_time_properties(struct clock *c)
|
||||
{
|
||||
return &c->tds;
|
||||
}
|
||||
|
||||
static void handle_state_decision_event(struct clock *c)
|
||||
{
|
||||
struct foreign_clock *best = NULL, *fc;
|
||||
|
|
14
clock.h
14
clock.h
|
@ -102,6 +102,13 @@ struct ClockIdentity clock_identity(struct clock *c);
|
|||
*/
|
||||
void clock_install_fda(struct clock *c, struct port *p, struct fdarray fda);
|
||||
|
||||
/**
|
||||
* Obtain a clock's parent data set.
|
||||
* @param c The clock instance.
|
||||
* @return A pointer to the parent data set of the clock.
|
||||
*/
|
||||
struct parentDS *clock_parent_ds(struct clock *c);
|
||||
|
||||
/**
|
||||
* Obtain the parent port identity from a clock's parent data set.
|
||||
* @param c The clock instance.
|
||||
|
@ -157,4 +164,11 @@ enum servo_state clock_synchronize(struct clock *c,
|
|||
Integer64 correction1,
|
||||
Integer64 correction2);
|
||||
|
||||
/**
|
||||
* Obtain a clock's time properties data set.
|
||||
* @param c The clock instance.
|
||||
* @return A pointer to the time properties data set of the clock.
|
||||
*/
|
||||
struct timePropertiesDS *clock_time_properties(struct clock *c);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue