handler ID cached, debug output improved
This commit is contained in:
parent
6c02776975
commit
15bb0aee98
@ -147,13 +147,18 @@ void FixedTimeslotTask::checkMissedDeadline(const TickType_t xLastWakeTime,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FixedTimeslotTask::handleMissedDeadline() {
|
void FixedTimeslotTask::handleMissedDeadline() {
|
||||||
#ifdef DEBUG
|
|
||||||
sif::warning << "FixedTimeslotTask: " << pcTaskGetName(NULL) <<
|
|
||||||
" missed deadline!\n" << std::flush;
|
|
||||||
#endif
|
|
||||||
if(deadlineMissedFunc != nullptr) {
|
if(deadlineMissedFunc != nullptr) {
|
||||||
this->deadlineMissedFunc();
|
this->deadlineMissedFunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
object_id_t handlerId = pst.current->handlerId;
|
||||||
|
sif::warning << "FixedTimeslotTask: " << pcTaskGetName(NULL) << " with"
|
||||||
|
<< " object ID 0x" << std::setfill('0') << std::setw(8) << std::hex
|
||||||
|
<< handlerId << " missed deadline!" << std::setfill(' ')
|
||||||
|
<< std::dec << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FixedTimeslotTask::sleepFor(uint32_t ms) {
|
ReturnValue_t FixedTimeslotTask::sleepFor(uint32_t ms) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
FixedSequenceSlot::FixedSequenceSlot(object_id_t handlerId, uint32_t setTime,
|
FixedSequenceSlot::FixedSequenceSlot(object_id_t handlerId, uint32_t setTime,
|
||||||
int8_t setSequenceId, ExecutableObjectIF* executableObject,
|
int8_t setSequenceId, ExecutableObjectIF* executableObject,
|
||||||
PeriodicTaskIF* executingTask) :
|
PeriodicTaskIF* executingTask) : handlerId(handlerId),
|
||||||
pollingTimeMs(setTime), opcode(setSequenceId) {
|
pollingTimeMs(setTime), opcode(setSequenceId) {
|
||||||
if(executableObject == nullptr) {
|
if(executableObject == nullptr) {
|
||||||
return;
|
return;
|
||||||
|
@ -20,6 +20,8 @@ public:
|
|||||||
PeriodicTaskIF* executingTask);
|
PeriodicTaskIF* executingTask);
|
||||||
virtual ~FixedSequenceSlot();
|
virtual ~FixedSequenceSlot();
|
||||||
|
|
||||||
|
object_id_t handlerId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Handler identifies which object is executed in this slot.
|
* @brief Handler identifies which object is executed in this slot.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user