# Important Classes and Interfaces

## realvirtualBehavior

#### Starting and Stopping Simulation

The **realvirtualBehavior** class incorporates a **public bool ForceStop** property that can be accessed by all derived components. This property informs components whether the simulation is currently halted. The value of **ForceStop** is controlled by the **public SetForceStop(bool forcestop)** method, typically invoked by **realvirtualController**.

Developers can customize the behavior of their components based on the simulation status by overriding two functions:

* **OnStop()**: This function is called when the simulation is stopped. Developers can implement custom logic to execute specific actions when the simulation halts.
* **OnStart()**: This function is invoked when the simulation starts. It allows developers to define custom logic that runs when the simulation resumes after being stopped.

These functions provide flexibility for implementing unique behaviors tailored to the simulation's current operational state within the **realvirtualIO** framework.

<figure><img src="/files/3EiucEcmVMA25aJpP0ol" alt=""><figcaption></figcaption></figure>

## realvirtualBehaviorInterface

#### implements ISignalInterface

<figure><img src="/files/ey7HDIe4KaHDJ77fNCX3" alt=""><figcaption></figcaption></figure>

## realvirtualInterfaceBaseClass

<figure><img src="/files/s46RSSV7XXmiYGO21sZP" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.realvirtual.io/advanced-topics/for-developers/important-classes-and-interfaces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
