TopCon API  1.1.0
.Net API to control TopCon devices
CH.Regatron.HPPS.TFE.UserDefinedCurveComponent Class Reference

This class implements all components that handle the use-defined time-based curve components. More...

Inheritance diagram for CH.Regatron.HPPS.TFE.UserDefinedCurveComponent:
Inheritance graph

Public Member Functions

 UserDefinedCurveComponent (ReDev.TopCon myTopCon, UInt16 timerPrescaler)
 This is the standard constructor for the user defined (time based) curve. More...
 
 UserDefinedCurveComponent (ReDev.TopCon myTopCon, UserDefinedCurvePointList newUserDefinedCurvePointList, UInt16 newTimerPrescaler)
 CURRENTLY NOT RECOMMENDED TO BE USED!
(Data points from curvePointList are not used.)
Constructor for the user defined (time based) curve. More...
 
UInt16 GetTimerPrescaler ()
 This method returns the value of the TimerPrescaler of this UserDefined (time-based) curve More...
 
void SetTimerPrescaler (UInt16 newTimerPrescaler)
 This method sets the TimerPrescaler value (this is linked to this UserDef function only). The TimerPrescaler is used to calculate the true time component of the CurvePoints from the given TimeData. Time-value and the base unit 50us
tDelta[s] = 50us * TimerPrescaler * timeValue
A value of 20'000 means that the timeValue is interpreted with base x * 1s; More...
 
new CurveComponentType GetCurveComponentType ()
 During work with the UserDefinedCurveComponent, it will be bound to a particular curveComponentType. Adding new CurvePoints of a different Type will result in unexpected behaviour (future: will throw an exception) More...
 
void PrepareAddingCurvePoints (CurveComponentType thisCurveComponentType)
 This method is needed to prepare the PointList for becoming a voltage, current or power curvePoint (changes the settings of the transformation between the true values and the internal representation).
Caution: It is currently possible to add curvePoints of a different type as this object is really used. The programmer is in charge to avoid this situation. More...
 
void AddCurvePoint (Double newAmplitude, Double newDeltaTime)
 This is a convenience method to immediately add new CurvePoints to this object. More...
 
override string ToString ()
 This method provides a readable string representation of the CurveComponent. More...
 
override void UpdateObjectFromCurveContainer (CurveContainer cc)
 This function updates this object with the data from the curveContainer parameter. More...
 
override void UpdateCurveContainerFromObject (CurveContainer curveContainer)
 This method updates the values in the curveContainer given as parameter with the properties of this object. More...
 
void ResetMainFunctionParameters ()
 This method updates the standard values (Amplitude, Offset) in the curveContainer with values from the given curvePoints. More...
 
UInt32 GetMaxAmplitudeNormalized ()
 This method returns the (internal) normalized value of the maximum UserDef Amplitude. The normalized values are unsigned integer to be used in the TopCon device (because of integer arithmetic in the DSPs). More...
 
Double GetMaxAmplitude ()
 This method returns the maximum value of the curvepoints of this user-defined curve. More...
 
- Public Member Functions inherited from CH.Regatron.HPPS.TFE.CurveComponent
static static string GetLastError ()
 

Public Attributes

readonly UserDefinedCurvePointList UserDefinedCurvePointList
 This is the handle to the collection of curve points. More...
 

Additional Inherited Members

- Public Types inherited from CH.Regatron.HPPS.TFE.CurveComponent
enum  CurveComponentType { CurveComponentType.VOLTAGEComponent = 0, CurveComponentType.CURRENTComponent = 1, CurveComponentType.POWERComponent = 2, CurveComponentType.INVALID = 99 }
 This list allows to identify/notify which component is to be used when data has to be drawn from a CurveContainer. The CurveComponentType is set while adding the curveComponent to the TFECurve. Therefore the CCType is commonly not set when the CC is not linked to a TFECurve. More...
 
enum  CurveComponentBaseFunctionType {
  CurveComponentBaseFunctionType.SINUS = 0, CurveComponentBaseFunctionType.RECTANGLE = 1, CurveComponentBaseFunctionType.TRIANGLE = 2, CurveComponentBaseFunctionType.USERDEFINED = 3,
  CurveComponentBaseFunctionType.AAP = 4, CurveComponentBaseFunctionType.UNKNOWN = 100
}
 This enumeration contains the identifiers for the type of the BASE FUNCTION of the curve component.
There exist several time-based functions (like sinus or rectangle, ...) or the user can choose the Area Application Processing feature, hence a function of the form x = f(y) with x, y voltage, current or power. More...
 

Detailed Description

This class implements all components that handle the use-defined time-based curve components.

Constructor & Destructor Documentation

◆ UserDefinedCurveComponent() [1/2]

CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.UserDefinedCurveComponent ( ReDev.TopCon  myTopCon,
UInt16  timerPrescaler 
)

This is the standard constructor for the user defined (time based) curve.

Parameters
myTopConThe link to the parent TopCon object.
timerPrescalerTimer prescaler (20.000 = 1s)

◆ UserDefinedCurveComponent() [2/2]

CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.UserDefinedCurveComponent ( ReDev.TopCon  myTopCon,
UserDefinedCurvePointList  newUserDefinedCurvePointList,
UInt16  newTimerPrescaler 
)

CURRENTLY NOT RECOMMENDED TO BE USED!
(Data points from curvePointList are not used.)
Constructor for the user defined (time based) curve.

Parameters
myTopConThe link to the parent TopCon object.
newUserDefinedCurvePointListThe list with predefined UserCurvePoints. CURRENTLY NEGLECTED
newTimerPrescalerTimer prescaler (20.000 -->> 1s ). (cf. SetTimerPrescaler (...) for further explantions)

Member Function Documentation

◆ AddCurvePoint()

void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.AddCurvePoint ( Double  newAmplitude,
Double  newDeltaTime 
)

This is a convenience method to immediately add new CurvePoints to this object.

Parameters
newAmplitudeAmplitude value for this curvePoint [V,Amp, kW]
newDeltaTimeTime difference between last and this value [physical unit is dependent of the set CurveComponentType.

◆ GetCurveComponentType()

new CurveComponentType CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.GetCurveComponentType ( )

During work with the UserDefinedCurveComponent, it will be bound to a particular curveComponentType. Adding new CurvePoints of a different Type will result in unexpected behaviour (future: will throw an exception)

Returns
null, if not yet set, the TFE.CurveComponent.CurveComponentType otherwise.

◆ GetMaxAmplitude()

Double CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.GetMaxAmplitude ( )

This method returns the maximum value of the curvepoints of this user-defined curve.

Returns
The maximum value of this user-defined curve.

◆ GetMaxAmplitudeNormalized()

UInt32 CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.GetMaxAmplitudeNormalized ( )

This method returns the (internal) normalized value of the maximum UserDef Amplitude. The normalized values are unsigned integer to be used in the TopCon device (because of integer arithmetic in the DSPs).

Returns
The maximum amplitude value of all curve points, represented as normalized unsigned integer [0...4000].

◆ GetTimerPrescaler()

UInt16 CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.GetTimerPrescaler ( )

This method returns the value of the TimerPrescaler of this UserDefined (time-based) curve

Returns
Integer that is used to multiply the relative time values. [0...65535]. A value of 20'000 means that the timeValue (y-coordinate) in the curvePoints are based on seconds [s].

◆ PrepareAddingCurvePoints()

void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.PrepareAddingCurvePoints ( CurveComponentType  thisCurveComponentType)

This method is needed to prepare the PointList for becoming a voltage, current or power curvePoint (changes the settings of the transformation between the true values and the internal representation).
Caution: It is currently possible to add curvePoints of a different type as this object is really used. The programmer is in charge to avoid this situation.

Parameters
thisCurveComponentTypeThe type of this curve component.

◆ ResetMainFunctionParameters()

void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.ResetMainFunctionParameters ( )

This method updates the standard values (Amplitude, Offset) in the curveContainer with values from the given curvePoints.

◆ SetTimerPrescaler()

void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.SetTimerPrescaler ( UInt16  newTimerPrescaler)

This method sets the TimerPrescaler value (this is linked to this UserDef function only). The TimerPrescaler is used to calculate the true time component of the CurvePoints from the given TimeData. Time-value and the base unit 50us
tDelta[s] = 50us * TimerPrescaler * timeValue
A value of 20'000 means that the timeValue is interpreted with base x * 1s;

Parameters
newTimerPrescalerThe new value of the TimerPrescaler [1...65535].

◆ ToString()

override string CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.ToString ( )

This method provides a readable string representation of the CurveComponent.

Returns
The string representation of this CurveComponent.

◆ UpdateCurveContainerFromObject()

override void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.UpdateCurveContainerFromObject ( CurveContainer  curveContainer)

This method updates the values in the curveContainer given as parameter with the properties of this object.

Parameters
curveContainerThe curveContainer to be filled with the values of this object.

◆ UpdateObjectFromCurveContainer()

override void CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.UpdateObjectFromCurveContainer ( CurveContainer  cc)

This function updates this object with the data from the curveContainer parameter.

Parameters
ccCurve container with curve raw data.

Member Data Documentation

◆ UserDefinedCurvePointList

readonly UserDefinedCurvePointList CH.Regatron.HPPS.TFE.UserDefinedCurveComponent.UserDefinedCurvePointList

This is the handle to the collection of curve points.