(end - start).count() / 100; // in Dezisekunden
+ if (elapsed >= timeout)
+ throw TimeoutException(
+ std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
+ ", " + std::to_string(elapsed) + " / " + std::to_string(timeout) + " ds");
+ }
+ while (bytes_avail < len);
+
+ code = read(file_desc, buffer + offset, len);
+ if (code != len)
+ throw USARTException(
+ std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
+ ", " + strerror(code) + " (code " + std::to_string(code) + " / " + std::to_string(len) + ")");
+}
+
+void USART::drop(uint8_t len)
+{
+ // Kann bestimmt noch eleganter gelöst werden
+ uint8_t dummy[len];
+ receive(&dummy[0], 0, len);
+}
+
+uint32_t USART::getBaudrate()
+{
+ return baudrate;
+}
+
+uint8_t USART::getTimeout()
+{
+ return timeout;
+}
+
+void USART::setBaudrate(uint32_t baudrate)
+{
+ this->baudrate = baudrate;
+}
+
+void USART::setTimeout(uint8_t timeout)
+{
+ this->timeout = timeout;
+}
diff --git a/control/src/drv/usart.h b/control/src/drv/usart.h
index 752f945..8ba889c 100644
--- a/control/src/drv/usart.h
+++ b/control/src/drv/usart.h
@@ -88,6 +88,13 @@ public:
*/
void receive(uint8_t *buffer, uint16_t offset, uint8_t len);
+ /**
+ * Receives n bytes but discards them
+ * \param len count of bytes to receive
+ * \throws USARTException
+ */
+ void drop(uint8_t len);
+
/*************************************/
diff --git a/docs/html/CMakeCCompilerId_8c_source.html b/docs/html/CMakeCCompilerId_8c_source.html
index 7c52db9..dc288c6 100644
--- a/docs/html/CMakeCCompilerId_8c_source.html
+++ b/docs/html/CMakeCCompilerId_8c_source.html
@@ -73,7 +73,7 @@ $(function() {
2 # error "A C++ compiler has been selected for C." 8 #if defined(__CLASSIC_C__) 18 #if defined(__INTEL_COMPILER) || defined(__ICC) 19 # define COMPILER_ID "Intel" 20 # if defined(_MSC_VER) 21 # define SIMULATE_ID "MSVC" 24 # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 25 # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 26 # if defined(__INTEL_COMPILER_UPDATE) 27 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 29 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 31 # if defined(__INTEL_COMPILER_BUILD_DATE) 33 # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 35 # if defined(_MSC_VER) 37 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 38 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 41 #elif defined(__PATHCC__) 42 # define COMPILER_ID "PathScale" 43 # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 44 # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 45 # if defined(__PATHCC_PATCHLEVEL__) 46 # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 49 #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 50 # define COMPILER_ID "Embarcadero" 51 # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 52 # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 53 # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 55 #elif defined(__BORLANDC__) 56 # define COMPILER_ID "Borland" 58 # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 59 # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 61 #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 62 # define COMPILER_ID "Watcom" 64 # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 65 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 66 # if (__WATCOMC__ % 10) > 0 67 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 70 #elif defined(__WATCOMC__) 71 # define COMPILER_ID "OpenWatcom" 73 # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 74 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 75 # if (__WATCOMC__ % 10) > 0 76 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 79 #elif defined(__SUNPRO_C) 80 # define COMPILER_ID "SunPro" 81 # if __SUNPRO_C >= 0x5100 83 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) 84 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) 85 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 88 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) 89 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) 90 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 93 #elif defined(__HP_cc) 94 # define COMPILER_ID "HP" 96 # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) 97 # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) 98 # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) 100 #elif defined(__DECC) 101 # define COMPILER_ID "Compaq" 103 # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) 104 # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) 105 # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) 107 #elif defined(__IBMC__) && defined(__COMPILER_VER__) 108 # define COMPILER_ID "zOS" 109 # if defined(__ibmxl__) 110 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 111 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 112 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 113 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 116 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 117 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 118 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 122 #elif defined(__ibmxl__) || (defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800) 123 # define COMPILER_ID "XL" 124 # if defined(__ibmxl__) 125 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 126 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 127 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 128 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 131 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 132 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 133 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 137 #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 138 # define COMPILER_ID "VisualAge" 139 # if defined(__ibmxl__) 140 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 141 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 142 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 143 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 146 # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 147 # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 148 # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 153 # define COMPILER_ID "PGI" 154 # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 155 # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 156 # if defined(__PGIC_PATCHLEVEL__) 157 # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 160 #elif defined(_CRAYC) 161 # define COMPILER_ID "Cray" 162 # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 163 # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 165 #elif defined(__TI_COMPILER_VERSION__) 166 # define COMPILER_ID "TI" 168 # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 169 # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 170 # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 172 #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 173 # define COMPILER_ID "Fujitsu" 175 #elif defined(__ghs__) 176 # define COMPILER_ID "GHS" 178 # ifdef __GHS_VERSION_NUMBER 179 # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 180 # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 181 # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 184 #elif defined(__TINYC__) 185 # define COMPILER_ID "TinyCC" 187 #elif defined(__BCC__) 188 # define COMPILER_ID "Bruce" 190 #elif defined(__SCO_VERSION__) 191 # define COMPILER_ID "SCO" 193 #elif defined(__ARMCC_VERSION) && !defined(__clang__) 194 # define COMPILER_ID "ARMCC" 195 #if __ARMCC_VERSION >= 1000000 197 # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 198 # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 199 # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 202 # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 203 # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 204 # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 208 #elif defined(__clang__) && defined(__apple_build_version__) 209 # define COMPILER_ID "AppleClang" 210 # if defined(_MSC_VER) 211 # define SIMULATE_ID "MSVC" 213 # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 214 # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 215 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 216 # if defined(_MSC_VER) 218 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 219 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 221 # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 223 #elif defined(__clang__) 224 # define COMPILER_ID "Clang" 225 # if defined(_MSC_VER) 226 # define SIMULATE_ID "MSVC" 228 # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 229 # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 230 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 231 # if defined(_MSC_VER) 233 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 234 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 237 #elif defined(__GNUC__) 238 # define COMPILER_ID "GNU" 239 # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 240 # if defined(__GNUC_MINOR__) 241 # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 243 # if defined(__GNUC_PATCHLEVEL__) 244 # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 247 #elif defined(_MSC_VER) 248 # define COMPILER_ID "MSVC" 250 # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 251 # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 252 # if defined(_MSC_FULL_VER) 253 # if _MSC_VER >= 1400 255 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 258 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 261 # if defined(_MSC_BUILD) 262 # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 265 #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 266 # define COMPILER_ID "ADSP" 267 #if defined(__VISUALDSPVERSION__) 269 # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 270 # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 271 # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 274 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 275 # define COMPILER_ID "IAR" 276 # if defined(__VER__) && defined(__ICCARM__) 277 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 278 # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 279 # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 280 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 281 # elif defined(__VER__) && defined(__ICCAVR__) 282 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 283 # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 284 # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 285 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 288 #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) 289 # define COMPILER_ID "SDCC" 290 # if defined(__SDCC_VERSION_MAJOR) 291 # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) 292 # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) 293 # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) 296 # define COMPILER_VERSION_MAJOR DEC(SDCC/100) 297 # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) 298 # define COMPILER_VERSION_PATCH DEC(SDCC % 10) 301 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) 302 # define COMPILER_ID "MIPSpro" 303 # if defined(_SGI_COMPILER_VERSION) 305 # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) 306 # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) 307 # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) 310 # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) 311 # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) 312 # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) 319 #elif defined(__hpux) || defined(__hpua) 320 # define COMPILER_ID "HP" 323 # define COMPILER_ID "" 330 char const* info_compiler =
"INFO" ":" "compiler[" COMPILER_ID
"]";
332 char const* info_simulate =
"INFO" ":" "simulate[" SIMULATE_ID
"]";
336 char const* qnxnto =
"INFO" ":" "qnxnto[]";
339 #if defined(__CRAYXE) || defined(__CRAYXC) 340 char const *info_cray =
"INFO" ":" "compiler_wrapper[CrayPrgEnv]";
343 #define STRINGIFY_HELPER(X) #X 344 #define STRINGIFY(X) STRINGIFY_HELPER(X) 347 #if defined(__linux) || defined(__linux__) || defined(linux) 348 # define PLATFORM_ID "Linux" 350 #elif defined(__CYGWIN__) 351 # define PLATFORM_ID "Cygwin" 353 #elif defined(__MINGW32__) 354 # define PLATFORM_ID "MinGW" 356 #elif defined(__APPLE__) 357 # define PLATFORM_ID "Darwin" 359 #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 360 # define PLATFORM_ID "Windows" 362 #elif defined(__FreeBSD__) || defined(__FreeBSD) 363 # define PLATFORM_ID "FreeBSD" 365 #elif defined(__NetBSD__) || defined(__NetBSD) 366 # define PLATFORM_ID "NetBSD" 368 #elif defined(__OpenBSD__) || defined(__OPENBSD) 369 # define PLATFORM_ID "OpenBSD" 371 #elif defined(__sun) || defined(sun) 372 # define PLATFORM_ID "SunOS" 374 #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 375 # define PLATFORM_ID "AIX" 377 #elif defined(__hpux) || defined(__hpux__) 378 # define PLATFORM_ID "HP-UX" 380 #elif defined(__HAIKU__) 381 # define PLATFORM_ID "Haiku" 383 #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 384 # define PLATFORM_ID "BeOS" 386 #elif defined(__QNX__) || defined(__QNXNTO__) 387 # define PLATFORM_ID "QNX" 389 #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 390 # define PLATFORM_ID "Tru64" 392 #elif defined(__riscos) || defined(__riscos__) 393 # define PLATFORM_ID "RISCos" 395 #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 396 # define PLATFORM_ID "SINIX" 398 #elif defined(__UNIX_SV__) 399 # define PLATFORM_ID "UNIX_SV" 401 #elif defined(__bsdos__) 402 # define PLATFORM_ID "BSDOS" 404 #elif defined(_MPRAS) || defined(MPRAS) 405 # define PLATFORM_ID "MP-RAS" 407 #elif defined(__osf) || defined(__osf__) 408 # define PLATFORM_ID "OSF1" 410 #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 411 # define PLATFORM_ID "SCO_SV" 413 #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 414 # define PLATFORM_ID "ULTRIX" 416 #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 417 # define PLATFORM_ID "Xenix" 419 #elif defined(__WATCOMC__) 420 # if defined(__LINUX__) 421 # define PLATFORM_ID "Linux" 423 # elif defined(__DOS__) 424 # define PLATFORM_ID "DOS" 426 # elif defined(__OS2__) 427 # define PLATFORM_ID "OS2" 429 # elif defined(__WINDOWS__) 430 # define PLATFORM_ID "Windows3x" 436 #elif defined(__INTEGRITY) 437 # if defined(INT_178B) 438 # define PLATFORM_ID "Integrity178" 441 # define PLATFORM_ID "Integrity" 454 #if defined(_WIN32) && defined(_MSC_VER) 455 # if defined(_M_IA64) 456 # define ARCHITECTURE_ID "IA64" 458 # elif defined(_M_X64) || defined(_M_AMD64) 459 # define ARCHITECTURE_ID "x64" 461 # elif defined(_M_IX86) 462 # define ARCHITECTURE_ID "X86" 464 # elif defined(_M_ARM64) 465 # define ARCHITECTURE_ID "ARM64" 467 # elif defined(_M_ARM) 469 # define ARCHITECTURE_ID "ARMV4I" 471 # define ARCHITECTURE_ID "ARMV5I" 473 # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 476 # elif defined(_M_MIPS) 477 # define ARCHITECTURE_ID "MIPS" 479 # elif defined(_M_SH) 480 # define ARCHITECTURE_ID "SHx" 483 # define ARCHITECTURE_ID "" 486 #elif defined(__WATCOMC__) 488 # define ARCHITECTURE_ID "I86" 490 # elif defined(_M_IX86) 491 # define ARCHITECTURE_ID "X86" 494 # define ARCHITECTURE_ID "" 497 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 498 # if defined(__ICCARM__) 499 # define ARCHITECTURE_ID "ARM" 501 # elif defined(__ICCAVR__) 502 # define ARCHITECTURE_ID "AVR" 505 # define ARCHITECTURE_ID "" 508 #elif defined(__ghs__) 509 # if defined(__PPC64__) 510 # define ARCHITECTURE_ID "PPC64" 512 # elif defined(__ppc__) 513 # define ARCHITECTURE_ID "PPC" 515 # elif defined(__ARM__) 516 # define ARCHITECTURE_ID "ARM" 518 # elif defined(__x86_64__) 519 # define ARCHITECTURE_ID "x64" 521 # elif defined(__i386__) 522 # define ARCHITECTURE_ID "X86" 525 # define ARCHITECTURE_ID "" 528 # define ARCHITECTURE_ID 533 ('0' + (((n) / 10000000)%10)), \ 534 ('0' + (((n) / 1000000)%10)), \ 535 ('0' + (((n) / 100000)%10)), \ 536 ('0' + (((n) / 10000)%10)), \ 537 ('0' + (((n) / 1000)%10)), \ 538 ('0' + (((n) / 100)%10)), \ 539 ('0' + (((n) / 10)%10)), \ 544 ('0' + ((n)>>28 & 0xF)), \ 545 ('0' + ((n)>>24 & 0xF)), \ 546 ('0' + ((n)>>20 & 0xF)), \ 547 ('0' + ((n)>>16 & 0xF)), \ 548 ('0' + ((n)>>12 & 0xF)), \ 549 ('0' + ((n)>>8 & 0xF)), \ 550 ('0' + ((n)>>4 & 0xF)), \ 554 #ifdef COMPILER_VERSION_MAJOR 555 char const info_version[] =
557 'I',
'N',
'F',
'O',
':',
558 'c',
'o',
'm',
'p',
'i',
'l',
'e',
'r',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'[',
559 COMPILER_VERSION_MAJOR,
560 # ifdef COMPILER_VERSION_MINOR 561 '.', COMPILER_VERSION_MINOR,
562 # ifdef COMPILER_VERSION_PATCH 563 '.', COMPILER_VERSION_PATCH,
564 # ifdef COMPILER_VERSION_TWEAK 565 '.', COMPILER_VERSION_TWEAK,
574 #ifdef COMPILER_VERSION_INTERNAL 575 char const info_version_internal[] =
577 'I',
'N',
'F',
'O',
':',
578 'c',
'o',
'm',
'p',
'i',
'l',
'e',
'r',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'_',
579 'i',
'n',
't',
'e',
'r',
'n',
'a',
'l',
'[',
580 COMPILER_VERSION_INTERNAL,
']',
'\0' 585 #ifdef SIMULATE_VERSION_MAJOR 586 char const info_simulate_version[] =
588 'I',
'N',
'F',
'O',
':',
589 's',
'i',
'm',
'u',
'l',
'a',
't',
'e',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'[',
590 SIMULATE_VERSION_MAJOR,
591 # ifdef SIMULATE_VERSION_MINOR 592 '.', SIMULATE_VERSION_MINOR,
593 # ifdef SIMULATE_VERSION_PATCH 594 '.', SIMULATE_VERSION_PATCH,
595 # ifdef SIMULATE_VERSION_TWEAK 596 '.', SIMULATE_VERSION_TWEAK,
608 char const* info_platform =
"INFO" ":" "platform[" PLATFORM_ID
"]";
609 char const* info_arch =
"INFO" ":" "arch[" ARCHITECTURE_ID
"]";
614 #if !defined(__STDC__) 615 # if (defined(_MSC_VER) && !defined(__clang__)) \ 616 || (defined(__ibmxl__) || defined(__IBMC__)) 617 # define C_DIALECT "90" 621 #elif __STDC_VERSION__ >= 201000L 622 # define C_DIALECT "11" 623 #elif __STDC_VERSION__ >= 199901L 624 # define C_DIALECT "99" 626 # define C_DIALECT "90" 628 const char* info_language_dialect_default =
629 "INFO" ":" "dialect_default[" C_DIALECT
"]";
636 # if defined(__CLASSIC_C__) 637 int main(argc, argv)
int argc;
640 int main(
int argc,
char* argv[])
644 require += info_compiler[argc];
645 require += info_platform[argc];
646 require += info_arch[argc];
647 #ifdef COMPILER_VERSION_MAJOR 648 require += info_version[argc];
650 #ifdef COMPILER_VERSION_INTERNAL 651 require += info_version_internal[argc];
654 require += info_simulate[argc];
656 #ifdef SIMULATE_VERSION_MAJOR 657 require += info_simulate_version[argc];
659 #if defined(__CRAYXE) || defined(__CRAYXC) 660 require += info_cray[argc];
662 require += info_language_dialect_default[argc];
diff --git a/docs/html/CMakeCXXCompilerId_8cpp_source.html b/docs/html/CMakeCXXCompilerId_8cpp_source.html
index 3389bb2..8805234 100644
--- a/docs/html/CMakeCXXCompilerId_8cpp_source.html
+++ b/docs/html/CMakeCXXCompilerId_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
5 # error "A C compiler has been selected for C++." 13 # define COMPILER_ID "Comeau" 15 # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 16 # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 18 #elif defined(__INTEL_COMPILER) || defined(__ICC) 19 # define COMPILER_ID "Intel" 20 # if defined(_MSC_VER) 21 # define SIMULATE_ID "MSVC" 24 # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 25 # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 26 # if defined(__INTEL_COMPILER_UPDATE) 27 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 29 # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 31 # if defined(__INTEL_COMPILER_BUILD_DATE) 33 # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 35 # if defined(_MSC_VER) 37 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 38 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 41 #elif defined(__PATHCC__) 42 # define COMPILER_ID "PathScale" 43 # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 44 # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 45 # if defined(__PATHCC_PATCHLEVEL__) 46 # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 49 #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 50 # define COMPILER_ID "Embarcadero" 51 # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 52 # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 53 # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 55 #elif defined(__BORLANDC__) 56 # define COMPILER_ID "Borland" 58 # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 59 # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 61 #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 62 # define COMPILER_ID "Watcom" 64 # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 65 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 66 # if (__WATCOMC__ % 10) > 0 67 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 70 #elif defined(__WATCOMC__) 71 # define COMPILER_ID "OpenWatcom" 73 # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 74 # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 75 # if (__WATCOMC__ % 10) > 0 76 # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 79 #elif defined(__SUNPRO_CC) 80 # define COMPILER_ID "SunPro" 81 # if __SUNPRO_CC >= 0x5100 83 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 84 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 85 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 88 # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 89 # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 90 # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 93 #elif defined(__HP_aCC) 94 # define COMPILER_ID "HP" 96 # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 97 # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 98 # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 100 #elif defined(__DECCXX) 101 # define COMPILER_ID "Compaq" 103 # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 104 # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 105 # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 107 #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 108 # define COMPILER_ID "zOS" 109 # if defined(__ibmxl__) 110 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 111 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 112 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 113 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 116 # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 117 # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 118 # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 122 #elif defined(__ibmxl__) || (defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800) 123 # define COMPILER_ID "XL" 124 # if defined(__ibmxl__) 125 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 126 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 127 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 128 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 131 # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 132 # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 133 # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 137 #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 138 # define COMPILER_ID "VisualAge" 139 # if defined(__ibmxl__) 140 # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 141 # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 142 # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 143 # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 146 # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 147 # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 148 # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 153 # define COMPILER_ID "PGI" 154 # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 155 # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 156 # if defined(__PGIC_PATCHLEVEL__) 157 # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 160 #elif defined(_CRAYC) 161 # define COMPILER_ID "Cray" 162 # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 163 # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 165 #elif defined(__TI_COMPILER_VERSION__) 166 # define COMPILER_ID "TI" 168 # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 169 # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 170 # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 172 #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 173 # define COMPILER_ID "Fujitsu" 175 #elif defined(__ghs__) 176 # define COMPILER_ID "GHS" 178 # ifdef __GHS_VERSION_NUMBER 179 # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 180 # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 181 # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 184 #elif defined(__SCO_VERSION__) 185 # define COMPILER_ID "SCO" 187 #elif defined(__ARMCC_VERSION) && !defined(__clang__) 188 # define COMPILER_ID "ARMCC" 189 #if __ARMCC_VERSION >= 1000000 191 # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 192 # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 193 # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 196 # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 197 # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 198 # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 202 #elif defined(__clang__) && defined(__apple_build_version__) 203 # define COMPILER_ID "AppleClang" 204 # if defined(_MSC_VER) 205 # define SIMULATE_ID "MSVC" 207 # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 208 # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 209 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 210 # if defined(_MSC_VER) 212 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 213 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 215 # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 217 #elif defined(__clang__) 218 # define COMPILER_ID "Clang" 219 # if defined(_MSC_VER) 220 # define SIMULATE_ID "MSVC" 222 # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 223 # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 224 # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 225 # if defined(_MSC_VER) 227 # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 228 # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 231 #elif defined(__GNUC__) || defined(__GNUG__) 232 # define COMPILER_ID "GNU" 233 # if defined(__GNUC__) 234 # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 236 # define COMPILER_VERSION_MAJOR DEC(__GNUG__) 238 # if defined(__GNUC_MINOR__) 239 # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 241 # if defined(__GNUC_PATCHLEVEL__) 242 # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 245 #elif defined(_MSC_VER) 246 # define COMPILER_ID "MSVC" 248 # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 249 # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 250 # if defined(_MSC_FULL_VER) 251 # if _MSC_VER >= 1400 253 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 256 # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 259 # if defined(_MSC_BUILD) 260 # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 263 #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 264 # define COMPILER_ID "ADSP" 265 #if defined(__VISUALDSPVERSION__) 267 # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 268 # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 269 # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 272 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 273 # define COMPILER_ID "IAR" 274 # if defined(__VER__) && defined(__ICCARM__) 275 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 276 # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 277 # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 278 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 279 # elif defined(__VER__) && defined(__ICCAVR__) 280 # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 281 # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 282 # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 283 # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 286 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) 287 # define COMPILER_ID "MIPSpro" 288 # if defined(_SGI_COMPILER_VERSION) 290 # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) 291 # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) 292 # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) 295 # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) 296 # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) 297 # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) 304 #elif defined(__hpux) || defined(__hpua) 305 # define COMPILER_ID "HP" 308 # define COMPILER_ID "" 315 char const* info_compiler =
"INFO" ":" "compiler[" COMPILER_ID
"]";
317 char const* info_simulate =
"INFO" ":" "simulate[" SIMULATE_ID
"]";
321 char const* qnxnto =
"INFO" ":" "qnxnto[]";
324 #if defined(__CRAYXE) || defined(__CRAYXC) 325 char const *info_cray =
"INFO" ":" "compiler_wrapper[CrayPrgEnv]";
328 #define STRINGIFY_HELPER(X) #X 329 #define STRINGIFY(X) STRINGIFY_HELPER(X) 332 #if defined(__linux) || defined(__linux__) || defined(linux) 333 # define PLATFORM_ID "Linux" 335 #elif defined(__CYGWIN__) 336 # define PLATFORM_ID "Cygwin" 338 #elif defined(__MINGW32__) 339 # define PLATFORM_ID "MinGW" 341 #elif defined(__APPLE__) 342 # define PLATFORM_ID "Darwin" 344 #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 345 # define PLATFORM_ID "Windows" 347 #elif defined(__FreeBSD__) || defined(__FreeBSD) 348 # define PLATFORM_ID "FreeBSD" 350 #elif defined(__NetBSD__) || defined(__NetBSD) 351 # define PLATFORM_ID "NetBSD" 353 #elif defined(__OpenBSD__) || defined(__OPENBSD) 354 # define PLATFORM_ID "OpenBSD" 356 #elif defined(__sun) || defined(sun) 357 # define PLATFORM_ID "SunOS" 359 #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 360 # define PLATFORM_ID "AIX" 362 #elif defined(__hpux) || defined(__hpux__) 363 # define PLATFORM_ID "HP-UX" 365 #elif defined(__HAIKU__) 366 # define PLATFORM_ID "Haiku" 368 #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 369 # define PLATFORM_ID "BeOS" 371 #elif defined(__QNX__) || defined(__QNXNTO__) 372 # define PLATFORM_ID "QNX" 374 #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 375 # define PLATFORM_ID "Tru64" 377 #elif defined(__riscos) || defined(__riscos__) 378 # define PLATFORM_ID "RISCos" 380 #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 381 # define PLATFORM_ID "SINIX" 383 #elif defined(__UNIX_SV__) 384 # define PLATFORM_ID "UNIX_SV" 386 #elif defined(__bsdos__) 387 # define PLATFORM_ID "BSDOS" 389 #elif defined(_MPRAS) || defined(MPRAS) 390 # define PLATFORM_ID "MP-RAS" 392 #elif defined(__osf) || defined(__osf__) 393 # define PLATFORM_ID "OSF1" 395 #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 396 # define PLATFORM_ID "SCO_SV" 398 #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 399 # define PLATFORM_ID "ULTRIX" 401 #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 402 # define PLATFORM_ID "Xenix" 404 #elif defined(__WATCOMC__) 405 # if defined(__LINUX__) 406 # define PLATFORM_ID "Linux" 408 # elif defined(__DOS__) 409 # define PLATFORM_ID "DOS" 411 # elif defined(__OS2__) 412 # define PLATFORM_ID "OS2" 414 # elif defined(__WINDOWS__) 415 # define PLATFORM_ID "Windows3x" 421 #elif defined(__INTEGRITY) 422 # if defined(INT_178B) 423 # define PLATFORM_ID "Integrity178" 426 # define PLATFORM_ID "Integrity" 439 #if defined(_WIN32) && defined(_MSC_VER) 440 # if defined(_M_IA64) 441 # define ARCHITECTURE_ID "IA64" 443 # elif defined(_M_X64) || defined(_M_AMD64) 444 # define ARCHITECTURE_ID "x64" 446 # elif defined(_M_IX86) 447 # define ARCHITECTURE_ID "X86" 449 # elif defined(_M_ARM64) 450 # define ARCHITECTURE_ID "ARM64" 452 # elif defined(_M_ARM) 454 # define ARCHITECTURE_ID "ARMV4I" 456 # define ARCHITECTURE_ID "ARMV5I" 458 # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 461 # elif defined(_M_MIPS) 462 # define ARCHITECTURE_ID "MIPS" 464 # elif defined(_M_SH) 465 # define ARCHITECTURE_ID "SHx" 468 # define ARCHITECTURE_ID "" 471 #elif defined(__WATCOMC__) 473 # define ARCHITECTURE_ID "I86" 475 # elif defined(_M_IX86) 476 # define ARCHITECTURE_ID "X86" 479 # define ARCHITECTURE_ID "" 482 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 483 # if defined(__ICCARM__) 484 # define ARCHITECTURE_ID "ARM" 486 # elif defined(__ICCAVR__) 487 # define ARCHITECTURE_ID "AVR" 490 # define ARCHITECTURE_ID "" 493 #elif defined(__ghs__) 494 # if defined(__PPC64__) 495 # define ARCHITECTURE_ID "PPC64" 497 # elif defined(__ppc__) 498 # define ARCHITECTURE_ID "PPC" 500 # elif defined(__ARM__) 501 # define ARCHITECTURE_ID "ARM" 503 # elif defined(__x86_64__) 504 # define ARCHITECTURE_ID "x64" 506 # elif defined(__i386__) 507 # define ARCHITECTURE_ID "X86" 510 # define ARCHITECTURE_ID "" 513 # define ARCHITECTURE_ID 518 ('0' + (((n) / 10000000)%10)), \ 519 ('0' + (((n) / 1000000)%10)), \ 520 ('0' + (((n) / 100000)%10)), \ 521 ('0' + (((n) / 10000)%10)), \ 522 ('0' + (((n) / 1000)%10)), \ 523 ('0' + (((n) / 100)%10)), \ 524 ('0' + (((n) / 10)%10)), \ 529 ('0' + ((n)>>28 & 0xF)), \ 530 ('0' + ((n)>>24 & 0xF)), \ 531 ('0' + ((n)>>20 & 0xF)), \ 532 ('0' + ((n)>>16 & 0xF)), \ 533 ('0' + ((n)>>12 & 0xF)), \ 534 ('0' + ((n)>>8 & 0xF)), \ 535 ('0' + ((n)>>4 & 0xF)), \ 539 #ifdef COMPILER_VERSION_MAJOR 540 char const info_version[] =
542 'I',
'N',
'F',
'O',
':',
543 'c',
'o',
'm',
'p',
'i',
'l',
'e',
'r',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'[',
544 COMPILER_VERSION_MAJOR,
545 # ifdef COMPILER_VERSION_MINOR 546 '.', COMPILER_VERSION_MINOR,
547 # ifdef COMPILER_VERSION_PATCH 548 '.', COMPILER_VERSION_PATCH,
549 # ifdef COMPILER_VERSION_TWEAK 550 '.', COMPILER_VERSION_TWEAK,
559 #ifdef COMPILER_VERSION_INTERNAL 560 char const info_version_internal[] =
562 'I',
'N',
'F',
'O',
':',
563 'c',
'o',
'm',
'p',
'i',
'l',
'e',
'r',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'_',
564 'i',
'n',
't',
'e',
'r',
'n',
'a',
'l',
'[',
565 COMPILER_VERSION_INTERNAL,
']',
'\0' 570 #ifdef SIMULATE_VERSION_MAJOR 571 char const info_simulate_version[] =
573 'I',
'N',
'F',
'O',
':',
574 's',
'i',
'm',
'u',
'l',
'a',
't',
'e',
'_',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'[',
575 SIMULATE_VERSION_MAJOR,
576 # ifdef SIMULATE_VERSION_MINOR 577 '.', SIMULATE_VERSION_MINOR,
578 # ifdef SIMULATE_VERSION_PATCH 579 '.', SIMULATE_VERSION_PATCH,
580 # ifdef SIMULATE_VERSION_TWEAK 581 '.', SIMULATE_VERSION_TWEAK,
593 char const* info_platform =
"INFO" ":" "platform[" PLATFORM_ID
"]";
594 char const* info_arch =
"INFO" ":" "arch[" ARCHITECTURE_ID
"]";
599 #if defined(_MSC_VER) && defined(_MSVC_LANG) 600 #define CXX_STD _MSVC_LANG 602 #define CXX_STD __cplusplus 605 const char* info_language_dialect_default =
"INFO" ":" "dialect_default[" 606 #if CXX_STD > 201703L 608 #elif CXX_STD >= 201703L 610 #elif CXX_STD >= 201402L 612 #elif CXX_STD >= 201103L 621 int main(
int argc,
char* argv[])
624 require += info_compiler[argc];
625 require += info_platform[argc];
626 #ifdef COMPILER_VERSION_MAJOR 627 require += info_version[argc];
629 #ifdef COMPILER_VERSION_INTERNAL 630 require += info_version_internal[argc];
633 require += info_simulate[argc];
635 #ifdef SIMULATE_VERSION_MAJOR 636 require += info_simulate_version[argc];
638 #if defined(__CRAYXE) || defined(__CRAYXC) 639 require += info_cray[argc];
641 require += info_language_dialect_default[argc];
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
index c07dd4e..5954645 100644
--- a/docs/html/annotated.html
+++ b/docs/html/annotated.html
@@ -85,7 +85,7 @@ $(function() {
diff --git a/docs/html/b15f_8cpp_source.html b/docs/html/b15f_8cpp_source.html
index acfab44..78bcd55 100644
--- a/docs/html/b15f_8cpp_source.html
+++ b/docs/html/b15f_8cpp_source.html
@@ -70,48 +70,49 @@ $(function() {
b15f.cpp
-
3 B15F *B15F::instance =
nullptr;
4 errorhandler_t B15F::errorhandler =
nullptr;
14 std::string device =
exec(
"bash -c 'ls /dev/ttyUSB*'");
15 while (device.find(
' ') != std::string::npos || device.find(
'\n') != std::string::npos ||
16 device.find(
'\t') != std::string::npos)
19 if (device.length() == 0)
20 abort(
"Adapter nicht gefunden");
22 std::cout <<
PRE <<
"Verwende Adapter: " << device << std::endl;
25 std::cout <<
PRE <<
"Stelle Verbindung mit Adapter her... " << std::flush;
28 std::cout <<
"OK" << std::endl;
31 std::cout <<
PRE <<
"Teste Verbindung... " << std::flush;
47 abort(
"Verbindungstest fehlgeschlagen. Neueste Version im Einsatz?");
48 std::cout <<
"OK" << std::endl;
53 std::cout <<
PRE <<
"AVR Firmware Version: " << info[0] <<
" um " << info[1] <<
" Uhr (" << info[2] <<
")" 69 abort(
"Verbindung kann nicht repariert werden");
82 for (uint8_t i = 0; i < 16; i++)
84 usart.
transmit(&rq[0], 0,
sizeof(rq));
89 catch (std::exception &ex)
99 uint8_t dummy = rand() % 256;
106 usart.
transmit(&rq[0], 0,
sizeof(rq));
109 usart.
receive(&aw[0], 0,
sizeof(aw));
111 return aw[0] ==
MSG_OK && aw[1] == dummy;
117 uint16_t dummy = rand() % (0xFFFF / 3);
122 static_cast<uint8_t >(dummy & 0xFF),
123 static_cast<uint8_t >(dummy >> 8)
125 usart.
transmit(&rq[0], 0,
sizeof(rq));
128 usart.
receive(reinterpret_cast<uint8_t*>(&aw), 0,
sizeof(aw));
130 return aw == dummy * 3;
136 std::vector<std::string> info;
142 usart.
transmit(&rq[0], 0,
sizeof(rq));
145 usart.
receive(&n, 0,
sizeof(n));
146 std::cout <<
"len: " << (int) n << std::endl << std::flush;
150 usart.
receive(&len, 0,
sizeof(len));
154 usart.
receive(reinterpret_cast<uint8_t *>(&str[0]), 0, len);
156 std::cout << &str[0] << std::endl;
158 info.push_back(std::string(str));
162 usart.
receive(&aw, 0,
sizeof(aw));
164 abort(
"Board Info fehlerhalft: code " + std::to_string((
int) aw));
175 usart.
transmit(&rq[0], 0,
sizeof(rq));
178 usart.
receive(&aw, 0,
sizeof(aw));
189 usart.
transmit(&rq[0], 0,
sizeof(rq));
192 usart.
receive(&aw, 0,
sizeof(aw));
203 usart.
transmit(&rq[0], 0,
sizeof(rq));
206 usart.
receive(&aw, 0,
sizeof(aw));
217 usart.
transmit(&rq[0], 0,
sizeof(rq));
220 usart.
receive(&aw, 0,
sizeof(aw));
231 usart.
transmit(&rq[0], 0,
sizeof(rq));
234 usart.
receive(&aw, 0,
sizeof(aw));
245 usart.
transmit(&rq[0], 0,
sizeof(rq));
248 usart.
receive(&aw, 0,
sizeof(aw));
257 static_cast<uint8_t >(value & 0xFF),
258 static_cast<uint8_t >(value >> 8)
260 usart.
transmit(&rq[0], 0,
sizeof(rq));
263 usart.
receive(&aw, 0,
sizeof(aw));
272 static_cast<uint8_t >(value & 0xFF),
273 static_cast<uint8_t >(value >> 8)
275 usart.
transmit(&rq[0], 0,
sizeof(rq));
278 usart.
receive(&aw, 0,
sizeof(aw));
286 abort(
"Bad ADC channel: " + std::to_string(channel));
294 usart.
transmit(&rq[0], 0,
sizeof(rq));
297 usart.
receive(reinterpret_cast<uint8_t*>(&aw), 0,
sizeof(aw));
300 abort(
"Bad ADC data detected (1)");
305 B15F::analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b,
306 uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
356 static_cast<uint8_t>((freq >> 0) & 0xFF),
357 static_cast<uint8_t>((freq >> 8) & 0xFF),
358 static_cast<uint8_t>((freq >> 16) & 0xFF),
359 static_cast<uint8_t>((freq >> 24) & 0xFF)
362 usart.
transmit(&rq[0], 0,
sizeof(rq));
365 usart.
receive(&aw, 0,
sizeof(aw));
379 usart.
transmit(&rq[0], 0,
sizeof(rq));
382 usart.
receive(&aw, 0,
sizeof(aw));
397 usart.
transmit(&rq[0], 0,
sizeof(rq));
400 usart.
receive(&aw, 0,
sizeof(aw));
414 usart.
transmit(&rq[0], 0,
sizeof(rq));
417 usart.
receive(&aw, 0,
sizeof(aw));
424 std::this_thread::sleep_for(std::chrono::milliseconds(ms));
429 std::this_thread::sleep_for(std::chrono::microseconds(us));
435 instance =
new B15F();
443 std::array<char, 128> buffer;
445 std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(),
"r"), pclose);
448 throw std::runtime_error(
"popen() failed!");
450 while (fgets(buffer.data(), buffer.size(), pipe.get()) !=
nullptr)
452 result += buffer.data();
469 std::cerr <<
"NOTICE: B15F::errorhandler not set" << std::endl;
470 std::cout << ex.what() << std::endl;
-static std::string exec(std::string cmd)
-uint8_t getRegister(uint8_t adr)
-void delay_us(uint16_t us)
-uint8_t digitalRead0(void)
-uint8_t pwmSetFrequency(uint32_t freq)
-void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
+ 3 B15F *B15F::instance =
nullptr;
4 errorhandler_t B15F::errorhandler =
nullptr;
14 std::string device =
exec(
"bash -c 'ls /dev/ttyUSB*'");
15 while (device.find(
' ') != std::string::npos || device.find(
'\n') != std::string::npos ||
16 device.find(
'\t') != std::string::npos)
19 if (device.length() == 0)
20 abort(
"Adapter nicht gefunden");
22 std::cout <<
PRE <<
"Verwende Adapter: " << device << std::endl;
25 std::cout <<
PRE <<
"Stelle Verbindung mit Adapter her... " << std::flush;
28 std::cout <<
"OK" << std::endl;
31 std::cout <<
PRE <<
"Teste Verbindung... " << std::flush;
47 abort(
"Verbindungstest fehlgeschlagen. Neueste Version im Einsatz?");
48 std::cout <<
"OK" << std::endl;
53 std::cout <<
PRE <<
"AVR Firmware Version: " << info[0] <<
" um " << info[1] <<
" Uhr (" << info[2] <<
")" 69 abort(
"Verbindung kann nicht repariert werden");
82 for (uint8_t i = 0; i < 16; i++)
84 usart.
transmit(&rq[0], 0,
sizeof(rq));
89 catch (std::exception &ex)
99 uint8_t dummy = rand() % 256;
106 usart.
transmit(&rq[0], 0,
sizeof(rq));
109 usart.
receive(&aw[0], 0,
sizeof(aw));
111 return aw[0] ==
MSG_OK && aw[1] == dummy;
117 uint16_t dummy = rand() % (0xFFFF / 3);
122 static_cast<uint8_t >(dummy & 0xFF),
123 static_cast<uint8_t >(dummy >> 8)
125 usart.
transmit(&rq[0], 0,
sizeof(rq));
128 usart.
receive(reinterpret_cast<uint8_t *>(&aw), 0,
sizeof(aw));
130 return aw == dummy * 3;
136 std::vector<std::string> info;
142 usart.
transmit(&rq[0], 0,
sizeof(rq));
145 usart.
receive(&n, 0,
sizeof(n));
149 usart.
receive(&len, 0,
sizeof(len));
153 usart.
receive(reinterpret_cast<uint8_t *>(&str[0]), 0, len);
155 info.push_back(std::string(str));
159 usart.
receive(&aw, 0,
sizeof(aw));
161 abort(
"Board Info fehlerhalft: code " + std::to_string((
int) aw));
172 usart.
transmit(&rq[0], 0,
sizeof(rq));
175 usart.
receive(&aw, 0,
sizeof(aw));
186 usart.
transmit(&rq[0], 0,
sizeof(rq));
189 usart.
receive(&aw, 0,
sizeof(aw));
200 usart.
transmit(&rq[0], 0,
sizeof(rq));
203 usart.
receive(&aw, 0,
sizeof(aw));
214 usart.
transmit(&rq[0], 0,
sizeof(rq));
217 usart.
receive(&aw, 0,
sizeof(aw));
228 usart.
transmit(&rq[0], 0,
sizeof(rq));
231 usart.
receive(&aw, 0,
sizeof(aw));
242 usart.
transmit(&rq[0], 0,
sizeof(rq));
245 usart.
receive(&aw, 0,
sizeof(aw));
254 static_cast<uint8_t >(value & 0xFF),
255 static_cast<uint8_t >(value >> 8)
257 usart.
transmit(&rq[0], 0,
sizeof(rq));
260 usart.
receive(&aw, 0,
sizeof(aw));
269 static_cast<uint8_t >(value & 0xFF),
270 static_cast<uint8_t >(value >> 8)
272 usart.
transmit(&rq[0], 0,
sizeof(rq));
275 usart.
receive(&aw, 0,
sizeof(aw));
283 abort(
"Bad ADC channel: " + std::to_string(channel));
291 usart.
transmit(&rq[0], 0,
sizeof(rq));
294 usart.
receive(reinterpret_cast<uint8_t *>(&aw), 0,
sizeof(aw));
297 abort(
"Bad ADC data detected (1)");
302 B15F::analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b,
303 uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
306 buffer_a += offset_a;
307 buffer_b += offset_b;
316 static_cast<uint8_t >(start & 0xFF),
317 static_cast<uint8_t >(start >> 8),
318 static_cast<uint8_t >(delta & 0xFF),
319 static_cast<uint8_t >(delta >> 8),
320 static_cast<uint8_t >(count & 0xFF),
321 static_cast<uint8_t >(count >> 8)
324 usart.
transmit(&rq[0], 0,
sizeof(rq));
326 for (uint16_t i = 0; i < count; i++)
330 usart.
receive(reinterpret_cast<uint8_t *>(&buffer_a[i]), 0, 2);
332 if (buffer_a[i] > 1023)
333 abort(
"Bad ADC data detected (2)");
342 usart.
receive(reinterpret_cast<uint8_t *>(&buffer_b[i]), 0, 2);
344 if (buffer_b[i] > 1023)
345 abort(
"Bad ADC data detected (3)");
354 usart.
receive(&aw, 0,
sizeof(aw));
356 abort(
"Sequenz unterbrochen");
366 static_cast<uint8_t>((freq >> 0) & 0xFF),
367 static_cast<uint8_t>((freq >> 8) & 0xFF),
368 static_cast<uint8_t>((freq >> 16) & 0xFF),
369 static_cast<uint8_t>((freq >> 24) & 0xFF)
372 usart.
transmit(&rq[0], 0,
sizeof(rq));
375 usart.
receive(&aw, 0,
sizeof(aw));
389 usart.
transmit(&rq[0], 0,
sizeof(rq));
392 usart.
receive(&aw, 0,
sizeof(aw));
407 usart.
transmit(&rq[0], 0,
sizeof(rq));
410 usart.
receive(&aw, 0,
sizeof(aw));
424 usart.
transmit(&rq[0], 0,
sizeof(rq));
427 usart.
receive(&aw, 0,
sizeof(aw));
434 std::this_thread::sleep_for(std::chrono::milliseconds(ms));
439 std::this_thread::sleep_for(std::chrono::microseconds(us));
445 instance =
new B15F();
453 std::array<char, 128> buffer;
455 std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(),
"r"), pclose);
458 throw std::runtime_error(
"popen() failed!");
460 while (fgets(buffer.data(), buffer.size(), pipe.get()) !=
nullptr)
462 result += buffer.data();
479 std::cerr <<
"NOTICE: B15F::errorhandler not set" << std::endl;
480 std::cout << ex.what() << std::endl;
+static std::string exec(std::string cmd)
+uint8_t getRegister(uint8_t adr)
+void delay_us(uint16_t us)
+uint8_t digitalRead0(void)
+uint8_t pwmSetFrequency(uint32_t freq)
+void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
bool testConnection(void)
-uint8_t readDipSwitch(void)
-void delay_ms(uint16_t ms)
-bool setRegister(uint8_t adr, uint8_t val)
-static B15F & getInstance(void)
+uint8_t readDipSwitch(void)
+void delay_ms(uint16_t ms)
+bool setRegister(uint8_t adr, uint8_t val)
+static B15F & getInstance(void)
-void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
-static void abort(std::string msg)
-void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
+void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
+static void abort(std::string msg)
+void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
void clearInputBuffer(void)
void clearOutputBuffer(void)
-uint16_t analogRead(uint8_t channel)
-bool digitalWrite0(uint8_t)
+uint16_t analogRead(uint8_t channel)
+bool digitalWrite0(uint8_t)
const std::string PRE
B15F stdout prefix.
-void setBaudrate(uint32_t baudrate)
-bool activateSelfTestMode(void)
+void setBaudrate(uint32_t baudrate)
+bool activateSelfTestMode(void)
std::vector< std::string > getBoardInfo(void)
constexpr static uint16_t RECONNECT_TIMEOUT
Time in ms after which a reconnect attempt aborts.
-bool analogWrite1(uint16_t port)
-bool digitalWrite1(uint8_t)
-bool pwmSetValue(uint8_t value)
+bool analogWrite1(uint16_t port)
+bool digitalWrite1(uint8_t)
+bool pwmSetValue(uint8_t value)
constexpr static uint8_t MSG_OK
Value to acknowledge a received command.
void openDevice(std::string device)
-uint8_t digitalRead1(void)
+uint8_t digitalRead1(void)
constexpr static uint32_t BAUDRATE
USART baudrate for communication with the MCU.
-static void setAbortHandler(errorhandler_t func)
-bool analogWrite0(uint16_t port)
+static void setAbortHandler(errorhandler_t func)
+
+bool analogWrite0(uint16_t port)
constexpr static uint8_t RECONNECT_TRIES
Maximum count of reconnect attempts after which the driver stops.
diff --git a/docs/html/b15f_8h_source.html b/docs/html/b15f_8h_source.html
index b307294..0dc1366 100644
--- a/docs/html/b15f_8h_source.html
+++ b/docs/html/b15f_8h_source.html
@@ -71,43 +71,43 @@ $(function() {
5 #include <bits/stdc++.h> 15 #include <sys/ioctl.h> 18 #include "driverexception.h" 19 #include "timeoutexception.h" 21 typedef std::function<void(std::exception&)> errorhandler_t;
89 static std::string
exec(std::string cmd);
95 static void abort(std::string msg);
101 static void abort(std::exception& ex);
195 void analogSequence(uint8_t channel_a, uint16_t* buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t* buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count);
233 const std::string
PRE =
"[B15F] ";
239 constexpr
static uint32_t
BAUDRATE = 57600;
250 static B15F* instance;
251 static errorhandler_t errorhandler;
254 constexpr
static uint8_t RQ_DISC = 0;
255 constexpr
static uint8_t RQ_TEST = 1;
256 constexpr
static uint8_t RQ_INFO = 2;
257 constexpr
static uint8_t RQ_INT = 3;
258 constexpr
static uint8_t RQ_ST = 4;
259 constexpr
static uint8_t RQ_BA0 = 5;
260 constexpr
static uint8_t RQ_BA1 = 6;
261 constexpr
static uint8_t RQ_BE0 = 7;
262 constexpr
static uint8_t RQ_BE1 = 8;
263 constexpr
static uint8_t RQ_DSW = 9;
264 constexpr
static uint8_t RQ_AA0 = 10;
265 constexpr
static uint8_t RQ_AA1 = 11;
266 constexpr
static uint8_t RQ_ADC = 12;
267 constexpr
static uint8_t RQ_ADC_DAC_STROKE = 13;
268 constexpr
static uint8_t RQ_PWM_SET_FREQ = 14;
269 constexpr
static uint8_t RQ_PWM_SET_VALUE = 15;
270 constexpr
static uint8_t RQ_SET_REG = 16;
271 constexpr
static uint8_t RQ_GET_REG = 17;
-static std::string exec(std::string cmd)
+static std::string exec(std::string cmd)
constexpr static uint8_t MSG_FAIL
Value to reject a received command.
-uint8_t getRegister(uint8_t adr)
-void delay_us(uint16_t us)
-uint8_t digitalRead0(void)
-uint8_t pwmSetFrequency(uint32_t freq)
-void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
+uint8_t getRegister(uint8_t adr)
+void delay_us(uint16_t us)
+uint8_t digitalRead0(void)
+uint8_t pwmSetFrequency(uint32_t freq)
+void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
bool testConnection(void)
-uint8_t readDipSwitch(void)
-void delay_ms(uint16_t ms)
-bool setRegister(uint8_t adr, uint8_t val)
-static B15F & getInstance(void)
+uint8_t readDipSwitch(void)
+void delay_ms(uint16_t ms)
+bool setRegister(uint8_t adr, uint8_t val)
+static B15F & getInstance(void)
-static void abort(std::string msg)
-
-uint16_t analogRead(uint8_t channel)
-bool digitalWrite0(uint8_t)
+static void abort(std::string msg)
+
+uint16_t analogRead(uint8_t channel)
+bool digitalWrite0(uint8_t)
const std::string PRE
B15F stdout prefix.
-bool activateSelfTestMode(void)
+bool activateSelfTestMode(void)
std::vector< std::string > getBoardInfo(void)
constexpr static uint16_t RECONNECT_TIMEOUT
Time in ms after which a reconnect attempt aborts.
-bool analogWrite1(uint16_t port)
-bool digitalWrite1(uint8_t)
-bool pwmSetValue(uint8_t value)
+bool analogWrite1(uint16_t port)
+bool digitalWrite1(uint8_t)
+bool pwmSetValue(uint8_t value)
constexpr static uint8_t MSG_OK
Value to acknowledge a received command.
-uint8_t digitalRead1(void)
+uint8_t digitalRead1(void)
constexpr static uint16_t WDT_TIMEOUT
Time in ms after which the watch dog timer resets the MCU.
constexpr static uint32_t BAUDRATE
USART baudrate for communication with the MCU.
-static void setAbortHandler(errorhandler_t func)
-bool analogWrite0(uint16_t port)
+static void setAbortHandler(errorhandler_t func)
+bool analogWrite0(uint16_t port)
constexpr static uint8_t RECONNECT_TRIES
Maximum count of reconnect attempts after which the driver stops.
diff --git a/docs/html/backup_8cpp_source.html b/docs/html/backup_8cpp_source.html
index 80a5be1..a942111 100644
--- a/docs/html/backup_8cpp_source.html
+++ b/docs/html/backup_8cpp_source.html
@@ -72,10 +72,10 @@ $(function() {
2 void USART::writeByte(uint8_t b)
4 int sent = write(file_desc, &b, 1);
7 std::cout <<
"WARNUNG: Fehler beim Senden (" << sent <<
"): writeByte(), wiederhole..." << std::endl;
9 sent = write(file_desc, &b, 1);
16 void USART::writeInt(uint16_t d)
18 int sent = write(file_desc, reinterpret_cast<char *>(&d), 2);
23 void USART::writeU32(uint32_t w)
25 int sent = write(file_desc, reinterpret_cast<char *>(&w), 4);
30 uint8_t USART::readByte(
void)
33 auto start = std::chrono::steady_clock::now();
36 while (elapsed < timeout * 100)
38 int code = read(file_desc, &b, 1);
40 return static_cast<uint8_t>(b);
42 end = std::chrono::steady_clock::now();
43 elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
49 uint16_t USART::readInt(
void)
51 return readByte() | readByte() << 8;
-
+
diff --git a/docs/html/classB15F-members.html b/docs/html/classB15F-members.html
index 490e7b1..82d47d9 100644
--- a/docs/html/classB15F-members.html
+++ b/docs/html/classB15F-members.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/classB15F.html b/docs/html/classB15F.html
index fbb454d..36594a4 100644
--- a/docs/html/classB15F.html
+++ b/docs/html/classB15F.html
@@ -202,7 +202,7 @@ constexpr static uint32_t
- Definition at line 463 of file b15f.cpp.
+Definition at line 473 of file b15f.cpp.
@@ -236,7 +236,7 @@ constexpr static uint32_t |
- Definition at line 457 of file b15f.cpp.
+Definition at line 467 of file b15f.cpp.
@@ -262,7 +262,7 @@ constexpr static uint32_t |
- Definition at line 169 of file b15f.cpp.
+Definition at line 166 of file b15f.cpp.
@@ -294,7 +294,7 @@ constexpr static uint32_t |
- Definition at line 282 of file b15f.cpp.
+Definition at line 279 of file b15f.cpp.
@@ -386,7 +386,7 @@ constexpr static uint32_t |
- Definition at line 305 of file b15f.cpp.
+Definition at line 302 of file b15f.cpp.
@@ -418,7 +418,7 @@ constexpr static uint32_t |
- Definition at line 252 of file b15f.cpp.
+Definition at line 249 of file b15f.cpp.
@@ -450,7 +450,7 @@ constexpr static uint32_t |
- Definition at line 267 of file b15f.cpp.
+Definition at line 264 of file b15f.cpp.
@@ -476,7 +476,7 @@ constexpr static uint32_t |
- Definition at line 422 of file b15f.cpp.
+Definition at line 432 of file b15f.cpp.
@@ -502,7 +502,7 @@ constexpr static uint32_t |
- Definition at line 427 of file b15f.cpp.
+Definition at line 437 of file b15f.cpp.
@@ -529,7 +529,7 @@ constexpr static uint32_t |
- Definition at line 210 of file b15f.cpp.
+Definition at line 207 of file b15f.cpp.
@@ -556,7 +556,7 @@ constexpr static uint32_t |
- Definition at line 224 of file b15f.cpp.
+Definition at line 221 of file b15f.cpp.
@@ -588,7 +588,7 @@ constexpr static uint32_t |
- Definition at line 182 of file b15f.cpp.
+Definition at line 179 of file b15f.cpp.
@@ -620,7 +620,7 @@ constexpr static uint32_t |
- Definition at line 196 of file b15f.cpp.
+Definition at line 193 of file b15f.cpp.
@@ -680,7 +680,7 @@ constexpr static uint32_t |
- Definition at line 441 of file b15f.cpp.
+Definition at line 451 of file b15f.cpp.
@@ -740,7 +740,7 @@ constexpr static uint32_t |
- Definition at line 432 of file b15f.cpp.
+Definition at line 442 of file b15f.cpp.
@@ -772,7 +772,7 @@ constexpr static uint32_t |
- Definition at line 404 of file b15f.cpp.
+Definition at line 414 of file b15f.cpp.
@@ -805,7 +805,7 @@ constexpr static uint32_t |
- Definition at line 349 of file b15f.cpp.
+Definition at line 359 of file b15f.cpp.
@@ -837,7 +837,7 @@ constexpr static uint32_t |
- Definition at line 369 of file b15f.cpp.
+Definition at line 379 of file b15f.cpp.
@@ -864,7 +864,7 @@ constexpr static uint32_t |
- Definition at line 238 of file b15f.cpp.
+Definition at line 235 of file b15f.cpp.
@@ -924,7 +924,7 @@ constexpr static uint32_t |
- Definition at line 475 of file b15f.cpp.
+Definition at line 485 of file b15f.cpp.
@@ -967,7 +967,7 @@ constexpr static uint32_t |
- Definition at line 386 of file b15f.cpp.
+Definition at line 396 of file b15f.cpp.
@@ -1030,7 +1030,7 @@ constexpr static uint32_t |
diff --git a/docs/html/classDot-members.html b/docs/html/classDot-members.html
index 3820c71..cce29ff 100644
--- a/docs/html/classDot-members.html
+++ b/docs/html/classDot-members.html
@@ -76,7 +76,7 @@ $(function() {
diff --git a/docs/html/classDot.html b/docs/html/classDot.html
index 267d5c3..1570169 100644
--- a/docs/html/classDot.html
+++ b/docs/html/classDot.html
@@ -196,7 +196,7 @@ Public Member Functions |
diff --git a/docs/html/classDriverException-members.html b/docs/html/classDriverException-members.html
index abf231a..08b2107 100644
--- a/docs/html/classDriverException-members.html
+++ b/docs/html/classDriverException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classDriverException.html b/docs/html/classDriverException.html
index 4154dda..9db6f34 100644
--- a/docs/html/classDriverException.html
+++ b/docs/html/classDriverException.html
@@ -109,7 +109,7 @@ std::string msg_ | <
diff --git a/docs/html/classPlottyFile-members.html b/docs/html/classPlottyFile-members.html
index 99e9e31..0423709 100644
--- a/docs/html/classPlottyFile-members.html
+++ b/docs/html/classPlottyFile-members.html
@@ -100,7 +100,7 @@ $(function() {
diff --git a/docs/html/classPlottyFile.html b/docs/html/classPlottyFile.html
index 54b5090..24c926b 100644
--- a/docs/html/classPlottyFile.html
+++ b/docs/html/classPlottyFile.html
@@ -811,7 +811,7 @@ Public Member Functions
diff --git a/docs/html/classTimeoutException-members.html b/docs/html/classTimeoutException-members.html
index f3a4a78..36a9dfa 100644
--- a/docs/html/classTimeoutException-members.html
+++ b/docs/html/classTimeoutException-members.html
@@ -69,16 +69,15 @@ $(function() {
This is the complete list of members for TimeoutException, including all inherited members.
diff --git a/docs/html/classTimeoutException.html b/docs/html/classTimeoutException.html
index 15f6df0..4f26688 100644
--- a/docs/html/classTimeoutException.html
+++ b/docs/html/classTimeoutException.html
@@ -83,36 +83,163 @@ $(function() {
|
-
- | TimeoutException (const char *message, int timeout) |
- |
-
- | TimeoutException (const std::string &message, int timeout) |
- |
-
-virtual const char * | what () const throw () |
+ | TimeoutException (const char *message) |
+ |
+ | TimeoutException (const std::string &message) |
+ |
+virtual | ~TimeoutException ()=default |
+ |
+virtual const char * | what () const throw () |
|
|
-std::string | msg |
+std::string msg |
+ | failure description
|
|
-
-int | m_timeout |
- |
Exception for USART related timeouts.
-
Definition at line 10 of file timeoutexception.h.
-
The documentation for this class was generated from the following file:
diff --git a/docs/html/classUSART-members.html b/docs/html/classUSART-members.html
index 8450cc1..f3e4a2f 100644
--- a/docs/html/classUSART-members.html
+++ b/docs/html/classUSART-members.html
@@ -72,20 +72,21 @@ $(function() {
clearInputBuffer(void) | USART | |
clearOutputBuffer(void) | USART | |
closeDevice(void) | USART | |
- flushOutputBuffer(void) | USART | |
- getBaudrate(void) | USART | |
- getTimeout(void) | USART | |
- openDevice(std::string device) | USART | |
- receive(uint8_t *buffer, uint16_t offset, uint8_t len) | USART | |
- setBaudrate(uint32_t baudrate) | USART | |
- setTimeout(uint8_t timeout) | USART | |
- transmit(uint8_t *buffer, uint16_t offset, uint8_t len) | USART | |
- USART()=default | USART | explicit |
- ~USART(void) | USART | virtual |
+ drop(uint8_t len) | USART | |
+ flushOutputBuffer(void) | USART | |
+ getBaudrate(void) | USART | |
+ getTimeout(void) | USART | |
+ openDevice(std::string device) | USART | |
+ receive(uint8_t *buffer, uint16_t offset, uint8_t len) | USART | |
+ setBaudrate(uint32_t baudrate) | USART | |
+ setTimeout(uint8_t timeout) | USART | |
+ transmit(uint8_t *buffer, uint16_t offset, uint8_t len) | USART | |
+ USART()=default | USART | explicit |
+ ~USART(void) | USART | virtual |
diff --git a/docs/html/classUSART.html b/docs/html/classUSART.html
index 60ef1ed..faa30ab 100644
--- a/docs/html/classUSART.html
+++ b/docs/html/classUSART.html
@@ -92,6 +92,8 @@ Public Member Functions
|
void | receive (uint8_t *buffer, uint16_t offset, uint8_t len) |
|
+void | drop (uint8_t len) |
+ |
uint32_t | getBaudrate (void) |
|
uint8_t | getTimeout (void) |
@@ -104,7 +106,7 @@ Public Member Functions
C++ Wrapper class for termios usart library.
-
Definition at line 15 of file usart.h.
+
Definition at line 16 of file usart.h.
◆ USART()
@@ -238,6 +240,38 @@ Public Member Functions
Definition at line 43 of file usart.cpp.
+
+
+
+◆ drop()
+
+
+
+
+
+ void USART::drop |
+ ( |
+ uint8_t |
+ len | ) |
+ |
+
+
+
+
Receives n bytes but discards them
- Parameters
-
+
+ len | count of bytes to receive |
+
+
+
+
- Exceptions
-
+
+
+
+
+
Definition at line 114 of file usart.cpp.
+
@@ -283,7 +317,7 @@ Public Member Functions
Liefert die eingestellte Baudrate Änderungen werden erst nach einem open() wirksam
-
Definition at line 104 of file usart.cpp.
+
Definition at line 121 of file usart.cpp.
@@ -304,7 +338,7 @@ Public Member Functions
Liefert den eingestellten Timeout (in Dezisekunden) Änderungen werden erst nach einem open() wirksam
-
Definition at line 109 of file usart.cpp.
+
Definition at line 126 of file usart.cpp.
@@ -386,7 +420,7 @@ Public Member Functions
-Definition at line 75 of file usart.cpp.
+Definition at line 84 of file usart.cpp.
@@ -407,7 +441,7 @@ Public Member Functions
@@ -428,7 +462,7 @@ Public Member Functions
@@ -478,7 +512,7 @@ Public Member Functions
-Definition at line 95 of file usart.cpp.
+Definition at line 75 of file usart.cpp.
@@ -489,7 +523,7 @@ Public Member Functions
diff --git a/docs/html/classUSARTException-members.html b/docs/html/classUSARTException-members.html
index 6a4a596..a16faa5 100644
--- a/docs/html/classUSARTException-members.html
+++ b/docs/html/classUSARTException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classUSARTException.html b/docs/html/classUSARTException.html
index 2f3808a..fe3c898 100644
--- a/docs/html/classUSARTException.html
+++ b/docs/html/classUSARTException.html
@@ -239,7 +239,7 @@ std::string
diff --git a/docs/html/classView-members.html b/docs/html/classView-members.html
index a3c83d2..1941828 100644
--- a/docs/html/classView-members.html
+++ b/docs/html/classView-members.html
@@ -89,7 +89,7 @@ $(function() {
diff --git a/docs/html/classView.html b/docs/html/classView.html
index 09a1a4e..3e35fc6 100644
--- a/docs/html/classView.html
+++ b/docs/html/classView.html
@@ -157,7 +157,7 @@ constexpr static int | KEY_E
diff --git a/docs/html/classViewInfo-members.html b/docs/html/classViewInfo-members.html
index bbe968c..b756c1e 100644
--- a/docs/html/classViewInfo-members.html
+++ b/docs/html/classViewInfo-members.html
@@ -99,7 +99,7 @@ $(function() {
diff --git a/docs/html/classViewInfo.html b/docs/html/classViewInfo.html
index 6832ee2..0ca0846 100644
--- a/docs/html/classViewInfo.html
+++ b/docs/html/classViewInfo.html
@@ -185,7 +185,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classViewMonitor-members.html b/docs/html/classViewMonitor-members.html
index 516ac80..0b71d2e 100644
--- a/docs/html/classViewMonitor-members.html
+++ b/docs/html/classViewMonitor-members.html
@@ -103,7 +103,7 @@ $(function() {
diff --git a/docs/html/classViewMonitor.html b/docs/html/classViewMonitor.html
index 886320b..c689040 100644
--- a/docs/html/classViewMonitor.html
+++ b/docs/html/classViewMonitor.html
@@ -197,7 +197,7 @@ constexpr static int | KEY_E
diff --git a/docs/html/classViewPromt-members.html b/docs/html/classViewPromt-members.html
index cac3125..3d9dc18 100644
--- a/docs/html/classViewPromt-members.html
+++ b/docs/html/classViewPromt-members.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/classViewPromt.html b/docs/html/classViewPromt.html
index 2133932..4b49506 100644
--- a/docs/html/classViewPromt.html
+++ b/docs/html/classViewPromt.html
@@ -205,7 +205,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classViewSelection-members.html b/docs/html/classViewSelection-members.html
index 6e4c446..6555992 100644
--- a/docs/html/classViewSelection-members.html
+++ b/docs/html/classViewSelection-members.html
@@ -94,7 +94,7 @@ $(function() {
diff --git a/docs/html/classViewSelection.html b/docs/html/classViewSelection.html
index 65f267e..fe63998 100644
--- a/docs/html/classViewSelection.html
+++ b/docs/html/classViewSelection.html
@@ -172,7 +172,7 @@ static std::vector< std::string > |
diff --git a/docs/html/classes.html b/docs/html/classes.html
index 446270b..87c806e 100644
--- a/docs/html/classes.html
+++ b/docs/html/classes.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/cli_8cpp_source.html b/docs/html/cli_8cpp_source.html
index 525431d..b4f80ce 100644
--- a/docs/html/cli_8cpp_source.html
+++ b/docs/html/cli_8cpp_source.html
@@ -66,13 +66,13 @@ $(function() {
cli.cpp
- 17 #include "ui/view_selection.h" 18 #include "ui/view_info.h" 19 #include "ui/view_monitor.h" 20 #include "ui/view_promt.h" 22 volatile int win_changed_cooldown = 0; 23 volatile bool t_refresh_active = false; 25 void signal_handler( int signal) 27 if(signal == SIGWINCH) 29 win_changed_cooldown = 10; 31 if (!t_refresh_active) 33 if(t_refresh.joinable()) 35 t_refresh_active = true; 36 t_refresh = std::thread([]() 39 while(win_changed_cooldown--) 40 std::this_thread::sleep_for(std::chrono::milliseconds(10)); 42 t_refresh_active = false; 45 win_stack.back()->repaint(); 51 else if(signal == SIGINT) 54 std::cout << "SIGINT - Abbruch." << std::endl; 59 void abort_handler(std::exception& ex) 62 view->setTitle( "Fehler"); 63 std::string msg(ex.what()); 64 msg += "\n\nBeende in 5 Sekunden."; 65 view->setText(msg.c_str()); 66 view->setLabelClose( ""); 69 std::this_thread::sleep_for(std::chrono::milliseconds(5000)); 72 std::cerr << std::endl << "*** EXCEPTION ***" << std::endl << ex.what() << std::endl; 80 #ifndef B15F_CLI_DEBUG 81 std::cout << std::endl << "Starte in 3s ..." << std::endl; 93 mousemask(ALL_MOUSE_EVENTS, NULL); 96 signal(SIGWINCH, signal_handler); 97 signal(SIGINT, signal_handler); 100 View::setWinContext(newwin(25, 85, 0, 0)); 108 int exit_code = EXIT_SUCCESS;
+ 17 #include "ui/view_selection.h" 18 #include "ui/view_info.h" 19 #include "ui/view_monitor.h" 20 #include "ui/view_promt.h" 22 volatile int win_changed_cooldown = 0; 23 volatile bool t_refresh_active = false; 25 void signal_handler( int signal) 27 if(signal == SIGWINCH) 29 win_changed_cooldown = 10; 31 if (!t_refresh_active) 33 if(t_refresh.joinable()) 35 t_refresh_active = true; 36 t_refresh = std::thread([]() 39 while(win_changed_cooldown--) 40 std::this_thread::sleep_for(std::chrono::milliseconds(10)); 42 t_refresh_active = false; 45 win_stack.back()->repaint(); 51 else if(signal == SIGINT) 54 std::cout << "SIGINT - Abbruch." << std::endl; 59 void abort_handler(std::exception& ex) 62 view->setTitle( "Fehler"); 63 std::string msg(ex.what()); 64 msg += "\n\nBeende in 5 Sekunden."; 65 view->setText(msg.c_str()); 66 view->setLabelClose( ""); 69 std::this_thread::sleep_for(std::chrono::milliseconds(5000)); 72 std::cerr << std::endl << "*** EXCEPTION ***" << std::endl << ex.what() << std::endl; 80 #ifndef B15F_CLI_DEBUG 81 std::cout << std::endl << "Starte in 3s ..." << std::endl; 93 mousemask(ALL_MOUSE_EVENTS, NULL); 96 signal(SIGWINCH, signal_handler); 97 signal(SIGINT, signal_handler); 100 View::setWinContext(newwin(25, 85, 0, 0)); 108 int exit_code = EXIT_SUCCESS;
-static B15F & getInstance(void)
-static void setAbortHandler(errorhandler_t func)
+static B15F & getInstance(void)
+static void setAbortHandler(errorhandler_t func)
diff --git a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
index 56c8278..2262cc8 100644
--- a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
+++ b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_19f2f1b99f19c12fa55b8d312cf373ed.html b/docs/html/dir_19f2f1b99f19c12fa55b8d312cf373ed.html
index 3bc1fd3..2ea82d4 100644
--- a/docs/html/dir_19f2f1b99f19c12fa55b8d312cf373ed.html
+++ b/docs/html/dir_19f2f1b99f19c12fa55b8d312cf373ed.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_3d3c8ff3ebf9841b39117ac899f41936.html b/docs/html/dir_3d3c8ff3ebf9841b39117ac899f41936.html
index 0cced8a..33d8d0e 100644
--- a/docs/html/dir_3d3c8ff3ebf9841b39117ac899f41936.html
+++ b/docs/html/dir_3d3c8ff3ebf9841b39117ac899f41936.html
@@ -77,7 +77,7 @@ Directories |
diff --git a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
index 8fdcc74..966a7a3 100644
--- a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
+++ b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_90e361ec3542f3dd076ea3ad19547437.html b/docs/html/dir_90e361ec3542f3dd076ea3ad19547437.html
index 44a759b..14a474b 100644
--- a/docs/html/dir_90e361ec3542f3dd076ea3ad19547437.html
+++ b/docs/html/dir_90e361ec3542f3dd076ea3ad19547437.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_95e29a8b8ee7c54052c171a88bb95675.html b/docs/html/dir_95e29a8b8ee7c54052c171a88bb95675.html
index b8dd610..725e942 100644
--- a/docs/html/dir_95e29a8b8ee7c54052c171a88bb95675.html
+++ b/docs/html/dir_95e29a8b8ee7c54052c171a88bb95675.html
@@ -77,7 +77,7 @@ Directories
diff --git a/docs/html/dir_f89abcb304c928c7d889aa5625570de5.html b/docs/html/dir_f89abcb304c928c7d889aa5625570de5.html
index a5c7337..2128dc2 100644
--- a/docs/html/dir_f89abcb304c928c7d889aa5625570de5.html
+++ b/docs/html/dir_f89abcb304c928c7d889aa5625570de5.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dot_8cpp_source.html b/docs/html/dot_8cpp_source.html
index 8843565..1b3c965 100644
--- a/docs/html/dot_8cpp_source.html
+++ b/docs/html/dot_8cpp_source.html
@@ -77,7 +77,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/dot_8h_source.html b/docs/html/dot_8h_source.html
index 495eaf2..c50d107 100644
--- a/docs/html/dot_8h_source.html
+++ b/docs/html/dot_8h_source.html
@@ -78,7 +78,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/driverexception_8h_source.html b/docs/html/driverexception_8h_source.html
index 70cb66c..6b94aa6 100644
--- a/docs/html/driverexception_8h_source.html
+++ b/docs/html/driverexception_8h_source.html
@@ -74,7 +74,7 @@ $(function() {
diff --git a/docs/html/feature__tests_8c_source.html b/docs/html/feature__tests_8c_source.html
index 6782373..01a251f 100644
--- a/docs/html/feature__tests_8c_source.html
+++ b/docs/html/feature__tests_8c_source.html
@@ -73,7 +73,7 @@ $(function() {
2 const char features[] = {
"\n" 4 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 9 "c_function_prototypes\n" 11 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 18 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 25 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 34 int main(
int argc,
char** argv)
37 return features[argc];
diff --git a/docs/html/feature__tests_8cxx_source.html b/docs/html/feature__tests_8cxx_source.html
index 260cda3..e4b0d1a 100644
--- a/docs/html/feature__tests_8cxx_source.html
+++ b/docs/html/feature__tests_8cxx_source.html
@@ -73,7 +73,7 @@ $(function() {
2 const char features[] = {
"\n" 4 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 9 "cxx_aggregate_default_initializers\n" 11 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 16 "cxx_alias_templates\n" 18 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 25 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 32 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 39 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 44 "cxx_attribute_deprecated\n" 46 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 53 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 58 "cxx_binary_literals\n" 60 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 67 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 72 "cxx_contextual_conversions\n" 74 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 81 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 88 #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 93 "cxx_decltype_incomplete_return_types\n" 95 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 100 "cxx_default_function_template_args\n" 102 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 107 "cxx_defaulted_functions\n" 109 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 114 "cxx_defaulted_move_initializers\n" 116 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 121 "cxx_delegating_constructors\n" 123 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 128 "cxx_deleted_functions\n" 130 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 135 "cxx_digit_separators\n" 137 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 142 "cxx_enum_forward_declarations\n" 144 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 149 "cxx_explicit_conversions\n" 151 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 156 "cxx_extended_friend_declarations\n" 158 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 163 "cxx_extern_templates\n" 165 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 172 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 177 "cxx_func_identifier\n" 179 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 184 "cxx_generalized_initializers\n" 186 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 191 "cxx_generic_lambdas\n" 193 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 198 "cxx_inheriting_constructors\n" 200 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 205 "cxx_inline_namespaces\n" 207 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 214 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 219 "cxx_lambda_init_captures\n" 221 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 226 "cxx_local_type_template_args\n" 228 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 233 "cxx_long_long_type\n" 235 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 242 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 247 "cxx_nonstatic_member_init\n" 249 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 256 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 263 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 270 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 275 "cxx_raw_string_literals\n" 277 #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 282 "cxx_reference_qualified_functions\n" 284 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 289 "cxx_relaxed_constexpr\n" 291 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 296 "cxx_return_type_deduction\n" 298 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 303 "cxx_right_angle_brackets\n" 305 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 310 "cxx_rvalue_references\n" 312 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 317 "cxx_sizeof_member\n" 319 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 324 "cxx_static_assert\n" 326 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 333 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 338 "cxx_template_template_parameters\n" 340 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 347 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 352 "cxx_trailing_return_types\n" 354 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 359 "cxx_unicode_literals\n" 361 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 366 "cxx_uniform_initialization\n" 368 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 373 "cxx_unrestricted_unions\n" 375 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 380 "cxx_user_literals\n" 382 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 387 "cxx_variable_templates\n" 389 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 394 "cxx_variadic_macros\n" 396 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 401 "cxx_variadic_templates\n" 405 int main(
int argc,
char** argv) { (void)argv;
return features[argc]; }
diff --git a/docs/html/files.html b/docs/html/files.html
index 2907cef..039cca8 100644
--- a/docs/html/files.html
+++ b/docs/html/files.html
@@ -109,7 +109,7 @@ $(function() {
diff --git a/docs/html/functions.html b/docs/html/functions.html
index 1392eed..30f0fa8 100644
--- a/docs/html/functions.html
+++ b/docs/html/functions.html
@@ -134,6 +134,9 @@ $(function() {
Dot()
: Dot
+drop()
+: USART
+
@@ -217,7 +220,8 @@ $(function() {
- m -
- msg
-: USARTException
+: TimeoutException
+, USARTException
- MSG_FAIL
: B15F
@@ -329,6 +333,9 @@ $(function() {
- testIntConv()
: B15F
+- TimeoutException()
+: TimeoutException
+
- transmit()
: USART
@@ -350,7 +357,8 @@ $(function() {
: B15F
- what()
-: USARTException
+: TimeoutException
+, USARTException
- writeToFile()
: PlottyFile
@@ -359,6 +367,9 @@ $(function() {
- ~ -
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
index 6ba4bdd..4922bf1 100644
--- a/docs/html/functions_func.html
+++ b/docs/html/functions_func.html
@@ -127,6 +127,9 @@ $(function() {
- Dot()
: Dot
+- drop()
+: USART
+
@@ -300,6 +303,9 @@ $(function() {
testIntConv()
: B15F
+TimeoutException()
+: TimeoutException
+
transmit()
: USART
@@ -318,7 +324,8 @@ $(function() {
- w -
- what()
-: USARTException
+: TimeoutException
+, USARTException
- writeToFile()
: PlottyFile
@@ -327,6 +334,9 @@ $(function() {
- ~ -
diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html
index 2d91bb7..906e3fd 100644
--- a/docs/html/functions_vars.html
+++ b/docs/html/functions_vars.html
@@ -67,7 +67,8 @@ $(function() {
: B15F
- msg
-: USARTException
+: TimeoutException
+, USARTException
- MSG_FAIL
: B15F
@@ -91,7 +92,7 @@ $(function() {
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html
index f062b1e..2f4a5cf 100644
--- a/docs/html/hierarchy.html
+++ b/docs/html/hierarchy.html
@@ -86,7 +86,7 @@ $(function() {
diff --git a/docs/html/index.html b/docs/html/index.html
index 3a701c1..04713b4 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -137,7 +137,7 @@ Dabei gehören Punkte mit dem gleichen Index für
curve
(uint8_
diff --git a/docs/html/plottyfile_8cpp_source.html b/docs/html/plottyfile_8cpp_source.html
index 845e297..1c79cc6 100644
--- a/docs/html/plottyfile_8cpp_source.html
+++ b/docs/html/plottyfile_8cpp_source.html
@@ -101,7 +101,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/plottyfile_8h_source.html b/docs/html/plottyfile_8h_source.html
index de56b4f..7770c6e 100644
--- a/docs/html/plottyfile_8h_source.html
+++ b/docs/html/plottyfile_8h_source.html
@@ -102,7 +102,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js
index 8c65e1c..f5a3874 100644
--- a/docs/html/search/all_10.js
+++ b/docs/html/search/all_10.js
@@ -1,5 +1,6 @@
var searchData=
[
+ ['_7etimeoutexception',['~TimeoutException',['../classTimeoutException.html#a2f686b262d2ccffa0090fda9b44ab540',1,'TimeoutException']]],
['_7eusart',['~USART',['../classUSART.html#a0c8eb1a939ca00921e22f6cbcc7bb749',1,'USART']]],
['_7eusartexception',['~USARTException',['../classUSARTException.html#a0e008b3cb4974859e6bc8c8f8eb480be',1,'USARTException']]]
];
diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js
index 08afc23..937a08b 100644
--- a/docs/html/search/all_3.js
+++ b/docs/html/search/all_3.js
@@ -8,5 +8,6 @@ var searchData=
['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]],
['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]],
['dot',['Dot',['../classDot.html',1,'Dot'],['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot::Dot()']]],
- ['driverexception',['DriverException',['../classDriverException.html',1,'']]]
+ ['driverexception',['DriverException',['../classDriverException.html',1,'']]],
+ ['drop',['drop',['../classUSART.html#a038d00c0b3d8c0c13c3e7eae5dad7813',1,'USART']]]
];
diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js
index 7c761ff..66df4a3 100644
--- a/docs/html/search/all_7.js
+++ b/docs/html/search/all_7.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['msg',['msg',['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException']]],
+ ['msg',['msg',['../classTimeoutException.html#aa625fc0fae48a67737a98eafb91c9624',1,'TimeoutException::msg()'],['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException::msg()']]],
['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]],
['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]]
];
diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js
index 9b03a67..37e3d29 100644
--- a/docs/html/search/all_c.js
+++ b/docs/html/search/all_c.js
@@ -2,6 +2,6 @@ var searchData=
[
['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]],
['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]],
- ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'']]],
+ ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'TimeoutException'],['../classTimeoutException.html#aa45912234da11ffc9dd3594a1bbc0218',1,'TimeoutException::TimeoutException(const char *message)'],['../classTimeoutException.html#ad6e5c200fbfd276f48a6c1163e2d2988',1,'TimeoutException::TimeoutException(const std::string &message)']]],
['transmit',['transmit',['../classUSART.html#a41b19dd58f307015b73e154048cd74ca',1,'USART']]]
];
diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js
index 511b30a..38b315c 100644
--- a/docs/html/search/all_f.js
+++ b/docs/html/search/all_f.js
@@ -1,6 +1,6 @@
var searchData=
[
['wdt_5ftimeout',['WDT_TIMEOUT',['../classB15F.html#a158d13bc84aed6430cdede1396384e06',1,'B15F']]],
- ['what',['what',['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException']]],
+ ['what',['what',['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]],
['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]]
];
diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js
index 7c01e06..06f50ef 100644
--- a/docs/html/search/functions_2.js
+++ b/docs/html/search/functions_2.js
@@ -7,5 +7,6 @@ var searchData=
['digitalwrite0',['digitalWrite0',['../classB15F.html#a13797edea1c50278988373acbd110064',1,'B15F']]],
['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]],
['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]],
- ['dot',['Dot',['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot']]]
+ ['dot',['Dot',['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot']]],
+ ['drop',['drop',['../classUSART.html#a038d00c0b3d8c0c13c3e7eae5dad7813',1,'USART']]]
];
diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js
index a8ec38d..c417073 100644
--- a/docs/html/search/functions_a.js
+++ b/docs/html/search/functions_a.js
@@ -2,5 +2,6 @@ var searchData=
[
['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]],
['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]],
+ ['timeoutexception',['TimeoutException',['../classTimeoutException.html#aa45912234da11ffc9dd3594a1bbc0218',1,'TimeoutException::TimeoutException(const char *message)'],['../classTimeoutException.html#ad6e5c200fbfd276f48a6c1163e2d2988',1,'TimeoutException::TimeoutException(const std::string &message)']]],
['transmit',['transmit',['../classUSART.html#a41b19dd58f307015b73e154048cd74ca',1,'USART']]]
];
diff --git a/docs/html/search/functions_c.js b/docs/html/search/functions_c.js
index 1a80ade..b730bff 100644
--- a/docs/html/search/functions_c.js
+++ b/docs/html/search/functions_c.js
@@ -1,5 +1,5 @@
var searchData=
[
- ['what',['what',['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException']]],
+ ['what',['what',['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]],
['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]]
];
diff --git a/docs/html/search/functions_d.js b/docs/html/search/functions_d.js
index 8c65e1c..f5a3874 100644
--- a/docs/html/search/functions_d.js
+++ b/docs/html/search/functions_d.js
@@ -1,5 +1,6 @@
var searchData=
[
+ ['_7etimeoutexception',['~TimeoutException',['../classTimeoutException.html#a2f686b262d2ccffa0090fda9b44ab540',1,'TimeoutException']]],
['_7eusart',['~USART',['../classUSART.html#a0c8eb1a939ca00921e22f6cbcc7bb749',1,'USART']]],
['_7eusartexception',['~USARTException',['../classUSARTException.html#a0e008b3cb4974859e6bc8c8f8eb480be',1,'USARTException']]]
];
diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js
index 7c761ff..66df4a3 100644
--- a/docs/html/search/variables_1.js
+++ b/docs/html/search/variables_1.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['msg',['msg',['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException']]],
+ ['msg',['msg',['../classTimeoutException.html#aa625fc0fae48a67737a98eafb91c9624',1,'TimeoutException::msg()'],['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException::msg()']]],
['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]],
['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]]
];
diff --git a/docs/html/timeoutexception_8h_source.html b/docs/html/timeoutexception_8h_source.html
index 93a32f7..9e21b38 100644
--- a/docs/html/timeoutexception_8h_source.html
+++ b/docs/html/timeoutexception_8h_source.html
@@ -70,11 +70,16 @@ $(function() {
timeoutexception.h
-
1 #ifndef TIMEOUTEXCEPTION_H 2 #define TIMEOUTEXCEPTION_H 17 explicit TimeoutException(
const std::string& message,
int timeout) : msg(message), m_timeout(timeout)
20 msg =
"Timeout reached (" + std::to_string(m_timeout) +
")";
27 virtual const char* what()
const throw ()
37 #endif // TIMEOUTEXCEPTION_H
-
+ 1 #ifndef TIMEOUTEXCEPTION_H 2 #define TIMEOUTEXCEPTION_H 37 virtual const char*
what()
const throw ()
46 #endif // TIMEOUTEXCEPTION_H
+virtual ~TimeoutException()=default
+std::string msg
failure description
+virtual const char * what() const
+TimeoutException(const char *message)
+
+TimeoutException(const std::string &message)
diff --git a/docs/html/ui_8cpp_source.html b/docs/html/ui_8cpp_source.html
index ce9aac2..2b38b03 100644
--- a/docs/html/ui_8cpp_source.html
+++ b/docs/html/ui_8cpp_source.html
@@ -73,22 +73,22 @@ $(function() {
2 #include "../drv/b15f.h" 4 std::vector<View*> win_stack;
10 view->setTitle(
"B15F - Command Line Interface");
11 view->addChoice(
"[ Monitor - Eingaben beobachten ]", &show_monitor);
12 view->addChoice(
"[ Digitale Ausgabe BE0 ]", &show_digital_output0);
13 view->addChoice(
"[ Digitale Ausgabe BE1 ]", &show_digital_output1);
14 view->addChoice(
"[ Analoge Ausgabe AA0 ]", &show_analog_output0);
15 view->addChoice(
"[ Analoge Ausgabe AA1 ]", &show_analog_output1);
16 view->addChoice(
"[ Selbsttest des B15 ]", &show_selftest_info);
17 view->addChoice(
"[ Informationen ]", &show_info);
18 view->addChoice(
"",
nullptr);
19 view->addChoice(
"[ Beenden ]", &finish);
22 win_stack.push_back(view);
32 key = wgetch(View::getWinContext());
33 win_stack.back()->repaint();
34 nextCall = win_stack.back()->keypress(key);
42 while(win_stack.size());
49 delete win_stack.back();
53 win_stack.back()->repaint();
64 if(t_refresh.joinable())
74 view->setTitle(
"Info");
75 view->setText(
"Informationen zu Board 15 Famulus Edition\nEs war einmal...");
76 view->setLabelClose(
"[ Zurueck ]");
79 win_stack.push_back(view);
83 void show_monitor(
int)
86 view->setTitle(
"Monitor");
87 view->setText(
"\nErfasse Messwerte...");
88 view->setLabelClose(
"[ Zurueck ]");
91 win_stack.push_back(view);
95 void show_invalid_port_input(
int)
98 view->setTitle(
"Falsche Eingabe");
99 view->setText(
"Bitte geben Sie einen Wert aus dem Intervall [0, FF] an.");
100 view->setLabelClose(
"[ Schliessen ]");
103 win_stack.push_back(view);
107 void show_invalid_dac_input(
int)
110 view->setTitle(
"Falsche Eingabe");
111 view->setText(
"Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an.");
112 view->setLabelClose(
"[ Schliessen ]");
115 win_stack.push_back(view);
119 void write_digital_output0(
int)
123 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
125 throw std::invalid_argument(
"bad value");
126 uint8_t port = static_cast<uint8_t>(d);
132 catch(std::invalid_argument& ex)
134 show_invalid_port_input(0);
138 void write_digital_output1(
int)
142 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
144 throw std::invalid_argument(
"bad value");
145 uint8_t port = static_cast<uint8_t>(d);
151 catch(std::invalid_argument& ex)
153 show_invalid_port_input(0);
157 void write_analog_output0(
int)
161 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
163 throw std::invalid_argument(
"bad value");
169 catch(std::invalid_argument& ex)
171 show_invalid_dac_input(0);
175 void write_analog_output1(
int)
179 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
181 throw std::invalid_argument(
"bad value");
187 catch(std::invalid_argument& ex)
189 show_invalid_dac_input(0);
193 void show_digital_output0(
int)
196 view->setTitle(
"Digitale Ausgabe BE0");
197 view->setMessage(
"\nAusgabe Port-Wert (hex): 0x");
198 view->setCancel(
"[ Zurueck ]",
true);
199 view->setConfirm(
"[ OK ]", &write_digital_output0);
202 win_stack.push_back(view);
206 void show_digital_output1(
int)
209 view->setTitle(
"Digitale Ausgabe BE1");
210 view->setMessage(
"\nAusgabe Port-Wert (hex): 0x");
211 view->setCancel(
"[ Zurueck ]",
true);
212 view->setConfirm(
"[ OK ]", &write_digital_output1);
215 win_stack.push_back(view);
219 void show_analog_output0(
int)
222 view->setTitle(
"Analoge Ausgabe AA0");
223 view->setMessage(
"\nAusgabe 10-Bit-Wert (0...1023): ");
224 view->setCancel(
"[ Zurueck ]",
true);
225 view->setConfirm(
"[ OK ]", &write_analog_output0);
228 win_stack.push_back(view);
232 void show_analog_output1(
int)
235 view->setTitle(
"Analoge Ausgabe AA1");
236 view->setMessage(
"\nAusgabe 10-Bit-Wert (0...1023): ");
237 view->setCancel(
"[ Zurueck ]",
true);
238 view->setConfirm(
"[ OK ]", &write_analog_output1);
241 win_stack.push_back(view);
245 void start_selftest(
int)
251 view->setTitle(
"Selbsttest aktiv");
252 view->setText(
"Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1");
253 view->setLabelClose(
"[ Selbsttest Beenden ]");
254 view->setCall(&stop_selftest);
257 win_stack.push_back(view);
261 void stop_selftest(
int)
271 void show_selftest_info(
int)
274 view->setTitle(
"Selbsttest");
275 view->setText(
"Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und bestaetigen\nmit Enter.");
276 view->setLabelClose(
"[ Weiter ]");
277 view->setCall(&start_selftest);
280 win_stack.push_back(view);
-void delay_ms(uint16_t ms)
-static B15F & getInstance(void)
+void delay_ms(uint16_t ms)
+static B15F & getInstance(void)
-bool digitalWrite0(uint8_t)
-bool activateSelfTestMode(void)
+bool digitalWrite0(uint8_t)
+bool activateSelfTestMode(void)
-bool analogWrite1(uint16_t port)
+bool analogWrite1(uint16_t port)
-bool digitalWrite1(uint8_t)
+bool digitalWrite1(uint8_t)
constexpr static uint16_t WDT_TIMEOUT
Time in ms after which the watch dog timer resets the MCU.
-bool analogWrite0(uint16_t port)
+bool analogWrite0(uint16_t port)
diff --git a/docs/html/ui_8h_source.html b/docs/html/ui_8h_source.html
index 5f300c9..6abbc9e 100644
--- a/docs/html/ui_8h_source.html
+++ b/docs/html/ui_8h_source.html
@@ -73,7 +73,7 @@ $(function() {
5 #include "view_selection.h" 7 #include "view_monitor.h" 8 #include "view_promt.h" 17 void show_monitor(
int);
18 void show_invalid_port_input(
int);
19 void show_invalid_dac_input(
int);
20 void write_digital_output0(
int);
21 void write_digital_output1(
int);
22 void write_analog_output0(
int);
23 void write_analog_output1(
int);
24 void show_digital_output0(
int);
25 void show_digital_output1(
int);
26 void show_analog_output0(
int);
27 void show_analog_output1(
int);
30 void show_selftest_info(
int);
31 void start_selftest(
int);
32 void stop_selftest(
int);
35 extern std::vector<View*> win_stack;
36 extern std::thread t_refresh;
diff --git a/docs/html/usart_8cpp_source.html b/docs/html/usart_8cpp_source.html
index e8912fd..5df9380 100644
--- a/docs/html/usart_8cpp_source.html
+++ b/docs/html/usart_8cpp_source.html
@@ -70,23 +70,25 @@ $(function() {
usart.cpp
-
12 file_desc = open(device.c_str(), O_RDWR | O_NOCTTY);
16 struct termios options;
17 int code = tcgetattr(file_desc, &options);
21 options.c_cflag = CS8 | CLOCAL | CREAD;
22 options.c_iflag = IGNPAR;
25 options.c_cc[VMIN] = 0;
26 options.c_cc[VTIME] = timeout;
27 code = cfsetspeed(&options, baudrate);
31 code = tcsetattr(file_desc, TCSANOW, &options);
35 code = fcntl(file_desc, F_SETFL, 0);
37 throw USARTException(
"Fehler beim Aktivieren des blockierenden Modus'");
47 int code = close(file_desc);
56 int code = tcflush(file_desc, TCIFLUSH);
63 int code = tcflush(file_desc, TCOFLUSH);
70 int code = tcdrain(file_desc);
77 int bytes_avail, code;
80 code = ioctl(file_desc, FIONREAD, &bytes_avail);
83 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
84 ", " + strerror(code) +
" (code " + std::to_string(code) +
")");
86 while(bytes_avail < len);
88 code = read(file_desc, buffer + offset, len);
91 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
92 ", " + strerror(code) +
" (code " + std::to_string(code) +
" / " + std::to_string(len) +
")");
97 int code = write(file_desc, buffer + offset, len);
100 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
101 ", " + strerror(code) +
" (code " + std::to_string(code) +
" / " + std::to_string(len) +
")");
116 this->baudrate = baudrate;
121 this->timeout = timeout;
-uint32_t getBaudrate(void)
+ 12 file_desc = open(device.c_str(), O_RDWR | O_NOCTTY);
16 struct termios options;
17 int code = tcgetattr(file_desc, &options);
21 options.c_cflag = CS8 | CLOCAL | CREAD;
22 options.c_iflag = IGNPAR;
25 options.c_cc[VMIN] = 0;
26 options.c_cc[VTIME] = timeout;
27 code = cfsetspeed(&options, baudrate);
31 code = tcsetattr(file_desc, TCSANOW, &options);
35 code = fcntl(file_desc, F_SETFL, 0);
37 throw USARTException(
"Fehler beim Aktivieren des blockierenden Modus'");
47 int code = close(file_desc);
56 int code = tcflush(file_desc, TCIFLUSH);
63 int code = tcflush(file_desc, TCOFLUSH);
70 int code = tcdrain(file_desc);
77 int code = write(file_desc, buffer + offset, len);
80 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
81 ", " + strerror(code) +
" (code " + std::to_string(code) +
" / " + std::to_string(len) +
")");
86 int bytes_avail, code;
87 auto start = std::chrono::steady_clock::now();
88 auto end = std::chrono::steady_clock::now();
91 code = ioctl(file_desc, FIONREAD, &bytes_avail);
94 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
95 ", " + strerror(code) +
" (code " + std::to_string(code) +
")");
97 end = std::chrono::steady_clock::now();
99 std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() / 100;
100 if (elapsed >= timeout)
102 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
103 ", " + std::to_string(elapsed) +
" / " + std::to_string(timeout) +
" ds");
105 while (bytes_avail < len);
107 code = read(file_desc, buffer + offset, len);
110 std::string(__FUNCTION__) +
" failed: " + std::string(__FILE__) +
"#" + std::to_string(__LINE__) +
111 ", " + strerror(code) +
" (code " + std::to_string(code) +
" / " + std::to_string(len) +
")");
133 this->baudrate = baudrate;
138 this->timeout = timeout;
+uint32_t getBaudrate(void)
-void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
-void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
+void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
+void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
void clearInputBuffer(void)
-
+
void clearOutputBuffer(void)
-void setBaudrate(uint32_t baudrate)
+void setBaudrate(uint32_t baudrate)
void openDevice(std::string device)
-void setTimeout(uint8_t timeout)
+
+void setTimeout(uint8_t timeout)
void flushOutputBuffer(void)
+
diff --git a/docs/html/usart_8h_source.html b/docs/html/usart_8h_source.html
index fdf1e0e..ea270ec 100644
--- a/docs/html/usart_8h_source.html
+++ b/docs/html/usart_8h_source.html
@@ -70,24 +70,25 @@ $(function() {
usart.h
-
11 #include "usartexception.h" 26 explicit USART() =
default;
79 void transmit(uint8_t *buffer, uint16_t offset, uint8_t len);
88 void receive(uint8_t *buffer, uint16_t offset, uint8_t len);
127 uint32_t baudrate = 9600;
128 uint8_t timeout = 100;
-uint32_t getBaudrate(void)
+ 11 #include "usartexception.h" 12 #include "timeoutexception.h" 27 explicit USART() =
default;
80 void transmit(uint8_t *buffer, uint16_t offset, uint8_t len);
89 void receive(uint8_t *buffer, uint16_t offset, uint8_t len);
96 void drop(uint8_t len);
135 uint32_t baudrate = 9600;
136 uint8_t timeout = 10;
+uint32_t getBaudrate(void)
-void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
-void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
+void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
+void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
void clearInputBuffer(void)
-
-
+
+
void clearOutputBuffer(void)
-void setBaudrate(uint32_t baudrate)
+void setBaudrate(uint32_t baudrate)
void openDevice(std::string device)
-void setTimeout(uint8_t timeout)
+
+void setTimeout(uint8_t timeout)
void flushOutputBuffer(void)
diff --git a/docs/html/usartexception_8h_source.html b/docs/html/usartexception_8h_source.html
index 4463697..d01d386 100644
--- a/docs/html/usartexception_8h_source.html
+++ b/docs/html/usartexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
virtual ~USARTException()=default
diff --git a/docs/html/view_8cpp_source.html b/docs/html/view_8cpp_source.html
index d1568a6..410eb35 100644
--- a/docs/html/view_8cpp_source.html
+++ b/docs/html/view_8cpp_source.html
@@ -71,10 +71,10 @@ $(function() {
3 WINDOW* View::win =
nullptr;
9 B15F::abort(
"View::win not initialized, missing context");
11 getmaxyx(win, height, width);
19 void View::setWinContext(WINDOW* win)
24 WINDOW* View::getWinContext()
30 std::vector<std::string> View::str_split(
const std::string& str,
const std::string delim)
32 std::vector<std::string> tokens;
33 size_t prev = 0, pos = 0;
36 pos = str.find(delim, prev);
37 if (pos == std::string::npos) pos = str.length();
38 std::string token = str.substr(prev, pos-prev);
39 if (!token.empty()) tokens.push_back(token);
40 prev = pos + delim.length();
42 while (pos < str.length() && prev < str.length());
47 void View::setTitle(std::string title)
56 if (ioctl(0, TIOCGWINSZ, (
char *) &size) < 0)
57 throw std::runtime_error(
"TIOCGWINSZ error");
60 start_x = floor((size.ws_col - width) / 2.);
61 start_y = floor((size.ws_row - height) / 2.);
64 mvwin(win, start_y, start_x);
70 int offset_x = (width - title.length()) / 2;
71 mvwprintw(win, 1, offset_x,
"%s", title.c_str());
-static void abort(std::string msg)
+static void abort(std::string msg)
diff --git a/docs/html/view_8h_source.html b/docs/html/view_8h_source.html
index 0943601..d460954 100644
--- a/docs/html/view_8h_source.html
+++ b/docs/html/view_8h_source.html
@@ -74,7 +74,7 @@ $(function() {
diff --git a/docs/html/view__info_8cpp_source.html b/docs/html/view__info_8cpp_source.html
index c4e9cb5..9c529cb 100644
--- a/docs/html/view__info_8cpp_source.html
+++ b/docs/html/view__info_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
5 calls.push_back(
nullptr);
8 void ViewInfo::setText(std::string text)
13 void ViewInfo::setLabelClose(std::string label)
15 this->label_close = label;
18 void ViewInfo::setCall(call_t call)
26 for(std::string line : str_split(text,
"\n"))
27 mvwprintw(win, text_offset_y + li++, text_offset_x,
"%s", line.c_str());
29 close_offset_x = (width - label_close.length()) / 2;
30 close_offset_y = height - 2;
32 wattron(win, A_REVERSE);
33 mvwprintw(win, close_offset_y, close_offset_x,
"%s", label_close.c_str());
34 wattroff(win, A_REVERSE);
37 call_t ViewInfo::keypress(
int& key)
46 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
48 size_t column = start_x + close_offset_x;
49 size_t row = start_y + close_offset_y;
50 size_t mouse_x =
event.x, mouse_y =
event.y;
51 if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
diff --git a/docs/html/view__info_8h_source.html b/docs/html/view__info_8h_source.html
index d72a82a..a7fc792 100644
--- a/docs/html/view__info_8h_source.html
+++ b/docs/html/view__info_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__monitor_8cpp_source.html b/docs/html/view__monitor_8cpp_source.html
index cbb64e7..2bff2ac 100644
--- a/docs/html/view__monitor_8cpp_source.html
+++ b/docs/html/view__monitor_8cpp_source.html
@@ -72,19 +72,19 @@ $(function() {
1 #include "view_monitor.h" 3 ViewMonitor::ViewMonitor() : t_worker(&
ViewMonitor::worker, this)
7 call_t ViewMonitor::keypress(
int& key)
17 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
19 size_t column = start_x + close_offset_x;
20 size_t row = start_y + close_offset_y;
21 size_t mouse_x =
event.x, mouse_y =
event.y;
22 if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
44 std::string ViewMonitor::fancyDigitalString(uint8_t& b)
46 std::stringstream str;
47 str << std::bitset<8>(b).to_string();
49 str <<
"0x" << std::setfill (
'0') << std::setw(2) << std::hex << (int) b << std::dec;
53 std::string ViewMonitor::fancyAnalogString(uint16_t& v)
55 std::stringstream str;
56 double volt = round(v * 100.0 * 5.0 / 1023.0) / 100.0;
58 str << std::setfill (
'0') << std::setw(4) << (int) v <<
" " << std::fixed << std::setprecision(2) << volt <<
" V ";
61 uint8_t p = round(v * 40.0 / 1023.0);
62 for(uint8_t i = 0; i < p; i++)
64 for(uint8_t i = 0; i < 40 - p; i++)
66 str <<
"]" << std::endl;
71 void ViewMonitor::worker()
78 std::this_thread::sleep_for(std::chrono::milliseconds(100));
84 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
88 std::stringstream str;
91 for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
98 str <<
"Digitale Enigaenge:" << std::endl;
99 str <<
"Binaere Eingabe 0: " << fancyDigitalString(be0) << std::endl;
100 str <<
"Binaere Eingabe 1: " << fancyDigitalString(be1) << std::endl;
101 str <<
"Dip Schalter (S7): " << fancyDigitalString(dsw) << std::endl;
104 for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
111 str <<
"Analoge Eingaenge:" << std::endl;
112 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
114 str <<
"Kanal " << std::to_string((
int) i) <<
": ";
115 str << fancyAnalogString(adc[i]) << std::endl;
123 std::cout <<
"DriverException: " << ex.what() << std::endl;
-uint8_t digitalRead0(void)
-uint8_t readDipSwitch(void)
-void delay_ms(uint16_t ms)
-static B15F & getInstance(void)
+uint8_t digitalRead0(void)
+uint8_t readDipSwitch(void)
+void delay_ms(uint16_t ms)
+static B15F & getInstance(void)
-static void abort(std::string msg)
-uint16_t analogRead(uint8_t channel)
-uint8_t digitalRead1(void)
+static void abort(std::string msg)
+uint16_t analogRead(uint8_t channel)
+uint8_t digitalRead1(void)
diff --git a/docs/html/view__monitor_8h_source.html b/docs/html/view__monitor_8h_source.html
index 505b418..ce253ad 100644
--- a/docs/html/view__monitor_8h_source.html
+++ b/docs/html/view__monitor_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__promt_8cpp_source.html b/docs/html/view__promt_8cpp_source.html
index 9d55b9c..8d05c1e 100644
--- a/docs/html/view__promt_8cpp_source.html
+++ b/docs/html/view__promt_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
1 #include "view_promt.h" 7 int li = text_offset_y;
9 for(std::string line : str_split(message + input,
"\n"))
11 mvwprintw(win, ++li, text_offset_x,
"%s", line.c_str());
12 ci = line.length() + text_offset_x;
15 button_offset_x = (width - label_cancel.length() - sep.length() - label_confirm.length()) / 2;
16 button_offset_y = height - text_offset_y;
20 wattron(win, A_REVERSE);
21 mvwprintw(win, button_offset_y, button_offset_x,
"%s", label_cancel.c_str());
22 wattroff(win, A_REVERSE);
23 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(),
"%s", sep.c_str());
24 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(),
"%s", label_confirm.c_str());
28 mvwprintw(win, button_offset_y, button_offset_x,
"%s", label_cancel.c_str());
29 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(),
"%s", sep.c_str());
30 wattron(win, A_REVERSE);
31 mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(),
"%s", label_confirm.c_str());
32 wattroff(win, A_REVERSE);
37 void ViewPromt::setMessage(std::string message)
39 this->message = message;
42 void ViewPromt::setConfirm(std::string name, std::function<
void(
int)> call)
48 void ViewPromt::setCancel(std::string name,
bool cancelable)
51 this->cancelable = cancelable;
54 std::string ViewPromt::getInput()
59 std::function<void(
int)> ViewPromt::keypress(
int& key)
61 std::function<void(
int)> ret =
nullptr;
71 selection = (selection + 1 ) % 2;
78 if(getmouse(&event) == OK &&
event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
80 size_t column_start = start_x + button_offset_x;
81 size_t row_start = start_y + button_offset_y;
82 size_t mouse_x =
event.x, mouse_y =
event.y;
83 if(mouse_y == row_start)
85 if(cancelable && mouse_x >= column_start && mouse_x < column_start + label_cancel.length())
87 if(selection == 0 || event.bstate & BUTTON1_DOUBLE_CLICKED)
91 if(mouse_x >= column_start + label_cancel.length() + sep.length() && mouse_x < column_start + label_cancel.length() + sep.length() + label_confirm.length())
93 if(selection == 1 || event.bstate & BUTTON1_DOUBLE_CLICKED)
115 if(key >=
' ' && key <=
'~')
diff --git a/docs/html/view__promt_8h_source.html b/docs/html/view__promt_8h_source.html
index 52166f8..eba626e 100644
--- a/docs/html/view__promt_8h_source.html
+++ b/docs/html/view__promt_8h_source.html
@@ -75,7 +75,7 @@ $(function() {
diff --git a/docs/html/view__selection_8cpp_source.html b/docs/html/view__selection_8cpp_source.html
index 4ee7ee7..12158d9 100644
--- a/docs/html/view__selection_8cpp_source.html
+++ b/docs/html/view__selection_8cpp_source.html
@@ -73,7 +73,7 @@ $(function() {
1 #include "view_selection.h" 3 void ViewSelection::draw()
6 for(
size_t i = 0; i < choices.size(); i++)
9 wattron(win, A_REVERSE);
10 mvwprintw(win, i + choice_offset_y, choice_offset_x,
"%s", choices[i].c_str());
12 wattroff(win, A_REVERSE);
16 void ViewSelection::addChoice(std::string name, call_t call)
18 choices.push_back(name);
19 calls.push_back(call);
22 call_t ViewSelection::keypress(
int& key)
29 selection = (selection - 1 + choices.size()) % choices.size();
30 while(!choices[selection].length() && choices.size());
36 selection = (selection + 1) % choices.size();
37 while(!choices[selection].length() && choices.size());
45 if(getmouse(&event) == OK &&
event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
47 size_t column_start = start_x + choice_offset_x;
48 size_t row_start = start_y + choice_offset_y;
49 size_t mouse_x =
event.x, mouse_y =
event.y;
50 for(
size_t i = 0; i < choices.size(); i++)
51 if(choices[i].length() && mouse_y == row_start + i && mouse_x >= column_start && mouse_x < column_start + choices[i].length())
53 if(selection == i || event.bstate & BUTTON1_DOUBLE_CLICKED)
66 if(selection == choices.size() - 1)
69 ret = calls[selection];
diff --git a/docs/html/view__selection_8h_source.html b/docs/html/view__selection_8h_source.html
index 80ca8c5..f5d97af 100644
--- a/docs/html/view__selection_8h_source.html
+++ b/docs/html/view__selection_8h_source.html
@@ -75,7 +75,7 @@ $(function() {