lms-org / lms

Lightweight Modular System
Apache License 2.0
10 stars 4 forks source link

publish method for datachannels #129

Closed Phibedy closed 7 years ago

Phibedy commented 7 years ago

We could add publish and hasNewData methods to dataChannel:

void publish(lms::Time t= lms::Time::now())

It would set some internal time value.

bool hasNewData()

Would check the internal time value and return true after publish has been called only once for each module.

syxolk commented 7 years ago

Is it really necessary to save a timestamp here? (Do you need the timestamp?)

syxolk commented 7 years ago

It would make sense to have the publish()-method only for WriteDataChannel and hasNewData() only for ReadDataChannel.