piba_getaliaswunit

This function retrieves all aliases defined on the passed unit. index should be set to zero for the first call to the function and subsequent calls should increment index, up to number-1 to retrieve remaining alias names.

C format

int32 piba_getaliaswunit(

char PIPTR * unit

char PIPTR * alias,

int32 len,

int32 index,

int32 PIPTR * number );

Returns

>0

System error

Success

-1

No aliases defined for unit or unit not defined.

-5

Index out of range

-991,-994

API access to batch not supported by the version of PI on the Server

-1002

No batch subsystem present on Server.

Arguments

unit (passed)

Unit name

alias (returned)

Alias name

len (passed)

Size of passed alias buffer

index (passed)

Index into list of aliases. For example, if 5 aliases are defined for the unit, indexes 0 through 4 are valid.

number (returned)

Total number of aliases defined for unit

Usage Notes

Example

char unit[81] = "reactor1"; 

char alias[81]; 

int32 n, index2; 

int32 len = sizeof(tag); 

int32 result; 

result = piba_getaliaswunit    (unit, alias, sizeof(alias),
  0, &n); 

for ( index2 = 1; index2 < n; index2++ ) 

result = piba_getaliaswunit   ( unit, alias, 

sizeof(alias), index2, &n ); 

Enabling Operational Intelligence