Handle for a concrete test run, which makes it possible to interact with the test during simulation.  
 More...
#include <EngineTest.hpp>
Handle for a concrete test run, which makes it possible to interact with the test during simulation. 
◆ addResult()
  
  | 
        
          | virtual void addResult | ( | const std::string & | name, |  
          |  |  | const std::string & | description = "" |  
          |  | ) |  |  |  | virtual | 
 
Construct a new Result with given name. 
- Parameters
- 
  
    | name | [in] the name of the Result. |  | description | [in] the description of the result. |  
 
 
 
◆ append() [1/2]
  
  | 
        
          | virtual void append | ( | const Result & | result | ) |  |  | virtual | 
 
Append with a new Result. 
- Parameters
- 
  
    | result | [in] the result to add. |  
 
 
 
◆ append() [2/2]
Append a timed state. 
- Parameters
- 
  
    | tstate | [in] the timed state. |  
 
 
 
◆ callback()
      
        
          | void callback | ( | double | time, | 
        
          |  |  | bool | failed, | 
        
          |  |  | bool | done | 
        
          |  | ) |  |  | 
      
 
Invoke the callback if it is set. 
- Parameters
- 
  
    | time | [in] the current simulation time. |  | failed | [in] whether or not simulation has failed. |  | done | [in] whether or not simulation has ended. |  
 
 
 
◆ getDynamicWorkCell()
Get the Dynamic WorkCell used in the test. 
- Returns
- reference to a DynamicWorkCell smart pointer. 
 
 
◆ getError()
  
  | 
        
          | virtual std::string getError | ( |  | ) | const |  | virtual | 
 
Get description of a simulation error. 
- Note
- This gives only overall simulation errors. Individual results from the test can still give failures. 
- Returns
- empty string if there was no simulation error, or string giving the error. 
 
 
◆ getResult()
  
  | 
        
          | virtual Result& getResult | ( | const std::string & | name | ) |  |  | virtual | 
 
Get a reference to a specific result. 
- Parameters
- 
  
    | name | [in] the name of the result to find. |  
 
- Returns
- the Result object with given name 
- Exceptions
- 
  
    | Exception | if name is not found. |  
 
 
 
◆ getResults()
  
  | 
        
          | virtual const std::vector<Result>& getResults | ( |  | ) | const |  | virtual | 
 
Get a vector of all results from the test run. 
- Returns
- a vector of Result objects. 
 
 
◆ getTimedStatePath()
Get the timed state path, which will allow playback of the simulation. 
- Returns
- a timed state path. 
 
 
◆ isAborted()
  
  | 
        
          | virtual bool isAborted | ( |  | ) |  |  | virtual | 
 
Check if test has been aborted. 
- Returns
- true if aborted. 
 
 
◆ setDynamicWorkCell()
Set the Dynamic WorkCell used in the test. 
- Parameters
- 
  
    | dwc | [in] reference to a DynamicWorkCell smart pointer. |  
 
 
 
◆ setError()
  
  | 
        
          | virtual void setError | ( | const std::string & | error | ) |  |  | virtual | 
 
Set a simulation error. 
- Parameters
- 
  
    | error | [in] a description of the simulation error. |  
 
 
 
◆ setTimeCallback()
Set a callback to retrieve the current state of the test run. 
- Parameters
- 
  
    | cb | [in] the function to call. |  
 
 
 
◆ success()
  
  | 
        
          | virtual bool success | ( |  | ) | const |  | virtual | 
 
Check if the test was successful. 
- Returns
- true if there were no simulation failures, and no failures were registered in the results. 
 
 
The documentation for this class was generated from the following file: