Class ModulateVBatOut
Modulates the CANdle VBat output to the specified duty cycle. This can be used to control a single-color LED strip.
Note that CANdleFeaturesConfigs.VBatOutputMode must be set to VBatOutputModeValue.Modulated.public sealed class ModulateVBatOut : ControlRequest, ICloneable
- Inheritance
-
ModulateVBatOut
- Implements
- Inherited Members
Constructors
ModulateVBatOut(double)
Modulates the CANdle VBat output to the specified duty cycle. This can be used to control a single-color LED strip.
Note that CANdleFeaturesConfigs.VBatOutputMode must be set to VBatOutputModeValue.Modulated. Proportion of VBat to output in fractional units between 0.0 and 1.0.public ModulateVBatOut(double Output)
Parameters
Outputdouble
Fields
Output
Proportion of VBat to output in fractional units between 0.0 and 1.0.
- Units: fractional
public double Output
Field Value
UpdateFreqHz
The frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public double UpdateFreqHz
Field Value
Properties
Name
Name of this control request.
public string Name { get; }
Property Value
Methods
Clone()
Creates a copy of this control request.
public ModulateVBatOut Clone()
Returns
GetControlInfo()
Gets information about this control request.
public Dictionary<string, string> GetControlInfo()
Returns
- Dictionary<string, string>
Dictionary of control parameter names and corresponding applied values
SendRequest(string, uint)
Sends this request out over CAN bus to the device for the device to apply.
public StatusCode SendRequest(string network, uint deviceHash)
Parameters
Returns
- StatusCode
Status of the send operation
ToString()
Provides the string representation of this object.
public override string ToString()
Returns
WithOutput(double)
Modifies this Control Request's Output parameter and returns itself for method-chaining and easier to use request API.
Proportion of VBat to output in fractional units between 0.0 and 1.0.- Units: fractional
public ModulateVBatOut WithOutput(double newOutput)
Parameters
newOutputdoubleParameter to modify
Returns
- ModulateVBatOut
Itself
WithUpdateFreqHz(double)
Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public ModulateVBatOut WithUpdateFreqHz(double newUpdateFreqHz)
Parameters
newUpdateFreqHzdoubleParameter to modify
Returns
- ModulateVBatOut
Itself