DEENESPTFRRUARHIKOZHNL

EFx Library (Efx)

ModulEfx (EFx Library)
BSW-Modul-ID208
Standard-Header#include "Efx.h"
SWS-SpezifikationAUTOSAR_CP_SWS_EFXLibrary.pdf, AUTOSAR_SWS_EFXLibrary.pdf
Umfang450 Records · 0 Snippets
ClusterAUTOSAR-Bibliotheken

EFx Library (Efx)

AUTOSAR Classic Libraries-Modul EFx Library (Efx, Spezifikation: AUTOSAR_CP_SWS_EFXLibrary.pdf, AUTOSAR_SWS_EFXLibrary.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

функция Efx_LpFilterFac1_<InType Mn><InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00005] 📄 PDF

<OutType> Efx_LpFilterFac1_<InType Mn><InType Mn><InType Mn>_<OutTypeMn>(<InType> Yn-1, <InType> Xn, <InType> fac);

This service computes the output of a first order low-pass filter

функция Efx_LpFilter_<InType Mn>_<OutTypeMn> [SWS_Efx_00012] 📄 PDF

<OutType> Efx_LpFilter_<InType Mn>_<OutTypeMn>(<InType> input, <InType> old_output, uint32 tau_const, uint16 recurrence, uint8 reset, <InType> init_val, uint8* started);

This service computes the first one order discrete filter

функция Efx_POut_<OutTypeMn> [SWS_Efx_00047] 📄 PDF

<OutType> Efx_POut_<OutTypeMn>(const sint32* P_ps32);

This routine returns 'P' controllers output value.

функция Efx_PT1Calc [SWS_Efx_00051] 📄 PDF

void Efx_PT1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);

This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn-1

функция Efx_PT1SetState [SWS_Efx_00056] 📄 PDF

void Efx_PT1SetState(Efx_StatePT1_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

The routine initialises internal state variables of a PT1 element.

функция Efx_PT1Out_<OutTypeMn> [SWS_Efx_00063] 📄 PDF

<OutType> Efx_PT1Out_<OutTypeMn>(const Efx_StatePT1_Type* State_cpst);

This routine returns 'PT1' controllers output value.

функция Efx_DT1Typ1Calc [SWS_Efx_00070] 📄 PDF

void Efx_DT1Typ1Calc(sint32 X_s32, Efx_StateDT1Typ1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);

This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn-1 - Xn-2) / dT)

функция Efx_DT1Typ1SetState [SWS_Efx_00077] 📄 PDF

void Efx_DT1Typ1SetState(Efx_StateDT1Typ1_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);

The routine initialises internal state variables of a DT1 element.

функция Efx_DT1Typ1Out_<OutTypeMn> [SWS_Efx_00081] 📄 PDF

<OutType> Efx_DT1Typ1Out_<OutTypeMn>(const Efx_StateDT1Typ1_Type* State_cpst);

This routine returns 'DT1' controller's output value.

функция Efx_PDCalc [SWS_Efx_00090] 📄 PDF

void Efx_PDCalc(sint32 X_s32, Efx_StatePD_Type* State_cpst, const Efx_ParamPD_Type* Param_cpst, sint32 dT_s32);

This routine computes proportional plus derivative controller output value using differential equation: Yn= K(1+Tv/dT) * Xn - K(Tv/dT) * Xn-1

функция Efx_PDSetState [SWS_Efx_00095] 📄 PDF

void Efx_PDSetState(Efx_StatePD_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

The routine initialises internal state variables of a PD element.

функция Efx_PDSetParam [SWS_Efx_00100] 📄 PDF

void Efx_PDSetParam(Efx_ParamPD_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32);

The routine sets the parameter structure of a PD element.

функция Efx_PDOut_<OutTypeMn> [SWS_Efx_00103] 📄 PDF

<OutType> Efx_PDOut_<OutTypeMn>(const Efx_StatePD_Type* State_cpcst);

This routine returns 'PD' controllers output value.

функция Efx_ICalc [SWS_Efx_00110] 📄 PDF

void Efx_ICalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, sint32 dT_s32);

This routine computes 'I' controller output value using differential equation, Yn = Yn-1 + K * dT * Xn-1

функция Efx_ISetState [SWS_Efx_00114] 📄 PDF

void Efx_ISetState(Efx_StateI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

The routine initialises internal state variables of an I element.

функция Efx_IOut_<OutTypeMn> [SWS_Efx_00118] 📄 PDF

<OutType> Efx_IOut_<OutTypeMn>(const Efx_StateI_Type* State_cpst);

This routine returns 'I' controller's output value.

функция Efx_PITyp1Calc [SWS_Efx_00125] 📄 PDF

void Efx_PITyp1Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);

This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn= Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1

функция Efx_PITyp2Calc [SWS_Efx_00130] 📄 PDF

void Efx_PITyp2Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);

This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn= Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1

функция Efx_PISetState [SWS_Efx_00135] 📄 PDF

void Efx_PISetState(Efx_StatePI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

The routine initialises internal state variables of a PI element.

функция Efx_PISetParam [SWS_Efx_00139] 📄 PDF

void Efx_PISetParam(Efx_ParamPI_Type* Param_cpst, sint32 K_s32, sint32 Tnrec);

The routine sets the parameter structure of a PI element.

функция Efx_PIOut_<OutTypeMn> [SWS_Efx_00142] 📄 PDF

<OutType> Efx_PIOut_<OutTypeMn>(const Efx_StatePI_Type* State_cpst);

This routine returns 'PI' controllers output value.

функция Efx_PIDTyp1Calc [SWS_Efx_00150] 📄 PDF

void Efx_PIDTyp1Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);

This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2

функция Efx_PIDTyp2Calc [SWS_Efx_00155] 📄 PDF

void Efx_PIDTyp2Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);

This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2

функция Efx_PIDSetState [SWS_Efx_00160] 📄 PDF

void Efx_PIDSetState(Efx_StatePID_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);

The routine initialises internal state variables of a PID element.

функция Efx_PIDSetParam [SWS_Efx_00164] 📄 PDF

void Efx_PIDSetParam(Efx_ParamPID_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32, sint32 Tnrec_s32);

The routine sets the parameter structure of a PID element.

функция Efx_PIDOut_<OutTypeMn> [SWS_Efx_00168] 📄 PDF

<OutType> Efx_PIDOut_<OutTypeMn>(const Efx_StatePID_Type* State_cpst);

This routine returns 'PID' controllers output value.

функция Efx_Array_Average_<InType Mn>_<OutTypeMn> [SWS_Efx_00193] 📄 PDF

<OutType> Efx_Array_Average_<InType Mn>_<OutTypeMn>(const <InType>* Array, uint16 Count);

The routine returns average value of an array.

функция Efx_MovingAverage_<InType Mn>_<OutTypeMn> [SWS_Efx_00197] 📄 PDF

<OutType> Efx_MovingAverage_<InType Mn>_<OutTypeMn>(Efx_MovingAvrg<InType Mn>_Type* state, <InType> value);

The routine returns sliding average value of n - 1 last subsequent values of an array plus one new value.

функция Efx_SlewRate_<InType Mn> [SWS_Efx_00261] 📄 PDF

void Efx_SlewRate_<InType Mn>(<InType> limit_pos, <InType> input, <InType> limit_neg, <InType>* output, uint8* init);

The routine limits the increase and the decrease of the Input entry by using tunable slopes.

функция Efx_RampCalc [SWS_Efx_00276] 📄 PDF

void Efx_RampCalc(sint32 X_s32, Efx_StateRamp_Type* State_cpst, const Efx_ParamRamp_Type* Param_cpcst, sint32 dT_s32);

The ramp output value increases or decreases a value with slope * dT_s32 depending if (State_ cpst->State_s32 < X_s32) or (State_cpst->State_s32 > X_s32).

функция Efx_RampInitState [SWS_Efx_00285] 📄 PDF

void Efx_RampInitState(Efx_StateRamp_Type* State_cpst, sint32 Val_s32);

Initializes the state, direction and switch parameters for the ramp.

функция Efx_RampSetParam [SWS_Efx_00287] 📄 PDF

void Efx_RampSetParam(Efx_ParamRamp_Type* Param_cpst, uint32 SlopePosVal_u32, uint32 SlopeNegVal_u32);

Sets the slope parameter for the ramp provided by the structure Efx_ParamRamp_Type.

функция Efx_RampOut_s32 [SWS_Efx_00289] 📄 PDF

sint32 Efx_RampOut_s32(const Efx_StateRamp_Type* State_cpcst);

Returns the internal state of the ramp element.

функция Efx_RampCalcJump [SWS_Efx_00291] 📄 PDF

void Efx_RampCalcJump(sint32 X_s32, Efx_StateRamp_Type* State_cpst);

This routine works in addition to main ramp function Efx_RampCalc to provide a faster adaption to target value.

функция Efx_RampGetSwitchPos [SWS_Efx_00307] 📄 PDF

boolean Efx_RampGetSwitchPos(const Efx_StateRamp_Type* State_cpst);

Gets the current switch position of ramp switch function.

функция Efx_RampCheckActivity [SWS_Efx_00309] 📄 PDF

boolean Efx_RampCheckActivity(const Efx_StateRamp_Type* State_cpst);

This routine checks the status of the ramp and returns TRUE if the ramp is active, otherwise it returns FALSE.

функция Efx_Hysteresis_<InType Mn>_<OutTypeMn> [SWS_Efx_00311] 📄 PDF

<OutType> Efx_Hysteresis_<InType Mn>_<OutTypeMn>(<InType> input, <InType> thresholdLow, <InType> thresholdHigh, <InType> Out_Val, <InType> Out_LowThresholdVal, <InType> Out_HighThresholdVal);

The routine estimates the output of the hysteresis.

функция Efx_HystCenterHalfDelta_<InType Mn>_<OutTypeMn> [SWS_Efx_00320] 📄 PDF

boolean Efx_HystCenterHalfDelta_<InType Mn>_<OutTypeMn>(<InType> X, <InType> center, <InType> halfDelta, boolean* State);

Hysteresis with center and left and right side halfDelta switching point.

функция Efx_HystLeftRight_<InType Mn>_<OutTypeMn> [SWS_Efx_00325] 📄 PDF

boolean Efx_HystLeftRight_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Rsp, boolean* State);

Hysteresis with left and right switching point.

функция Efx_HystDeltaRight_<InType Mn>_<OutTypeMn> [SWS_Efx_00331] 📄 PDF

boolean Efx_HystDeltaRight_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Delta, <InType> Rsp, boolean* State);

Hysteresis with right switching point and delta to left switching point

функция Efx_HystLeftDelta_<InType Mn>_<OutTypeMn> [SWS_Efx_00336] 📄 PDF

boolean Efx_HystLeftDelta_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Delta, boolean* State);

Hysteresis with left switching point and delta to right switching point.

функция Efx_Debounce_u8_u8 [SWS_Efx_00355] 📄 PDF

boolean Efx_Debounce_u8_u8(boolean X, Efx_DebounceState_Type* State, const Efx_DebounceParam_Type* Param, sint32 dT);

This routine debounces a digital input signal and returns the state of the signal as a boolean value.

функция Efx_DebounceInit [SWS_Efx_00362] 📄 PDF

void Efx_DebounceInit(Efx_DebounceState_Type* State, boolean X);

This routine call shall stop the debouncing timer.

функция Efx_DebounceSetParam [SWS_Efx_00365] 📄 PDF

void Efx_DebounceSetParam(Efx_DebounceParam_Type* Param, sint16 THighLow, sint16 TLowHigh);

This routine sets timing parameters, time for high to low transition and time for low to high for debouncing.

функция Efx_SortAscend_<InType Mn> [SWS_Efx_00370] 📄 PDF

void Efx_SortAscend_<InType Mn>(<OutType>* Array, uint16 Num);

The sorting algorithm modifies the given input array and rearranges data in ascending order.

функция Efx_SortDescend_<InType Mn> [SWS_Efx_00373] 📄 PDF

void Efx_SortDescend_<InType Mn>(<OutType>* Array, uint16 Num);

The sorting algorithm modifies the given input array and rearranges data in descending order.

функция Efx_MedianSort_<InType Mn>_<OutTypeMn> [SWS_Efx_00376] 📄 PDF

<OutType> Efx_MedianSort_<InType Mn>_<OutTypeMn>(<InType>* Array, uint8 N);

Sort an array and return its median value

функция Efx_EdgeBipol_u8_u8 [SWS_Efx_00380] 📄 PDF

boolean Efx_EdgeBipol_u8_u8(boolean Inp_Val, boolean* Old_Val);

This routine detects whether a signal has changed since the last call and returns TRUE. If signal has not changed then returns FALSE.

функция Efx_EdgeFalling_u8_u8 [SWS_Efx_00382] 📄 PDF

boolean Efx_EdgeFalling_u8_u8(boolean Inp_Val, boolean* Old_Val);

Returns TRUE when the signal has a falling edge, i.e. the signal was TRUE at the last call and FALSE at the actual call of this routine

функция Efx_EdgeRising_u8_u8 [SWS_Efx_00384] 📄 PDF

boolean Efx_EdgeRising_u8_u8(boolean Inp_Val, boolean* Old_Val);

Returns TRUE when the signal has a rising edge, i.e. the signal was FALSE at the last call and TRUE at the actual call of this routine

функция Efx_IntervalClosed_<InType Mn>_<OutTypeMn> [SWS_Efx_00386] 📄 PDF

