ControlState#
Description#
This state controls all the other states.
Based on user input, it decides which state is executed and in which order.
This is done via ControlFlags and finished/entered Flags of the individual states.
If multiple ID-states
are requested, the ControlState will start the next one after the previous one has finished and the ACCEPT button has been pressed.
This is an integral part of the ParameterID and must always be implemented.
ControlState object#
-
typedef struct uz_ParaID_ControlState_t uz_ParaID_ControlState_t#
Object definition for uz_ParaID_ControlState_t.
ControlState functions#
-
uz_ParaID_ControlState_t *uz_ControlState_init(void)#
Initializes the uz_ParaID_ControlState_t object.
- Returns:
uz_ParaID_ControlState_t pointer to object
-
void uz_ControlState_step(uz_ParaID_ControlState_t *self)#
steps the uz_ParaID_ControlState_t state once
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
-
void uz_ControlState_set_finishedFrictionID(uz_ParaID_ControlState_t *self, bool is_finished)#
Sets the finishedFrictionID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
is_finished – flag to signal, that the FrictionID state has finished
-
void uz_ControlState_set_finishedElectricalID(uz_ParaID_ControlState_t *self, bool is_finished)#
Sets the finishedElectricalID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
is_finished – flag to signal, that the ElectricalID state has finished
-
void uz_ControlState_set_finishedTwoMassID(uz_ParaID_ControlState_t *self, bool is_finished)#
Sets the finishedTwoMassID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
is_finished – flag to signal, that the TwoMassID state has finished
-
void uz_ControlState_set_finishedFluxMapID(uz_ParaID_ControlState_t *self, bool is_finished)#
Sets the finishedFluxMapID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
is_finished – flag to signal, that the FluxMapID state has finished
-
void uz_ControlState_set_enteredFrictionID(uz_ParaID_ControlState_t *self, bool did_enter)#
Sets the enteredFrictionID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
did_enter – flag to signal, that the FrictionID state has been entered
-
void uz_ControlState_set_enteredFluxMapID(uz_ParaID_ControlState_t *self, bool did_enter)#
Sets the enteredFluxMapID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
did_enter – flag to signal, that the FluxMapID state has been entered
-
void uz_ControlState_set_enteredTwoMassID(uz_ParaID_ControlState_t *self, bool did_enter)#
Sets the enteredTwoMassID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
did_enter – flag to signal, that the TwoMassID state has been entered
-
void uz_ControlState_set_enteredElectricalID(uz_ParaID_ControlState_t *self, bool did_enter)#
Sets the enteredElectricalID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
did_enter – flag to signal, that the ElectricalID state has been entered
-
void uz_ControlState_set_enteredOnlineID(uz_ParaID_ControlState_t *self, bool did_enter)#
Sets the enteredOnlineID flag for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
did_enter – flag to signal, that the OnlineID state has been entered
-
void uz_ControlState_set_ElectricalID_output(uz_ParaID_ControlState_t *self, uz_ParaID_ElectricalID_output_t *ElectricalID_output)#
Sets the output struct of the ElectricalID for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
ElectricalID_output – pointer to the output struct of the ElectricalID
-
void uz_ControlState_set_GlobalConfig(uz_ParaID_ControlState_t *self, uz_ParaID_GlobalConfig_t GlobalConfig)#
Sets the GlobalConfig struct of the ParameterID for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
GlobalConfig – struct for the general settings of the ParameterID
-
void uz_ControlState_set_ElectricalID_FOC_output(uz_ParaID_ControlState_t *self, uz_ParaID_Controller_Parameters_output_t ElectricalID_FOC_output)#
Sets the Controller Parameters of the ElectricalID state for the ControlState.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
ElectricalID_FOC_output – struct for the ElectricalID controller parameters output struct
-
uz_ParaID_GlobalConfig_t *uz_ControlState_get_GlobalConfig(uz_ParaID_ControlState_t *self)#
Gets the GlobalConfig struct of the ControlState. This struct should be given to every ID-state.
- Parameters:
self – pointer to uz_ParaID_ControlState_t object
- Returns:
uz_ParaID_GlobalConfig_t* pointer to the struct
-
uz_ParaID_ControlFlags_t *uz_ControlState_get_ControlFlags(uz_ParaID_ControlState_t *self)#
Gets the ControlFlags struct. This struct should be given to every ID-state.
- Parameters:
self – struct for the general settings of the ParameterID
- Returns:
uz_ParaID_ControlFlags_t* pointer to the struct