cniGetAttributeName

Returns the name of a node attribute specified by an index. It is invoked by the message broker when the broker requires the names of attributes supported by a particular instance of a node. The function must guarantee to return the attributes in a known, defined order, and to return the attribute name represented by the index parameter.

Defined In Type Member
CNI_VFT Optional iFpGetAttributeName

Syntax

int cniGetAttributeName(
  CciContext*  context,
  int          index,
  CciChar*     buffer,
  int          bufsize);

Parameters

context
The address of the context for the instance of the node, as created by the node and returned by the cniCreateNodeContext function (input).
index
Specifies the index of the attribute name (input). The index of the attributes starts from zero.
buffer
The address of a buffer into which the attribute name is copied (output).
bufsize
The length, in bytes, of the buffer specified in the buffer parameter (input).

Return values

If successful, zero is returned, and the name of the attribute is returned in the specified buffer. If the end of the list of attributes is reached, a non-zero value is returned.

Related concepts
User-defined Input nodes
User-defined message processing nodes
User-defined output nodes

Related tasks
Creating an input node in C
Creating a message processing node in C

Related reference
C language node implementation functions
cniCreateNodeContext
cniGetAttribute