boolean Efx_IntervalClosed_<InType Mn>_<OutTypeMn>(<InType> MinVal, <InType> InpVal, <InType> MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

функция Efx_IntervalOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00390] 📄 PDF

boolean Efx_IntervalOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

функция Efx_IntervalLeftOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00393] 📄 PDF

boolean Efx_IntervalLeftOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

функция Efx_IntervalRightOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00396] 📄 PDF

boolean Efx_IntervalRightOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

функция Efx_CounterSet_<InType Mn> [SWS_Efx_00399] 📄 PDF

void Efx_CounterSet_<InType Mn>(<InType>* CounterVal, <InType> Val);

The CounterSet routines initialise counter value with initial value • CounterVal = Val;

функция Efx_Counter_<InType Mn>_<OutTypeMn> [SWS_Efx_00400] 📄 PDF

<OutType> Efx_Counter_<InType Mn>_<OutTypeMn>(<InType>* CounterVal);

The counter routines increments the value of the parameter CounterVal by 1.

функция Efx_TypeLimiter_<InType Mn>_<OutTypeMn> [SWS_Efx_00410] 📄 PDF

<OutType> Efx_TypeLimiter_<InType Mn>_<OutTypeMn>(<InType> Input_Val);

limiter routine

функция Efx_Cast_<InType Mn>_<OutTypeMn> [SWS_Efx_00420] 📄 PDF

<OutType> Efx_Cast_<InType Mn>_<OutType Mn>(<InType> x_value);

Convert value of entry type in the value in the output type

функция Efx_Add_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00423] 📄 PDF

<OutType> Efx_Add_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);

This service makes an addition between the two arguments The addition is protected against the overflow.

функция Efx_Mul_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00426] 📄 PDF

<OutType> Efx_Mul_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);

This service makes a multiplication between the two arguments The multiplication is protected against the overflow.

функция Efx_Div_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00429] 📄 PDF

<OutType> Efx_Div_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);

These services make a division between the two arguments

функция Efx_Gt_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00436] 📄 PDF

boolean Efx_Gt_<InType Mn><InType Mn>_<OutType Mn>(<InType> x_value, <InType> y_value);

This service makes a comparison between the two arguments

функция Efx_ILimCalc [SWS_Efx_00455] 📄 PDF

void Efx_ILimCalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine computes DT1 controller output value using differential equation, Yn = Yn-1 + K * d T * Xn-1

функция Efx_PITyp1LimCalc [SWS_Efx_00465] 📄 PDF

void Efx_PITyp1LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn = Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1

функция Efx_PITyp2LimCalc [SWS_Efx_00475] 📄 PDF

void Efx_PITyp2LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1

функция Efx_PIDTyp1LimCalc [SWS_Efx_00485] 📄 PDF

void Efx_PIDTyp1LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2

функция Efx_PIDTyp2LimCalc [SWS_Efx_00495] 📄 PDF

void Efx_PIDTyp2LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2

функция Efx_DT1Typ2Calc [SWS_Efx_00501] 📄 PDF

void Efx_DT1Typ2Calc(sint32 X_s32, Efx_StateDT1Typ2_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);

This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn - Xn-1) / dT)

функция Efx_DT1Typ2SetState [SWS_Efx_00510] 📄 PDF

void Efx_DT1Typ2SetState(Efx_StateDT1Typ2_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

The routine initialises internal state variables of a DT1 element.

функция Efx_DT1Typ2Out_<OutTypeMn> [SWS_Efx_00515] 📄 PDF

<OutType> Efx_DT1Typ2Out_<OutTypeMn>(const Efx_StateDT1Typ2_Type* State_cpst);

This routine returns 'DT1' controller's output value.

функция Efx_RampCalcSwitch [SWS_Efx_00520] 📄 PDF

sint32 Efx_RampCalcSwitch(sint32 Xa_s32, sint32 Xb_s32, boolean Switch, Efx_StateRamp_Type* State_cpst);

This routine switches between two target values for a ramp service based on a Switch parameter.

функция Efx_PT1Typ1Calc [SWS_Efx_00531] 📄 PDF

void Efx_PT1Typ1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);

This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn

функция Efx_Abs_<InTypeMn1>_<OutTypeMn> [SWS_Efx_10001] 📄 PDF

<OutType> Efx_Abs_<InTypeMn1>_<OutTypeMn>(<InType1> x_value);

This routine computes the absolute value of a signed value

функция Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Efx_10006] 📄 PDF

<OutType> Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

This routine makes a subtraction between the two arguments.

функция Efx_Mod_<TypeMn> [SWS_Efx_10015] 📄 PDF

<Type> Efx_Mod_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

This routine returns the remainder of the division x_value / y_value if y_value is not zero.

тип Efx_MovingAvrgS16_Type [SWS_Efx_00204] 📄 PDF

Structure definition for sliding average routine for sint16 input value

тип Efx_ParamPD_Type [SWS_Efx_00827] 📄 PDF

System and Time equivalent parameter Structure for PD controller routine

тип Efx_StatePI_Type [SWS_Efx_00829] 📄 PDF

System State Structure for PI additive ( Type1 and Type 2 ) controller routine

тип Efx_ParamPI_Type [SWS_Efx_00830] 📄 PDF

System and Time equivalent parameter Structure for PI additive ( Type1 and Type 2 ) controller routine

тип Efx_StatePID_Type [SWS_Efx_00831] 📄 PDF

System State Structure for PID additive ( Type1 and Type 2 ) controller routine

тип Efx_ParamPID_Type [SWS_Efx_00832] 📄 PDF

System and Time equivalent parameter Structure for PID additive ( Type1 and Type 2 ) controller routine

тип Efx_MovingAvrgS32_Type [SWS_Efx_00836] 📄 PDF

Structure definition for sliding average routine for sint32 input value

requirement SWS_Efx_00006 [SWS_Efx_00006] 📄 PDF

Yn = Yn-1 + (((Xn - Yn-1) * fac) >> n) Where 'n' is a shift that depends on the types used by the functions for the factor

requirement SWS_Efx_00007 [SWS_Efx_00007] 📄 PDF

In order to converge all the time, the result is corrected for value saturation using the following logic: If (Yn == Yn-1) If (((Xn - Yn-1) * fac) > 0) Yn ++ Else If (((Xn - Yn-1) * fac) < 0) Yn – End If Endif

requirement SWS_Efx_00014 [SWS_Efx_00014] 📄 PDF

If (*started==0), then output = init_val This flag is used to indicate the filter state. *Started = 0, indicates that current function call is the first call of the function to trigger initialisation.

requirement SWS_Efx_00020 [SWS_Efx_00020] 📄 PDF

input, old_output, and init_val must have the same resolution and the same physical unit.

requirement SWS_Efx_00021 [SWS_Efx_00021] 📄 PDF

tau_const and recurrence must have the same resolution and the same physical unit

requirement SWS_Efx_00023 [SWS_Efx_00023] 📄 PDF

: Yn = Yn-1 - (K * Yn-1 / 216) + (Xn - Xn-1)*27 The result is rounded towards zero.

requirement SWS_Efx_00024 [SWS_Efx_00024] 📄 PDF

Return value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00025 [SWS_Efx_00025] 📄 PDF

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

requirement SWS_Efx_00027 [SWS_Efx_00027] 📄 PDF

Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*27 The result is rounded towards zero.

requirement SWS_Efx_00028 [SWS_Efx_00028] 📄 PDF

Return value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00029 [SWS_Efx_00029] 📄 PDF

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

requirement SWS_Efx_00031 [SWS_Efx_00031] 📄 PDF

Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*215 The result is rounded towards zero.

requirement SWS_Efx_00032 [SWS_Efx_00032] 📄 PDF

Return value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00033 [SWS_Efx_00033] 📄 PDF

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

requirement SWS_Efx_00036 [SWS_Efx_00036] 📄 PDF

Yn = Yn-1- (K* Yn-1/216) + (Xn- Xn-1)*215 The result is rounded towards zero.

requirement SWS_Efx_00037 [SWS_Efx_00037] 📄 PDF

Return value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00038 [SWS_Efx_00038] 📄 PDF

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1> 0)) decrement Ynby one If ((Yn equals Yn-1) and (Yn-1< 0)) increment Yn by one

requirement SWS_Efx_00049 [SWS_Efx_00049] 📄 PDF

Return value shall be saturated to boundary values of the return data type in case of negative or positive overflow.

requirement SWS_Efx_00052 [SWS_Efx_00052] 📄 PDF

This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)

requirement SWS_Efx_00053 [SWS_Efx_00053] 📄 PDF

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

requirement SWS_Efx_00054 [SWS_Efx_00054] 📄 PDF

If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1

requirement SWS_Efx_00055 [SWS_Efx_00055] 📄 PDF

calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

requirement SWS_Efx_00057 [SWS_Efx_00057] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00058 [SWS_Efx_00058] 📄 PDF

The internal state of the PT1 element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00059 [SWS_Efx_00059] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

requirement SWS_Efx_00062 [SWS_Efx_00062] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00065 [SWS_Efx_00065] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00066 [SWS_Efx_00066] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00071 [SWS_Efx_00071] 📄 PDF

This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((State_cpst->X1 - State_ cpst->X2) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.

requirement SWS_Efx_00072 [SWS_Efx_00072] 📄 PDF

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

requirement SWS_Efx_00073 [SWS_Efx_00073] 📄 PDF

If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (State_cpst->X1 - State_cpst->X2) / dT.

requirement SWS_Efx_00074 [SWS_Efx_00074] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00075 [SWS_Efx_00075] 📄 PDF

Old input value State->cpst->X1 shall be stored to State_cpst- >X2. State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00076 [SWS_Efx_00076] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00078 [SWS_Efx_00078] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00079 [SWS_Efx_00079] 📄 PDF

The internal state of the DT1 element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00080 [SWS_Efx_00080] 📄 PDF

Initialisation of input state variables X1 and X2. State_cpst->X1 = X1_s32 State_cpst->X2 = X2_s32

requirement SWS_Efx_00083 [SWS_Efx_00083] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00084 [SWS_Efx_00084] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00091 [SWS_Efx_00091] 📄 PDF

This equation derives implementation : Output_value = (Param_cpst->K_C * (1+ Param_cpst->Tv_C/dT_s32) * X_s32) - (Param_cpst->K_C * (Param_cpst->Tv_C/dT_s32) * State_cpst->X1) The result shall be Rounded towards Zero.

requirement SWS_Efx_00092 [SWS_Efx_00092] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00093 [SWS_Efx_00093] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00094 [SWS_Efx_00094] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00096 [SWS_Efx_00096] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00097 [SWS_Efx_00097] 📄 PDF

The internal state of the PD element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00098 [SWS_Efx_00098] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

requirement SWS_Efx_00102 [SWS_Efx_00102] 📄 PDF

Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32

requirement SWS_Efx_00105 [SWS_Efx_00105] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00106 [SWS_Efx_00106] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00111 [SWS_Efx_00111] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1

requirement SWS_Efx_00112 [SWS_Efx_00112] 📄 PDF

Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

requirement SWS_Efx_00113 [SWS_Efx_00113] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00115 [SWS_Efx_00115] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00116 [SWS_Efx_00116] 📄 PDF

The internal state of the DT1 element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00117 [SWS_Efx_00117] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

requirement SWS_Efx_00120 [SWS_Efx_00120] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00121 [SWS_Efx_00121] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00126 [SWS_Efx_00126] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)

requirement SWS_Efx_00127 [SWS_Efx_00127] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00128 [SWS_Efx_00128] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00129 [SWS_Efx_00129] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00131 [SWS_Efx_00131] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)

requirement SWS_Efx_00132 [SWS_Efx_00132] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00133 [SWS_Efx_00133] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00134 [SWS_Efx_00134] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00136 [SWS_Efx_00136] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00137 [SWS_Efx_00137] 📄 PDF

The internal state of the PD element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00138 [SWS_Efx_00138] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

requirement SWS_Efx_00141 [SWS_Efx_00141] 📄 PDF

Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32

requirement SWS_Efx_00144 [SWS_Efx_00144] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00145 [SWS_Efx_00145] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00151 [SWS_Efx_00151] 📄 PDF

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.

requirement SWS_Efx_00152 [SWS_Efx_00152] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00153 [SWS_Efx_00153] 📄 PDF

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00154 [SWS_Efx_00154] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00156 [SWS_Efx_00156] 📄 PDF

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.

requirement SWS_Efx_00157 [SWS_Efx_00157] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00158 [SWS_Efx_00158] 📄 PDF

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00159 [SWS_Efx_00159] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00161 [SWS_Efx_00161] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00162 [SWS_Efx_00162] 📄 PDF

The internal state of the PD element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00163 [SWS_Efx_00163] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32 Initialisation of input state variable X2. State_cpst->X2 = X2_s32

requirement SWS_Efx_00166 [SWS_Efx_00166] 📄 PDF

Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32

requirement SWS_Efx_00167 [SWS_Efx_00167] 📄 PDF

Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32

requirement SWS_Efx_00170 [SWS_Efx_00170] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00171 [SWS_Efx_00171] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00187 [SWS_Efx_00187] 📄 PDF

Output is quantized by 2ˆ16 Output Range = ([0.00004539....22026.4657948] * 2ˆ16) = [2....1443526462] Input Range = ([-10....10] * 2ˆ16) = [0xFFF60000....0x000A0000]

requirement SWS_Efx_00198 [SWS_Efx_00198] 📄 PDF

state ->p_beg pointer holds start address of an array state ->p_end pointer holds end address of an array state ->p_act pointer holds address of an oldest entry of an array

