Compare commits

...

4 Commits

Author SHA1 Message Date
2506af27ed Merge pull request 'meier/breakDoSendRead' (#28) from meier/breakDoSendRead into eive/develop
Reviewed-on: #28
2021-12-22 11:30:27 +01:00
Jakob Meier
b98c85d33f Merge branch 'eive/develop' into meier/breakDoSendRead 2021-12-19 11:41:53 +01:00
Jakob Meier
eb58a8d954 virtual printset function 2021-12-19 11:33:12 +01:00
Jakob Meier
9a858eb54c introduced protected function to break doSendRead 2021-12-14 19:39:38 +01:00
4 changed files with 24 additions and 1 deletions

View File

@@ -321,3 +321,7 @@ float LocalPoolDataSetBase::getCollectionInterval() const {
return 0.0;
}
}
void LocalPoolDataSetBase::printSet() {
return;
}

View File

@@ -176,6 +176,11 @@ public:
*/
float getCollectionInterval() const;
/**
* @brief Can be overwritten by a specific implementation of a dataset to print the set.
*/
virtual void printSet();
protected:
sid_t sid;
//! This mutex is used if the data is created by one object only.
@@ -234,7 +239,6 @@ protected:
PeriodicHousekeepingHelper* periodicHelper = nullptr;
LocalDataPoolManager* poolManager = nullptr;
};

View File

@@ -684,6 +684,11 @@ void DeviceHandlerBase::doGetWrite() {
void DeviceHandlerBase::doSendRead() {
ReturnValue_t result;
result = doSendReadHook();
if (result != RETURN_OK){
return;
}
size_t replyLen = 0;
if(cookieInfo.pendingCommand != deviceCommandMap.end()) {
replyLen = getNextReplyLength(cookieInfo.pendingCommand->first);
@@ -950,6 +955,10 @@ void DeviceHandlerBase::commandSwitch(ReturnValue_t onOff) {
}
}
ReturnValue_t DeviceHandlerBase::doSendReadHook() {
return RETURN_OK;
}
ReturnValue_t DeviceHandlerBase::getSwitches(const uint8_t **switches,
uint8_t *numberOfSwitches) {
return DeviceHandlerBase::NO_SWITCH;

View File

@@ -1094,6 +1094,12 @@ protected:
*/
void commandSwitch(ReturnValue_t onOff);
/**
* @brief This function can be used to insert device specific code during the do-send-read
* step.
*/
virtual ReturnValue_t doSendReadHook();
private:
/**