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_NETWORK
15 #include <Network/TcpClient.h>
16 #endif
17 
18 #define MAX_COMMANDSIZE 64
19 
21 {
22 public:
23  CommandExecutor(const CommandExecutor&) = delete;
24  CommandExecutor& operator=(const CommandExecutor&) = delete;
25 
26 #ifndef DISABLE_NETWORK
27  CommandExecutor(TcpClient* cmdClient);
29 #endif
30  CommandExecutor(Stream* reqStream);
32 
33  int executorReceive(char* recvData, int recvSize);
34  int executorReceive(char recvChar);
35  int executorReceive(const String& recvString);
36  void setCommandEOL(char reqEOL);
37 
38 private:
40  void processCommandLine(const String& cmdString);
42  CommandOutput* commandOutput = nullptr;
43 };
Definition: WebsocketConnection.h:68
int executorReceive(char *recvData, int recvSize)
CommandExecutor & operator=(const CommandExecutor &)=delete
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: Wiring/Stream.h:32