areaDetector  3-5-0
EPICS areaDetector framework
NDPosPluginFileReader.h
Go to the documentation of this file.
1 /*
2  * NDPosPluginFileReader.h
3  *
4  * Created on: 21 May 2015
5  * Author: gnx91527
6  */
7 
8 #ifndef POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_
9 #define POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_
10 
11 #include "asynDriver.h"
12 #include <libxml/xmlreader.h>
13 #include <string>
14 #include <vector>
15 #include <map>
16 
18 {
19 public:
20  static const std::string ELEMENT_NAME;
25 
27 
29  virtual ~NDPosPluginFileReader();
30  asynStatus validateXML(const std::string& filename);
31  asynStatus loadXML(const std::string& filename);
32  std::vector<std::string> readDimensions();
33  std::vector<std::map<std::string, double> > readPositions();
34  asynStatus clearPositions();
35  asynStatus processNode();
36  asynStatus addDimension();
37  asynStatus addPosition();
39 
40 protected:
41  void setErrorMsg(const std::string& msg);
42 
43 private:
44  xmlTextReaderPtr xmlreader;
45  std::vector<std::string> dimensions;
46  std::vector<std::map<std::string, double> > positions;
47  std::string errorMessage;
48 };
49 
50 #endif /* POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_ */
asynStatus clearPositions()
Definition: NDPosPluginFileReader.cpp:101
asynStatus loadXML(const std::string &filename)
Definition: NDPosPluginFileReader.cpp:60
NDPosPluginFileReader()
Definition: NDPosPluginFileReader.cpp:19
virtual ~NDPosPluginFileReader()
Definition: NDPosPluginFileReader.cpp:24
void setErrorMsg(const std::string &msg)
Definition: NDPosPluginFileReader.cpp:220
asynStatus addDimension()
Definition: NDPosPluginFileReader.cpp:144
static const std::string ELEMENT_DIMENSION
Definition: NDPosPluginFileReader.h:22
Definition: NDPosPluginFileReader.h:17
asynStatus processNode()
Definition: NDPosPluginFileReader.cpp:108
static const std::string DIMENSION_NAME
Definition: NDPosPluginFileReader.h:26
static const std::string ELEMENT_NAME
Definition: NDPosPluginFileReader.h:20
static const std::string ELEMENT_POSITION
Definition: NDPosPluginFileReader.h:24
static const std::string ELEMENT_POSITIONS
Definition: NDPosPluginFileReader.h:23
asynStatus validateXML(const std::string &filename)
Definition: NDPosPluginFileReader.cpp:28
std::string getErrorMsg()
Definition: NDPosPluginFileReader.cpp:215
std::vector< std::string > readDimensions()
Definition: NDPosPluginFileReader.cpp:91
Definition: NDFileHDF5Layout.h:42
asynStatus addPosition()
Definition: NDPosPluginFileReader.cpp:173
static const std::string ELEMENT_DIMENSIONS
Definition: NDPosPluginFileReader.h:21
std::vector< std::map< std::string, double > > readPositions()
Definition: NDPosPluginFileReader.cpp:96