PIDUINO
Loading...
Searching...
No Matches
terminalnotifier.h
1/* Copyright © 2018-2025 Pascal JEAN, All rights reserved.
2 * This file is part of the Piduino Library.
3 *
4 * The Piduino Library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * The Piduino Library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with the Piduino Library; if not, see <http://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <string>
20#include <piduino/global.h>
21#include <piduino/filedevice.h>
22
28namespace Piduino {
29
35 public:
38
39 bool start ();
40 void terminate();
41 bool isRunning() const;
42
43 size_t available() const;
44
45 size_t read (char * buf, size_t len, long msTimeout = 0);
46 size_t read (std::string & str, long msTimeout = 0);
47 bool read (char & c, long msTimeout = 0);
48
49 size_t peek (char * buf, size_t len, long msTimeout = 0);
50 size_t peek (std::string & str, long msTimeout = 0);
51 bool peek (char & c, long msTimeout = 0);
52
53 protected:
54 class Private;
56 std::shared_ptr<Private> d_ptr;
57
58 private:
60 };
61
62}
67/* ========================================================================== */
Provides an interface for reading from and writing to files.
Definition filedevice.h:45
bool peek(char &c, long msTimeout=0)
TerminalNotifier(FileDevice *io)
TerminalNotifier(Private &dd)
size_t peek(char *buf, size_t len, long msTimeout=0)
size_t peek(std::string &str, long msTimeout=0)
size_t read(char *buf, size_t len, long msTimeout=0)
size_t read(std::string &str, long msTimeout=0)
size_t available() const
bool read(char &c, long msTimeout=0)
std::shared_ptr< Private > d_ptr
Internal implementation class for GpioDevice.
#define PIMP_DECLARE_PRIVATE(Class)
PIMP_DECLARE_PRIVATE.
Definition global.h:82
Global namespace for Piduino.
Definition board.h:28