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_entity.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_entity.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_entity.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_entity.html on line 8

ham_entity(), ham_entity_node()

Create entity placeholder objects in a HAM

Synopsis:

#include <ha/ham.h>

ham_entity_t *ham_entity( const char *ename, 
                          int nd, 
                          unsigned flags);

ham_entity_t *ham_entity_node( const char *ename, 
                          const char *nodename, 
                          unsigned flags);

Library:

libham

Description:

These functions are used to create placeholders for entity objects in a HAM. The ham_entity_node() function is used when a nodename is used to specify a remote HAM instead of a node identifier (nd).

You can use these functions to create entities, and associate conditions and actions with them, before the process associated with an entity is started (or attached). Subsequent ham_attach*() calls by entities can attach to these placeholder and thereby enable conditions and actions when they occur.

The nd variable specifies the node identifier of the remote node at the time the call is made.


Note: Since node identifiers are transient objects, we recommend that the value for nd is obtained at the time of the call, using netmgr_strtond() or another function that converts nodenames into node identifiers.

The ham_entity_node() function takes as a parameter a fully qualified node name (FQNN).

Returns:

an entity handle
Success.
NULL
Failure (errno is set).

Errors:

EBADF
Couldn't connect to the HAM.
EINVAL
The name given in 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.
ENOMEM
Not enough memory to create a new handle.

In addition to the above errors, the HAM returns any error it encounters while servicing this request.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

ham_attach(), ham_attach_self(), ham_condition(), ham_condition_control(), ham_condition_handle(), ham_condition_handle_free(), ham_condition_remove(), ham_detach(), ham_detach_name(), ham_detach_self(),


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_entity.html on line 178

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_entity.html on line 178