1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00
CommandStation-EX/CommandDistributor.h
Asbelos 3f06fb08df
Wifi reliability (#45)
* First pass at wifi inbound FSA
* Fixup detector loop
* Remove asyncBanned
Unused, uninitialized
* Move wifi setup loop out of .ino
Wifi auto detect Serial 1,2,3
* Correct capitalization
* Uno compiles clean
* Command distributor
Moved command execution routing out of Wifi code for future use by Ethernet interface.
Co-authored-by: Fred <fndecker@gmail.com>
2020-10-05 13:42:31 -04:00

21 lines
431 B
C++

#ifndef CommandDistributor_h
#define CommandDistributor_h
#include "DCCEXParser.h"
typedef void (*HTTP_CALLBACK)(Print *stream, byte *cmd);
class CommandDistributor {
public :
static void setHTTPCallback(HTTP_CALLBACK callback);
static bool parse(byte clientId,byte* buffer, Print * streamer);
private:
static HTTP_CALLBACK httpCallback;
static bool isHTTP(byte * buffer);
static DCCEXParser * parser;
};
#endif