Notifying the application of events
A set of RMC subroutines enables an application to register with the RMC subsystem for event notifications.
- A timestamp that indicates when the event occurred.
- For a resource event, the resource handle of the resource whose state change resulted in the generation of the event. For a resource class event, the name of the resource class whose state change resulted in the generation of the event.
- The values of the attributes that are used in the event expression.
Once an event notification has been given to the application, the application may hold the data as long as necessary, even subsequent to the return of any callback that received the data. When the event notification is no longer needed, the application must free it by calling the mc_free_response subroutine. Note that an event notification may be returned even under certain error conditions.
Once the application has registered an event with the RMC subsystem, event notification will continue until the application unregisters the event using one of the mc_unreg_event_* subroutines.
The RMC API invokes the event callback routine using a thread that the application must provide by calling the mc_dispatch subroutine. For more information on the mc_dispatch subroutine and supplying threads to the RMC API, see Providing the RMC API with one or more threads.