requirement SWS_Efx_00199 [SWS_Efx_00199] 📄 PDF

state ->sum shall store total sum including 'value' & excluding old- est entry state ->sum = state ->sum - *(state ->p_act) + value

requirement SWS_Efx_00200 [SWS_Efx_00200] 📄 PDF

In every routine call state ->p_act shall be incremented with wrap around. This increment ensures that oldest entry gets replaced with new entry.

requirement SWS_Efx_00264 [SWS_Efx_00264] 📄 PDF

Input, limit_pos, limit_neg and output must have the same resolu- tion and the same physical unit.

requirement SWS_Efx_00265 [SWS_Efx_00265] 📄 PDF

If the result of the Efx_SlewRate is only computed when some conditions are fulfilled, do not call the slew rate under the condition, but systematically! The slew rate must be called at each recurrence, even if it is not used, because oth- erwise, the output will be frozen to the previous value all the time, if conditions are not fulfilled.

requirement SWS_Efx_00266 [SWS_Efx_00266] 📄 PDF

The parameters given for output and init, for which we receive the addresses, must be declared by the caller as private variables and will be initialized at 0, because the function uses the previous values of these outputs (so the stack must not be used).

requirement SWS_Efx_00267 [SWS_Efx_00267] 📄 PDF

Physical values of limit_pos and limit_neg are positive. Internally limit_pos is added to output value and limit_neg is substracted from output value to get upper and lower limit band within which output value is limited.

requirement SWS_Efx_00268 [SWS_Efx_00268] 📄 PDF

At first step, when *init==0, output takes the value of input and *init will be put at 1.

requirement SWS_Efx_00269 [SWS_Efx_00269] 📄 PDF

limit_pos is added to the output and it becomes the maximum value of the new output limit_neg is deducted from the output and it becomes the minimum value of the new output. If input is outside this range, output is limited to these values, in the other case, output takes the value of input

requirement SWS_Efx_00270 [SWS_Efx_00270] 📄 PDF

Values of limit_pos and limit_neg shall be adapted to the fre- quency of the call of the service.

requirement SWS_Efx_00277 [SWS_Efx_00277] 📄 PDF

This routine decided if jump has to be done or not in case of change in target. Efx_RampCalc function shall be called after this function that a jump or the standard ramp behaviour is executed.

requirement SWS_Efx_00278 [SWS_Efx_00278] 📄 PDF

If ramp direction is rising then ramp increases a value with slope * dT_s32 if (State_cpst->Dir_s8 == RISING) State_cpst->State_s32 = State_cpst->State_s32 + (Param_cpcst->SlopePos_u32 * d T_s32) The minimum value of Param_cpcst->SlopePos_u32 * dT_s32 shall be 1, when Param- >SlopePos > 0. The intermediate results shall be rounded off. Ex: minimum increment of Param_cpcst->SlopePos_u32 * dT_s32 = 1/(2ˆ16*10ˆ6)

requirement SWS_Efx_00279 [SWS_Efx_00279] 📄 PDF

If ramp direction is falling then ramp decreases a value with slope * dT_s32 if (State_cpst->Dir_s8 == FALLING) State_cpst->State_s32 = State_cpst->State_s32 - (Param_cpcst->SlopeNeg_u32 * d T_s32) The minimum value of Param_cpcst->SlopeNeg_u32 * dT_s32 shall be 1, when Param->SlopeNeg > 0. The intermediate results shall be rounded off. Ex: minimum decrement of Param_cpcst->SlopeNeg_u32 * dT_s32 = 1/(2ˆ16*10ˆ6)

requirement SWS_Efx_00280 [SWS_Efx_00280] 📄 PDF

Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.

requirement SWS_Efx_00281 [SWS_Efx_00281] 📄 PDF

Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END

requirement SWS_Efx_00284 [SWS_Efx_00284] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00286 [SWS_Efx_00286] 📄 PDF

Ramp direction is initialised with END value. User has no possi- bility to change or modify ramp direction. State_cpst->Dir_s8 = END E.g. of ramp direction states: RISING = 1, FALLING = -1, END = 0

requirement SWS_Efx_00288 [SWS_Efx_00288] 📄 PDF

Sets positive and negative ramp slopes. Param_cpst->SlopePos_u32 = SlopePosVal_u32 Param_cpst ->SlopeNeg_u32 = SlopeNegVal_u32

requirement SWS_Efx_00292 [SWS_Efx_00292] 📄 PDF

If target value changes to a value contrary to current ramp direc- tion and ramp has not reached its old target value then ramp state jumps to new target value immediately. State_cpst->State_s32 = X_s32 State_cpst->Dir_s8 = END

requirement SWS_Efx_00293 [SWS_Efx_00293] 📄 PDF

If target value is changed to new value and ramp has reached its old target value then normal ramp behavior is maintained. State_cpst->Dir_s8 = END

requirement SWS_Efx_00303 [SWS_Efx_00303] 📄 PDF

Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.

requirement SWS_Efx_00304 [SWS_Efx_00304] 📄 PDF

Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END

requirement SWS_Efx_00308 [SWS_Efx_00308] 📄 PDF

Return value = TRUE if Switch position State_cpst->Switch_s8 = TARGET_A Return value = FALSE if Switch position State_cpst->Switch_s8 = TARGET_B

requirement SWS_Efx_00310 [SWS_Efx_00310] 📄 PDF

return value = TRUE, if Ramp is active (State_cpst->Dir_s8 != END) return value = FALSE, if Ramp is inactive (State_cpst->Dir_s8 == END)

requirement SWS_Efx_00312 [SWS_Efx_00312] 📄 PDF

If Input < thresholdLow, Then return_value = Out_LowThreshold Val

requirement SWS_Efx_00313 [SWS_Efx_00313] 📄 PDF

If Input > thresholdHigh, Then return_value = Out_HighThreshold Val

requirement SWS_Efx_00314 [SWS_Efx_00314] 📄 PDF

If thresholdLow  Input  thresholdHigh, then return_value = Out_Val

requirement SWS_Efx_00315 [SWS_Efx_00315] 📄 PDF

Input, thresholdLow and thresholdHigh must have the same reso- lution and the same physical unit.

requirement SWS_Efx_00316 [SWS_Efx_00316] 📄 PDF

Return_value , Out_Val, Out_LowThresholdVal and Out_High ThresholdVal must have the same resolution and the same physical unit.

requirement SWS_Efx_00321 [SWS_Efx_00321] 📄 PDF

Return value = TRUE, if X > center + halfDelta Return value = FALSE, if X < center - halfDelta Return value is former state value if (center - halfDelta)  X  (center + halfDelta )

requirement SWS_Efx_00322 [SWS_Efx_00322] 📄 PDF

Parameters X, center and halfDelta should have the same data type.

requirement SWS_Efx_00326 [SWS_Efx_00326] 📄 PDF

Return value = TRUE, if X > Rsp (right switching point) Return value = FALSE, if X < Lsp (left switching point) Return value is former state value if Lsp  X  Rsp

requirement SWS_Efx_00332 [SWS_Efx_00332] 📄 PDF

Return value = TRUE if X > Rsp (right switching point) Return value = FALSE if X < (Rsp - Delta) Return value is former state value if (Rsp - Delta)  X  Rsp

requirement SWS_Efx_00337 [SWS_Efx_00337] 📄 PDF

Return value is TRUE if X > (Lsp + Delta) Return value is FALSE if X < Lsp Return value is former state value if Lsp  X  (Lsp + Delta)

requirement SWS_Efx_00357 [SWS_Efx_00357] 📄 PDF

If transition occurs from FALSE to TRUE (i.e State->XOld = FALSE and X = TRUE), then use Param->TimeLowHigh as debouncing time; otherwise use Param->TimeHighLow.

requirement SWS_Efx_00358 [SWS_Efx_00358] 📄 PDF

State->Timer is incremented with sample time for debouncing in- put signal. Once reached to the set period, old state is updated with X. State->Timer += dT; If (State->Timer  (TimePeriod * 10000)) State->XOld = X, and stop the timer, State->Timer = 0 where TimePeriod = Param->TimeLowHigh or Param->TimeHighLow

requirement SWS_Efx_00359 [SWS_Efx_00359] 📄 PDF

Old value shall be returned as a output value. Current input is stored to old state. Return value = State->XOld State->XOld = X

requirement SWS_Efx_00360 [SWS_Efx_00360] 📄 PDF

Resolution of dT is 10-6 seconds per increment of 1 data repre- sentation unit

requirement SWS_Efx_00377 [SWS_Efx_00377] 📄 PDF

This routine sorts values of an array in ascending order. Input array passed by the pointer shall have sorted values after this routine call.

requirement SWS_Efx_00378 [SWS_Efx_00378] 📄 PDF

Returns the median value of sorted array in case of N is even. Result = (Sorted_array[N/2] + Sorted_array[(N/2) - 1] ) / 2

requirement SWS_Efx_00381 [SWS_Efx_00381] 📄 PDF

if (Inp_Val != *Old_Val) return value = TRUE else return value = FALSE.

requirement SWS_Efx_00383 [SWS_Efx_00383] 📄 PDF

Return value = TRUE, If (*Old_Val == TRUE && Inp_Val == FALSE) Return value = FALSE, otherwise.

requirement SWS_Efx_00385 [SWS_Efx_00385] 📄 PDF

Return value = TRUE, If (*Old_Val == FALSE && Inp_Val == TRUE) Return value = FALSE, otherwise.

requirement SWS_Efx_00387 [SWS_Efx_00387] 📄 PDF

Return value = TRUE, if (MinVal  InpVal  MaxVal) Return value = FALSE, otherwise.

requirement SWS_Efx_00391 [SWS_Efx_00391] 📄 PDF

Return value = TRUE, if (MinVal < InpVal < MaxVal) Return value = FALSE, otherwise.

requirement SWS_Efx_00394 [SWS_Efx_00394] 📄 PDF

Return value = TRUE, if (MinVal < InpVal  MaxVal) Return value = FALSE, otherwise.

requirement SWS_Efx_00397 [SWS_Efx_00397] 📄 PDF

Return value = TRUE, if (MinVal  InpVal < MaxVal) Return value = FALSE, otherwise.

requirement SWS_Efx_00401 [SWS_Efx_00401] 📄 PDF

The return value is the new value of the parameter CounterVal. * CounterVal ++; Return value = *CounterVal;

requirement SWS_Efx_00402 [SWS_Efx_00402] 📄 PDF

In case of saturation, counter value shall not be reset to 0 and shall not be incremented. Return value = Saturated value of the counter data type

requirement SWS_Efx_00406 [SWS_Efx_00406] 📄 PDF

The reset switch is higher prior than the set switch, e.g. R_Val = TRUE, S_Val = TRUE Then state and return value = FALSE

requirement SWS_Efx_00407 [SWS_Efx_00407] 📄 PDF

Reset condition : R_Val = TRUE, S_Val = FALSE Then state and return value = FALSE

requirement SWS_Efx_00408 [SWS_Efx_00408] 📄 PDF

Set condition : R_Val = FALSE, S_Val = TRUE Then state and return value = TRUE

requirement SWS_Efx_00409 [SWS_Efx_00409] 📄 PDF

Invalid condition : R_Val = FALSE, S_Val = FALSE Then state and return value are unchanged

requirement SWS_Efx_00411 [SWS_Efx_00411] 📄 PDF

Input value shall be saturated according to the data type of the return parameter. e.g. If return type is sint16 and input data range is uint32, then output value will be limited to sint16 data range.

requirement SWS_Efx_00431 [SWS_Efx_00431] 📄 PDF

The result after division by zero is defined by: If x_value  0 then the function returns the maximum value of the output type If x_value < 0 then the function returns the minimum value of the output type

requirement SWS_Efx_00435 [SWS_Efx_00435] 📄 PDF

Extract the sign of an integer value. It is defined as follows: Return-value = {-1, if x_value < 0; 0, if x_value == 0; 1, if x_value > 0}

requirement SWS_Efx_00440 [SWS_Efx_00440] 📄 PDF

Returns the median value of sorted array in case of N is odd. Return_Value = Sorted_array [N/2] = 15

requirement SWS_Efx_00442 [SWS_Efx_00442] 📄 PDF

Initialisation of state variable State_cpst->State_s32 = Val_s32

requirement SWS_Efx_00443 [SWS_Efx_00443] 📄 PDF

Initialisation of switch variable. User has no possibility to change or modify switch initialization value. State_cpst->Switch_s8 = OFF E.g. of switch states: TARGET_A = 1, TARGET_B = -1, OFF = 0

requirement SWS_Efx_00451 [SWS_Efx_00451] 📄 PDF

TeQApp = 1 - (T1rec_s32 * dT_s32) TeQApp is factorised by 2ˆ16 This approximation is valid only when the product of the physical values of T1rec_s32 and dt_s32 is less than 1. i.e, (T1rec_s32 * dT_s32) < 1

requirement SWS_Efx_00452 [SWS_Efx_00452] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00456 [SWS_Efx_00456] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1

requirement SWS_Efx_00457 [SWS_Efx_00457] 📄 PDF

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

requirement SWS_Efx_00458 [SWS_Efx_00458] 📄 PDF

Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

requirement SWS_Efx_00459 [SWS_Efx_00459] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00466 [SWS_Efx_00466] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)

requirement SWS_Efx_00467 [SWS_Efx_00467] 📄 PDF

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

requirement SWS_Efx_00468 [SWS_Efx_00468] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00469 [SWS_Efx_00469] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00470 [SWS_Efx_00470] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00476 [SWS_Efx_00476] 📄 PDF

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)

requirement SWS_Efx_00477 [SWS_Efx_00477] 📄 PDF

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

requirement SWS_Efx_00478 [SWS_Efx_00478] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00479 [SWS_Efx_00479] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00480 [SWS_Efx_00480] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00486 [SWS_Efx_00486] 📄 PDF

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32

requirement SWS_Efx_00487 [SWS_Efx_00487] 📄 PDF

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

requirement SWS_Efx_00488 [SWS_Efx_00488] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00489 [SWS_Efx_00489] 📄 PDF

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00490 [SWS_Efx_00490] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00496 [SWS_Efx_00496] 📄 PDF

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32

requirement SWS_Efx_00497 [SWS_Efx_00497] 📄 PDF

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

requirement SWS_Efx_00498 [SWS_Efx_00498] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00499 [SWS_Efx_00499] 📄 PDF

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00500 [SWS_Efx_00500] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00502 [SWS_Efx_00502] 📄 PDF

This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((X_s32 - State_cpst->X1) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.

requirement SWS_Efx_00503 [SWS_Efx_00503] 📄 PDF

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32.

requirement SWS_Efx_00504 [SWS_Efx_00504] 📄 PDF

If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (X_s32 - State_cpst->X1) / dT

requirement SWS_Efx_00505 [SWS_Efx_00505] 📄 PDF

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

requirement SWS_Efx_00506 [SWS_Efx_00506] 📄 PDF

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

requirement SWS_Efx_00507 [SWS_Efx_00507] 📄 PDF

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

requirement SWS_Efx_00511 [SWS_Efx_00511] 📄 PDF

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

requirement SWS_Efx_00512 [SWS_Efx_00512] 📄 PDF

The internal state of the DT1 element is stored as (Y1_s16 << 16)

requirement SWS_Efx_00513 [SWS_Efx_00513] 📄 PDF

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

requirement SWS_Efx_00517 [SWS_Efx_00517] 📄 PDF

Output value shall be normalized by 16 bit right shift of internal state variable.

requirement SWS_Efx_00518 [SWS_Efx_00518] 📄 PDF

Return value shall be limited by boundary values of the return data type.

requirement SWS_Efx_00521 [SWS_Efx_00521] 📄 PDF

Parameter Switch decides which target value is selected. If Switch = TRUE, then Xa_s32 is selected. State_cpst->Switch_s8 is set to TARGET_A Return value = Xa_s32 If Switch = FALSE, then Xb_s32 is selected. State_cpst->Switch_s8 is set to TARGET_B Return value = Xb_s32

requirement SWS_Efx_00522 [SWS_Efx_00522] 📄 PDF

State_cpst->Dir_s8 hold direction information State_cpst->Dir_s8 shall be set to END to reset direction information in case of target switch.

requirement SWS_Efx_00524 [SWS_Efx_00524] 📄 PDF

Update limit structure Limit_cpst->Min_C = Min_s32 Limit_cpst->Max_C = Max_s32

requirement SWS_Efx_00527 [SWS_Efx_00527] 📄 PDF

Amplification factor is quantized with 1/216 per increment of 1 data representation unit

requirement SWS_Efx_00528 [SWS_Efx_00528] 📄 PDF

Efx_RampCalcSwitch routine has to be called before Efx_Ramp Calc

requirement SWS_Efx_00532 [SWS_Efx_00532] 📄 PDF

This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)

requirement SWS_Efx_00533 [SWS_Efx_00533] 📄 PDF

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

requirement SWS_Efx_00534 [SWS_Efx_00534] 📄 PDF

If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1

requirement SWS_Efx_00535 [SWS_Efx_00535] 📄 PDF

calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

requirement SWS_Efx_00800 [SWS_Efx_00800] 📄 PDF

Efx library shall not require initialization phase. A Library function may be called at the very first step of ECU initialization, e.g. even by the OS or EcuM, thus the library shall be ready.

requirement SWS_Efx_00806 [SWS_Efx_00806] 📄 PDF

The Efx library shall be implemented in a way that the code can be shared among callers in different memory partitions.

requirement SWS_Efx_00807 [SWS_Efx_00807] 📄 PDF

Usage of macros should be avoided. The function should be de- clared as function or inline function. Macro #define should not be used.

requirement SWS_Efx_00808 [SWS_Efx_00808] 📄 PDF

A library function shall not call any BSW modules functions, e.g. the DET. A library function can call other library functions. Because a library function shall be re-entrant. But other BSW modules functions may not be re-entrant.

requirement SWS_Efx_00809 [SWS_Efx_00809] 📄 PDF

The library, written in C programming language, should conform to the MISRA C Standard. Please refer to SWS_BSW_00115 for more details.

requirement SWS_Efx_00810 [SWS_Efx_00810] 📄 PDF

Each AUTOSAR library Module implementation <library>*.c and <library>*.h shall map their code to memory sections using the AUTOSAR memory mapping mechanism.

requirement SWS_Efx_00812 [SWS_Efx_00812] 📄 PDF

All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this library is clearly identified to be compliant only with a platform.

requirement SWS_Efx_00813 [SWS_Efx_00813] 📄 PDF

All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly identified to be compliant only with a platform. eg. #pragma, typeof etc.

requirement SWS_Efx_00814 [SWS_Efx_00814] 📄 PDF

The standardized common published parameters as required by SRS_BSW_00402 in the General Requirements on Basic Software Modules [REF] shall be published within the header file of this module and need to be provided in the BSW Module Description. The according module abbreviation can be found in the List of Basic Software Modules [REF].

requirement SWS_Efx_00816 [SWS_Efx_00816] 📄 PDF

If source code for caller and callee of Efx_GetVersionInfo is avail- able, the Efx library should realize Efx_GetVersionInfo as a macro defined in the mod- ule's header file.

requirement SWS_Efx_00818 [SWS_Efx_00818] 📄 PDF

The Efx library shall not have any configuration options that may affect the functional behavior of the routines. I.e. for a given set of input parameters, the outputs shall be always the same. For example, the returned value in case of error shall not be configurable.

requirement SWS_Efx_00821 [SWS_Efx_00821] 📄 PDF

Section 7.1 "Error Handling" of the document "General Specifica- tion of Basic Software Modules" describes the error handling of the Basic Software in detail. Above all, it constitutes a classification scheme consisting of five error types which may occur in BSW modules.

requirement SWS_Efx_00823 [SWS_Efx_00823] 📄 PDF

Integral promotion has to be adhered to when implementing Efx services. Thus, to obtain maximal precision, intermediate results shall not be limited.

requirement SWS_Efx_00837 [SWS_Efx_00837] 📄 PDF

If the ramp state State_cpst->State_s32 has reached or crossed the target value X_s32 while the direction of the ramp had been RISING/FALLING, then set State_cpst->State_s32 = X_s32

requirement SWS_Efx_00843 [SWS_Efx_00843] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00844 [SWS_Efx_00844] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_00845 [SWS_Efx_00845] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_10002 [SWS_Efx_10002] 📄 PDF

This routine computes the absolute value of a signed value: Return-value = |x_value|

requirement SWS_Efx_10003 [SWS_Efx_10003] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_10007 [SWS_Efx_10007] 📄 PDF

This routine makes a subtraction between the two arguments: Return-value = x_value - y_value.

requirement SWS_Efx_10008 [SWS_Efx_10008] 📄 PDF

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

requirement SWS_Efx_91001 [SWS_Efx_91001] 📄 PDF

Module Header File Imported Type Std Std_Types.h Std_VersionInfoType

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_Efx
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_Efx@rel:R20-11#cb585542
Content hash
cb585542
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_EFXLibrary.pdf#nameddest=SWS_Efx_00005

Карта тем

Инициализация и состояние

1

Сервисы

105
Efx_Abs_InTypeMn1_OutTypeMnEfx_Add_InTypeMnInTypeMn_OutTypeMnEfx_ArcCos_s16_u16Efx_ArcCos_s32_u32Efx_ArcCos_s8_u8Efx_ArcSin_s32_s32Efx_ArcSin_s8_s8Efx_Array_Average_InTypeMn_OutTypeMnEfx_ArsSin_s16_s16Efx_Average_s32_s32Efx_CalcTeQ_s32Efx_CalcTeQApp_s32Efx_Cast_InTypeMn_OutTypeMnEfx_Cos_s16_s16Efx_Cos_s32_s32Efx_Cos_s8_s8Efx_Counter_InTypeMn_OutTypeMnEfx_CounterSet_InTypeMnEfx_CtrlSetLimitsEfx_Debounce_u8_u8Efx_DebounceInitEfx_DebounceSetParamEfx_Div_InTypeMnInTypeMn_OutTypeMnEfx_DT1Typ1CalcEfx_DT1Typ1Out_OutTypeMnEfx_DT1Typ1SetStateEfx_DT1Typ2CalcEfx_DT1Typ2Out_OutTypeMnEfx_DT1Typ2SetStateEfx_EdgeBipol_u8_u8Efx_EdgeFalling_u8_u8Efx_EdgeRising_u8_u8Efx_Exp_s32_s32Efx_HpFilter_s16_s32Efx_HpFilter_s8_s16Efx_HpFilter_u16_s32Efx_HpFilter_u8_s16Efx_Hypot_u16u16_u16Efx_Hypot_u32u32_u32Efx_Hypot_u8u8_u8Efx_HystCenterHalfDelta_InTypeMn_OutTypeMnEfx_HystDeltaRight_InTypeMn_OutTypeMnEfx_Hysteresis_InTypeMn_OutTypeMnEfx_HystLeftDelta_InTypeMn_OutTypeMnEfx_HystLeftRight_InTypeMn_OutTypeMnEfx_ICalcEfx_ILimCalcEfx_IntervalClosed_InTypeMn_OutTypeMnEfx_IntervalLeftOpen_InTypeMn_OutTypeMnEfx_IntervalOpen_InTypeMn_OutTypeMnEfx_IntervalRightOpen_InTypeMn_OutTypeMnEfx_IOut_OutTypeMnEfx_ISetStateEfx_LpFilter_InTypeMn_OutTypeMnEfx_LpFilterFac1_InTypeMnInTypeMnInTypeMn_OutTypeMnEfx_MedianSort_InTypeMn_OutTypeMnEfx_Mod_TypeMnEfx_MovingAverage_InTypeMn_OutTypeMnEfx_Mul_InTypeMnInTypeMn_OutTypeMnEfx_PCalcEfx_PDCalcEfx_PDOut_OutTypeMnEfx_PDSetParamEfx_PDSetStateEfx_PIDOut_OutTypeMnEfx_PIDSetParamEfx_PIDSetStateEfx_PIDTyp1CalcEfx_PIDTyp1LimCalcEfx_PIDTyp2CalcEfx_PIDTyp2LimCalcEfx_PIOut_OutTypeMnEfx_PISetParamEfx_PISetStateEfx_PITyp1CalcEfx_PITyp1LimCalcEfx_PITyp2CalcEfx_PITyp2LimCalcEfx_POut_OutTypeMnEfx_PSetStateEfx_PT1CalcEfx_PT1Out_OutTypeMnEfx_PT1SetStateEfx_PT1Typ1CalcEfx_RampCalcEfx_RampCalcJumpEfx_RampCalcSwitchEfx_RampCheckActivityEfx_RampGetSwitchPosEfx_RampInitStateEfx_RampOut_s32Efx_RampSetParamEfx_RSFlipFlopEfx_Sgn_s64_s8Efx_Sin_s16_s16Efx_Sin_s32_s32Efx_Sin_s8_s8Efx_SlewRate_InTypeMnEfx_SortAscend_InTypeMnEfx_SortDescend_InTypeMnEfx_Sqrt_u16_u16Efx_Sqrt_u32_u32Efx_Sqrt_u8_u8Efx_Sub_InTypeMn1InTypeMn2_OutTypeMnEfx_TypeLimiter_InTypeMn_OutTypeMn

Callout-функции и ожидаемые интерфейсы

1

Требования

326
SWS_Efx_00006SWS_Efx_00007SWS_Efx_00008SWS_Efx_00013SWS_Efx_00014SWS_Efx_00015SWS_Efx_00016SWS_Efx_00017SWS_Efx_00018SWS_Efx_00020SWS_Efx_00021SWS_Efx_00023SWS_Efx_00024SWS_Efx_00025SWS_Efx_00027SWS_Efx_00028SWS_Efx_00029SWS_Efx_00031SWS_Efx_00032SWS_Efx_00033SWS_Efx_00036SWS_Efx_00037SWS_Efx_00038SWS_Efx_00045SWS_Efx_00046SWS_Efx_00048SWS_Efx_00049SWS_Efx_00050SWS_Efx_00052SWS_Efx_00053SWS_Efx_00054SWS_Efx_00055SWS_Efx_00057SWS_Efx_00058SWS_Efx_00059SWS_Efx_00061SWS_Efx_00062SWS_Efx_00064SWS_Efx_00065SWS_Efx_00066SWS_Efx_00067SWS_Efx_00071SWS_Efx_00072SWS_Efx_00073SWS_Efx_00074SWS_Efx_00075SWS_Efx_00076SWS_Efx_00078SWS_Efx_00079SWS_Efx_00080SWS_Efx_00082SWS_Efx_00083SWS_Efx_00084SWS_Efx_00085SWS_Efx_00091SWS_Efx_00092SWS_Efx_00093SWS_Efx_00094SWS_Efx_00096SWS_Efx_00097SWS_Efx_00098SWS_Efx_00101SWS_Efx_00102SWS_Efx_00104SWS_Efx_00105SWS_Efx_00106SWS_Efx_00107SWS_Efx_00111SWS_Efx_00112SWS_Efx_00113SWS_Efx_00115SWS_Efx_00116SWS_Efx_00117SWS_Efx_00119SWS_Efx_00120SWS_Efx_00121SWS_Efx_00122SWS_Efx_00126SWS_Efx_00127SWS_Efx_00128SWS_Efx_00129SWS_Efx_00131SWS_Efx_00132SWS_Efx_00133SWS_Efx_00134SWS_Efx_00136SWS_Efx_00137SWS_Efx_00138SWS_Efx_00140SWS_Efx_00141SWS_Efx_00143SWS_Efx_00144SWS_Efx_00145SWS_Efx_00146SWS_Efx_00151SWS_Efx_00152SWS_Efx_00153SWS_Efx_00154SWS_Efx_00156SWS_Efx_00157SWS_Efx_00158SWS_Efx_00159SWS_Efx_00161SWS_Efx_00162SWS_Efx_00163SWS_Efx_00165SWS_Efx_00166SWS_Efx_00167SWS_Efx_00169SWS_Efx_00170SWS_Efx_00171SWS_Efx_00172SWS_Efx_00176SWS_Efx_00177SWS_Efx_00179SWS_Efx_00180SWS_Efx_00182SWS_Efx_00183SWS_Efx_00186SWS_Efx_00187SWS_Efx_00191SWS_Efx_00192SWS_Efx_00194SWS_Efx_00195SWS_Efx_00196SWS_Efx_00198SWS_Efx_00199SWS_Efx_00200SWS_Efx_00201SWS_Efx_00202SWS_Efx_00203SWS_Efx_00205SWS_Efx_00211SWS_Efx_00212SWS_Efx_00214SWS_Efx_00215SWS_Efx_00217SWS_Efx_00218SWS_Efx_00222SWS_Efx_00225SWS_Efx_00228SWS_Efx_00231SWS_Efx_00234SWS_Efx_00237SWS_Efx_00242SWS_Efx_00245SWS_Efx_00248SWS_Efx_00252SWS_Efx_00255SWS_Efx_00258SWS_Efx_00262SWS_Efx_00264SWS_Efx_00265SWS_Efx_00266SWS_Efx_00267SWS_Efx_00268SWS_Efx_00269SWS_Efx_00270SWS_Efx_00271SWS_Efx_00277SWS_Efx_00278SWS_Efx_00279SWS_Efx_00280SWS_Efx_00281SWS_Efx_00284SWS_Efx_00286SWS_Efx_00288SWS_Efx_00290SWS_Efx_00292SWS_Efx_00293SWS_Efx_00303SWS_Efx_00304SWS_Efx_00308SWS_Efx_00310SWS_Efx_00312SWS_Efx_00313SWS_Efx_00314SWS_Efx_00315SWS_Efx_00316SWS_Efx_00317SWS_Efx_00321SWS_Efx_00322SWS_Efx_00323SWS_Efx_00324SWS_Efx_00326SWS_Efx_00327SWS_Efx_00328SWS_Efx_00329SWS_Efx_00330SWS_Efx_00332SWS_Efx_00333SWS_Efx_00334SWS_Efx_00335SWS_Efx_00337SWS_Efx_00338SWS_Efx_00339SWS_Efx_00340SWS_Efx_00356SWS_Efx_00357SWS_Efx_00358SWS_Efx_00359SWS_Efx_00360SWS_Efx_00363SWS_Efx_00364SWS_Efx_00366SWS_Efx_00372SWS_Efx_00375SWS_Efx_00377SWS_Efx_00378SWS_Efx_00379SWS_Efx_00381SWS_Efx_00383SWS_Efx_00385SWS_Efx_00387SWS_Efx_00388SWS_Efx_00391SWS_Efx_00392SWS_Efx_00394SWS_Efx_00395SWS_Efx_00397SWS_Efx_00398SWS_Efx_00401SWS_Efx_00402SWS_Efx_00403SWS_Efx_00404SWS_Efx_00406SWS_Efx_00407SWS_Efx_00408SWS_Efx_00409SWS_Efx_00411SWS_Efx_00412SWS_Efx_00424SWS_Efx_00425SWS_Efx_00427SWS_Efx_00428SWS_Efx_00430SWS_Efx_00431SWS_Efx_00433SWS_Efx_00434SWS_Efx_00435SWS_Efx_00437SWS_Efx_00440SWS_Efx_00441SWS_Efx_00442SWS_Efx_00443SWS_Efx_00451SWS_Efx_00452SWS_Efx_00456SWS_Efx_00457SWS_Efx_00458SWS_Efx_00459SWS_Efx_00466SWS_Efx_00467SWS_Efx_00468SWS_Efx_00469SWS_Efx_00470SWS_Efx_00476SWS_Efx_00477SWS_Efx_00478SWS_Efx_00479SWS_Efx_00480SWS_Efx_00486SWS_Efx_00487SWS_Efx_00488SWS_Efx_00489SWS_Efx_00490SWS_Efx_00496SWS_Efx_00497SWS_Efx_00498SWS_Efx_00499SWS_Efx_00500SWS_Efx_00502SWS_Efx_00503SWS_Efx_00504SWS_Efx_00505SWS_Efx_00506SWS_Efx_00507SWS_Efx_00511SWS_Efx_00512SWS_Efx_00513SWS_Efx_00516SWS_Efx_00517SWS_Efx_00518SWS_Efx_00519SWS_Efx_00521SWS_Efx_00522SWS_Efx_00524SWS_Efx_00526SWS_Efx_00527SWS_Efx_00528SWS_Efx_00532SWS_Efx_00533SWS_Efx_00534SWS_Efx_00535SWS_Efx_00800SWS_Efx_00801SWS_Efx_00806SWS_Efx_00807SWS_Efx_00808SWS_Efx_00809SWS_Efx_00810SWS_Efx_00812SWS_Efx_00813SWS_Efx_00814SWS_Efx_00816SWS_Efx_00818SWS_Efx_00821SWS_Efx_00822SWS_Efx_00823SWS_Efx_00837SWS_Efx_00843SWS_Efx_00844SWS_Efx_00845SWS_Efx_10002SWS_Efx_10003SWS_Efx_10004SWS_Efx_10005SWS_Efx_10007SWS_Efx_10008SWS_Efx_10009SWS_Efx_10010SWS_Efx_10011SWS_Efx_10012SWS_Efx_10013SWS_Efx_10014SWS_Efx_91001

Подробный вид

Выберите элемент в оглавлении.

Инициализация и состояние

Efx_GetVersionInfo функция

Returns the version information of this library.

void Efx_GetVersionInfo(Std_VersionInfoType* versioninfo);

Сервисы

This routine computes the absolute value of a signed value

<OutType> Efx_Abs_<InTypeMn1>_<OutTypeMn>(<InType1> x_value);

This service makes an addition between the two arguments The addition is protected against the overflow.

<OutType> Efx_Add_<InTypeMn><InTypeMn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
Efx_ArcCos_s16_u16 функция

This service computes the inverse cosine of a value.

uint16 Efx_ArcCos_s16_u16(sint16 x_value);
Efx_ArcCos_s32_u32 функция

This service computes the inverse cosine of a value.

uint32 Efx_ArcCos_s32_u32(sint32 x_value);
Efx_ArcCos_s8_u8 функция

This service computes the inverse cosine of a value.

uint8 Efx_ArcCos_s8_u8(sint8 x_value);
Efx_ArcSin_s32_s32 функция

This service computes the inverse sine of a value.

sint32 Efx_ArcSin_s32_s32(sint32 x_value);
Efx_ArcSin_s8_s8 функция

This service computes the inverse sine of a value.

sint8 Efx_ArcSin_s8_s8(sint8 x_value);

The routine returns average value of an array.

<OutType> Efx_Array_Average_<InTypeMn>_<OutTypeMn>(const <InType>* Array, uint16 Count);
Efx_ArsSin_s16_s16 функция

This service computes the inverse sine of a value.

sint16 Efx_ArsSin_s16_s16(sint16 x_value);
Efx_Average_s32_s32 функция

The routine returns average value.

sint32 Efx_Average_s32_s32(sint32 value1, sint32 value2);
Efx_CalcTeQ_s32 функция

This routine calculates time equivalent factor

sint32 Efx_CalcTeQ_s32(sint32 T1rec_s32, sint32 dT_s32);
Efx_CalcTeQApp_s32 функция

This routine calculates time equivalent factor

sint32 Efx_CalcTeQApp_s32(sint32 T1rec_s32, sint32 dT_s32);

Convert value of entry type in the value in the output type

<OutType> Efx_Cast_<InType Mn>_<OutType Mn>(<InType> x_value);
Efx_Cos_s16_s16 функция

This service computes the cosine of an angle.

sint16 Efx_Cos_s16_s16(sint16 x_value);
Efx_Cos_s32_s32 функция

This service computes the cosine of an angle.

sint32 Efx_Cos_s32_s32(sint32 x_value);
Efx_Cos_s8_s8 функция

This service computes the cosine of an angle.

sint8 Efx_Cos_s8_s8(sint8 x_value);

The counter routines increments the value of the parameter CounterVal by 1.

<OutType> Efx_Counter_<InTypeMn>_<OutTypeMn>(<InType>* CounterVal);

The CounterSet routines initialise counter value with initial value • CounterVal = Val;

void Efx_CounterSet_<InTypeMn>(<InType>* CounterVal, <InType> Val);
Efx_CtrlSetLimits функция

Update limit structure

void Efx_CtrlSetLimits(Efx_Limits_Type* Limit_cpst, sint32 Min_s32, sint32 Max_s32);
Efx_Debounce_u8_u8 функция

This routine debounces a digital input signal and returns the state of the signal as a boolean value.

boolean Efx_Debounce_u8_u8(boolean X, Efx_DebounceState_Type* State, const Efx_DebounceParam_Type* Param, sint32 dT);
Efx_DebounceInit функция

This routine call shall stop the debouncing timer.

void Efx_DebounceInit(Efx_DebounceState_Type* State, boolean X);
Efx_DebounceSetParam функция

This routine sets timing parameters, time for high to low transition and time for low to high for debouncing.

void Efx_DebounceSetParam(Efx_DebounceParam_Type* Param, sint16 THighLow, sint16 TLowHigh);

These services make a division between the two arguments

<OutType> Efx_Div_<InTypeMn><InTypeMn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
Efx_DT1Typ1Calc функция

This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn-1 - Xn-2) / dT)

void Efx_DT1Typ1Calc(sint32 X_s32, Efx_StateDT1Typ1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);

This routine returns 'DT1' controller's output value.

<OutType> Efx_DT1Typ1Out_<OutTypeMn>(const Efx_StateDT1Typ1_Type* State_cpst);
Efx_DT1Typ1SetState функция

The routine initialises internal state variables of a DT1 element.

void Efx_DT1Typ1SetState(Efx_StateDT1Typ1_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);
Efx_DT1Typ2Calc функция

This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn - Xn-1) / dT)

void Efx_DT1Typ2Calc(sint32 X_s32, Efx_StateDT1Typ2_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);

This routine returns 'DT1' controller's output value.

<OutType> Efx_DT1Typ2Out_<OutTypeMn>(const Efx_StateDT1Typ2_Type* State_cpst);
Efx_DT1Typ2SetState функция

The routine initialises internal state variables of a DT1 element.

void Efx_DT1Typ2SetState(Efx_StateDT1Typ2_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
Efx_EdgeBipol_u8_u8 функция

This routine detects whether a signal has changed since the last call and returns TRUE. If signal has not changed then returns FALSE.

boolean Efx_EdgeBipol_u8_u8(boolean Inp_Val, boolean* Old_Val);
Efx_EdgeFalling_u8_u8 функция

Returns TRUE when the signal has a falling edge, i.e. the signal was TRUE at the last call and FALSE at the actual call of this routine

boolean Efx_EdgeFalling_u8_u8(boolean Inp_Val, boolean* Old_Val);
Efx_EdgeRising_u8_u8 функция

Returns TRUE when the signal has a rising edge, i.e. the signal was FALSE at the last call and TRUE at the actual call of this routine

boolean Efx_EdgeRising_u8_u8(boolean Inp_Val, boolean* Old_Val);
Efx_Exp_s32_s32 функция

The routine returns exponential value of an input value.

sint32 Efx_Exp_s32_s32(sint32 Value1);
Efx_HpFilter_s16_s32 функция

This service computes the output of a first order high-Pass filter

sint32 Efx_HpFilter_s16_s32(sint32 Yn-1, sint16 Xn, sint16 Xn-1, uint16 K);
Efx_HpFilter_s8_s16 функция

This service computes the output of a first order high-Pass filter

sint16 Efx_HpFilter_s8_s16(sint16 Yn-1, sint8 Xn, sint8 Xn-1, uint16 K);
Efx_HpFilter_u16_s32 функция

This service computes the output of a first order high-Pass filter

sint32 Efx_HpFilter_u16_s32(sint32 Yn-1, uint16 Xn, uint16 Xn-1, uint16 K);
Efx_HpFilter_u8_s16 функция

This service computes the output of a first order high-Pass filter

sint16 Efx_HpFilter_u8_s16(sint16 Yn-1, uint8 Xn, uint8 Xn-1, uint16 K);
Efx_Hypot_u16u16_u16 функция

This service computes the length of a vector

uint16 Efx_Hypot_u16u16_u16(uint16 x_value, uint16 y_value);
Efx_Hypot_u32u32_u32 функция

This service computes the length of a vector

uint32 Efx_Hypot_u32u32_u32(uint32 x_value, uint32 y_value);
Efx_Hypot_u8u8_u8 функция

This service computes the length of a vector

uint8 Efx_Hypot_u8u8_u8(uint8 x_value, uint8 y_value);

Hysteresis with center and left and right side halfDelta switching point.

boolean Efx_HystCenterHalfDelta_<InTypeMn>_<OutTypeMn>(<InType> X, <InType> center, <InType> halfDelta, boolean* State);

Hysteresis with right switching point and delta to left switching point

boolean Efx_HystDeltaRight_<InTypeMn>_<OutTypeMn>(<InType> X, <InType> Delta, <InType> Rsp, boolean* State);

The routine estimates the output of the hysteresis.

<OutType> Efx_Hysteresis_<InTypeMn>_<OutTypeMn>(<InType> input, <InType> thresholdLow, <InType> thresholdHigh, <InType> Out_Val, <InType> Out_LowThresholdVal, <InType> Out_HighThresholdVal);

Hysteresis with left switching point and delta to right switching point.

boolean Efx_HystLeftDelta_<InTypeMn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Delta, boolean* State);

Hysteresis with left and right switching point.

boolean Efx_HystLeftRight_<InTypeMn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Rsp, boolean* State);
Efx_ICalc функция

This routine computes 'I' controller output value using differential equation, Yn = Yn-1 + K * dT * Xn-1

void Efx_ICalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, sint32 dT_s32);
Efx_ILimCalc функция

This routine computes DT1 controller output value using differential equation, Yn = Yn-1 + K * d T * Xn-1

void Efx_ILimCalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

boolean Efx_IntervalClosed_<InTypeMn>_<OutTypeMn>(<InType> MinVal, <InType> InpVal, <InType> MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

boolean Efx_IntervalLeftOpen_<InTypeMn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

boolean Efx_IntervalOpen_<InTypeMn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);

This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.

boolean Efx_IntervalRightOpen_<InTypeMn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);
Efx_IOut_OutTypeMn функция

This routine returns 'I' controller's output value.

<OutType> Efx_IOut_<OutTypeMn>(const Efx_StateI_Type* State_cpst);
Efx_ISetState функция

The routine initialises internal state variables of an I element.

void Efx_ISetState(Efx_StateI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);

This service computes the first one order discrete filter

<OutType> Efx_LpFilter_<InTypeMn>_<OutTypeMn>(<InType> input, <InType> old_output, uint32 tau_const, uint16 recurrence, uint8 reset, <InType> init_val, uint8* started);

This service computes the output of a first order low-pass filter

<OutType> Efx_LpFilterFac1_<InTypeMn><InTypeMn><InTypeMn>_<OutTypeMn>(<InType> Yn-1, <InType> Xn, <InType> fac);

Sort an array and return its median value

<OutType> Efx_MedianSort_<InTypeMn>_<OutTypeMn>(<InType>* Array, uint8 N);
Efx_Mod_TypeMn функция

This routine returns the remainder of the division x_value / y_value if y_value is not zero.

<Type> Efx_Mod_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️

The routine returns sliding average value of n - 1 last subsequent values of an array plus one new value.

<OutType> Efx_MovingAverage_<InTypeMn>_<OutTypeMn>(Efx_MovingAvrg<InTypeMn>_Type* state, <InType> value);

This service makes a multiplication between the two arguments The multiplication is protected against the overflow.

<OutType> Efx_Mul_<InTypeMn><InTypeMn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
Efx_PCalc функция

This routine computes differential equation Differential equation: Y = K * X

void Efx_PCalc(sint32 X_s32, sint32* P_ps32, sint32 K_s32);
Efx_PDCalc функция

This routine computes proportional plus derivative controller output value using differential equation: Yn= K(1+Tv/dT) * Xn - K(Tv/dT) * Xn-1

void Efx_PDCalc(sint32 X_s32, Efx_StatePD_Type* State_cpst, const Efx_ParamPD_Type* Param_cpst, sint32 dT_s32);
Efx_PDOut_OutTypeMn функция

This routine returns 'PD' controllers output value.

<OutType> Efx_PDOut_<OutTypeMn>(const Efx_StatePD_Type* State_cpcst);
Efx_PDSetParam функция

The routine sets the parameter structure of a PD element.

void Efx_PDSetParam(Efx_ParamPD_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32);
Efx_PDSetState функция

The routine initialises internal state variables of a PD element.

void Efx_PDSetState(Efx_StatePD_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
Efx_PIDOut_OutTypeMn функция

This routine returns 'PID' controllers output value.

<OutType> Efx_PIDOut_<OutTypeMn>(const Efx_StatePID_Type* State_cpst);
Efx_PIDSetParam функция

The routine sets the parameter structure of a PID element.

void Efx_PIDSetParam(Efx_ParamPID_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32, sint32 Tnrec_s32);
Efx_PIDSetState функция

The routine initialises internal state variables of a PID element.

void Efx_PIDSetState(Efx_StatePID_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);
Efx_PIDTyp1Calc функция

This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2

void Efx_PIDTyp1Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);
Efx_PIDTyp1LimCalc функция

This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2

void Efx_PIDTyp1LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
Efx_PIDTyp2Calc функция

This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2

void Efx_PIDTyp2Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);
Efx_PIDTyp2LimCalc функция

This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2

void Efx_PIDTyp2LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
Efx_PIOut_OutTypeMn функция

This routine returns 'PI' controllers output value.

<OutType> Efx_PIOut_<OutTypeMn>(const Efx_StatePI_Type* State_cpst);
Efx_PISetParam функция

The routine sets the parameter structure of a PI element.

void Efx_PISetParam(Efx_ParamPI_Type* Param_cpst, sint32 K_s32, sint32 Tnrec);
Efx_PISetState функция

The routine initialises internal state variables of a PI element.

void Efx_PISetState(Efx_StatePI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
Efx_PITyp1Calc функция

This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn= Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1

void Efx_PITyp1Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);
Efx_PITyp1LimCalc функция

This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn = Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1

void Efx_PITyp1LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
Efx_PITyp2Calc функция

This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn= Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1

void Efx_PITyp2Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);
Efx_PITyp2LimCalc функция

This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1

void Efx_PITyp2LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
Efx_POut_OutTypeMn функция

This routine returns 'P' controllers output value.

<OutType> Efx_POut_<OutTypeMn>(const sint32* P_ps32);
Efx_PSetState функция

The routine sets the internal state variables of a P element.

void Efx_PSetState(sint32* P_s32, sint16 Y_s16);
Efx_PT1Calc функция

This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn-1

void Efx_PT1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);
Efx_PT1Out_OutTypeMn функция

This routine returns 'PT1' controllers output value.

<OutType> Efx_PT1Out_<OutTypeMn>(const Efx_StatePT1_Type* State_cpst);
Efx_PT1SetState функция

The routine initialises internal state variables of a PT1 element.

void Efx_PT1SetState(Efx_StatePT1_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
Efx_PT1Typ1Calc функция

This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn

void Efx_PT1Typ1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);
Efx_RampCalc функция

The ramp output value increases or decreases a value with slope * dT_s32 depending if (State_ cpst->State_s32 < X_s32) or (State_cpst->State_s32 > X_s32).

void Efx_RampCalc(sint32 X_s32, Efx_StateRamp_Type* State_cpst, const Efx_ParamRamp_Type* Param_cpcst, sint32 dT_s32);
Efx_RampCalcJump функция

This routine works in addition to main ramp function Efx_RampCalc to provide a faster adaption to target value.

void Efx_RampCalcJump(sint32 X_s32, Efx_StateRamp_Type* State_cpst);
Efx_RampCalcSwitch функция

This routine switches between two target values for a ramp service based on a Switch parameter.

sint32 Efx_RampCalcSwitch(sint32 Xa_s32, sint32 Xb_s32, boolean Switch, Efx_StateRamp_Type* State_cpst);
Efx_RampCheckActivity функция

This routine checks the status of the ramp and returns TRUE if the ramp is active, otherwise it returns FALSE.

boolean Efx_RampCheckActivity(const Efx_StateRamp_Type* State_cpst);
Efx_RampGetSwitchPos функция

Gets the current switch position of ramp switch function.

boolean Efx_RampGetSwitchPos(const Efx_StateRamp_Type* State_cpst);
Efx_RampInitState функция

Initializes the state, direction and switch parameters for the ramp.

void Efx_RampInitState(Efx_StateRamp_Type* State_cpst, sint32 Val_s32);
Efx_RampOut_s32 функция

Returns the internal state of the ramp element.

sint32 Efx_RampOut_s32(const Efx_StateRamp_Type* State_cpcst);
Efx_RampSetParam функция

Sets the slope parameter for the ramp provided by the structure Efx_ParamRamp_Type.

void Efx_RampSetParam(Efx_ParamRamp_Type* Param_cpst, uint32 SlopePosVal_u32, uint32 SlopeNegVal_u32);
Efx_RSFlipFlop функция

RS flip flop can be set and reset via input switches R_Val and S_Val.

boolean Efx_RSFlipFlop(boolean R_Val, boolean S_Val, boolean* State_Val);
Efx_Sgn_s64_s8 функция

Signum function. Extract the sign of an integer value.

sint8 Efx_Sgn_s64_s8(sint64 x_value);
Efx_Sin_s16_s16 функция

This service computes the sine of an angle.

sint16 Efx_Sin_s16_s16(sint16 x_value);
Efx_Sin_s32_s32 функция

This service computes the sine of an angle.

sint32 Efx_Sin_s32_s32(sint32 x_value);
Efx_Sin_s8_s8 функция

This service computes the sine of an angle.

sint8 Efx_Sin_s8_s8(sint8 x_value);
Efx_SlewRate_InTypeMn функция

The routine limits the increase and the decrease of the Input entry by using tunable slopes.

void Efx_SlewRate_<InTypeMn>(<InType> limit_pos, <InType> input, <InType> limit_neg, <InType>* output, uint8* init);

The sorting algorithm modifies the given input array and rearranges data in ascending order.

void Efx_SortAscend_<InTypeMn>(<OutType>* Array, uint16 Num);

The sorting algorithm modifies the given input array and rearranges data in descending order.

void Efx_SortDescend_<InTypeMn>(<OutType>* Array, uint16 Num);
Efx_Sqrt_u16_u16 функция

This service computes the square root of a value

uint16 Efx_Sqrt_u16_u16(uint16 x_value);
Efx_Sqrt_u32_u32 функция

This service computes the square root of a value

uint32 Efx_Sqrt_u32_u32(uint32 x_value);
Efx_Sqrt_u8_u8 функция

This service computes the square root of a value

uint8 Efx_Sqrt_u8_u8(uint8 x_value);

This routine makes a subtraction between the two arguments.

<OutType> Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);

limiter routine

<OutType> Efx_TypeLimiter_<InTypeMn>_<OutTypeMn>(<InType> Input_Val);

Callout-функции и ожидаемые интерфейсы

<InType Mn> функция

This service makes a comparison between the two arguments

boolean Efx_Gt_<InType Mn><InType Mn>_<OutType Mn>(<InType> x_value, <InType> y_value);

Типы

Structure definition for Debounce routine

Structure definition for Debounce routine

Controller limit value structure

Structure definition for sliding average routine for sint16 input value

Structure definition for sliding average routine for sint32 input value

System and Time equivalent parameter Structure for PD controller routine

System and Time equivalent parameter Structure for PI additive ( Type1 and Type 2 ) controller routine

System and Time equivalent parameter Structure for PID additive ( Type1 and Type 2 ) controller routine

Structure definition for Ramp routine

System State Structure for DT1-Type1 controller routine

System State Structure for DT1-Type2 controller routine

System State Structure for I controller routine

System State Structure for PD controller routine

System State Structure for PI additive ( Type1 and Type 2 ) controller routine

System State Structure for PID additive ( Type1 and Type 2 ) controller routine

System State Structure for PT1 controller routine

Structure definition for Ramp routine

Требования

SWS_Efx_00006 requirement

Yn = Yn-1 + (((Xn - Yn-1) * fac) >> n) Where 'n' is a shift that depends on the types used by the functions for the factor

SWS_Efx_00007 requirement

In order to converge all the time, the result is corrected for value saturation using the following logic: If (Yn == Yn-1) If (((Xn - Yn-1) * fac) > 0) Yn ++ Else If (((Xn - Yn-1) * fac) < 0) Yn – End If Endif

SWS_Efx_00008 requirement

Here is the list of implemented functions.

SWS_Efx_00013 requirement

If (tau_const==0), then output = input

SWS_Efx_00014 requirement

If (*started==0), then output = init_val This flag is used to indicate the filter state. *Started = 0, indicates that current function call is the first call of the function to trigger initialisation.

SWS_Efx_00015 requirement

This service computes the first one order discrete filter:

SWS_Efx_00016 requirement

if ((reset == 1) or (*started == 0)), then output = init_val

SWS_Efx_00017 requirement

if (*started == 0), then *started=1

SWS_Efx_00018 requirement

Here is the list of implemented functions.

SWS_Efx_00020 requirement

input, old_output, and init_val must have the same resolution and the same physical unit.

SWS_Efx_00021 requirement

tau_const and recurrence must have the same resolution and the same physical unit

SWS_Efx_00023 requirement

: Yn = Yn-1 - (K * Yn-1 / 216) + (Xn - Xn-1)*27 The result is rounded towards zero.

SWS_Efx_00024 requirement

Return value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00025 requirement

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

SWS_Efx_00027 requirement

Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*27 The result is rounded towards zero.

SWS_Efx_00028 requirement

Return value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00029 requirement

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

SWS_Efx_00031 requirement

Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*215 The result is rounded towards zero.

SWS_Efx_00032 requirement

Return value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00033 requirement

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one

SWS_Efx_00036 requirement

Yn = Yn-1- (K* Yn-1/216) + (Xn- Xn-1)*215 The result is rounded towards zero.

SWS_Efx_00037 requirement

Return value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00038 requirement

A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1> 0)) decrement Ynby one If ((Yn equals Yn-1) and (Yn-1< 0)) increment Yn by one

SWS_Efx_00045 requirement

Output value *P_s32 = Y_s16 << 16

SWS_Efx_00046 requirement

The internal state of the P element is stored as (Y_s16 << 16)

SWS_Efx_00048 requirement

Output value = *P_ps32 >> 16

SWS_Efx_00049 requirement

Return value shall be saturated to boundary values of the return data type in case of negative or positive overflow.

SWS_Efx_00050 requirement

Here is the list of implemented functions.

SWS_Efx_00052 requirement

This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)

SWS_Efx_00053 requirement

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

SWS_Efx_00054 requirement

If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1

SWS_Efx_00055 requirement

calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

SWS_Efx_00057 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00058 requirement

The internal state of the PT1 element is stored as (Y1_s16 << 16)

SWS_Efx_00059 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

SWS_Efx_00061 requirement

TeQ = exp(-T1rec_s32 * dT_s32)

SWS_Efx_00062 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00064 requirement

Output value = State_cpst->Y1_s32 >> 16

SWS_Efx_00065 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00066 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00067 requirement

Here is the list of implemented functions.

SWS_Efx_00071 requirement

This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((State_cpst->X1 - State_ cpst->X2) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.

SWS_Efx_00072 requirement

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

SWS_Efx_00073 requirement

If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (State_cpst->X1 - State_cpst->X2) / dT.

SWS_Efx_00074 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00075 requirement

Old input value State->cpst->X1 shall be stored to State_cpst- >X2. State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00076 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00078 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00079 requirement

The internal state of the DT1 element is stored as (Y1_s16 << 16)

SWS_Efx_00080 requirement

Initialisation of input state variables X1 and X2. State_cpst->X1 = X1_s32 State_cpst->X2 = X2_s32

SWS_Efx_00082 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00083 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00084 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00085 requirement

Here is the list of implemented functions.

SWS_Efx_00091 requirement

This equation derives implementation : Output_value = (Param_cpst->K_C * (1+ Param_cpst->Tv_C/dT_s32) * X_s32) - (Param_cpst->K_C * (Param_cpst->Tv_C/dT_s32) * State_cpst->X1) The result shall be Rounded towards Zero.

SWS_Efx_00092 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00093 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00094 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00096 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00097 requirement

The internal state of the PD element is stored as (Y1_s16 << 16)

SWS_Efx_00098 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

SWS_Efx_00101 requirement

Initialisation of amplification factor. Param_cpst->K_C = K_s32

SWS_Efx_00102 requirement

Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32

SWS_Efx_00104 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00105 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00106 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00107 requirement

Here is the list of implemented functions.

SWS_Efx_00111 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1

SWS_Efx_00112 requirement

Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

SWS_Efx_00113 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00115 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00116 requirement

The internal state of the DT1 element is stored as (Y1_s16 << 16)

SWS_Efx_00117 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

SWS_Efx_00119 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00120 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00121 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00122 requirement

Here is the list of implemented functions.

SWS_Efx_00126 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)

SWS_Efx_00127 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00128 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00129 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00131 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)

SWS_Efx_00132 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00133 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00134 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00136 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00137 requirement

The internal state of the PD element is stored as (Y1_s16 << 16)

SWS_Efx_00138 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

SWS_Efx_00140 requirement

Initialisation of amplification factor. Param_cpst->K_C = K_s32

SWS_Efx_00141 requirement

Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32

SWS_Efx_00143 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00144 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00145 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00146 requirement

Here is the list of implemented functions.

SWS_Efx_00151 requirement

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.

SWS_Efx_00152 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00153 requirement

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00154 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00156 requirement

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.

SWS_Efx_00157 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00158 requirement

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00159 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00161 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00162 requirement

The internal state of the PD element is stored as (Y1_s16 << 16)

SWS_Efx_00163 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32 Initialisation of input state variable X2. State_cpst->X2 = X2_s32

SWS_Efx_00165 requirement

Initialisation of amplification factor. Param_cpst->K_C = K_s32

SWS_Efx_00166 requirement

Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32

SWS_Efx_00167 requirement

Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32

SWS_Efx_00169 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00170 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00171 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00172 requirement

Here is the list of implemented functions.

SWS_Efx_00176 requirement

Result = square_root ( x_value )

SWS_Efx_00177 requirement

The result is rounded off.

SWS_Efx_00179 requirement

Result = square_root ( x_value )

SWS_Efx_00180 requirement

The result is rounded off.

SWS_Efx_00182 requirement

Result = square_root ( x_value )

SWS_Efx_00183 requirement

The result is rounded off.

SWS_Efx_00186 requirement

Output = e-x where x = Value1

SWS_Efx_00187 requirement

Output is quantized by 2ˆ16 Output Range = ([0.00004539....22026.4657948] * 2ˆ16) = [2....1443526462] Input Range = ([-10....10] * 2ˆ16) = [0xFFF60000....0x000A0000]

SWS_Efx_00191 requirement

Output = (Value1 + Value2 ) / 2

SWS_Efx_00192 requirement

The result is rounded towards zero.

SWS_Efx_00194 requirement

Output = (Array[0] + Array[1] + ... + Array[N-1] ) / Count

SWS_Efx_00195 requirement

The result is rounded towards zero.

SWS_Efx_00196 requirement

Here is the list of implemented functions.

SWS_Efx_00198 requirement

state ->p_beg pointer holds start address of an array state ->p_end pointer holds end address of an array state ->p_act pointer holds address of an oldest entry of an array

SWS_Efx_00199 requirement

state ->sum shall store total sum including 'value' & excluding old- est entry state ->sum = state ->sum - *(state ->p_act) + value

SWS_Efx_00200 requirement

In every routine call state ->p_act shall be incremented with wrap around. This increment ensures that oldest entry gets replaced with new entry.

SWS_Efx_00201 requirement

Output_value = state->sum / state->n

SWS_Efx_00202 requirement

If state ->n = 0 the result shall be zero by definition.

SWS_Efx_00203 requirement

The result is rounded towards zero.

SWS_Efx_00205 requirement

Here is the list of implemented functions.

SWS_Efx_00211 requirement

Result = sqrt(x_value * x_value/2 + y_value * y_value/2)

SWS_Efx_00212 requirement

The result is rounded off.

SWS_Efx_00214 requirement

Result = sqrt(x_value * x_value/2 + y_value * y_value/2)

SWS_Efx_00215 requirement

The result is rounded off.

SWS_Efx_00217 requirement

Result = sqrt(x_value * x_value/2 + y_value * y_value/2)

SWS_Efx_00218 requirement

The result is rounded off.

SWS_Efx_00222 requirement

The result is rounded off.

SWS_Efx_00225 requirement

The result is rounded off.

SWS_Efx_00228 requirement

The result is rounded off.

SWS_Efx_00231 requirement

The result is rounded off.

SWS_Efx_00234 requirement

The result is rounded off.

SWS_Efx_00237 requirement

The result is rounded off.

SWS_Efx_00242 requirement

The result is rounded off.

SWS_Efx_00245 requirement

The result is rounded off.

SWS_Efx_00248 requirement

The result is rounded off.

SWS_Efx_00252 requirement

The result is rounded off.

SWS_Efx_00255 requirement

The result is rounded off.

SWS_Efx_00258 requirement

The result is rounded off.

SWS_Efx_00262 requirement

If *init==0, *output=input

SWS_Efx_00264 requirement

Input, limit_pos, limit_neg and output must have the same resolu- tion and the same physical unit.

SWS_Efx_00265 requirement

If the result of the Efx_SlewRate is only computed when some conditions are fulfilled, do not call the slew rate under the condition, but systematically! The slew rate must be called at each recurrence, even if it is not used, because oth- erwise, the output will be frozen to the previous value all the time, if conditions are not fulfilled.

SWS_Efx_00266 requirement

The parameters given for output and init, for which we receive the addresses, must be declared by the caller as private variables and will be initialized at 0, because the function uses the previous values of these outputs (so the stack must not be used).

SWS_Efx_00267 requirement

Physical values of limit_pos and limit_neg are positive. Internally limit_pos is added to output value and limit_neg is substracted from output value to get upper and lower limit band within which output value is limited.

SWS_Efx_00268 requirement

At first step, when *init==0, output takes the value of input and *init will be put at 1.

SWS_Efx_00269 requirement

limit_pos is added to the output and it becomes the maximum value of the new output limit_neg is deducted from the output and it becomes the minimum value of the new output. If input is outside this range, output is limited to these values, in the other case, output takes the value of input

SWS_Efx_00270 requirement

Values of limit_pos and limit_neg shall be adapted to the fre- quency of the call of the service.

SWS_Efx_00271 requirement

Here is the list of implemented functions.

SWS_Efx_00277 requirement

This routine decided if jump has to be done or not in case of change in target. Efx_RampCalc function shall be called after this function that a jump or the standard ramp behaviour is executed.

SWS_Efx_00278 requirement

If ramp direction is rising then ramp increases a value with slope * dT_s32 if (State_cpst->Dir_s8 == RISING) State_cpst->State_s32 = State_cpst->State_s32 + (Param_cpcst->SlopePos_u32 * d T_s32) The minimum value of Param_cpcst->SlopePos_u32 * dT_s32 shall be 1, when Param- >SlopePos > 0. The intermediate results shall be rounded off. Ex: minimum increment of Param_cpcst->SlopePos_u32 * dT_s32 = 1/(2ˆ16*10ˆ6)

SWS_Efx_00279 requirement

If ramp direction is falling then ramp decreases a value with slope * dT_s32 if (State_cpst->Dir_s8 == FALLING) State_cpst->State_s32 = State_cpst->State_s32 - (Param_cpcst->SlopeNeg_u32 * d T_s32) The minimum value of Param_cpcst->SlopeNeg_u32 * dT_s32 shall be 1, when Param->SlopeNeg > 0. The intermediate results shall be rounded off. Ex: minimum decrement of Param_cpcst->SlopeNeg_u32 * dT_s32 = 1/(2ˆ16*10ˆ6)

SWS_Efx_00280 requirement

Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.

SWS_Efx_00281 requirement

Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END

SWS_Efx_00284 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00286 requirement

Ramp direction is initialised with END value. User has no possi- bility to change or modify ramp direction. State_cpst->Dir_s8 = END E.g. of ramp direction states: RISING = 1, FALLING = -1, END = 0

SWS_Efx_00288 requirement

Sets positive and negative ramp slopes. Param_cpst->SlopePos_u32 = SlopePosVal_u32 Param_cpst ->SlopeNeg_u32 = SlopeNegVal_u32

SWS_Efx_00290 requirement

Return Value = State_cpcst->State_s32

SWS_Efx_00292 requirement

If target value changes to a value contrary to current ramp direc- tion and ramp has not reached its old target value then ramp state jumps to new target value immediately. State_cpst->State_s32 = X_s32 State_cpst->Dir_s8 = END

SWS_Efx_00293 requirement

If target value is changed to new value and ramp has reached its old target value then normal ramp behavior is maintained. State_cpst->Dir_s8 = END

SWS_Efx_00303 requirement

Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.

SWS_Efx_00304 requirement

Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END

SWS_Efx_00308 requirement

Return value = TRUE if Switch position State_cpst->Switch_s8 = TARGET_A Return value = FALSE if Switch position State_cpst->Switch_s8 = TARGET_B

SWS_Efx_00310 requirement

return value = TRUE, if Ramp is active (State_cpst->Dir_s8 != END) return value = FALSE, if Ramp is inactive (State_cpst->Dir_s8 == END)

SWS_Efx_00312 requirement

If Input < thresholdLow, Then return_value = Out_LowThreshold Val

SWS_Efx_00313 requirement

If Input > thresholdHigh, Then return_value = Out_HighThreshold Val

SWS_Efx_00314 requirement

If thresholdLow  Input  thresholdHigh, then return_value = Out_Val

SWS_Efx_00315 requirement

Input, thresholdLow and thresholdHigh must have the same reso- lution and the same physical unit.

SWS_Efx_00316 requirement

Return_value , Out_Val, Out_LowThresholdVal and Out_High ThresholdVal must have the same resolution and the same physical unit.

SWS_Efx_00317 requirement

Here is the list of implemented functions.

SWS_Efx_00321 requirement

Return value = TRUE, if X > center + halfDelta Return value = FALSE, if X < center - halfDelta Return value is former state value if (center - halfDelta)  X  (center + halfDelta )

SWS_Efx_00322 requirement

Parameters X, center and halfDelta should have the same data type.

SWS_Efx_00323 requirement

State variable shall store the old boolean result.

SWS_Efx_00324 requirement

Here is the list of implemented functions.

SWS_Efx_00326 requirement

Return value = TRUE, if X > Rsp (right switching point) Return value = FALSE, if X < Lsp (left switching point) Return value is former state value if Lsp  X  Rsp

SWS_Efx_00327 requirement

Parameters X, Lsp and Rsp should have the same data type.

