areaDetector  3-13
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_ */
Definition: NDPosPluginFileReader.h:18
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
asynStatus processNode()
Definition: NDPosPluginFileReader.cpp:108
std::vector< std::map< std::string, double > > readPositions()
Definition: NDPosPluginFileReader.cpp:96
static const std::string ELEMENT_POSITIONS
Definition: NDPosPluginFileReader.h:23
static const std::string DIMENSION_NAME
Definition: NDPosPluginFileReader.h:26
void setErrorMsg(const std::string &msg)
Definition: NDPosPluginFileReader.cpp:220
asynStatus addPosition()
Definition: NDPosPluginFileReader.cpp:173
static const std::string ELEMENT_POSITION
Definition: NDPosPluginFileReader.h:24
asynStatus addDimension()
Definition: NDPosPluginFileReader.cpp:144
static const std::string ELEMENT_NAME
Definition: NDPosPluginFileReader.h:20
asynStatus loadXML(const std::string &filename)
Definition: NDPosPluginFileReader.cpp:60
asynStatus clearPositions()
Definition: NDPosPluginFileReader.cpp:101
virtual ~NDPosPluginFileReader()
Definition: NDPosPluginFileReader.cpp:24
NDPosPluginFileReader()
Definition: NDPosPluginFileReader.cpp:19
static const std::string ELEMENT_DIMENSION
Definition: NDPosPluginFileReader.h:22
static const std::string ELEMENT_DIMENSIONS
Definition: NDPosPluginFileReader.h:21
@ string
Definition: NDFileHDF5Layout.h:44