1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 23:13:07 +01:00

introduce NMEA filter

This commit is contained in:
andreas
2021-11-03 19:36:28 +01:00
parent 2028525cc9
commit 3cf67d387e
5 changed files with 183 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
#ifndef _GWCONFIGITEM_H
#define _GWCONFIGITEM_H
#include "WString.h"
#include <vector>
class GwConfigInterface{
public:
virtual String asString() const=0;
@@ -48,5 +49,20 @@ class GwConfigItem: public GwConfigInterface{
}
};
class GwNmeaFilter{
private:
GwConfigInterface *config=NULL;
bool isReady=false;
std::vector<String> whitelist;
std::vector<String> blacklist;
void parseFilter();
public:
GwNmeaFilter(GwConfigInterface *config){
this->config=config;
isReady=false;
}
bool canPass(const char *buffer);
};
#endif