diff --git a/modules/database/src/ioc/db/dbConvertFast.h b/modules/database/src/ioc/db/dbConvertFast.h index 0980b6b198..470cedbdd9 100644 --- a/modules/database/src/ioc/db/dbConvertFast.h +++ b/modules/database/src/ioc/db/dbConvertFast.h @@ -7,7 +7,20 @@ * EPICS Base is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* dbConvertFast.h */ +/** @file dbConvertFast.h + * @brief Data conversion for scalar values + * + * The typedef FASTCONVERTFUNC is defined in link.h as: + * @code + * long convert(const void *from, void *to, const struct dbAddr *paddr); + * @endcode + * + * The arrays declared here provide pointers to the fast conversion + * routine where the first array index is the data type for the first + * "from" pointer arg, and the second array index is the data type for + * the second "to" pointer arg. The array index values are a subset of + * the DBF_ enum values defined in dbFldTypes.h + */ #ifndef INCdbConvertFasth #define INCdbConvertFasth @@ -20,10 +33,12 @@ extern "C" { #endif -/* typedef FASTCONVERTFUNC is now defined in link.h */ - -DBCORE_API extern FASTCONVERTFUNC dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1]; -DBCORE_API extern FASTCONVERTFUNC dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1]; +/** Function pointers for get conversions */ +DBCORE_API extern const FASTCONVERTFUNC + dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1]; +/** Function pointers for put conversions */ +DBCORE_API extern const FASTCONVERTFUNC + dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1]; #ifdef __cplusplus } diff --git a/modules/database/src/ioc/db/dbFastLinkConv.c b/modules/database/src/ioc/db/dbFastLinkConv.c index fc229605ff..7d463d4d1a 100644 --- a/modules/database/src/ioc/db/dbFastLinkConv.c +++ b/modules/database/src/ioc/db/dbFastLinkConv.c @@ -1639,7 +1639,7 @@ static long cvt_device_st(const void *f, void *t, const dbAddr *paddr) * NULL implies the conversion is not supported. */ -FASTCONVERTFUNC dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1] = { +FASTCONVERTFUNC const dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1] = { /* Convert DBF_STRING to ... */ { cvt_st_st, cvt_st_c, cvt_st_uc, cvt_st_s, cvt_st_us, cvt_st_l, cvt_st_ul, cvt_st_q, cvt_st_uq, cvt_st_f, cvt_st_d, cvt_st_e }, @@ -1695,7 +1695,7 @@ FASTCONVERTFUNC dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1] = { * NULL implies the conversion is not supported. */ -FASTCONVERTFUNC dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1] = { +FASTCONVERTFUNC const dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1] = { /* Convert DBR_STRING to ... */ { cvt_st_st, cvt_st_c, cvt_st_uc, cvt_st_s, cvt_st_us, cvt_st_l, cvt_st_ul, cvt_st_q, cvt_st_uq, cvt_st_f, cvt_st_d, cvt_st_e, cvt_st_menu, cvt_st_device},