DEV: cli_device(renamed after ATmodem) added

This commit is contained in:
2021-09-29 15:56:54 +03:00
parent f7c904e9c2
commit cd23eb4963
5 changed files with 666 additions and 421 deletions
+7 -7
View File
@@ -225,7 +225,7 @@ class sequencer {
* \param stream2 What we search [The record's token]
* \return True on success, false otherwise
*/
static constexpr auto equals = [](const string_view stream1, const string_view stream2) -> bool {
static constexpr auto equals = [](const string_view stream1, const string_view stream2) noexcept -> bool {
return (stream1 == stream2);
};
@@ -236,7 +236,7 @@ class sequencer {
* \param prefix What we search [The record's token]
* \return True on success, false otherwise
*/
static constexpr auto starts_with = [](const string_view stream, const string_view prefix) -> bool {
static constexpr auto starts_with = [](const string_view stream, const string_view prefix) noexcept -> bool {
return (stream.rfind(prefix, 0) != string_view::npos);
};
@@ -265,18 +265,18 @@ class sequencer {
* \param needle What we search [The record's token]
* \return True on success, false otherwise
*/
static constexpr auto contains = [](const string_view haystack, const string_view needle) -> bool {
static constexpr auto contains = [](const string_view haystack, const string_view needle) noexcept -> bool {
return (haystack.find(needle) != string_view::npos);
};
//! Always false predicate
static constexpr auto always_true = [](const string_view s1, const string_view s2) -> bool {
static constexpr auto always_true = [](const string_view s1, const string_view s2) noexcept -> bool {
(void)s1; (void)s2;
return true;
};
//! Always false predicate
static constexpr auto always_false = [](const string_view s1, const string_view s2) -> bool {
static constexpr auto always_false = [](const string_view s1, const string_view s2) noexcept -> bool {
(void)s1; (void)s2;
return false;
};
@@ -302,7 +302,7 @@ class sequencer {
size_t get_ (Data_t* data) { return impl().get (data); }
size_t contents_ (Data_t* data) { return impl().contents(data); }
size_t put_ (const Data_t* data, size_t n) { return impl().put (data, n); }
clock_t clock_ () { return impl().clock(); }
clock_t clock_ () noexcept { return impl().clock(); }
//! @}
//! \name Private functionality
@@ -364,7 +364,7 @@ class sequencer {
public:
//! \return The buffer size of the sequencer
constexpr size_t size() const { return N; }
constexpr size_t size() const noexcept { return N; }
/*!
* \brief