* @brief Returns a list with the available baud rate configurations. */
| 353 | * @brief Returns a list with the available baud rate configurations. |
| 354 | */ |
| 355 | QStringList IO::Drivers::UART::baudRateList() const |
| 356 | { |
| 357 | QSet<qint32> baudSet = {110, |
| 358 | 150, |
| 359 | 300, |
| 360 | 1200, |
| 361 | 2400, |
| 362 | 4800, |
| 363 | 9600, |
| 364 | 19200, |
| 365 | 38400, |
| 366 | 57600, |
| 367 | 115200, |
| 368 | 230400, |
| 369 | 256000, |
| 370 | 460800, |
| 371 | 576000, |
| 372 | 921600}; |
| 373 | |
| 374 | QList<qint32> sortedList = baudSet.values(); |
| 375 | std::sort(sortedList.begin(), sortedList.end()); |
| 376 | |
| 377 | QStringList result; |
| 378 | result.reserve(sortedList.size()); |
| 379 | for (qint32 rate : std::as_const(sortedList)) |
| 380 | result.append(QString::number(rate)); |
| 381 | |
| 382 | return result; |
| 383 | } |
| 384 | |
| 385 | /** |
| 386 | * @brief Returns a list with the available parity configurations. |
no test coverage detected