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.
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).
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_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(),