diff --git a/clock.c b/clock.c index 0582563..8eb3998 100644 --- a/clock.c +++ b/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; diff --git a/clock.h b/clock.h index d3b8b10..af04f49 100644 --- a/clock.h +++ b/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