Prosoft-technology MVI56E-LDM Uživatelský manuál Strana 196

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 264
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 195
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
errcode
Error code returned from an API function
buf
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
OCX_SUCCESS
Message returned in buff
OCX_ERR_BADPARAM
Unknown error code
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);
}
Zobrazit stránku 195
1 2 ... 191 192 193 194 195 196 197 198 199 200 201 ... 263 264

Komentáře k této Příručce

Žádné komentáře