BlackErr.h
Go to the documentation of this file.
1  /*
2 
3  ####################################################################################
4  # BlackLib Library controls Beaglebone Black's inputs and outputs. #
5  # Copyright (C) 2013-2015 by Yigit YUCE #
6  ####################################################################################
7  # #
8  # This file is part of BlackLib library. #
9  # #
10  # BlackLib library is free software: you can redistribute it and/or modify #
11  # it under the terms of the GNU Lesser General Public License as published by #
12  # the Free Software Foundation, either version 3 of the License, or #
13  # (at your option) any later version. #
14  # #
15  # BlackLib library is distributed in the hope that it will be useful, #
16  # but WITHOUT ANY WARRANTY; without even the implied warranty of #
17  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
18  # GNU Lesser General Public License for more details. #
19  # #
20  # You should have received a copy of the GNU Lesser General Public License #
21  # along with this program. If not, see <http://www.gnu.org/licenses/>. #
22  # #
23  # For any comment or suggestion please contact the creator of BlackLib Library #
24  # at ygtyce@gmail.com #
25  # #
26  ####################################################################################
27 
28  */
29 
30 
31 
32 #ifndef BLACKERR_H_
33 #define BLACKERR_H_
34 
35 
36 
37 
38 
39 namespace BlackLib
40 {
41 
47  struct errorCore
48  {
58 
59 
68  bool ocpError;
69 
75  {
76  capeMgrError = false;
77  ocpError = false;
78  }
79  };
80 
81 
82 
83 
88  struct errorCoreADC
89  {
101 
102 
112 
113 
122  bool dtError;
123 
124 
130  {
131  dtError = false;
132  helperError = false;
133  coreErrors = new errorCore();
134  }
135 
136 
144  {
145  dtError = false;
146  helperError = false;
147  coreErrors = base;
148  }
149  };
150 
151 
152 
153 
154 
159  struct errorADC
160  {
172 
173 
186  bool readError;
187 
188 
194  {
195  readError = false;
196  adcCoreErrors = new errorCoreADC();
197  }
198 
199 
207  {
208  readError = false;
209  adcCoreErrors = base;
210  }
211  };
212 
213 
214 
215 
221  {
233 
234 
243  bool dtSsError;
244 
245 
254  bool dtError;
255 
256 
266 
267 
273  {
274  dtSsError = false;
275  dtError = false;
276  pwmTestError = false;
277  coreErrors = new errorCore();
278  }
279 
280 
288  {
289  dtSsError = false;
290  dtError = false;
291  pwmTestError = false;
292  coreErrors = base;
293  }
294  };
295 
296 
297 
298 
303  struct errorPWM
304  {
316 
317 
339 
340 
364 
365 
381 
382 
400 
401 
417 
418 
424  {
425  periodFileError = false;
426  dutyFileError = false;
427  runFileError = false;
428  polarityFileError = false;
429  outOfRange = false;
430  pwmCoreErrors = new errorCorePWM();
431  }
432 
433 
441  {
442  periodFileError = false;
443  dutyFileError = false;
444  runFileError = false;
445  polarityFileError = false;
446  outOfRange = false;
447  pwmCoreErrors = base;
448  }
449  };
450 
451 
452 
453 
459  {
471 
472 
482 
483 
493 
494 
500  {
501  exportFileError = false;
502  directionFileError = false;
503  coreErrors = new errorCore();
504  }
505 
506 
514  {
515  exportFileError = false;
516  directionFileError = false;
517  coreErrors = base;
518  }
519  };
520 
521 
522 
523 
528  struct errorGPIO
529  {
541 
542 
567 
568 
593 
594 
612  bool readError;
613 
614 
626 
627 
638 
639 
645  {
646  exportError = false;
647  directionError = false;
648  readError = false;
649  writeError = false;
650  forcingError = false;
651  gpioCoreErrors = new errorCoreGPIO();
652  }
653 
654 
662  {
663  exportError = false;
664  directionError = false;
665  readError = false;
666  writeError = false;
667  forcingError = false;
668  gpioCoreErrors = base;
669  }
670  };
671 
672 
673 
674 
679  struct errorUART
680  {
692 
693 
702  bool dtError;
703 
704 
713  bool openError;
714 
724 
725 
737 
738 
748 
749 
764  bool readError;
765 
766 
782 
783 
799 
800 
816 
817 
833 
834 
850 
851 
857  {
858  dtError = false;
859  openError = false;
860  closeError = false;
861  directionError = false;
862  flushError = false;
863  readError = false;
864  writeError = false;
865  baudRateError = false;
866  parityError = false;
867  stopBitsError = false;
868  charSizeError = false;
869  coreErrors = new errorCore();
870  }
871 
872 
880  {
881  dtError = false;
882  openError = false;
883  closeError = false;
884  directionError = false;
885  flushError = false;
886  readError = false;
887  writeError = false;
888  baudRateError = false;
889  parityError = false;
890  stopBitsError = false;
891  charSizeError = false;
892  coreErrors = base;
893  }
894  };
895 
896 
897 
898 
903  struct errorSPI
904  {
916 
917 
926  bool dtError;
927 
928 
937  bool openError;
938 
939 
949 
950 
960 
961 
973 
974 
989  bool modeError;
990 
991 
1007 
1008 
1024 
1025 
1031  {
1032  dtError = false;
1033  openError = false;
1034  closeError = false;
1035  portPathError = false;
1036  transferError = false;
1037  modeError = false;
1038  speedError = false;
1039  bitSizeError = false;
1040  coreErrors = new errorCore();
1041  }
1042 
1043 
1051  {
1052  dtError = false;
1053  openError = false;
1054  closeError = false;
1055  portPathError = false;
1056  transferError = false;
1057  modeError = false;
1058  speedError = false;
1059  bitSizeError = false;
1060  coreErrors = base;
1061  }
1062  };
1063 
1064 
1065 
1066 
1071  struct errorI2C
1072  {
1084 
1085 
1095 
1096 
1106 
1107 
1136 
1137 
1153 
1169 
1170 
1176  {
1177  openError = false;
1178  closeError = false;
1179  setSlaveError = false;
1180  readError = false;
1181  writeError = false;
1182  coreErrors = new errorCore();
1183  }
1184 
1185 
1193  {
1194  openError = false;
1195  closeError = false;
1196  setSlaveError = false;
1197  readError = false;
1198  writeError = false;
1199  coreErrors = base;
1200  }
1201  };
1202 
1203 
1204 
1205 } /* namespace BlackLib */
1206 
1207 #endif /* BLACKERR_H_ */
errorCoreADC(errorCore *base)
errorCoreADC struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:143
bool periodFileError
Period file reading error.
Definition: BlackErr.h:338
bool ocpError
ocp directory finding error.
Definition: BlackErr.h:68
errorSPI(errorCore *base)
errorSPI struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:1050
bool readError
Value file reading error.
Definition: BlackErr.h:186
Holds BlackGPIO errors.
Definition: BlackErr.h:528
errorCore * coreErrors
Pointer of errorCore struct which stores errors of BlackCore class.
Definition: BlackErr.h:232
bool readError
TTY file reading error.
Definition: BlackErr.h:764
bool directionFileError
Direction file opening error.
Definition: BlackErr.h:492
bool readError
I2C reading error.
Definition: BlackErr.h:1152
errorUART(errorCore *base)
errorUART struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:879
Holds BlackCorePWM errors.
Definition: BlackErr.h:220
Holds BlackI2C errors.
Definition: BlackErr.h:1071
errorPWM(errorCorePWM *base)
errorPWM struct's constructor with errorCorePWM pointer parameter.
Definition: BlackErr.h:440
Holds BlackUART errors.
Definition: BlackErr.h:679
bool closeError
TTY file closing error.
Definition: BlackErr.h:723
errorCore()
errorCore struct's constructor.
Definition: BlackErr.h:74
Holds BlackCore errors.
Definition: BlackErr.h:47
bool pwmTestError
pwm_test directory finding error.
Definition: BlackErr.h:265
bool dutyFileError
Duty file reading error.
Definition: BlackErr.h:363
Holds BlackCoreGPIO errors.
Definition: BlackErr.h:458
bool openError
TTY file opening error.
Definition: BlackErr.h:713
Holds BlackADC errors.
Definition: BlackErr.h:159
bool helperError
helper directory finding error.
Definition: BlackErr.h:111
bool capeMgrError
capemgr directory finding error.
Definition: BlackErr.h:57
bool dtError
Device tree loading error.
Definition: BlackErr.h:702
bool charSizeError
UART's character size property setting error.
Definition: BlackErr.h:849
errorCorePWM()
errorCorePWM struct's constructor.
Definition: BlackErr.h:272
errorCoreADC()
errorCoreADC struct's constructor.
Definition: BlackErr.h:129
bool transferError
SPI data transfer error.
Definition: BlackErr.h:972
errorCoreADC * adcCoreErrors
Pointer of errorCoreADC struct which stores errors of BlackCoreADC class.
Definition: BlackErr.h:171
Holds BlackSPI errors.
Definition: BlackErr.h:903
bool closeError
TTY file closing error.
Definition: BlackErr.h:1105
bool writeError
Value file writing error.
Definition: BlackErr.h:625
errorCoreGPIO(errorCore *base)
errorCoreGPIO struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:513
bool readError
Value file reading error.
Definition: BlackErr.h:612
bool dtError
Device tree loading error.
Definition: BlackErr.h:926
errorCorePWM * pwmCoreErrors
Pointer of errorCorePWM struct, which stores errors of BlackCorePWM class.
Definition: BlackErr.h:315
bool runFileError
Run file reading error.
Definition: BlackErr.h:380
bool directionError
Pin direction couldn't set error.
Definition: BlackErr.h:592
bool speedError
SPI's speed property setting error.
Definition: BlackErr.h:1006
errorCore * coreErrors
Pointer of errorCore struct, which stores errors of BlackCore class.
Definition: BlackErr.h:691
bool dtSsError
Device tree loading error.
Definition: BlackErr.h:243
errorSPI()
errorSPI struct's constructor.
Definition: BlackErr.h:1030
bool exportFileError
Export file opening error.
Definition: BlackErr.h:481
bool polarityFileError
Polarity file reading error.
Definition: BlackErr.h:399
bool openError
TTY file opening error.
Definition: BlackErr.h:937
errorGPIO()
errorGPIO struct's constructor.
Definition: BlackErr.h:644
bool forcingError
Pin write forcing error.
Definition: BlackErr.h:637
errorCore * coreErrors
Pointer of errorCore struct, which stores errors of BlackCore class.
Definition: BlackErr.h:1083
errorADC(errorCoreADC *base)
errorADC struct's constructor with errorCoreADC pointer parameter.
Definition: BlackErr.h:206
errorCoreGPIO()
errorCoreGPIO struct's constructor.
Definition: BlackErr.h:499
bool closeError
TTY file closing error.
Definition: BlackErr.h:948
Holds BlackPWM errors.
Definition: BlackErr.h:303
errorCore * coreErrors
Pointer of errorCore struct, which stores errors of BlackCore class.
Definition: BlackErr.h:470
bool bitSizeError
SPI's bit size property setting error.
Definition: BlackErr.h:1023
bool directionError
Some uart operation's direction error.
Definition: BlackErr.h:736
bool writeError
TTY file writing error.
Definition: BlackErr.h:781
bool modeError
SPI's mode property setting error.
Definition: BlackErr.h:989
errorI2C(errorCore *base)
BlackI2C struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:1192
bool writeError
I2C writing error.
Definition: BlackErr.h:1168
errorCorePWM(errorCore *base)
errorCorePWM struct's constructor with errorCore pointer parameter.
Definition: BlackErr.h:287
bool exportError
Pin couldn't export error.
Definition: BlackErr.h:566
bool stopBitsError
UART's stop bits property setting error.
Definition: BlackErr.h:832
bool setSlaveError
Slave setting error.
Definition: BlackErr.h:1135
bool baudRateError
UART's baud property setting error.
Definition: BlackErr.h:798
errorCoreGPIO * gpioCoreErrors
Pointer of errorCoreGPIO struct, which stores errors of BlackCoreGPIO class.
Definition: BlackErr.h:540
errorCore * coreErrors
Pointer of errorCore struct which stores errors of BlackCore class.
Definition: BlackErr.h:100
errorGPIO(errorCoreGPIO *base)
errorGPIO struct's constructor with errorCoreGPIO pointer parameter.
Definition: BlackErr.h:661
bool dtError
Device tree loading error.
Definition: BlackErr.h:254
bool outOfRange
Out of range value error.
Definition: BlackErr.h:416
errorCore * coreErrors
Pointer of errorCore struct, which stores errors of BlackCore class.
Definition: BlackErr.h:915
errorPWM()
errorPWM struct's constructor.
Definition: BlackErr.h:423
errorI2C()
BlackI2C struct's constructor.
Definition: BlackErr.h:1175
Definition: BlackADC.cpp:36
bool openError
TTY file opening error.
Definition: BlackErr.h:1094
bool flushError
UART line flushing error.
Definition: BlackErr.h:747
errorUART()
errorUART struct's constructor.
Definition: BlackErr.h:856
Holds BlackCoreADC errors.
Definition: BlackErr.h:88
bool dtError
Device tree loading error.
Definition: BlackErr.h:122
bool parityError
UART's parity property setting error.
Definition: BlackErr.h:815
bool portPathError
TTY file path finding error.
Definition: BlackErr.h:959
errorADC()
errorADC struct's constructor.
Definition: BlackErr.h:193