Device Handler Base Proposals #15

Closed
muellerr wants to merge 3 commits from KSat:mueller_DeviceHandlerBase_Changes into master
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 4340f08cf2 - Show all commits

View File

@ -63,6 +63,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
decrementDeviceReplyMap(); decrementDeviceReplyMap();
fdirInstance->checkForFailures(); fdirInstance->checkForFailures();
hkSwitcher.performOperation(); hkSwitcher.performOperation();
performOperationHook();
} }
if (mode == MODE_OFF) { if (mode == MODE_OFF) {
return RETURN_OK; return RETURN_OK;
@ -1279,7 +1280,8 @@ void DeviceHandlerBase::setTaskIF(PeriodicTaskIF* task_){
executingTask = task_; executingTask = task_;
} }
// Default implementations empty.
void DeviceHandlerBase::debugInterface(uint8_t positionTracker, void DeviceHandlerBase::debugInterface(uint8_t positionTracker,
object_id_t objectId, uint32_t parameter) { object_id_t objectId, uint32_t parameter) {}
} void DeviceHandlerBase::performOperationHook() {}

View File

@ -469,6 +469,12 @@ protected:
*/ */
virtual ReturnValue_t getSwitches(const uint8_t **switches, virtual ReturnValue_t getSwitches(const uint8_t **switches,
uint8_t *numberOfSwitches); uint8_t *numberOfSwitches);
/**
* @brief Hook function for child handlers which is called once per
* performOperation(). Default implementation is empty.
*/
virtual void performOperationHook();
public: public:
/** /**
* @param parentQueueId * @param parentQueueId