PVData C++  8.0.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
pvdVersion.cpp
1 /*
2  * Copyright information and license terms for this software can be
3  * found in the file LICENSE that is included with the distribution
4  */
5 
6 #include <stdlib.h>
7 
8 #define epicsExportSharedSymbols
9 #include <pv/pvdVersion.h>
10 
11 namespace epics{namespace pvData{
12 
13 void getVersion(epics::pvData::PVDataVersion *ptr)
14 {
15  ptr->major = EPICS_PVD_MAJOR_VERSION;
16  ptr->minor = EPICS_PVD_MINOR_VERSION;
17  ptr->maint = EPICS_PVD_MAINTENANCE_VERSION;
18  ptr->devel = EPICS_PVD_DEVELOPMENT_FLAG;
19 }
20 
21 }} // namespace epics::pvData
22 
23 // perhaps helpful in a loadable module
24 
25 extern "C" {
26 epicsShareExtern void getPVDataVersion(epics::pvData::PVDataVersion *ptr, size_t len);
27 
28 void getPVDataVersion(epics::pvData::PVDataVersion *ptr, size_t len)
29 {
30  if(len>=sizeof(*ptr)) {
31  epics::pvData::getVersion(ptr);
32  }
33 }
34 }