NDS3  1.0.0
API reference manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pvDelegateIn.h
Go to the documentation of this file.
1 /*
2  * Nominal Device Support v3 (NDS3)
3  *
4  * Copyright (c) 2015 Cosylab d.d.
5  *
6  * For more information about the license please refer to the license.txt
7  * file included in the distribution.
8  */
9 
10 #ifndef NDSPVDELEGATEIN_H
11 #define NDSPVDELEGATEIN_H
12 
23 #include "nds3/definitions.h"
24 #include "nds3/pvBaseIn.h"
25 
26 #ifndef SWIG // PVDelegate will not be present in SWIG generated files
27 
28 namespace nds
29 {
30 
51 template <typename T>
52 class NDS3_API PVDelegateIn: public PVBaseIn
53 {
54 protected:
55  PVDelegateIn();
56 
57 public:
58 
67  typedef std::function<void (timespec*, T*)> read_t;
68 
76  PVDelegateIn(const std::string& name, read_t readFunction);
77 
78 #ifndef SWIG
79 private:
80  read_t m_reader;
81 #endif
82 };
83 
84 }
85 
86 #endif // SWIG
87 #endif // NDSPVDELEGATEIN_H
std::function< void(timespec *, T *)> read_t
Definition of the method used to read the PV value.
Definition: pvDelegateIn.h:67
Defines all the enumeration and common types used across the NDS library.
Defines the base class for the input PVs.
Represents an input PV.
Definition: pvBaseIn.h:35
An input PV that delegates the read operation to an external function.
Definition: pvDelegateIn.h:52