Used by an entity to notify the HAM of a state transition
#include <ha/ham.h> int ham_entity_condition_state( ham_entity_t *ehdl, unsigned tostate, unsigned flags );
libham
This function enables an entity to report a transition to the HAM; the value tostate indicates the transitional state. The HAM in turn triggers a condition state event for this entity, and will search for matching subscribers for this event and execute all associated actions. For more details of the matching mechanisms refer to the API documentation for ham_condition_state().
The connection to the HAM is invalid. This happens when the process that opened the connection (using ham_connect()) and the process that's calling this function are not the same.
In addition to the above errors, the HAM returns any error it encounters while servicing this request.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |