Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 8
Get a handle to a condition in an entity
#include <ha/ham.h>
ham_condition_t *ham_condition_handle(
int nd,
const char *ename,
const char *cname,
unsigned flags );
ham_condition_t *ham_condition_handle_node(
const char *nodename,
const char *ename,
const char *cname,
unsigned flags );
libham
The ham_condition_handle() function returns a handle to a
condition (cname) in an entity (ename).
The handle obtained from this function can be passed to other functions, such as
ham_action_restart() or
ham_condition_handle_free().
The handle returned is opaque — its contents are internal to the library.
If a node (nd) is specified, the handle is to an
entity/condition/action combination that refers to a process
on that remote node. The ham_condition_handle_node()
function is used when a nodename is used to
specify a remote HAM instead of a node identifier (nd).
There are no flags defined at this time.
A valid ham_condition_t or NULL if an error
occurred (errno is set).
- EINVAL
- The name given in cname or ename is invalid (e.g. it
contains the “/” character) or is NULL.
- ENAMETOOLONG
- The name given (in aname) is too long, i.e.
it exceeds _POSIX_PATH_MAX (defined in <limits.h>).
Note that the combined length of an entity/condition/action
name is also limited by _POSIX_PATH_MAX.
- ENOENT
- There's no condition by the name cname defined in an
entity by name ename in the current context of the HAM.
- ENOMEM
- Not enough memory to create a new handle.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
A call to ham_condition_handle() and a subsequent
use of the handle returned in a call such as
ham_action_restart() are completely
asynchronous. Therefore, a valid
action/condition/entity may no longer exist when the handle
is used to attach actions at a later time.
In such an event, the ham_action*() functions
will return an error (ENOENT) that the condition
doesn't exist in the given entity.
ham_action_execute(),
ham_action_handle(),
ham_action_handle_free(),
ham_action_notify_pulse(),
ham_action_notify_signal(),
ham_action_remove(),
ham_action_restart(),
ham_action_waitfor(),
ham_condition_handle_free(),
ham_entity_handle(),
ham_entity_handle_free()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 175
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_condition_handle.html on line 175