nrac_consumer_create()
Abstract
Create a consumer object within a network.
Syntax
nrac_consumer_create (net_handle, name, load, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
net_handle |
Nrac_Net_Handle |
handle for the network context of interest |
name |
const char * |
name of the consumer (used only for reporting) |
double |
load |
number of resource units the consumer requires |
client_state_ptr |
void * |
a way to link the consumer to other states in the client application. Use OPC_NIL if not needed. |
Return Type
Nrac_Consumer_Handle
a handle representing the new consumer object. OPC_NIL means the creation failed, typically due to lack of memory resources.
Header
nrac.h
Details
Consumers represent the users, or the sources of load on the network resources. Typically, a consumer is a traffic demand that flows through the network, utilizing one or more resources. When initially created, the consumer is not associated with any resources. It simply exists within the network and is available to apply to resources. The consumer's name is an optional string used to describe the object in any reporting. The load attribute represents the number of resource units needed to support this consumer (e.g., the amount of bandwidth).