Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Group

Model selection
Description

Connects the API to an active model. Subsequent API calls refer to this model.

Required ControlNone
Usage(modelState, ) = RtlabApi.Connect(instanceId, systemControl)
Input
  • instanceId: The id of the model instance to which the connection is to be made. See Glossary.
  • systemControl: True to request control of the model.
Output
  • modelState: Current state of the model. See OP_MODEL_STATE.
Exception
  • EOK: Success.
  • EIO: Error sending the request or receiving the reply.
  • ESRCH: Invalid instance id or instance id not found.
  • EPERM: Control requested, but already given to another client.
  • ENOEXEC: Could not connect to the model. Not all of the subsystems are still active.
  • EINVAL: Trying to connect to a model whose local and UNC path are both empty.
  • ENOENT: Could not find the original model we are trying to connect to.
  • OP_API_EBAD_CONFIG: Node mapping not valid or IP address of the controller machine not specified (environment variable OPAL_META_CTL_IP not set).
  • OP_API_EBAD_PHYS_NODE: Physical node not found.
  • OP_API_EMODEL_CHANGED: The original model has been changed (number of subsystems, sub-systems names, etc.)
  • OP_API_ENO_LICENSE: No license.
  • OP_API_ENO_PRODUCT: No license for RT-LAB and RT-LABx.
  • OP_API_MODEL_IO_TIMEOUT: Timed out waiting for a reply from the model.
  • OP_API_MODEL_IO_ERROR: Model is missing some or all processes or subsystems.
ExamplesNone
Related ItemsConnectByName, Disconnect
Modulesimport RtlabApi
  • No labels