ISIS Logo
NetShrVar
An EPICS support module to export National Instruments Network Shared Variables as process variables
cnvconvert.cpp
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2013 Science and Technology Facilities Council (STFC), GB.
3 * All rights reverved.
4 * This file is distributed subject to a Software License Agreement found
5 * in the file LICENSE.txt that is included with this distribution.
6 \*************************************************************************/
7 
10 
11 #include <stdexcept>
12 
13 #include <cvirte.h>
14 #include <userint.h>
15 #include <cvinetv.h>
16 
17 #include <asynPortDriver.h>
18 
19 #include "cnvconvert.h"
20 
21 const char* CNV2C<CNVBool>::desc = "bool";
22 const char* CNV2C<CNVString>::desc = "char*";
23 const char* CNV2C<CNVSingle>::desc = "float";
24 const char* CNV2C<CNVDouble>::desc = "double";
25 const char* CNV2C<CNVInt8>::desc = "char";
26 const char* CNV2C<CNVUInt8>::desc = "unsigned char";
27 const char* CNV2C<CNVInt16>::desc = "short";
28 const char* CNV2C<CNVUInt16>::desc = "unsigned short";
29 const char* CNV2C<CNVInt32>::desc = "int";
30 const char* CNV2C<CNVUInt32>::desc = "unsigned int";
31 const char* CNV2C<CNVInt64>::desc = "__int64";
32 const char* CNV2C<CNVUInt64>::desc = "unsigned __int64";
33 
34 const char* C2CNV<bool>::desc = "CNVBool";
35 const char* C2CNV<char*>::desc = "CNVString";
36 const char* C2CNV<float>::desc = "CNVSingle";
37 const char* C2CNV<double>::desc = "CNVDouble";
38 const char* C2CNV<char>::desc = "CNVInt8";
39 const char* C2CNV<unsigned char>::desc = "CNVUInt8";
40 const char* C2CNV<short>::desc = "CNVInt16";
41 const char* C2CNV<unsigned short>::desc = "CNVUInt16";
42 const char* C2CNV<int>::desc = "CNVInt32";
43 const char* C2CNV<unsigned int>::desc = "CNVUInt32";
44 const char* C2CNV<__int64>::desc = "CNVInt64";
45 const char* C2CNV<unsigned __int64>::desc = "CNVUInt64";
46 
47 // asyn callbacks take signed types only
48 asynStatus (asynPortDriver::*C2CNV<double>::asyn_callback)(double* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksFloat64Array;
49 asynStatus (asynPortDriver::*C2CNV<float>::asyn_callback)(float* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksFloat32Array;
50 asynStatus (asynPortDriver::*C2CNV<int>::asyn_callback)(int* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt32Array;
51 asynStatus (asynPortDriver::*C2CNV<short>::asyn_callback)(short* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt16Array;
52 asynStatus (asynPortDriver::*C2CNV<char>::asyn_callback)(char* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt8Array;
53 asynStatus (asynPortDriver::*C2CNV<unsigned int>::asyn_callback)(int* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt32Array;
54 asynStatus (asynPortDriver::*C2CNV<unsigned short>::asyn_callback)(short* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt16Array;
55 asynStatus (asynPortDriver::*C2CNV<unsigned char>::asyn_callback)(char* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt8Array;
56 asynStatus (asynPortDriver::*C2CNV<bool>::asyn_callback)(char* value, size_t nElements, int reason, int addr) = &asynPortDriver::doCallbacksInt8Array;
Provide the underlying C data type ctype for a given network shared variable type.
Definition: cnvconvert.h:20
Header file for network shared variable to EPICS type convertion routines.
For a given C data type, provide the appropriate network shared variable type.
Definition: cnvconvert.h:133
Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5