1
0
Fork 0

universe source can be set without setting data

This commit is contained in:
Kevin Matz 2021-06-20 09:09:03 -04:00
parent 2858d64218
commit c58163fb8d
2 changed files with 14 additions and 13 deletions

View File

@ -42,16 +42,6 @@ UniverseSource::UniverseSource(std::shared_ptr<DATA::Pdu> pdu) {
};
/**
Construct a new Universe.
*/
Universe::Universe()
: DMX::Universe()
{
synchronized_ = false;
}
/**
Set universe data from a DMP PDU from a UniverseSource.
*/
@ -99,7 +89,17 @@ void Universe::set(std::shared_ptr<DMP::Pdu> dmp,
/// The DMP Layer's Property values field is used to encode the
// DMX512-A [DMX] START Code and data.
DMX::Universe::set(pd);
source_ = source;
setSource(source);
}
/**
* @brief Universe::setSource
* @param source
*/
void Universe::setSource(std::shared_ptr<UniverseSource> source)
{
source_ = source;
}
}; // SACN

View File

@ -68,10 +68,11 @@ class Universe
: public DMX::Universe
{
public:
Universe();
bool isSyncronized() const {return synchronized_;};
Universe() : DMX::Universe(), synchronized_(false) {};
const bool isSyncronized() const {return synchronized_;};
void set(std::shared_ptr<DMP::Pdu>, std::shared_ptr<UniverseSource>);
void setSource(std::shared_ptr<UniverseSource>);
private:
bool synchronized_;