Class CANdleSimState
Class to control the state of a simulated CANdle.
public class CANdleSimState
- Inheritance
-
CANdleSimState
- Inherited Members
Constructors
CANdleSimState(CoreCANdle)
Creates an object to control the state of the given CANdle.
Note the recommended method of accessing simulation features is to use SimState.public CANdleSimState(CoreCANdle device)
Parameters
deviceCoreCANdleDevice to which this simulation state is attached
Properties
LastStatusCode
Gets the last status code generated by a simulation function.
Not all functions return a status code but can potentially report errors. This function can be used to retrieve those status codes.public StatusCode LastStatusCode { get; }
Property Value
- StatusCode
Last status code generated by a simulation function
VBatModulation
Gets the simulated VBat modulated output of the CANdle.
public double VBatModulation { get; }
Property Value
Methods
SetDeviceTemp(double)
Sets the simulated temperature of the CANdle.
public StatusCode SetDeviceTemp(double temperature)
Parameters
temperaturedoubleThe device temperature in ℃
Returns
- StatusCode
Status code
SetFiveVRailVoltage(double)
Sets the simulated 5V rail voltage of the CANdle.
public StatusCode SetFiveVRailVoltage(double volts)
Parameters
voltsdoubleThe 5V rail voltage in Volts
Returns
- StatusCode
Status code
SetOutputCurrent(double)
Sets the simulated output current of the CANdle.
public StatusCode SetOutputCurrent(double amps)
Parameters
ampsdoubleThe output current in Amps
Returns
- StatusCode
Status code
SetSupplyVoltage(double)
Sets the simulated supply voltage of the CANdle.
The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.public StatusCode SetSupplyVoltage(double volts)
Parameters
voltsdoubleThe supply voltage in Volts