Table of Contents

Class CANrangeSimState

Namespace
CTRE.Phoenix6.Sim
Assembly
Phoenix6.Hardware.dll

Class to control the state of a simulated CANrange.

public class CANrangeSimState
Inheritance
CANrangeSimState
Inherited Members

Constructors

CANrangeSimState(CoreCANrange)

Creates an object to control the state of the given CANrange.

Note the recommended method of accessing simulation features is to use SimState.
public CANrangeSimState(CoreCANrange device)

Parameters

device CoreCANrange

Device to which this simulation state is attached

Methods

SetDistance(double)

Sets the simulated distance of the CANrange.

public StatusCode SetDistance(double meters)

Parameters

meters double

The distance in meters

Returns

StatusCode

Status code

SetSupplyVoltage(double)

Sets the simulated supply voltage of the CANrange.

The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.
public StatusCode SetSupplyVoltage(double volts)

Parameters

volts double

The supply voltage in Volts

Returns

StatusCode

Status code