Update for Assembly Base #38
@ -53,7 +53,7 @@ class AssemblyBase : public SubsystemBase {
|
|||||||
* @param mode
|
* @param mode
|
||||||
* @param submode
|
* @param submode
|
||||||
* @return
|
* @return
|
||||||
* - @c RETURN_OK if ok
|
* - @c RETURN_OK if OK
|
||||||
* - @c NEED_SECOND_STEP if children need to be commanded again
|
* - @c NEED_SECOND_STEP if children need to be commanded again
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) = 0;
|
virtual ReturnValue_t commandChildren(Mode_t mode, Submode_t submode) = 0;
|
||||||
@ -145,12 +145,31 @@ class AssemblyBase : public SubsystemBase {
|
|||||||
|
|
||||||
bool handleChildrenChangedHealth();
|
bool handleChildrenChangedHealth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Core transition handler. The default implementation will only do something if
|
||||||
|
* #commandsOutstanding is smaller or equal to zero, which means that all mode commands
|
||||||
|
* from the #doPerformTransition call were executed successfully.
|
||||||
|
*
|
||||||
|
* Unless a second step was requested, the function will then use #checkChildrenState to
|
||||||
|
* determine whether the target mode was reached.
|
||||||
|
*
|
||||||
|
* There is some special handling for certain (internal) modes:
|
||||||
|
* - A second step is necessary. #commandChildren will be performed again
|
||||||
|
* - The device health was overwritten. #commandChildren will be called
|
||||||
|
* - A recovery is ongoing. #checkAndHandleRecovery will be called.
|
||||||
|
*/
|
||||||
virtual void handleChildrenTransition();
|
virtual void handleChildrenTransition();
|
||||||
|
|
||||||
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode);
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode);
|
||||||
|
|
||||||
virtual void startTransition(Mode_t mode, Submode_t submode);
|
virtual void startTransition(Mode_t mode, Submode_t submode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function starts the transition by setting the internal #targetSubmode and #targetMode
|
||||||
|
* variables and then calling the #commandChildren function.
|
||||||
|
* @param mode
|
||||||
|
* @param submode
|
||||||
|
*/
|
||||||
virtual void doStartTransition(Mode_t mode, Submode_t submode);
|
virtual void doStartTransition(Mode_t mode, Submode_t submode);
|
||||||
|
|
||||||
virtual bool isInTransition();
|
virtual bool isInTransition();
|
||||||
|
Loading…
Reference in New Issue
Block a user