Skip to contents

Must be called before any other cuvis.r function. Loads the Cubert CUVIS SDK and configures the user settings directory.

Usage

cuvis_init(settings_dir = NULL)

Arguments

settings_dir

Character. Path to the CUVIS settings directory — the one holding factory/ and user/. If NULL (default), the directory is discovered in this order: the CUVIS_SETTINGS environment variable, then the standard install locations for the platform, and only as a last resort a temporary directory.

Value

Invisible NULL.

Details

The settings directory is not optional in practice. The SDK loads its factory calibration from it, and pointing it at an empty directory makes every subsequent cuvis_proc_cont_apply() fail with "Could not process measurement" — which looks like a corrupt recording rather than a configuration problem. Hence the search over real install locations before falling back to a temporary directory, and the warning when it does.

Examples

# Requires the proprietary Cubert CUVIS SDK. The SDK can be initialized
# only once per R process, so cuvis_shutdown() is called only at the very
# end of a session.
if (cuvis_available()) {
  cuvis_init()
  cuvis_is_initialized()
}