14 #include <type_traits>
19 template<CNVDataType type>
24 static void free(ctype);
32 static void free(ctype val) { }
40 static void free(ctype val)
54 static void free(ctype val) { }
62 static void free(ctype val) { }
70 static void free(ctype val) { }
78 static void free(ctype val) { }
86 static void free(ctype val) { }
94 static void free(ctype val) { }
102 static void free(ctype val) { }
110 static void free(ctype val) { }
118 static void free(ctype val) { }
126 static void free(ctype val) { }
137 static asynStatus (asynPortDriver::*
asyn_callback)(T* value,
size_t nElements,
int reason,
int addr);
145 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt8* value,
size_t nElements,
int reason,
int addr);
153 static asynStatus (asynPortDriver::*
asyn_callback)(
char** value,
size_t nElements,
int reason,
int addr);
161 static asynStatus (asynPortDriver::*
asyn_callback)(epicsFloat32* value,
size_t nElements,
int reason,
int addr);
169 static asynStatus (asynPortDriver::*
asyn_callback)(epicsFloat64* value,
size_t nElements,
int reason,
int addr);
177 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt8* value,
size_t nElements,
int reason,
int addr);
185 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt8* value,
size_t nElements,
int reason,
int addr);
193 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt16* value,
size_t nElements,
int reason,
int addr);
201 static asynStatus(asynPortDriver::*
asyn_callback)(epicsInt16* value,
size_t nElements,
int reason,
int addr);
209 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt32* value,
size_t nElements,
int reason,
int addr);
217 static asynStatus (asynPortDriver::*
asyn_callback)(epicsInt32* value,
size_t nElements,
int reason,
int addr);
225 static asynStatus (asynPortDriver::*
asyn_callback)(__int64* value,
size_t nElements,
int reason,
int addr);
233 static asynStatus (asynPortDriver::*
asyn_callback)(__int64* value,
size_t nElements,
int reason,
int addr);
241 template<
typename T,
typename U>
244 return static_cast<T
>(val);
247 template<
typename T,
typename U>
250 throw std::runtime_error(
"convertToScalar: illegal cast of pointer to simple type");
254 template<
typename T,
typename U>
257 throw std::runtime_error(
"convertToPtr: illegal cast of simple type to pointer");
262 template<
typename T,
typename U>
266 if ( std::is_same< std::make_signed< std::remove_cv<T>::type >::type, std::make_signed< std::remove_cv<U>::type >::type >::value )
268 return reinterpret_cast<T*
>(val);
static void free(ctype val)
static void free(ctype)
function to free any memory associated with type
static void free(ctype val)
static T convertToScalar(U val)
convert one type to another
static asynStatus(asynPortDriver::* asyn_callback)(T *value, size_t nElements, int reason, int addr)
int ctype
an instance of the underlying type
static void free(ctype val)
Provide the underlying C data type ctype for a given network shared variable type.
static void free(ctype val)
static void free(ctype val)
static void free(ctype val)
static const char * desc
description of type
static void free(ctype val)
static T * convertToPtr(U val)
static void free(ctype val)
static void free(ctype val)
static void free(ctype val)
static void free(ctype val)
static void free(ctype val)
For a given C data type, provide the appropriate network shared variable type.