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:
@@ -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
|
||||
Reference in New Issue
Block a user