fake | Switch Component
fake
The fake switch model is a model for testing switch functionality without physical hardware. It simulates a multi-position switch which you can control programmatically.
Attributes
The following attributes are available for the fake switch model:
| Name | Type | Required? | Description |
|---|---|---|---|
position_count |
int | Required | The number of positions that the switch can be in. Default: 2 |
labels |
array | Optional | An array of labels corresponding to the positions. Default: numeric values for the number of positions, starting with 0. |
Troubleshooting
If your fake switch is not working as expected:
- Check your machine logs on the LOGS tab to check for errors.
- Make sure the
position_countmatches the number oflabelsif both are specified. - Verify that position values used with
SetPositionare within the valid range (0 toposition_count - 1). - Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the switch there.