DRS::IResponseActionInstance

DRS::IResponseActionInstanceabstract

One concrete running instance of the actions. (There might be actions that dont need instances, because their action is instantaneously. More...

#include

Public Types

enum eCurrentState {
CS_RUNNING, CS_FINISHED, CS_CANCELED, CS_ERROR,
CS_RUNNING_NON_BLOCKING
}

Public Member Functions

virtual eCurrentState Update ()=0
virtual void Cancel ()=0

Detailed Description

One concrete running instance of the actions. (There might be actions that dont need instances, because their action is instantaneously.

Member Function Documentation

◆ Cancel()

virtual void DRS::IResponseActionInstance::Cancel ( )
pure virtual

Will be called when someone requested a cancellation of a running response (segment). Its up to the action instance how to handle this request. There might be cases for example, where the action decides to first finish the current sentence before actually stop. So the DRS will continue updating the ActionInstance, until the actionInstance decides to stop (by returning CS_CANCELED or CS_FINISHED in the Update method).

Note: its called by the DRS system, when someone requested a cancellation of a running response (segment)

See also
Update()

◆ Update()

virtual eCurrentState DRS::IResponseActionInstance::Update ( )
pure virtual

This method continues the execution of an started action that takes some time to finish. Its called from the DRS System until it stops returning CS_RUNNING.

Note: its called by the DRS system, as long as the action instance is running

Returns
returns the current state of the execution of the action. CS_RUNNING means still needs time to finish, CS_FINISHED means finished successful,
CS_CANCELED means the action was canceled from the outside before it was finished, CS_ERROR means an error happened during execution, CS_RUNNING_NON_BLOCKING means not finished, but the response instance is nevertheless allowed to continue with the next follow-up response