Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoherence between SignalBase::setReady and needUpdate #49

Open
jmirabel opened this issue Dec 18, 2019 · 1 comment
Open

Incoherence between SignalBase::setReady and needUpdate #49

jmirabel opened this issue Dec 18, 2019 · 1 comment
Assignees
Labels
Simplification Make the rational simpler and the code easier to read

Comments

@jmirabel
Copy link
Contributor

SignalBase defines the following methods/

  const bool &getReady() const { return ready; }
  virtual bool needUpdate(const Time &) const { return ready; }
  inline void setReady(const bool sready = true) { ready = sready; }

It is very misleading that signal.getReady() == signal.needUpdate(). From the code, it seems this is only use in SignalTimeDependent and attribute ready is true when the signal is NOT up to date

@jmirabel
Copy link
Contributor Author

After having dig a bit more into this, and following an old discussion with @nmansard, the part of TimeDependent::needUpdate which is complex was needed to allow a signal value to change within one time frame. This happened in the MailBox class (in sot-core I think). This should be removed to makeTimeDependent::needUpdate simpler.

@olivier-stasse olivier-stasse self-assigned this Jan 16, 2020
@olivier-stasse olivier-stasse added the Simplification Make the rational simpler and the code easier to read label Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simplification Make the rational simpler and the code easier to read
Projects
None yet
Development

No branches or pull requests

2 participants