Class CANdiConfiguration
Class for CTR Electronics' CANdi™ branded device, a device that integrates digital signals into the existing CAN bus network.
This defines all configurations for the CANdi.public class CANdiConfiguration : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
CANdiConfiguration
- Implements
- Inherited Members
Fields
CustomParams
Custom Params.
Custom paramaters that have no real impact on controller. Parameter list:public CustomParamsConfigs CustomParams
Field Value
DigitalInputs
Configs related to the CANdi™ branded device's digital I/O settings
Contains float-state settings and when to assert the S1/S2 inputs. Parameter list:public DigitalInputsConfigs DigitalInputs
Field Value
FutureProofConfigs
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.
This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior. This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.public bool FutureProofConfigs
Field Value
PWM1
Configs related to the CANdi™ branded device's PWM interface on the Signal 1 input (S1IN)
All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction. Parameter list:public PWM1Configs PWM1
Field Value
PWM2
Configs related to the CANdi™ branded device's PWM interface on the Signal 2 input (S2IN)
All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction. Parameter list:public PWM2Configs PWM2
Field Value
Quadrature
Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputs
All the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction. Parameter list:public QuadratureConfigs Quadrature
Field Value
Methods
Clone()
Creates a copy of this configuration.
public CANdiConfiguration Clone()
Returns
Deserialize(string)
Take a string and deserialize it to this configuration
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestring
Returns
- StatusCode
Return code of the deserialize method
Serialize()
Get the serialized form of this configuration
public string Serialize()
Returns
- string
Serialized form of this config group
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithCustomParams(CustomParamsConfigs)
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.
Custom Params. Custom paramaters that have no real impact on controller. Parameter list:public CANdiConfiguration WithCustomParams(CustomParamsConfigs newCustomParams)
Parameters
newCustomParamsCustomParamsConfigsParameter to modify
Returns
- CANdiConfiguration
Itself
WithDigitalInputs(DigitalInputsConfigs)
Modifies this configuration's DigitalInputs parameter and returns itself for method-chaining and easier to use config API.
Configs related to the CANdi™ branded device's digital I/O settings Contains float-state settings and when to assert the S1/S2 inputs. Parameter list:public CANdiConfiguration WithDigitalInputs(DigitalInputsConfigs newDigitalInputs)
Parameters
newDigitalInputsDigitalInputsConfigsParameter to modify
Returns
- CANdiConfiguration
Itself
WithPWM1(PWM1Configs)
Modifies this configuration's PWM1 parameter and returns itself for method-chaining and easier to use config API.
Configs related to the CANdi™ branded device's PWM interface on the Signal 1 input (S1IN) All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction. Parameter list:public CANdiConfiguration WithPWM1(PWM1Configs newPWM1)
Parameters
newPWM1PWM1ConfigsParameter to modify
Returns
- CANdiConfiguration
Itself
WithPWM2(PWM2Configs)
Modifies this configuration's PWM2 parameter and returns itself for method-chaining and easier to use config API.
Configs related to the CANdi™ branded device's PWM interface on the Signal 2 input (S2IN) All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction. Parameter list:public CANdiConfiguration WithPWM2(PWM2Configs newPWM2)
Parameters
newPWM2PWM2ConfigsParameter to modify
Returns
- CANdiConfiguration
Itself
WithQuadrature(QuadratureConfigs)
Modifies this configuration's Quadrature parameter and returns itself for method-chaining and easier to use config API.
Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputs All the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction. Parameter list:public CANdiConfiguration WithQuadrature(QuadratureConfigs newQuadrature)
Parameters
newQuadratureQuadratureConfigsParameter to modify
Returns
- CANdiConfiguration
Itself