Create entity placeholder objects in a HAM
#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);
libham
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.
The ham_entity_node() function takes as a parameter a fully qualified node name (FQNN).
An entity handle, or NULL if an error occurred (errno is set).
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 |