MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / baudRateList

Method baudRateList

app/src/IO/Drivers/UART.cpp:355–383  ·  view source on GitHub ↗

* @brief Returns a list with the available baud rate configurations. */

Source from the content-addressed store, hash-verified

353 * @brief Returns a list with the available baud rate configurations.
354 */
355QStringList 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.

Callers 2

getBaudRateListMethod · 0.45
getBaudRateListMethod · 0.45

Calls 4

sortFunction · 0.85
beginMethod · 0.80
sizeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected