pipt_digcode

This function retrieves the digital state code associated with the passed string. The first code matching the string is returned. The case of the strings is not significant.

C format

int32 pipt_digcode(

int32 PIPTR * digcode,

char PIPTR * digstring );

Returns

0

Success 

-12

Digital state string not found 

Arguments

digcode (returned)

Positive digital state code

digstring (passed)

Digital state string (79 characters plus null terminated)

Usage Notes

PI2 digital state strings are 12 characters long. Thus, only the first 12 characters of digstring will be used. PI3 uses all characters passed in digstring, which is limited to 79 characters plus a null terminator in the API.

PI3 systems search the system set first, then the defined state sets in order of definiton (or state set number). The first match is returned.

If the return code is -12 the passed string buffer will be set to a null string.

Enabling Operational Intelligence