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

make data store times configurable

This commit is contained in:
andreas
2024-09-29 19:56:39 +02:00
parent 358710ef03
commit c266bddea3
6 changed files with 176 additions and 62 deletions

View File

@@ -167,15 +167,18 @@ class GwXDRFoundMapping : public GwBoatItemNameProvider{
GwXDRType *type=NULL;
int instanceId=-1;
bool empty=true;
GwXDRFoundMapping(GwXDRMappingDef *definition,GwXDRType *type){
unsigned long timeout=0;
GwXDRFoundMapping(GwXDRMappingDef *definition,GwXDRType *type, unsigned long timeout){
this->definition=definition;
this->type=type;
this->timeout=timeout;
empty=false;
}
GwXDRFoundMapping(GwXDRMapping* mapping,int instance=0){
GwXDRFoundMapping(GwXDRMapping* mapping,unsigned long timeout,int instance){
this->definition=mapping->definition;
this->type=mapping->type;
this->instanceId=instance;
this->timeout=timeout;
empty=false;
}
GwXDRFoundMapping(){}
@@ -195,6 +198,9 @@ class GwXDRFoundMapping : public GwBoatItemNameProvider{
return "formatXdr:"+type->xdrtype+":"+type->boatDataUnit;
};
virtual ~GwXDRFoundMapping(){}
virtual unsigned long getInvalidTime() override{
return timeout;
}
};
//the class GwXDRMappings is not intended to be deleted