frequency_listener
interface is used for
modeling frequency changes.
The frequency change initiator should call set() to set the
new frequency. The set() function may be called multiple times
with the same frequency value. The frequency is specified by the
numerator
and denominator
arguments in units of Hz.
The set() function should also be used to set the initial value for a target.
An object that implements the frequency_listener
interface typically has an attribute that refers to an object and
port that implements the simple_dispatcher
interface, from where the frequency originates.
The initiator of a frequency change should implement the
simple_dispatcher
interface, and it should only call
the set() function on objects that have registered with
this interface.
SIM_INTERFACE(frequency_listener) { void (*set)(conf_object_t *NOTNULL obj, uint64 numerator, uint64 denominator); }; #define FREQUENCY_LISTENER_INTERFACE "frequency_listener"