> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionHILAPIGetSignalGeneratorState

# HILAPIGetSignalGeneratorState

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

## Function Syntax

```
dword HILAPIGetSignalGeneratorState(dword handle);
```

## Description

Returns the state of a Signal Generator.

## Parameters

* **handle**: The handle of the Signal Generator.

## Return Values

* **0**: The handle of the Signal Generator is not valid
* **1**: The Signal Generator is in the state READY
* **2**: The Signal Generator is in the state FINISHED
* **3**: The Signal Generator is in the state PAUSED
* **4**: The Signal Generator is in the state RUNNING
* **5**: The Signal Generator is in the state STOPPED

## Example

Gets the state of the Signal Generator:

```c theme={null}
dword state;
state = HILAPIGetSignalGeneratorState(hGenerator);
```
