QuadroCopter  0.1.4
analogOverlay.h
Go to the documentation of this file.
1 //
2 // Created by Michael Brookes on 22/05/2016.
3 /*
4 Copyright (C) 2017 Michael Brookes
5 
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
26 #ifndef ANALOGDEVICE_ANALOGOVERLAY_H
27 #define ANALOGDEVICE_ANALOGOVERLAY_H
28 
29 #define ANALOG_MAX_BUF 1024
30 
31 #include "../../overlays/overlayBase.h"
32 #include "../Exceptions/analogSetupException.h"
33 
34 namespace quadro {
35 
36  namespace analog {
37 
43 
44  public:
50 
54  struct overlaySettings {
55  const char* overlay = "cape-bone-iio"; //<! overlays Name
56  const char* searchFile = "AIN0"; //<! Successful setup file name
57  const char* fileType = "AIN"; //<! Successful setup folder name
58  const char* helperParentDir = "/sys/devices/ocp.3/"; //<! Location for ananlog file structure
59  char helperPath[ANALOG_MAX_BUF]; //<! Full path to analogBase helper file.
60  bool overlayLoaded; //<! Boolean that holds the loaded value
61  } settings;
62 
63  char analogFilePath[ANALOG_MAX_BUF]; //<! Full path to analogBase file
64 
65  private:
66 
71  void findHelperDir();
72 
73  };
74 
75  } //end namespace analog
76 
77 } //end namespace quadro
78 
79 #endif //ANALOGDEVICE_ANALOGOVERLAY_H
analogOverlay()
Definition: analogOverlay.cpp:24
bool overlayLoaded
Definition: analogOverlay.h:60
Definition: overlayBase.h:60
const char * searchFile
Definition: analogOverlay.h:56
Definition: analogSetupException.h:40
struct quadro::analog::analogOverlay::overlaySettings settings
char analogFilePath[ANALOG_MAX_BUF]
Definition: analogOverlay.h:63
const char * overlay
Definition: analogOverlay.h:55
const char * fileType
Definition: analogOverlay.h:57
Definition: aeronautics.h:23
char helperPath[ANALOG_MAX_BUF]
Definition: analogOverlay.h:59
Definition: analogOverlay.h:42
const char * helperParentDir
Definition: analogOverlay.h:58
#define ANALOG_MAX_BUF
Definition: analogOverlay.h:29