mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Settings: Add PerfTest
This commit is contained in:
committed by
Kyle Schwarz
parent
4dd97f734a
commit
30606be7a8
@@ -184,6 +184,7 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
@@ -466,6 +467,23 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::optional<bool> isPerfTestEnabled() const override {
|
||||
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return std::nullopt;
|
||||
|
||||
return std::make_optional<bool>(cfg->perf_en != 0);
|
||||
}
|
||||
|
||||
bool setPerfTestEnable(bool enable) override {
|
||||
auto cfg = getMutableStructurePointer<neovifire3t1slin_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return false;
|
||||
|
||||
cfg->perf_en = !!enable;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
const ETHERNET10T1S_SETTINGS* getT1SSettingsFor(Network net) const {
|
||||
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
|
||||
|
||||
Reference in New Issue
Block a user