Changeset 437 in flair-src for trunk/lib/FlairCore/src/SendData.cpp
- Timestamp:
- 08/24/21 17:33:19 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/SendData.cpp
r15 r437 30 30 31 31 SendData::SendData(const LayoutPosition *position, string name, string type, 32 uint16_t default_periodms, bool default_enabled )32 uint16_t default_periodms, bool default_enabled, uint16_t default_nb_buffering) 33 33 : Widget(position->getLayout(), name, type) { 34 34 pimpl_ = new SendData_impl(); … … 39 39 pimpl_->send_period = default_periodms; 40 40 pimpl_->is_enabled = default_enabled; 41 pimpl_->nb_buffering = default_nb_buffering; 41 42 42 43 SetVolatileXmlProp("row", position->Row()); … … 46 47 GetPersistentXmlProp("enabled", pimpl_->is_enabled); 47 48 SetPersistentXmlProp("enabled", pimpl_->is_enabled); 49 GetPersistentXmlProp("nb_buf", pimpl_->nb_buffering); 50 SetPersistentXmlProp("nb_buf", pimpl_->nb_buffering); 48 51 49 52 delete position; … … 67 70 68 71 void SendData::XmlEvent(void) { 69 uint16_t send_period ;72 uint16_t send_period,nb_buffering; 70 73 bool is_enabled; 71 74 bool something_changed = false; 72 75 73 if (GetPersistentXmlProp("period", send_period) && 74 GetPersistentXmlProp("enabled", is_enabled)) { 76 if (GetPersistentXmlProp("period", send_period) && GetPersistentXmlProp("enabled", is_enabled) && GetPersistentXmlProp("nb_buf", nb_buffering)) { 75 77 if (send_period != SendPeriod()) 76 78 something_changed = true; 77 79 if (is_enabled != IsEnabled()) 80 something_changed = true; 81 } 82 83 if (GetPersistentXmlProp("nb_buf", nb_buffering)) { 84 if (nb_buffering != NbBuffering()) 78 85 something_changed = true; 79 86 } … … 84 91 SetSendPeriod(send_period); 85 92 SetEnabled(is_enabled); 93 SetNbBuffering(nb_buffering); 86 94 87 95 getFrameworkManager()->UpdateSendData(this); … … 91 99 SetVolatileXmlProp("period", send_period); 92 100 SetVolatileXmlProp("enabled", is_enabled); 101 SetVolatileXmlProp("nb_buf", nb_buffering); 93 102 SendXml(); 94 103 … … 102 111 103 112 uint16_t SendData::SendPeriod(void) const { return pimpl_->send_period; } 113 114 uint16_t SendData::NbBuffering(void) const { return pimpl_->nb_buffering; } 104 115 105 116 bool SendData::IsEnabled(void) const { return pimpl_->is_enabled; } … … 116 127 void SendData::SetSendPeriod(uint16_t value) { pimpl_->send_period = value; } 117 128 129 void SendData::SetNbBuffering(uint16_t value) { pimpl_->nb_buffering = value; } 130 118 131 } // end namespace core 119 132 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.