1
0
Fork 0

update the sender source name when the UACN changes

This commit is contained in:
Kevin Matz 2022-11-24 11:35:25 -05:00
parent 758740704c
commit 4ad13317fd
3 changed files with 12 additions and 1 deletions

View File

@ -94,7 +94,7 @@ public:
*
* If not an empty string, will be prefered over the FCTN.
*/
void assignUserName(const std::string s) { uacn_ = s; }
virtual void assignUserName(const std::string s) { uacn_ = s; }
private:
const UUID::uuid cid_;

View File

@ -216,6 +216,14 @@ std::shared_ptr<Universe> Source::universe(const uint16_t num)
}
void Source::assignUserName(const std::string s)
{
ACN::Component::assignUserName(s);
for( auto & [_, universe] : universes_ )
universe->provenance()->source_name = name();
}
/**
* @brief Source::discovery_loop_
*/

View File

@ -54,6 +54,9 @@ public:
virtual void terminate(const uint16_t);
std::shared_ptr<Universe> universe(const uint16_t);
virtual void assignUserName(const std::string) override;
protected:
virtual void discoveryAnnounce();