neMESYS SDK
20150729
|
This group defines all required error handling functions. More...
Functions | |
NCS_Func long __stdcall | NCS_GetDevErrorMsg (ncs_hdl hDevice, unsigned char DosingUnit, long DevErrCode, char *pErrString, unsigned char MaxErrStringSize) |
Get an descriptive error message for a certain device error code. More... | |
NCS_Func void __stdcall | NCS_GetErrorMsg (long ErrCode, char *pErrMsgBuf, unsigned long ErrMsgBugSize) |
Get an descriptive error message for a certain error code. More... | |
NCS_Func long __stdcall | NCS_GetLastDevErr (ncs_hdl hDevice, unsigned char DosingUnit, long *pLastErr) |
Get last error from device that is in fault state. More... | |
This group defines all required error handling functions.
All functions of neMESYS API return an error code. This error code is returned as a signed 32 bit integer. If no error occured, then ERR_NOERR is returned. The value of ERR_NOERR is 0. If an error occurred, then the error code is returned a s a negative value. I.e. if a cartain function parameter is out of range, then -ERR_PARAM_RANGE will be returned. That means you can check if the return code is < 0 to know if an error occured.
To check if a device error occured during dosage, you should periodically call NCS_IsInFaultState(). If this function returns true then you can call the function NCS_GetLastDevErr() to read the last error from the device. You can use the functions NCS_GetErrMsg() or NCS_GetDevErrorMsg() to translate an error code into a human readable string.
NCS_Func long __stdcall NCS_GetDevErrorMsg | ( | ncs_hdl | hDevice, |
unsigned char | DosingUnit, | ||
long | DevErrCode, | ||
char * | pErrString, | ||
unsigned char | MaxErrStringSize | ||
) |
Get an descriptive error message for a certain device error code.
[in] | hDevice | Valid device handle |
[in] | DosingUnit | Dosing unit number of dosing unit that caused error |
[in] | DevErrCode | The device error code (NCS_GetLastDevErr()) |
[in] | pErrString | Buffer for storing the returned error string |
[in] | MaxErrStringSize | Size of buffer pErrString |
NCS_Func void __stdcall NCS_GetErrorMsg | ( | long | ErrCode, |
char * | pErrMsgBuf, | ||
unsigned long | ErrMsgBugSize | ||
) |
Get an descriptive error message for a certain error code.
[in] | ErrCode | Error code returned by function |
[out] | pErrMsgBuf | Buffer for storing the error string |
[in] | ErrMsgBugSize | Size of string buffer pErrorString points to |
NCS_Func long __stdcall NCS_GetLastDevErr | ( | ncs_hdl | hDevice, |
unsigned char | DosingUnit, | ||
long * | pLastErr | ||
) |
Get last error from device that is in fault state.
If a device is in fault state, then this funtcion returns the error code of this device.
[in] | hDevice | Valid device handle |
[in] | DosingUnit | Index of neMESYS pump from 0 to number of pumps - 1 |
[out] | pLastErr | Last device error that occured |