Merge 7.0 commit 'ca9c95' into PSI-7.0

This commit is contained in:
2023-12-01 14:21:07 +01:00
35 changed files with 446 additions and 296 deletions

View File

@@ -271,7 +271,6 @@ void errSymTestPrint(long errNum)
if ( message[0] == '\0' ) return;
printf("module %hu number %hu message=\"%s\"\n",
modnum, errnum, message);
return;
}
/****************************************************************

View File

@@ -38,13 +38,38 @@ typedef ERRSYMTAB *ERRSYMTAB_ID;
extern "C" {
#endif
/** \brief Lookup message from error/status code.
* \param status Input code
* \param pBuf Output string buffer
* \param bufLength Length of output buffer in bytes. Must be non-zero.
*
* Handles EPICS message codes, and "errno" codes.
*
* Copies in a mesage for any status code. Unknown status codes
* are printed numerically.
*/
LIBCOM_API void errSymLookup(long status, char *pBuf, size_t bufLength);
/** \brief Lookup message from error/status code.
* \param status Input code
* \returns A statically allocated message string. Never NULL.
*
* Handles EPICS message codes, and "errno" codes.
*
* For any unknown status codes, a generic "Unknown code" message is returned.
*
* \since 3.16.1
*/
LIBCOM_API const char* errSymMsg(long status);
LIBCOM_API void errSymTest(epicsUInt16 modnum, epicsUInt16 begErrNum,
epicsUInt16 endErrNum);
LIBCOM_API void errSymTestPrint(long errNum);
LIBCOM_API int errSymBld(void);
LIBCOM_API int errSymbolAdd(long errNum, const char *name);
/** @brief Define new custom error code and associate message string.
* @param errNum New error code. Caller is reponsible for avoiding reuse of existing codes.
* @param message New message. Pointer stored. Caller must not free pointed storage.
* @return 0 on success
*/
LIBCOM_API int errSymbolAdd(long errNum, const char *message);
LIBCOM_API void errSymDump(void);
#ifdef __cplusplus