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

Replace multiple command methods with single method in state machine interface. #44

Open
joshuaplusone opened this issue Sep 4, 2018 · 1 comment

Comments

@joshuaplusone
Copy link
Contributor

Replace

virtual bool start();
virtual bool clear();
virtual bool reset();
virtual bool hold();
virtual bool unhold();
virtual bool suspend();
virtual bool unsuspend();
virtual bool stop();
virtual bool abort();

with

bool sendTransitionCommand(CmdEnum command);
@joshuaplusone
Copy link
Contributor Author

Should be able to get rid of the protected implementations of the following as well:

  /**
   * @brief Override to call implementations version of start command.
   *
   */
  virtual void _start() = 0;

  /**
   * @brief Override to call implementations version of clear command.
   *
   */
  virtual void _clear() = 0;

  /**
   * @brief Override to call implementations version of the reset command.
   *
   */
  virtual void _reset() = 0;

  /**
   * @brief Override to call implementations version of the hold command.
   *
   */
  virtual void _hold() = 0;

  /**
   * @brief Override to call implementations version of the unhold command.
   *
   */
  virtual void _unhold() = 0;

  /**
   * @brief Override to call implementations version of the suspend command.
   *
   */
  virtual void _suspend() = 0;

  /**
   * @brief Override to call implementations version of the unsuspend command.
   *
   */
  virtual void _unsuspend() = 0;

  /**
   * @brief Override to call implementations version of the stop command.
   *
   */
  virtual void _stop() = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant