IActionControllerabstract

Inherited by ActionController.

Public Member Functions

virtual ActionId SelectModeAutomatic ()=0
 This action triggers the vision system to change from the "Pre-operational" state into the operational mode "OperationalAutomaticMode". More...
 
virtual ActionId PrepareRecipe (RecipeId const &recipeId)=0
 This action triggers the vision system to load a recipe with the specified ID and the vision app (i.e., *.mvapp) that is referenced in the recipe. More...
 
virtual ActionId UnprepareRecipe (std::optional< RecipeId > const &recipeId)=0
 This action may only be called while the vision system is in the "Ready" state. More...
 
ActionInfo StartSingleJob ()
 This action is called to trigger a single execution of the vision app (i.e., *.mvapp) that is referenced in the currently prepared recipe. More...
 
ActionInfo StartContinuous ()
 This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) that is referenced in the currently prepared recipe. More...
 
virtual ActionInfo StartSingleJob (std::optional< RecipeId > const &recipeId, std::vector< VariantScalar > startParams)
 This action is called to trigger a single execution of the vision app (i.e., *.mvapp) but with additional parameters. More...
 
virtual ActionInfo StartContinuous (std::optional< RecipeId > const &recipeId, std::vector< VariantScalar > startParams)
 This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) but with additional parameters. More...
 
virtual ActionInfo StartSingleJob (StartJobOptions options)=0
 This action is called to trigger a single execution of the vision app (i.e., *.mvapp) where options to parameterize the job are aggregated in the data structure StartJobOptions. More...
 
virtual ActionInfo StartContinuous (StartJobOptions options)=0
 This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) where options to parameterize the job are aggregated in the data structure StartJobOptions. More...
 
virtual ActionId Halt ()=0
 This action can be called in any of the sub-states of "Operational" or in the state "Pre-operational" to facilitate the transition of the vision system to the "Halted" state. More...
 
virtual ActionId Reset ()=0
 This action behaves similarly to Halt with the distinction that the vision system will ultimately end up in the "Pre-operational" state. More...
 
virtual ActionId Stop ()=0
 This action is called to stop the execution of the vision app and may thus only be called in the state "SingleExecution". More...
 
virtual ActionId Abort ()=0
 This action is currently synonymous to Stop. More...
 

Member Function Documentation

◆ Abort()

virtual ActionId Abort ( )
pure virtual

This action is currently synonymous to Stop.

Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ Halt()

virtual ActionId Halt ( )
pure virtual

This action can be called in any of the sub-states of "Operational" or in the state "Pre-operational" to facilitate the transition of the vision system to the "Halted" state.

Note that the system may not change immediately to the "Halted" state but unprepare the currently prepared recipe during which time it will intermediately change to the "Initialized" state. If an execution is in progress while Halt is called, it will finish as usual but the system will change to "Initialized" without intermediately going to "Ready" and no Ready event will be emitted. However, the corresponding ResultReady event will be.

Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ PrepareRecipe()

virtual ActionId PrepareRecipe ( RecipeId const &  recipeId)
pure virtual

This action triggers the vision system to load a recipe with the specified ID and the vision app (i.e., *.mvapp) that is referenced in the recipe.

PrepareRecipe is called automatically when MERLIC RTE is started and can be called in either the "Initialized" or "Ready" state. In the latter, it will trigger the unpreparation of the previously prepared recipe. While the recipe is being prepared, the system will change into the "Initialized" state and return to "Ready" once it concluded at which point a RecipePrepared event is emitted

Parameters
recipeIdthe specified recipe ID which should be loaded
Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ Reset()

virtual ActionId Reset ( )
pure virtual

This action behaves similarly to Halt with the distinction that the vision system will ultimately end up in the "Pre-operational" state.

It can be called in any of the sub-states of "Operational" or in "Halted".

Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ SelectModeAutomatic()

virtual ActionId SelectModeAutomatic ( )
pure virtual

This action triggers the vision system to change from the "Pre-operational" state into the operational mode "OperationalAutomaticMode".

Note that the vision system triggers the selection of the automatic mode on startup.

Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ StartContinuous() [1/3]

ActionInfo StartContinuous ( )
inline

This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) that is referenced in the currently prepared recipe.

It may only be called in the "Ready" state. The vision system will change to the "ContinuousExecutionState" state and emit a JobStarted event as the execution commences. The continuous execution is a series of single executions with the difference that the vision system only emits a "Ready" event after the execution is stopped.

Returns
the unique ID of the action when it is enqueued and a unique ID of the job. Note that job IDs are assigned regardless of whether or not a job can be started at the time the action is processed by the vision system; if so, a JobStarted event will be emitted which references the job ID.

◆ StartContinuous() [2/3]

virtual ActionInfo StartContinuous ( StartJobOptions  options)
pure virtual

This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) where options to parameterize the job are aggregated in the data structure StartJobOptions.

Parameters
optionsThe parameter contains a data structure which holds all of the additional parameters which can be set when starting a job. All of the parameters have default initializers, so if C++20 is available, designated initializers may be used to only specify a subset. The data structure may be extended in future API versions.

Implemented in ActionController.

◆ StartContinuous() [3/3]

virtual ActionInfo StartContinuous ( std::optional< RecipeId > const &  recipeId,
std::vector< VariantScalar >  startParams 
)
inlinevirtual

