syrlinks handler ready for testing

This commit is contained in:
2021-02-22 09:24:42 +01:00
parent 13c75ed9c2
commit 9bdc2096b0
18 changed files with 842 additions and 247 deletions

View File

@ -40,7 +40,7 @@ ReturnValue_t I2cComIF::initializeInterface(CookieIF * cookie) {
sif::error << "I2cComIF::initializeInterface: Failed to insert "
<< "device with address " << i2cAddress << "to I2C device "
<< "map" << std::endl;
return HasReturnvaluesIF::RETURN_OK;
return HasReturnvaluesIF::RETURN_FAILED;
}
}
else {
@ -48,11 +48,6 @@ ReturnValue_t I2cComIF::initializeInterface(CookieIF * cookie) {
<< "already in use" << std::endl;
}
i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
if(i2cDeviceMapIter == i2cDeviceMap.end()) {
sif::error << "Failure" << std::endl;
}
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -15,8 +15,9 @@ public:
/**
* @brief Constructor for the I2C cookie.
* @param i2cAddress_ The i2c address of the target device.
* @param maxReplyLen The maximum expected length of a reply from the
* @param maxReplyLen_ The maximum expected length of a reply from the
* target device.
* @param devicFile_ The device file specifying the i2c interface to use. E.g. "/dev/i2c-0".
*/
I2cCookie(address_t i2cAddress_, size_t maxReplyLen_,
std::string deviceFile_);