ham_entity_condition_raise()
Used by an entity to raise a condition
Synopsis:
#include <ha/ham.h> int ham_entity_condition_raise( ham_entity_t *ehdl, unsigned rtype, unsigned rclass, unsigned rseverity, unsigned flags );
Arguments:
- ehdl
- The HAM entity handle to notify.
- rtype
- The type of the condition you want to match.
- rclass
- The class of the condition you want to match.
- rseverity
- The severity of the condition you want to match.
- flags
- Currently not used.
Library:
libham
Description:
This function is used by an entity to notify a HAM of an interesting event of its choice. This in turn triggers a CONDRAISE in the HAM, which will search for matching subscribers for this event and execute all associated actions.
The values of rtype, rclass, and rseverity can be used to permit finer grain matching and to gather additional information relating to the condition.
To learn more about the matching mechanism, refer to the API documentation for ham_condition_raise().
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- EBADF
- Couldn't connect to the HAM.
- EINVAL
- The handle specified in ehdl is invalid.
- ENOENT
- There's no entity by the given handle (ehdl).
In addition to the above errors, the HAM returns any error it encounters while servicing this request.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | No |
Thread | Yes |