state_bn GetStateNamed_bn ( const char*  name,   const node_bn*  node )

Returns the index number of the state whose name is name, or UNDEF_STATE if there isn't one (case sensitive comparison).

The result is only valid for node; another node may have a state with the same name, but a different state number.

name can be any string; it need not be a legal IDname (of course if it isn't, UNDEF_STATE will be returned).

Netica won't modify or free the passed name string.

The returned value is a 'state_bn', which is just another name for an 'int', but used to indicate that the int stands for a state index.

Version:

This function is available in all versions. In versions previous to 3.05, this function was named StateNamed_bn.

See also:

GetNodeStateName_bn    (inverse function) Returns the state name given its index
GetNodeNumberStates_bn    The value returned will be between 0 and one less than this, inclusive