mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Run new astyle formatter against libs Bridge, SpacebrewYun and Temboo
This commit is contained in:
@ -22,48 +22,50 @@
|
||||
#include <Bridge.h>
|
||||
|
||||
class Process : public Stream {
|
||||
public:
|
||||
// Constructor with a user provided BridgeClass instance
|
||||
Process(BridgeClass &_b = Bridge) :
|
||||
bridge(_b), started(false), buffered(0), readPos(0) { }
|
||||
~Process();
|
||||
|
||||
void begin(const String &command);
|
||||
void addParameter(const String ¶m);
|
||||
unsigned int run();
|
||||
void runAsynchronously();
|
||||
boolean running();
|
||||
unsigned int exitValue();
|
||||
void close();
|
||||
public:
|
||||
// Constructor with a user provided BridgeClass instance
|
||||
Process(BridgeClass &_b = Bridge) :
|
||||
bridge(_b), started(false), buffered(0), readPos(0) { }
|
||||
~Process();
|
||||
|
||||
unsigned int runShellCommand(const String &command);
|
||||
void runShellCommandAsynchronously(const String &command);
|
||||
void begin(const String &command);
|
||||
void addParameter(const String ¶m);
|
||||
unsigned int run();
|
||||
void runAsynchronously();
|
||||
boolean running();
|
||||
unsigned int exitValue();
|
||||
void close();
|
||||
|
||||
operator bool () { return started; }
|
||||
unsigned int runShellCommand(const String &command);
|
||||
void runShellCommandAsynchronously(const String &command);
|
||||
|
||||
// Stream methods
|
||||
// (read from process stdout)
|
||||
int available();
|
||||
int read();
|
||||
int peek();
|
||||
// (write to process stdin)
|
||||
size_t write(uint8_t);
|
||||
void flush();
|
||||
// TODO: add optimized function for block write
|
||||
|
||||
private:
|
||||
BridgeClass &bridge;
|
||||
unsigned int handle;
|
||||
String *cmdline;
|
||||
boolean started;
|
||||
operator bool () {
|
||||
return started;
|
||||
}
|
||||
|
||||
// Stream methods
|
||||
// (read from process stdout)
|
||||
int available();
|
||||
int read();
|
||||
int peek();
|
||||
// (write to process stdin)
|
||||
size_t write(uint8_t);
|
||||
void flush();
|
||||
// TODO: add optimized function for block write
|
||||
|
||||
private:
|
||||
BridgeClass &bridge;
|
||||
unsigned int handle;
|
||||
String *cmdline;
|
||||
boolean started;
|
||||
|
||||
private:
|
||||
void doBuffer();
|
||||
uint8_t buffered;
|
||||
uint8_t readPos;
|
||||
static const int BUFFER_SIZE = 64;
|
||||
uint8_t buffer[BUFFER_SIZE];
|
||||
|
||||
private:
|
||||
void doBuffer();
|
||||
uint8_t buffered;
|
||||
uint8_t readPos;
|
||||
static const int BUFFER_SIZE = 64;
|
||||
uint8_t buffer[BUFFER_SIZE];
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user