some renaming
This commit is contained in:
parent
f766398b20
commit
fba8775f49
@ -20,7 +20,7 @@
|
||||
class PoolVariableIF : public SerializeIF {
|
||||
friend class PoolDataSetBase;
|
||||
friend class GlobDataSet;
|
||||
friend class LocalDataSetBase;
|
||||
friend class LocalPoolDataSetBase;
|
||||
public:
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::POOL_VARIABLE_IF;
|
||||
static constexpr ReturnValue_t INVALID_READ_WRITE_MODE = MAKE_RETURN_CODE(0xA0);
|
||||
|
@ -116,7 +116,7 @@ const HasLocalDataPoolIF* LocalDataPoolManager::getOwner() const {
|
||||
|
||||
ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
|
||||
MessageQueueId_t sendTo) {
|
||||
LocalDataSetBase* dataSetToSerialize = dynamic_cast<LocalDataSetBase*>(
|
||||
LocalPoolDataSetBase* dataSetToSerialize = dynamic_cast<LocalPoolDataSetBase*>(
|
||||
owner->getDataSetHandle(sid));
|
||||
if(dataSetToSerialize == nullptr) {
|
||||
sif::warning << "HousekeepingManager::generateHousekeepingPacket:"
|
||||
@ -155,7 +155,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid) {
|
||||
LocalDataSetBase* dataSet = dynamic_cast<LocalDataSetBase*>(
|
||||
LocalPoolDataSetBase* dataSet = dynamic_cast<LocalPoolDataSetBase*>(
|
||||
owner->getDataSetHandle(sid));
|
||||
if(dataSet == nullptr) {
|
||||
sif::warning << "HousekeepingManager::generateHousekeepingPacket:"
|
||||
@ -186,7 +186,7 @@ void LocalDataPoolManager::setMinimalSamplingFrequency(float frequencySeconds) {
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataPoolManager::serializeHkPacketIntoStore(
|
||||
store_address_t *storeId, LocalDataSetBase* dataSet) {
|
||||
store_address_t *storeId, LocalPoolDataSetBase* dataSet) {
|
||||
size_t hkSize = dataSet->getSerializedSize();
|
||||
uint8_t* storePtr = nullptr;
|
||||
ReturnValue_t result = ipcStore->getFreeElement(storeId, hkSize,&storePtr);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
class LocalDataSetBase;
|
||||
class LocalPoolDataSetBase;
|
||||
|
||||
/**
|
||||
* @brief This class is the managing instance for local data pool.
|
||||
@ -38,7 +38,7 @@ class LocalDataPoolManager {
|
||||
friend class LocalPoolVar;
|
||||
template<typename T, uint16_t vecSize>
|
||||
friend class LocalPoolVector;
|
||||
friend class LocalDataSetBase;
|
||||
friend class LocalPoolDataSetBase;
|
||||
public:
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::HOUSEKEEPING_MANAGER;
|
||||
|
||||
@ -154,7 +154,7 @@ private:
|
||||
* The data pool manager will keep an internal map of HK receivers.
|
||||
*/
|
||||
struct HkReceiver {
|
||||
LocalDataSetBase* dataSet = nullptr;
|
||||
LocalPoolDataSetBase* dataSet = nullptr;
|
||||
lp_id_t localPoolId = HasLocalDataPoolIF::NO_POOL_ID;
|
||||
MessageQueueId_t destinationQueue = MessageQueueIF::NO_QUEUE;
|
||||
ReportingType reportingType = ReportingType::PERIODIC;
|
||||
@ -222,7 +222,7 @@ private:
|
||||
|
||||
void setMinimalSamplingFrequency(float frequencySeconds);
|
||||
ReturnValue_t serializeHkPacketIntoStore(store_address_t* storeId,
|
||||
LocalDataSetBase* dataSet);
|
||||
LocalPoolDataSetBase* dataSet);
|
||||
};
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
LocalDataSet::LocalDataSet(HasLocalDataPoolIF *hkOwner,
|
||||
const size_t maxNumberOfVariables):
|
||||
LocalDataSetBase(hkOwner,poolVarList.data(), maxNumberOfVariables) {
|
||||
LocalPoolDataSetBase(hkOwner,poolVarList.data(), maxNumberOfVariables) {
|
||||
poolVarList.reserve(maxNumberOfVariables);
|
||||
poolVarList.resize(maxNumberOfVariables);
|
||||
if(hkOwner == nullptr) {
|
||||
@ -20,7 +20,7 @@ LocalDataSet::LocalDataSet(HasLocalDataPoolIF *hkOwner,
|
||||
|
||||
LocalDataSet::LocalDataSet(object_id_t ownerId,
|
||||
const size_t maxNumberOfVariables):
|
||||
LocalDataSetBase(ownerId, poolVarList.data(), maxNumberOfVariables) {
|
||||
LocalPoolDataSetBase(ownerId, poolVarList.data(), maxNumberOfVariables) {
|
||||
poolVarList.reserve(maxNumberOfVariables);
|
||||
poolVarList.resize(maxNumberOfVariables);
|
||||
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <framework/datapoollocal/LocalPoolDataSetBase.h>
|
||||
#include <vector>
|
||||
|
||||
class LocalDataSet: public LocalDataSetBase {
|
||||
class LocalDataSet: public LocalPoolDataSetBase {
|
||||
public:
|
||||
LocalDataSet(HasLocalDataPoolIF* hkOwner, const size_t maxSize);
|
||||
LocalDataSet(object_id_t owner, const size_t maxSize);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
LocalDataSetBase::LocalDataSetBase(HasLocalDataPoolIF *hkOwner,
|
||||
LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
|
||||
PoolVariableIF** registeredVariablesArray,
|
||||
const size_t maxNumberOfVariables):
|
||||
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
|
||||
@ -17,7 +17,7 @@ LocalDataSetBase::LocalDataSetBase(HasLocalDataPoolIF *hkOwner,
|
||||
hkManager = hkOwner->getHkManagerHandle();
|
||||
}
|
||||
|
||||
LocalDataSetBase::LocalDataSetBase(object_id_t ownerId,
|
||||
LocalPoolDataSetBase::LocalPoolDataSetBase(object_id_t ownerId,
|
||||
PoolVariableIF** registeredVariablesArray,
|
||||
const size_t maxNumberOfVariables):
|
||||
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
|
||||
@ -31,15 +31,15 @@ LocalDataSetBase::LocalDataSetBase(object_id_t ownerId,
|
||||
hkManager = hkOwner->getHkManagerHandle();
|
||||
}
|
||||
|
||||
LocalDataSetBase::~LocalDataSetBase() {
|
||||
LocalPoolDataSetBase::~LocalPoolDataSetBase() {
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataSetBase::lockDataPool(uint32_t timeoutMs) {
|
||||
ReturnValue_t LocalPoolDataSetBase::lockDataPool(uint32_t timeoutMs) {
|
||||
MutexIF* mutex = hkManager->getMutexHandle();
|
||||
return mutex->lockMutex(MutexIF::TimeoutType::WAITING, timeoutMs);
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataSetBase::serializeWithValidityBuffer(uint8_t **buffer,
|
||||
ReturnValue_t LocalPoolDataSetBase::serializeWithValidityBuffer(uint8_t **buffer,
|
||||
size_t *size, size_t maxSize,
|
||||
SerializeIF::Endianness streamEndianness) const {
|
||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_FAILED;
|
||||
@ -72,12 +72,12 @@ ReturnValue_t LocalDataSetBase::serializeWithValidityBuffer(uint8_t **buffer,
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataSetBase::unlockDataPool() {
|
||||
ReturnValue_t LocalPoolDataSetBase::unlockDataPool() {
|
||||
MutexIF* mutex = hkManager->getMutexHandle();
|
||||
return mutex->unlockMutex();
|
||||
}
|
||||
|
||||
ReturnValue_t LocalDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
|
||||
ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
|
||||
size_t* size, size_t maxSize,
|
||||
SerializeIF::Endianness streamEndianness) const {
|
||||
for (uint16_t count = 0; count < fillCount; count++) {
|
||||
@ -93,7 +93,7 @@ ReturnValue_t LocalDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void LocalDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
|
||||
void LocalPoolDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
|
||||
if(position > 7) {
|
||||
sif::debug << "Pool Raw Access: Bit setting invalid position" << std::endl;
|
||||
return;
|
||||
@ -102,6 +102,6 @@ void LocalDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
|
||||
*byte |= 1 << shiftNumber;
|
||||
}
|
||||
|
||||
bool LocalDataSetBase::isValid() const {
|
||||
bool LocalPoolDataSetBase::isValid() const {
|
||||
return this->valid;
|
||||
}
|
||||
|
@ -30,14 +30,14 @@ class LocalDataPoolManager;
|
||||
*
|
||||
* @ingroup data_pool
|
||||
*/
|
||||
class LocalDataSetBase: public PoolDataSetBase {
|
||||
class LocalPoolDataSetBase: public PoolDataSetBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor for the creator of local pool data.
|
||||
* The constructor simply sets the fill_count to zero and sets
|
||||
* the state to "uninitialized".
|
||||
*/
|
||||
LocalDataSetBase(HasLocalDataPoolIF *hkOwner,
|
||||
LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
|
||||
PoolVariableIF** registeredVariablesArray,
|
||||
const size_t maxNumberOfVariables);
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
* @details
|
||||
*
|
||||
*/
|
||||
LocalDataSetBase(object_id_t ownerId,
|
||||
LocalPoolDataSetBase(object_id_t ownerId,
|
||||
PoolVariableIF** registeredVariablesArray,
|
||||
const size_t maxNumberOfVariables);
|
||||
|
||||
@ -61,7 +61,7 @@ public:
|
||||
* the destructor parses all variables that are still registered to the set.
|
||||
* For each, the valid flag in the data pool is set to "invalid".
|
||||
*/
|
||||
~LocalDataSetBase();
|
||||
~LocalPoolDataSetBase();
|
||||
|
||||
/**
|
||||
* Special version of the serilization function which appends a
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
SharedLocalDataSet::SharedLocalDataSet(object_id_t objectId, object_id_t owner,
|
||||
const size_t maxSize): SystemObject(objectId),
|
||||
LocalDataSetBase(owner, nullptr, maxSize) {
|
||||
LocalPoolDataSetBase(owner, nullptr, maxSize) {
|
||||
this->setContainer(poolVarVector.data());
|
||||
datasetLock = MutexFactory::instance()->createMutex();
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* Then a regular local data set is sufficient.
|
||||
*/
|
||||
class SharedLocalDataSet: public SystemObject,
|
||||
public LocalDataSetBase,
|
||||
public LocalPoolDataSetBase,
|
||||
public SharedDataSetIF {
|
||||
public:
|
||||
SharedLocalDataSet(object_id_t objectId, object_id_t owner,
|
||||
|
@ -14,13 +14,12 @@
|
||||
* @tparam capacity
|
||||
*/
|
||||
template <uint8_t NUM_VARIABLES>
|
||||
class StaticLocalDataSet: public LocalDataSetBase {
|
||||
class StaticLocalDataSet: public LocalPoolDataSetBase {
|
||||
public:
|
||||
StaticLocalDataSet(object_id_t owner):
|
||||
LocalDataSetBase(owner, poolVarList.data(), NUM_VARIABLES) {
|
||||
LocalPoolDataSetBase(owner, poolVarList.data(), NUM_VARIABLES) {
|
||||
}
|
||||
|
||||
virtual~ StaticLocalDataSet() {};
|
||||
private:
|
||||
std::array<PoolVariableIF*, NUM_VARIABLES> poolVarList;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user