diff --git a/protocol/esta/dmx/universe.cpp b/protocol/esta/dmx/universe.cpp index 6b9824f..1948fbb 100644 --- a/protocol/esta/dmx/universe.cpp +++ b/protocol/esta/dmx/universe.cpp @@ -85,7 +85,7 @@ double Universe::rxRate() * @brief milliseconds since the last update * @return */ -long Universe::rxAge() +long Universe::age() { if (!last_updated_.time_since_epoch().count()) return -1; // universe has never been seen @@ -310,7 +310,7 @@ void Universe::rx_timeout_(bool add_now) last_updated_ = now; rx_times_.push(now); } - else if (status_ == DMX_ACTIVE && rxAge() >= E111_DATA_LOSS_TIMEOUT) + else if (status_ == DMX_ACTIVE && age() >= E111_DATA_LOSS_TIMEOUT) // E1.11 DMX timeout period may be different the the rx_timeout_period setStatus(DMX_LOST); diff --git a/protocol/esta/dmx/universe.h b/protocol/esta/dmx/universe.h index ac56755..e4be4ec 100644 --- a/protocol/esta/dmx/universe.h +++ b/protocol/esta/dmx/universe.h @@ -53,7 +53,7 @@ class Universe { virtual uint8_t slot (const uint16_t); virtual double rxRate(); - virtual long rxAge(); + virtual long age(); virtual void setValue (const uint16_t address, const uint8_t value); virtual void setValue (const uint16_t start, const uint16_t footprint, diff --git a/protocol/esta/sacn/arbitratinguniverse.cpp b/protocol/esta/sacn/arbitratinguniverse.cpp index 260d381..121cba3 100644 --- a/protocol/esta/sacn/arbitratinguniverse.cpp +++ b/protocol/esta/sacn/arbitratinguniverse.cpp @@ -315,7 +315,7 @@ std::shared_ptr ArbitratingUniverse::dominant_() // cache the age of each universe std::unordered_map ages; for (const auto& [header, universe] : sources_) - ages.insert({header, universe->rxAge()}); + ages.insert({header, universe->age()}); purge_stale_sources_(&ages); @@ -347,7 +347,7 @@ void ArbitratingUniverse::purge_stale_sources_(std::unordered_maprxAge()}); + ages.insert({header, universe->age()}); // order the member universes by age std::multimap by_age;