Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM plugin objects
SVM plugins

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.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_type (const void *svm, const SVM_Value_PluginEntryPoint type)
| This function checks whether a type exists.
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.
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.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_structure (const void *svm, const SVM_Value_PluginEntryPoint structure)
| This function checks whether a structure exists.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_interruption (const void *svm, const SVM_Value_PluginEntryPoint interruption)
| This function checks whether an interruption exists.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_sequencer (const void *svm, const SVM_Value_PluginEntryPoint sequencer)
| This function checks whether a sequencer exists.
SVM_FUNCTION SVM_Boolean | svm_plugin_has_scheduler (const void *svm, const SVM_Value_PluginEntryPoint scheduler)
| This function checks whether a scheduler exists.

## 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | function | The function name.
  [in] | argc | The number of parameters.
  [in] | argv | A sample of parameters. Only their types are used.
  [in] | result | A 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

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | function | The function name.
  [in] | argc | The number of parameters.
  [in] | argv | A sample of parameters. Only their types are used.
  [in] | result | A 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

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | instruction | The instruction name.
  [in] | argc | The number of parameters.
  [in] | argv | A sample of parameters. Only their types are used.
  [in] | result | A 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

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | interruption | The interruption name to check.

Returns
  TRUE if the interruption exists, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | scheduler | The scheduler name to check.

Returns
  TRUE if the scheduler exists, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | sequencer | The sequencer name to check.

Returns
  TRUE if the sequencer exists, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | structure | The structure name to check.

Returns
  TRUE if the structure exists, FALSE otherwise.

Exceptions

  FAILURE | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | type | The type name to check.

Returns
  TRUE if the type exists, FALSE otherwise.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)