nrac_event_create()
Abstract
Create a new event within the context of a network.
Syntax
nrac_event_create (net_handle, description, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
net_handle |
Nrac_Net_Handle |
handle for the network context of interest |
description |
const char * |
free-form text description of the event. Optional–used only for reporting. |
client_state_ptr |
void * |
a way to link the event to other states in the client application. Use OPC_NIL if not needed. |
Return Type
Nrac_Event_Handle
handle for the new event. OPC_NIL means that creation failed, typically due to insufficient memory.
Header
nrac.h
Details
Events can be used to express a condition for the use of a resource by a consumer. In other words, one can state that a consumer uses a resource unconditionally, or that the consumer uses the resource only under specific conditions. In the latter case, an event object is used to represent the condition of interest. Typically, this could be the failure of a resource, such as a link. When such a failure occurs, traffic is re-routed and therefore requires other resources to support it. This is used to represent the concept of shared protection, for example.