Make dbFastGet/PutConvertRoutine arrays const
Also added Doxygen annotations for them.
This commit is contained in:
@ -7,7 +7,20 @@
|
|||||||
* EPICS Base is distributed subject to a Software License Agreement found
|
* EPICS Base is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* 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
|
#ifndef INCdbConvertFasth
|
||||||
#define INCdbConvertFasth
|
#define INCdbConvertFasth
|
||||||
@ -20,10 +33,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* typedef FASTCONVERTFUNC is now defined in link.h */
|
/** Function pointers for get conversions */
|
||||||
|
DBCORE_API extern const FASTCONVERTFUNC
|
||||||
DBCORE_API extern FASTCONVERTFUNC dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1];
|
dbFastGetConvertRoutine[DBF_DEVICE+1][DBR_ENUM+1];
|
||||||
DBCORE_API extern FASTCONVERTFUNC dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1];
|
/** Function pointers for put conversions */
|
||||||
|
DBCORE_API extern const FASTCONVERTFUNC
|
||||||
|
dbFastPutConvertRoutine[DBR_ENUM+1][DBF_DEVICE+1];
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -1639,7 +1639,7 @@ static long cvt_device_st(const void *f, void *t, const dbAddr *paddr)
|
|||||||
* NULL implies the conversion is not supported.
|
* 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 ... */
|
/* 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 },
|
{ 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.
|
* 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 ... */
|
/* 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},
|
{ 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},
|
||||||
|
Reference in New Issue
Block a user