
CIP API Functions ControlLogix Platform ♦ "C" Programmable
Developer's Manual Linux Application Development Module
Page 190 of 264 ProSoft Technology, Inc.
March 12, 2014
OCXcip_ErrorString
Syntax
int OCXcip_ErrorString (int errorcode,
char * buf);
Parameters
Error code returned from an API function
Pointer to user buffer to receive message
Description
OCXcip_ErrorString returns a text error message associated with the error code
errcode. The Null-terminated error message is copied into the buffer specified by
buf. The buffer should be a minimum of 80 characters in length.
Return Value
Example
char buf[80];
int rc;
.
.
//SOme OCX API is called
rc=OCXcip_.....(.....);
if (rc !=OCX_SUCCESS)
{
// Print error message
OCXcip_ErrorString (rc, buf };
printf ("Error: %s", buf);
}
Comentários a estes Manuais