Attach a condition associated with a condition raise condition
#include <ha/ham.h> ham_condition_t *ham_condition_raise( ham_entity_t *ehdl, const char *cname, unsigned rtype, unsigned rclass, unsigned rseverity, unsigned flags );
libham
This condition is triggered whenever an entity raises a condition, which matches the given rtype, rclass, and rseverity. An entity that raises a condition, does so with a given set of values for type, class, and severity. Subscribers to this event can specify the conditions they are interested in either explicitly or by using the following special wild cards for each of these values.
CONDRAISETYPEANY /* ANY type : raised condition */ CONDRAISECLASSANY /* ANY class : raised condition */ CONDRAISESEVERITYANY /* ANY severity : raised condition */
The ehdl argument is an entity handle obtained either:
or:
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 ham_condition() aren't 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 |
ham_condition(), ham_condition_state(), ham_attach() ham_attach_self() ham_entity() ham_entity_control() ham_entity_handle() ham_entity_handle_free() ham_entity_node()