Plugins API

subroutine  al_register_plugin(plugin_name, retstatus)

Register an Access Layer plugin.

Plugins extend the functionality of the Access Layer. Plugins must be registered before they can be activated with al_bind_plugin().

The environment variable IMAS_AL_PLUGINS indicates the folder where the compiled plugin(s) are located. If this environment variable is unset, or no shared library with the name <plugin_name>_plugin.so can be found, an exception status is returned.

Parameters:
  • plugin_name [character(*),in] :: Name of the plugin to register

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure

Example

integer :: status

call al_register_plugin("debug", status)
if status .neq. 0
    error stop
endif
subroutine  al_unregister_plugin(plugin_name, retstatus)

Unregister a previously registered Access Layer plugin.

Parameters:
  • plugin_name [character(*),in] :: Name of the plugin to register

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure

subroutine  al_bind_plugin(path, plugin_name, retstatus)

Activate an Access Layer plugin.

Plugins are inactive until activated with bind_plugin. After activation, plugins can modify the data on the path(s) they are activated on during a ids_put(), ids_put_slice(), ids_get() or ids_get_slice().

Parameters:
  • path [character(*),in] :: The path that the plugin is allowed to operate on: <ids_name>:<occurrence>/<path_in_ids>.

  • plugin_name [character(*),in] :: Name of the plugin. The plugin must have been registered with a call to al_register_plugin().

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure

Example

integer :: status

call al_register_plugin("debug", status)
if status .neq. 0
    error stop
endif
call al_bind_plugin ('magnetics:0/ids_properties/version_put/access_layer', 'debug', status)
call al_bind_plugin ('magnetics:0/flux_loop', 'debug', status)
subroutine  al_unbind_plugin(path, plugin_name, retstatus)

Unbind a plugin on a previously bound path.

Arguments are the same as for al_bind_plugin().

subroutine  al_setvalue_parameter_plugin(parameter_name, datatype, dim, size, parameter_data, plugin_name, retstatus)

Set a plugin parameter value.

See the documentation of your specific plugin for more details.

Parameters:
  • parameter_name [character(*),in] :: Name of the parameter to set

  • datatype [integer,in] :: Type of data (one of CHAR_DATA, INTEGER_DATA, DOUBLE_DATA or COMPLEX_DATA)

  • dim [integer,in] :: Dimension of the data

  • size [type(C_PTR),in] :: Pointer to array specifying the shape of the array (must have dim elements)

  • data [type(C_PTR)] :: Pointer to the data

  • plugin_name [character(*),in] :: Name of the plugin. The plugin must have been registered with a call to al_register_plugin().

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure

subroutine  al_setvalue_int_scalar_parameter_plugin(parameter_name, parameter_value, plugin_name, retstatus)

Convenience method to set a plugin parameter value to a scalar integer.

See the documentation of your specific plugin for more details.

Parameters:
  • parameter_name [character(*),in] :: Name of the parameter to set

  • parameter_value [integer,int] :: Value to set the parameter to

  • plugin_name [character(*),in] :: Name of the plugin. The plugin must have been registered with a call to al_register_plugin().

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure

subroutine  al_setvalue_int_scalar_parameter_plugin(parameter_name, parameter_value, plugin_name, retstatus)

Convenience method to set a plugin parameter value to a scalar real.

See the documentation of your specific plugin for more details.

Parameters:
  • parameter_name [character(*),in] :: Name of the parameter to set

  • parameter_value [real,int] :: Value to set the parameter to

  • plugin_name [character(*),in] :: Name of the plugin. The plugin must have been registered with a call to al_register_plugin().

  • retstatus [integer,out] :: Status code: 0 on success, <0 on failure