This action is called to trigger a continuous execution of the vision app (i.e., *.mvapp) but with additional parameters.

See also StartContinuous().

Parameters
recipeIdThe parameter represents the recipe ID of the recipe that is to be executed. The parameter is optional: If no recipe ID is specified, the currently prepared recipe is executed. If a recipe ID is specified, it must match the ID of the latest prepared recipe.
startParamsThe parameter represents the vector of parameter values that are used for the single execution instead of the parameter values defined in the recipe that is to be executed. When specifying the parameter values in the vector, some requirements must be fulfilled.
  • Correct number of vector elements: The vector size must correspond to the number of parameter values defined in the specified recipe. For each recipe value, a vector element must be defined.
  • Correct order of vector elements: The order of the values defined in the vector must correspond to the order of the parameter values in the recipe. The value of the first vector element overwrites the first parameter value in the recipe and so on.
  • Suitable data type for a lossless conversion: The data type of each vector element must be suitable to enable a lossless conversion of the actual value in the tuple to the data type of the respective recipe value. Either the data type of the vector element corresponds to the one of the recipe value or the data type has a value range in which the actual value of the vector element can be represented. If these requirements are not fulfilled, the action will result in a non-fatal Error event and the parameter values in the vector are ignored. In this case, the parameter values defined in the recipe will be used for the single execution.
Returns
the unique ID of the action when it is enqueued and a unique ID of the job.

◆ StartSingleJob() [1/3]

ActionInfo StartSingleJob ( )
inline

This action is called to trigger a single execution of the vision app (i.e., *.mvapp) that is referenced in the currently prepared recipe.

It may only be called in the "Ready" state. The vision system will change to the state "SingleExecution" and emit a JobStarted event as the execution commences. Upon the execution's completion, the system returns to the "Ready" state and emits a Ready event unless preempted by way of Halt or Reset actions during the ongoing execution.

Returns
the unique ID of the action when it is enqueued and a unique ID of the job. Note that job IDs are assigned regardless of whether or not a job can be started at the time the action is processed by the vision system; if so, a JobStarted event will be emitted which references the job ID.

◆ StartSingleJob() [2/3]

virtual ActionInfo StartSingleJob ( StartJobOptions  options)
pure virtual

This action is called to trigger a single execution of the vision app (i.e., *.mvapp) where options to parameterize the job are aggregated in the data structure StartJobOptions.

Parameters
optionsThe parameter contains a data structure holding all of the additional parameters which can be set when starting a job. All of the parameters have default initializers, so if C++20 is available, designated initializers may be used to only specify a subset. The data structure may be extended in future API versions.

Implemented in ActionController.

◆ StartSingleJob() [3/3]

virtual ActionInfo StartSingleJob ( std::optional< RecipeId > const &  recipeId,
std::vector< VariantScalar >  startParams 
)
inlinevirtual

This action is called to trigger a single execution of the vision app (i.e., *.mvapp) but with additional parameters.

See also StartSingleJob().

Parameters
recipeIdThe parameter represents the recipe ID of the recipe that is to be executed. The parameter is optional: If no recipe ID is specified, the currently prepared recipe is executed. If a recipe ID is specified, it must match the ID of the latest prepared recipe.
startParamsThe parameter represents the vector of parameter values that are used for the single execution instead of the parameter values defined in the recipe that is to be executed. When specifying the parameter values in the vector, some requirements must be fulfilled.
  • Correct number of vector elements: The vector size must correspond to the number of parameter values defined in the specified recipe. For each recipe value, a vector element must be defined.
  • Correct order of vector elements: The order of the values defined in the vector must correspond to the order of the parameter values in the recipe. The value of the first vector element overwrites the first parameter value in the recipe and so on.
  • Suitable data type for a lossless conversion: The data type of each vector element must be suitable to enable a lossless conversion of the actual value in the tuple to the data type of the respective recipe value. Either the data type of the vector element corresponds to the one of the recipe value or the data type has a value range in which the actual value of the vector element can be represented. If these requirements are not fulfilled, the action will result in a non-fatal Error event and the parameter values in the vector are ignored. In this case, the parameter values defined in the recipe will be used for the single execution.
Returns
the unique ID of the action when it is enqueued and a unique ID of the job.

◆ Stop()

virtual ActionId Stop ( )
pure virtual

This action is called to stop the execution of the vision app and may thus only be called in the state "SingleExecution".

Currently, calling Stop will not stop the execution any sooner than it would by simply waiting for the single execution to finish. However, once the execution concludes, the resulting Ready and StateChanged events will reference the ID of the Stop action as their cause.

Returns
the unique ID of the action when it is enqueued

Implemented in ActionController.

◆ UnprepareRecipe()

virtual ActionId UnprepareRecipe ( std::optional< RecipeId > const &  recipeId)
pure virtual

This action may only be called while the vision system is in the "Ready" state.

It causes the vision system to unload the vision app (i.e., *.mvapp) that is referenced in the currently prepared recipe and to return to the "Initialized" state. A RecipeUnprepared event is emitted as soon as the unloading starts and the recipe becomes unavailable to execution.

Parameters
recipeIdthe specified recipe ID which should be unloaded, or nullopt to unload any prepared recipe
Returns
the unique ID of the action when it is enqueued

The documentation for this class was generated from the following file: