2016-06-15 23:48:41 +02:00
|
|
|
/**
|
2018-07-12 16:29:32 +02:00
|
|
|
* @file FixedSequenceSlot.h
|
2016-06-15 23:48:41 +02:00
|
|
|
* @brief This file defines the PollingSlot class.
|
|
|
|
* @date 19.12.2012
|
|
|
|
* @author baetz
|
|
|
|
*/
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
#ifndef FIXEDSEQUENCESLOT_H_
|
|
|
|
#define FIXEDSEQUENCESLOT_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
#include <framework/objectmanager/ObjectManagerIF.h>
|
2018-07-12 16:29:32 +02:00
|
|
|
#include <framework/tasks/ExecutableObjectIF.h>
|
|
|
|
class PeriodicTaskIF;
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief This class is the representation of a single polling sequence table entry.
|
|
|
|
*
|
|
|
|
* \details The PollingSlot class is the representation of a single polling sequence table entry.
|
|
|
|
*/
|
2018-07-12 16:29:32 +02:00
|
|
|
class FixedSequenceSlot {
|
|
|
|
public:
|
2020-04-06 11:19:05 +02:00
|
|
|
FixedSequenceSlot( object_id_t handlerId, uint32_t setTimeMs,
|
|
|
|
int8_t setSequenceId, PeriodicTaskIF* executingTask );
|
2018-07-12 16:29:32 +02:00
|
|
|
virtual ~FixedSequenceSlot();
|
|
|
|
|
2016-06-15 23:48:41 +02:00
|
|
|
/**
|
2020-04-06 11:19:05 +02:00
|
|
|
* @brief Handler identifies which device handler object is executed in this slot.
|
2016-06-15 23:48:41 +02:00
|
|
|
*/
|
2018-07-12 16:29:32 +02:00
|
|
|
ExecutableObjectIF* handler;
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
/**
|
2020-04-06 11:19:05 +02:00
|
|
|
* @brief This attribute defines when a device handler object is executed.
|
2016-06-15 23:48:41 +02:00
|
|
|
*
|
2020-04-06 11:19:05 +02:00
|
|
|
* @details The pollingTime attribute identifies the time the handler is executed in ms.
|
|
|
|
* It must be smaller than the period length of the polling sequence.
|
2016-06-15 23:48:41 +02:00
|
|
|
*/
|
2018-07-12 16:29:32 +02:00
|
|
|
uint32_t pollingTimeMs;
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief This value defines the type of device communication.
|
|
|
|
*
|
2020-04-06 11:19:05 +02:00
|
|
|
* \details The state of this value decides what communication routine is
|
|
|
|
* called in the PST executable or the device handler object.
|
2016-06-15 23:48:41 +02:00
|
|
|
*/
|
|
|
|
uint8_t opcode;
|
2020-04-06 11:19:05 +02:00
|
|
|
|
|
|
|
bool operator <(const FixedSequenceSlot & fixedSequenceSlot) const {
|
|
|
|
return pollingTimeMs < fixedSequenceSlot.pollingTimeMs;
|
|
|
|
}
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
#endif /* FIXEDSEQUENCESLOT_H_ */
|