probe_sampler_cache recorder
API Reference Manual  /  7 Simulator-to-Simulator Interfaces  / 

probe_subscribe

Description
This is an optional additional probe interface. This interface should be implemented to prevent any slowdown or unwanted side-effects if there are no listener on the probe. The subscribe() method should increment a reference count on how many subscribers there are, and do any kind of preparation to activate the probe when it is being used.

Similarly, the unsubscribe() method should decrement the reference count and disable the feature when there is no subscribers left.

The num_subscribers() method should return the current reference count.

SIM_INTERFACE(probe_subscribe) {
        void (*subscribe)(conf_object_t *obj);
        void (*unsubscribe)(conf_object_t *obj);
        int  (*num_subscribers)(conf_object_t *obj);
};
#define PROBE_SUBSCRIBE_INTERFACE "probe_subscribe"

Execution Context
Global Context for all methods.

probe_sampler_cache recorder