CommandExecutor.h
Go to the documentation of this file.
1 /*
2  * CommandExecutor.h
3  *
4  * Created on: 2 jul. 2015
5  * Author: Herman
6  */
7 
8 #pragma once
9 
10 #include "CommandHandler.h"
11 #include "CommandOutput.h"
12 #include <Data/Buffer/LineBuffer.h>
13 
14 #ifndef DISABLE_WIFI
15 #include <Network/TcpClient.h>
16 #endif
17 
18 #define MAX_COMMANDSIZE 64
19 
21 {
22 public:
23 #ifndef DISABLE_WIFI
24  CommandExecutor(TcpClient* cmdClient);
26 #endif
27  CommandExecutor(Stream* reqStream);
29 
30  int executorReceive(char* recvData, int recvSize);
31  int executorReceive(char recvChar);
32  int executorReceive(const String& recvString);
33  void setCommandEOL(char reqEOL);
34 
35 private:
37  void processCommandLine(const String& cmdString);
39  CommandOutput* commandOutput = nullptr;
40 };
Definition: WebsocketConnection.h:64
int executorReceive(char *recvData, int recvSize)
The String class.
Definition: WString.h:136
Definition: TcpClient.h:46
Definition: CommandExecutor.h:20
Definition: CommandOutput.h:18
void setCommandEOL(char reqEOL)
Base Stream class.
Definition: Stream.h:32