Simple Virtual Machine
A simple but flexible virtual machine
SVM plugin objects

This module contains API functions to handle SVM plugin objects. More...

Functions

SVM_FUNCTION SVM_Boolean svm_plugin_has_instruction (const void *svm, const SVM_Value_PluginEntryPoint instruction, const SVM_Size argc, const SVM_Parameter argv[], SVM_Parameter result)
 This function checks whether a call to an instruction is possible. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_type (const void *svm, const SVM_Value_PluginEntryPoint type)
 This function checks whether a type exists. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_function (const void *svm, const SVM_Value_PluginEntryPoint function, const SVM_Size argc, const SVM_Parameter argv[], SVM_Parameter result)
 This function checks whether a call to a function is possible. More...
 
SVM_FUNCTION SVM_Status_Boolean svm_plugin_has_function_details (const void *svm, const SVM_Value_PluginEntryPoint function, const SVM_Size argc, const SVM_Parameter argv[], SVM_Parameter result)
 This function checks whether a call to a function is possible, and provide details on failure. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_structure (const void *svm, const SVM_Value_PluginEntryPoint structure)
 This function checks whether a structure exists. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_interruption (const void *svm, const SVM_Value_PluginEntryPoint interruption)
 This function checks whether an interruption exists. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_sequencer (const void *svm, const SVM_Value_PluginEntryPoint sequencer)
 This function checks whether a sequencer exists. More...
 
SVM_FUNCTION SVM_Boolean svm_plugin_has_scheduler (const void *svm, const SVM_Value_PluginEntryPoint scheduler)
 This function checks whether a scheduler exists. More...
 

Detailed Description

This module contains API functions to handle SVM plugin objects.

Function Documentation

◆ svm_plugin_has_function()

SVM_FUNCTION SVM_Boolean svm_plugin_has_function ( const void *  svm,
const SVM_Value_PluginEntryPoint  function,
const SVM_Size  argc,
const SVM_Parameter  argv[],
SVM_Parameter  result 
)

This function checks whether a call to a function is possible.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]functionThe function name.
[in]argcThe number of parameters.
[in]argvA sample of parameters. Only their types are used.
[in]resultA sample of the result of the function. The result parameter can contain:
  • an initialised value or structure to simulate a plain result return,
  • a null value to simulate the possibility to return a null value,
  • a NULL pointer to simulate an instruction returning no value at all.
Returns
TRUE if the call is compatible with the function definition, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_function_details()

SVM_FUNCTION SVM_Status_Boolean svm_plugin_has_function_details ( const void *  svm,
const SVM_Value_PluginEntryPoint  function,
const SVM_Size  argc,
const SVM_Parameter  argv[],
SVM_Parameter  result 
)

This function checks whether a call to a function is possible, and provide details on failure.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]functionThe function name.
[in]argcThe number of parameters.
[in]argvA sample of parameters. Only their types are used.
[in]resultA sample of the result of the function. The result parameter can contain:
  • an initialised value or structure to simulate a plain result return,
  • a null value to simulate the possibility to return a null value,
  • a NULL pointer to simulate an instruction returning no value at all.
Returns
A status with TRUE if the call is compatible with the function definition, FALSE otherwise. When FALSE is returned, the error message is provided in the status details.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_instruction()

SVM_FUNCTION SVM_Boolean svm_plugin_has_instruction ( const void *  svm,
const SVM_Value_PluginEntryPoint  instruction,
const SVM_Size  argc,
const SVM_Parameter  argv[],
SVM_Parameter  result 
)

This function checks whether a call to an instruction is possible.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]instructionThe instruction name.
[in]argcThe number of parameters.
[in]argvA sample of parameters. Only their types are used.
[in]resultA sample of the result of the function. The result parameter can contain:
  • an initialised value to simulate a plain result return,
  • a null value to simulate the possibility to return a null value,
  • a NULL pointer to simulate an instruction returning no value at all.
Returns
TRUE if the call is compatible with the instruction definition, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_interruption()

SVM_FUNCTION SVM_Boolean svm_plugin_has_interruption ( const void *  svm,
const SVM_Value_PluginEntryPoint  interruption 
)

This function checks whether an interruption exists.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]interruptionThe interruption name to check.
Returns
TRUE if the interruption exists, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_scheduler()

SVM_FUNCTION SVM_Boolean svm_plugin_has_scheduler ( const void *  svm,
const SVM_Value_PluginEntryPoint  scheduler 
)

This function checks whether a scheduler exists.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]schedulerThe scheduler name to check.
Returns
TRUE if the scheduler exists, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_sequencer()

SVM_FUNCTION SVM_Boolean svm_plugin_has_sequencer ( const void *  svm,
const SVM_Value_PluginEntryPoint  sequencer 
)

This function checks whether a sequencer exists.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]sequencerThe sequencer name to check.
Returns
TRUE if the sequencer exists, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_structure()

SVM_FUNCTION SVM_Boolean svm_plugin_has_structure ( const void *  svm,
const SVM_Value_PluginEntryPoint  structure 
)

This function checks whether a structure exists.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]structureThe structure name to check.
Returns
TRUE if the structure exists, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)

◆ svm_plugin_has_type()

SVM_FUNCTION SVM_Boolean svm_plugin_has_type ( const void *  svm,
const SVM_Value_PluginEntryPoint  type 
)

This function checks whether a type exists.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]typeThe type name to check.
Returns
TRUE if the type exists, FALSE otherwise.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)