2.7. Disconnecting from a target

The target connection mechanism in CADI enables establishing connections to CADI targets. It is also responsible for a clean disconnection from targets and the release of a connected simulation object.

The primary way to disconnect from a simulation is to use the Release() method of those target-side classes that are involved in the connection mechanism. After this method is called, the caller must ensure that it does not start any additional interaction with the connection. The call performs the appropriate actions on the target-side such as:

Caution

The caller must not explicitly destroy any target-side objects. This is the task of the target implementation and must be triggered through Release() calls wherever appropriate.

Using only Release() calls is acceptable for simple scenarios such as unique and direct connections between caller and target. For more sophisticated scenarios, however, a well-coordinated disconnection is required. The CADISimulationCallback class provides two callbacks that are essential for such a disconnection:

simShutdown()

the simulation signals a request for a clean shutdown.

simKilled()

the simulation signals a hard shutdown. It was not able to be kept alive until a clean shutdown could be performed. After this call is received, the caller must ensure that it does not access the CADISimulation or associated CADI objects.

Using these callbacks in combination with the Release() method in the target enables establishing well-defined procedures for disconnection from a CADI simulation.

Copyright © 2008-2014 ARM. All rights reserved.ARM DUI 0444M
Non-ConfidentialID051314