SWS_Efx_00328 requirement

State variable shall store the old boolean result.

SWS_Efx_00329 requirement

Rsp shall be always greater than Lsp

SWS_Efx_00330 requirement

Here is the list of implemented functions.

SWS_Efx_00332 requirement

Return value = TRUE if X > Rsp (right switching point) Return value = FALSE if X < (Rsp - Delta) Return value is former state value if (Rsp - Delta)  X  Rsp

SWS_Efx_00333 requirement

Parameters X, Rsp and Delta should have the same data type.

SWS_Efx_00334 requirement

State variable shall store the old boolean result.

SWS_Efx_00335 requirement

Here is the list of implemented functions.

SWS_Efx_00337 requirement

Return value is TRUE if X > (Lsp + Delta) Return value is FALSE if X < Lsp Return value is former state value if Lsp  X  (Lsp + Delta)

SWS_Efx_00338 requirement

Parameters X, Lsp and Delta should have the same data type.

SWS_Efx_00339 requirement

State variable shall store the old boolean result.

SWS_Efx_00340 requirement

Here is the list of implemented functions.

SWS_Efx_00356 requirement

If(X != State->XOld) then check start debouncing.

SWS_Efx_00357 requirement

If transition occurs from FALSE to TRUE (i.e State->XOld = FALSE and X = TRUE), then use Param->TimeLowHigh as debouncing time; otherwise use Param->TimeHighLow.

SWS_Efx_00358 requirement

State->Timer is incremented with sample time for debouncing in- put signal. Once reached to the set period, old state is updated with X. State->Timer += dT; If (State->Timer  (TimePeriod * 10000)) State->XOld = X, and stop the timer, State->Timer = 0 where TimePeriod = Param->TimeLowHigh or Param->TimeHighLow

SWS_Efx_00359 requirement

Old value shall be returned as a output value. Current input is stored to old state. Return value = State->XOld State->XOld = X

SWS_Efx_00360 requirement

Resolution of dT is 10-6 seconds per increment of 1 data repre- sentation unit

SWS_Efx_00363 requirement

State->Timer = 0

SWS_Efx_00364 requirement

Sets the input state to the given init value. State->XOld = X;

SWS_Efx_00366 requirement

Param-> TimeHighLow = THighLow Param-> TimeLowHigh = TLowHigh

SWS_Efx_00372 requirement

Here is the list of implemented functions.

SWS_Efx_00375 requirement

Here is the list of implemented functions.

SWS_Efx_00377 requirement

This routine sorts values of an array in ascending order. Input array passed by the pointer shall have sorted values after this routine call.

SWS_Efx_00378 requirement

Returns the median value of sorted array in case of N is even. Result = (Sorted_array[N/2] + Sorted_array[(N/2) - 1] ) / 2

SWS_Efx_00379 requirement

Here is the list of implemented functions.

SWS_Efx_00381 requirement

if (Inp_Val != *Old_Val) return value = TRUE else return value = FALSE.

SWS_Efx_00383 requirement

Return value = TRUE, If (*Old_Val == TRUE && Inp_Val == FALSE) Return value = FALSE, otherwise.

SWS_Efx_00385 requirement

Return value = TRUE, If (*Old_Val == FALSE && Inp_Val == TRUE) Return value = FALSE, otherwise.

SWS_Efx_00387 requirement

Return value = TRUE, if (MinVal  InpVal  MaxVal) Return value = FALSE, otherwise.

SWS_Efx_00388 requirement

Here is the list of implemented functions.

SWS_Efx_00391 requirement

Return value = TRUE, if (MinVal < InpVal < MaxVal) Return value = FALSE, otherwise.

SWS_Efx_00392 requirement

Here is the list of implemented functions.

SWS_Efx_00394 requirement

Return value = TRUE, if (MinVal < InpVal  MaxVal) Return value = FALSE, otherwise.

SWS_Efx_00395 requirement

Here is the list of implemented functions.

SWS_Efx_00397 requirement

Return value = TRUE, if (MinVal  InpVal < MaxVal) Return value = FALSE, otherwise.

SWS_Efx_00398 requirement

Here is the list of implemented functions.

SWS_Efx_00401 requirement

The return value is the new value of the parameter CounterVal. * CounterVal ++; Return value = *CounterVal;

SWS_Efx_00402 requirement

In case of saturation, counter value shall not be reset to 0 and shall not be incremented. Return value = Saturated value of the counter data type

SWS_Efx_00403 requirement

Here is the list of implemented functions.

SWS_Efx_00404 requirement

Here is the list of implemented functions.

SWS_Efx_00406 requirement

The reset switch is higher prior than the set switch, e.g. R_Val = TRUE, S_Val = TRUE Then state and return value = FALSE

SWS_Efx_00407 requirement

Reset condition : R_Val = TRUE, S_Val = FALSE Then state and return value = FALSE

SWS_Efx_00408 requirement

Set condition : R_Val = FALSE, S_Val = TRUE Then state and return value = TRUE

SWS_Efx_00409 requirement

Invalid condition : R_Val = FALSE, S_Val = FALSE Then state and return value are unchanged

SWS_Efx_00411 requirement

Input value shall be saturated according to the data type of the return parameter. e.g. If return type is sint16 and input data range is uint32, then output value will be limited to sint16 data range.

SWS_Efx_00412 requirement

Here is the list of implemented functions.

SWS_Efx_00424 requirement

Return value = x_value + y_value

SWS_Efx_00425 requirement

Here is the list of implemented functions.

SWS_Efx_00427 requirement

Return value = x_value * y_value

SWS_Efx_00428 requirement

Here is the list of implemented functions.

SWS_Efx_00430 requirement

Return value = x_value / y_value

SWS_Efx_00431 requirement

The result after division by zero is defined by: If x_value  0 then the function returns the maximum value of the output type If x_value < 0 then the function returns the minimum value of the output type

SWS_Efx_00433 requirement

The result is rounded towards 0.

SWS_Efx_00434 requirement

Here is the list of implemented functions.

SWS_Efx_00435 requirement

Extract the sign of an integer value. It is defined as follows: Return-value = {-1, if x_value < 0; 0, if x_value == 0; 1, if x_value > 0}

SWS_Efx_00437 requirement

Return Value = TRUE, if (x_value > y_value), else FALSE.

SWS_Efx_00440 requirement

Returns the median value of sorted array in case of N is odd. Return_Value = Sorted_array [N/2] = 15

SWS_Efx_00441 requirement

In above calculation, N/2 shall be rounded towards zero.

SWS_Efx_00442 requirement

Initialisation of state variable State_cpst->State_s32 = Val_s32

SWS_Efx_00443 requirement

Initialisation of switch variable. User has no possibility to change or modify switch initialization value. State_cpst->Switch_s8 = OFF E.g. of switch states: TARGET_A = 1, TARGET_B = -1, OFF = 0

SWS_Efx_00451 requirement

TeQApp = 1 - (T1rec_s32 * dT_s32) TeQApp is factorised by 2ˆ16 This approximation is valid only when the product of the physical values of T1rec_s32 and dt_s32 is less than 1. i.e, (T1rec_s32 * dT_s32) < 1

SWS_Efx_00452 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00456 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1

SWS_Efx_00457 requirement

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

SWS_Efx_00458 requirement

Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

SWS_Efx_00459 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00466 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)

SWS_Efx_00467 requirement

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

SWS_Efx_00468 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00469 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00470 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00476 requirement

This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)

SWS_Efx_00477 requirement

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

SWS_Efx_00478 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00479 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00480 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00486 requirement

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32

SWS_Efx_00487 requirement

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

SWS_Efx_00488 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00489 requirement

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00490 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00496 requirement

This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32

SWS_Efx_00497 requirement

Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C

SWS_Efx_00498 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00499 requirement

Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00500 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00502 requirement

This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((X_s32 - State_cpst->X1) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.

SWS_Efx_00503 requirement

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32.

SWS_Efx_00504 requirement

If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (X_s32 - State_cpst->X1) / dT

SWS_Efx_00505 requirement

Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value

SWS_Efx_00506 requirement

Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32

SWS_Efx_00507 requirement

Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit

SWS_Efx_00511 requirement

Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16

SWS_Efx_00512 requirement

The internal state of the DT1 element is stored as (Y1_s16 << 16)

SWS_Efx_00513 requirement

Initialisation of input state variable X1. State_cpst->X1 = X1_s32

SWS_Efx_00516 requirement

Output value = State_cpst->Y1 >> 16

SWS_Efx_00517 requirement

Output value shall be normalized by 16 bit right shift of internal state variable.

SWS_Efx_00518 requirement

Return value shall be limited by boundary values of the return data type.

SWS_Efx_00519 requirement

Here is the list of implemented functions.

SWS_Efx_00521 requirement

Parameter Switch decides which target value is selected. If Switch = TRUE, then Xa_s32 is selected. State_cpst->Switch_s8 is set to TARGET_A Return value = Xa_s32 If Switch = FALSE, then Xb_s32 is selected. State_cpst->Switch_s8 is set to TARGET_B Return value = Xb_s32

SWS_Efx_00522 requirement

State_cpst->Dir_s8 hold direction information State_cpst->Dir_s8 shall be set to END to reset direction information in case of target switch.

SWS_Efx_00524 requirement

Update limit structure Limit_cpst->Min_C = Min_s32 Limit_cpst->Max_C = Max_s32

SWS_Efx_00526 requirement

Calculated value *P_ps32 = (K_s32 * X_s32) >> 16

SWS_Efx_00527 requirement

Amplification factor is quantized with 1/216 per increment of 1 data representation unit

SWS_Efx_00528 requirement

Efx_RampCalcSwitch routine has to be called before Efx_Ramp Calc

SWS_Efx_00532 requirement

This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)

SWS_Efx_00533 requirement

Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.

SWS_Efx_00534 requirement

If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1

SWS_Efx_00535 requirement

calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32

SWS_Efx_00800 requirement

Efx library shall not require initialization phase. A Library function may be called at the very first step of ECU initialization, e.g. even by the OS or EcuM, thus the library shall be ready.

SWS_Efx_00801 requirement

Efx library shall not require a shutdown operation phase.

SWS_Efx_00806 requirement

The Efx library shall be implemented in a way that the code can be shared among callers in different memory partitions.

SWS_Efx_00807 requirement

Usage of macros should be avoided. The function should be de- clared as function or inline function. Macro #define should not be used.

SWS_Efx_00808 requirement

A library function shall not call any BSW modules functions, e.g. the DET. A library function can call other library functions. Because a library function shall be re-entrant. But other BSW modules functions may not be re-entrant.

SWS_Efx_00809 requirement

The library, written in C programming language, should conform to the MISRA C Standard. Please refer to SWS_BSW_00115 for more details.

SWS_Efx_00810 requirement

Each AUTOSAR library Module implementation <library>*.c and <library>*.h shall map their code to memory sections using the AUTOSAR memory mapping mechanism.

SWS_Efx_00812 requirement

All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this library is clearly identified to be compliant only with a platform.

SWS_Efx_00813 requirement

All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly identified to be compliant only with a platform. eg. #pragma, typeof etc.

SWS_Efx_00814 requirement

The standardized common published parameters as required by SRS_BSW_00402 in the General Requirements on Basic Software Modules [REF] shall be published within the header file of this module and need to be provided in the BSW Module Description. The according module abbreviation can be found in the List of Basic Software Modules [REF].

SWS_Efx_00816 requirement

If source code for caller and callee of Efx_GetVersionInfo is avail- able, the Efx library should realize Efx_GetVersionInfo as a macro defined in the mod- ule's header file.

SWS_Efx_00818 requirement

The Efx library shall not have any configuration options that may affect the functional behavior of the routines. I.e. for a given set of input parameters, the outputs shall be always the same. For example, the returned value in case of error shall not be configurable.

SWS_Efx_00821 requirement

Section 7.1 "Error Handling" of the document "General Specifica- tion of Basic Software Modules" describes the error handling of the Basic Software in detail. Above all, it constitutes a classification scheme consisting of five error types which may occur in BSW modules.

SWS_Efx_00822 requirement

These requirements are not applicable to this specification.

SWS_Efx_00823 requirement

Integral promotion has to be adhered to when implementing Efx services. Thus, to obtain maximal precision, intermediate results shall not be limited.

SWS_Efx_00837 requirement

If the ramp state State_cpst->State_s32 has reached or crossed the target value X_s32 while the direction of the ramp had been RISING/FALLING, then set State_cpst->State_s32 = X_s32

SWS_Efx_00843 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00844 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_00845 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_10002 requirement

This routine computes the absolute value of a signed value: Return-value = |x_value|

SWS_Efx_10003 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_10004 requirement

Here is the list of implemented functions.

SWS_Efx_10005 requirement

[SWS_Efx_10005]

SWS_Efx_10007 requirement

This routine makes a subtraction between the two arguments: Return-value = x_value - y_value.

SWS_Efx_10008 requirement

Return-value shall be saturated to boundary values in the event of negative or positive overflow.

SWS_Efx_10009 requirement

Here is the list of implemented functions.

SWS_Efx_10010 requirement

[SWS_Efx_10010]

SWS_Efx_10011 requirement

IF y_value is zero, the result is zero.

SWS_Efx_10012 requirement

In other cases, Return-value = x_value mod y_value

SWS_Efx_10013 requirement

The sign of the remainder is the same than the sign of x_value.

SWS_Efx_10014 requirement

Here is the list of implemented functions.

SWS_Efx_91001 requirement

Module Header File Imported Type Std Std_Types.h Std_VersionInfoType