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 );



System error



No aliases defined for unit or unit not defined.


Index out of range


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


No batch subsystem present on Server.


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


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