Public Member Functions |
void | enterPacket (void *packet, double *data) |
| Passes a new control sequence packet to the actuator.
|
void | getCurrentControl (double *control) |
| Offers the current validated control based on entered control sequences.
|
| RealtimeActuator (yane::Model::Model *model, Cycle *cycle, int horizon, T_RESPONSEFUNC func=0, void *ptr=0, yane::Utils::DebugMaster *dm=0, yane::Utils::StatisticsMaster *sm=0) |
| Constructor.
|
void | setSamplingInstant (int samplingInstant) |
| Function to set the current time instant.
|
| ~RealtimeActuator () |
| Destructor.
|
Protected Member Functions |
void | proceedError (int seq, int preseq) |
| Triggers an error message by calling the callback function.
|
Protected Attributes |
T_RESPONSEFUNC | _actuatorfunction |
| Pointer to the error callback function.
|
ControlClipboard * | _cb |
| Instance of a control sequence manager object.
|
Cycle * | _cycle |
| stores the pointer the the discrete realtime clock
|
yane::Utils::DebugClient * | _debugclient |
| Instance of a debugging client.
|
double * | _defaultu |
| Emergency fallback control to handle the case of buffer running empty.
|
int | _dimu |
| Dimension of the control variable.
|
int | _horizon |
| Length of the control sequences.
|
yane::Model::Model * | _model |
| Instance of the plant model.
|
void * | _ptr |
| Custom pointer passed to the callback function.
|
int | _seq |
| Current time instant, to be set externally.
|
yane::Utils::StatisticsClientIntCounter * | _stat_appliedseq |
| Statistics collector for applied sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_bridgedseq |
| Statistics collector for bridged sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_bufferunderrun |
| Statistics collector for buffer underruns.
|
bool | _stat_collect |
| If true, the actuator will collect statistical data.
|
yane::Utils::StatisticsClientIntCounter * | _stat_duplicateseq |
| Statistics collector for duplicated sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_inconsistentseq |
| Statistics collector for inconsistent sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_invalidatedseq |
| Statistics collector for invalidated sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_missingseq |
| Statistics collector for missing sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_outdatedseq |
| Statistics collector for outdated sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_recvseq |
| Statistics collector for received sequences.
|
yane::Utils::StatisticsClientIntCounter * | _stat_senterror |
| Statistics collector for sent error messages.
|
double * | _u |
| Temporary memory for control storage.
|
int | _u_seq |
| Time instant of the last implemented control sequence.
|
This class can be used to simulate a physical hardware controller. It offers realtime controls computed by a predictive controller and automatically stores and sorts the transmitted control sequences.
The user has to pass computed control sequences to an instance of this class. The object automatically chooses the current control vector and provides error packets dedicated to the predictive controller if necessary. The object needs an instance of a discrete realtime clock to identify the current cycle.