Trigger based on state transitions

When an entity publishes a state transition, a state transition condition is raised for that entity, based on the two states involved in the transition (the from state and the to state). Subscribers indicate which states they are interested in by specifying values for the fromstate and tostate parameters in the API call.

For more details, refer to the API reference documentation for ham_condition_state().

ham_condition_t *ham_condition_state(ham_entity_t *ehdl, const char *cname, 
                 unsigned fromstate, unsigned tostate, unsigned flags);