virtual method for getting active slot count
This commit is contained in:
parent
bbe4432737
commit
e538cc74d3
|
@ -1,6 +1,5 @@
|
|||
#include "qsacnuniverse.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief QSacnUniverse::QSacnUniverse
|
||||
* @param parent
|
||||
|
@ -76,6 +75,16 @@ bool QSacnUniverse::isEditable() const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief QSacnUniverse::activeSlots
|
||||
* @return
|
||||
*/
|
||||
uint16_t QSacnUniverse::activeSlots() const
|
||||
{
|
||||
return universe_->activeSlots();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief QSacnUniverse::setDescription
|
||||
* @param desc
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
uint8_t slot(const u_int16_t slot) const;
|
||||
|
||||
bool isEditable() const;
|
||||
uint16_t activeSlots() const;
|
||||
|
||||
public slots:
|
||||
void setDescription(std::string desc);
|
||||
|
|
|
@ -193,6 +193,15 @@ bool ArbitratingUniverse::isEditable() const {
|
|||
}
|
||||
|
||||
|
||||
uint16_t ArbitratingUniverse::activeSlots() const
|
||||
{
|
||||
auto universe = dominant_();
|
||||
if (!universe)
|
||||
return 0;
|
||||
return universe->activeSlots();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief MergeProxyUniverse::slot
|
||||
* @param s
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
bool isSyncronized() const override;
|
||||
void synchronize(uint8_t = 0) override;
|
||||
bool isEditable() const override;
|
||||
uint16_t activeSlots() const override;
|
||||
|
||||
// DMX::Universe Overrides:
|
||||
uint8_t slot(const uint16_t) const override;
|
||||
|
|
|
@ -175,7 +175,17 @@ bool Universe::isEditable() const
|
|||
}
|
||||
|
||||
|
||||
void Universe::setValue (const uint16_t address, const uint8_t value)
|
||||
/**
|
||||
* @brief Universe::activeSlots
|
||||
* @return
|
||||
*/
|
||||
uint16_t Universe::activeSlots() const
|
||||
{
|
||||
return active_data_slots;
|
||||
}
|
||||
|
||||
|
||||
void Universe::setValue(const uint16_t address, const uint8_t value)
|
||||
{
|
||||
if (!isEditable())
|
||||
return;
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
virtual void synchronize(uint8_t = 0);
|
||||
|
||||
virtual bool isEditable() const;
|
||||
virtual uint16_t activeSlots() const;
|
||||
|
||||
// DMX::Universe overrides
|
||||
void setValue (const uint16_t address, const uint8_t value) override;
|
||||
|
@ -72,7 +73,11 @@ public:
|
|||
*/
|
||||
ipAddress destination;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
void sACNsend() const;
|
||||
|
||||
/**
|
||||
* @brief \cite sACN 3.7 Active Data Slots
|
||||
*
|
||||
|
@ -86,8 +91,6 @@ protected:
|
|||
*/
|
||||
uint16_t active_data_slots;
|
||||
|
||||
void sACNsend() const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<DATA::data_header> provenance_;
|
||||
std::vector<uint8_t> * sync_data_ = nullptr;
|
||||
|
|
Loading…
Reference in New Issue