renaming complete, pool in namespace
This commit is contained in:
@@ -38,7 +38,7 @@ ReturnValue_t DataPoolAdmin::executeAction(ActionId_t actionId,
|
||||
|
||||
uint8_t valid = data[4];
|
||||
|
||||
uint32_t poolId = ::dataPool.PIDToDataPoolId(address);
|
||||
uint32_t poolId = glob::dataPool.PIDToDataPoolId(address);
|
||||
|
||||
GlobDataSet mySet;
|
||||
PoolRawAccess variable(poolId, 0, &mySet, PoolVariableIF::VAR_READ_WRITE);
|
||||
@@ -90,8 +90,8 @@ void DataPoolAdmin::handleCommand() {
|
||||
|
||||
ReturnValue_t DataPoolAdmin::handleMemoryLoad(uint32_t address,
|
||||
const uint8_t* data, uint32_t size, uint8_t** dataPointer) {
|
||||
uint32_t poolId = ::dataPool.PIDToDataPoolId(address);
|
||||
uint8_t arrayIndex = ::dataPool.PIDToArrayIndex(address);
|
||||
uint32_t poolId = glob::dataPool.PIDToDataPoolId(address);
|
||||
uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address);
|
||||
GlobDataSet testSet;
|
||||
PoolRawAccess varToGetSize(poolId, arrayIndex, &testSet,
|
||||
PoolVariableIF::VAR_READ);
|
||||
@@ -129,8 +129,8 @@ ReturnValue_t DataPoolAdmin::handleMemoryLoad(uint32_t address,
|
||||
|
||||
ReturnValue_t DataPoolAdmin::handleMemoryDump(uint32_t address, uint32_t size,
|
||||
uint8_t** dataPointer, uint8_t* copyHere) {
|
||||
uint32_t poolId = ::dataPool.PIDToDataPoolId(address);
|
||||
uint8_t arrayIndex = ::dataPool.PIDToArrayIndex(address);
|
||||
uint32_t poolId = glob::dataPool.PIDToDataPoolId(address);
|
||||
uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address);
|
||||
GlobDataSet testSet;
|
||||
PoolRawAccess varToGetSize(poolId, arrayIndex, &testSet,
|
||||
PoolVariableIF::VAR_READ);
|
||||
|
||||
@@ -142,5 +142,8 @@ public:
|
||||
};
|
||||
|
||||
//We assume someone globally instantiates a DataPool.
|
||||
namespace glob {
|
||||
extern GlobalDataPool dataPool;
|
||||
}
|
||||
|
||||
#endif /* DATAPOOL_H_ */
|
||||
|
||||
@@ -111,11 +111,11 @@ ReturnValue_t GlobDataSet::handleUnreadDatasetCommit() {
|
||||
}
|
||||
|
||||
ReturnValue_t GlobDataSet::unlockDataPool() {
|
||||
return ::dataPool.freeDataPoolLock();
|
||||
return glob::dataPool.freeDataPoolLock();
|
||||
}
|
||||
|
||||
ReturnValue_t GlobDataSet::lockDataPool() {
|
||||
return ::dataPool.lockDataPool();
|
||||
return glob::dataPool.lockDataPool();
|
||||
}
|
||||
|
||||
ReturnValue_t GlobDataSet::serialize(uint8_t** buffer, size_t* size,
|
||||
|
||||
@@ -13,7 +13,7 @@ inline GlobPoolVar<T>::GlobPoolVar(uint32_t set_id,
|
||||
|
||||
template <class T>
|
||||
inline ReturnValue_t GlobPoolVar<T>::read() {
|
||||
PoolEntry<T>* read_out = ::dataPool.getData<T>(dataPoolId, 1);
|
||||
PoolEntry<T>* read_out = glob::dataPool.getData<T>(dataPoolId, 1);
|
||||
if (read_out != NULL) {
|
||||
valid = read_out->valid;
|
||||
value = *(read_out->address);
|
||||
@@ -29,7 +29,7 @@ inline ReturnValue_t GlobPoolVar<T>::read() {
|
||||
|
||||
template <class T>
|
||||
inline ReturnValue_t GlobPoolVar<T>::commit() {
|
||||
PoolEntry<T>* write_back = ::dataPool.getData<T>(dataPoolId, 1);
|
||||
PoolEntry<T>* write_back = glob::dataPool.getData<T>(dataPoolId, 1);
|
||||
if ((write_back != NULL) && (readWriteMode != VAR_READ)) {
|
||||
write_back->valid = valid;
|
||||
*(write_back->address) = value;
|
||||
|
||||
@@ -50,7 +50,7 @@ protected:
|
||||
* The operation does NOT provide any mutual exclusive protection by itself.
|
||||
*/
|
||||
ReturnValue_t read() {
|
||||
PoolEntry<T>* read_out = ::dataPool.getData<T>(this->dataPoolId,
|
||||
PoolEntry<T>* read_out = glob::dataPool.getData<T>(this->dataPoolId,
|
||||
vector_size);
|
||||
if (read_out != NULL) {
|
||||
this->valid = read_out->valid;
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
*
|
||||
*/
|
||||
ReturnValue_t commit() {
|
||||
PoolEntry<T>* write_back = ::dataPool.getData<T>(this->dataPoolId,
|
||||
PoolEntry<T>* write_back = glob::dataPool.getData<T>(this->dataPoolId,
|
||||
vector_size);
|
||||
if ((write_back != NULL) && (this->readWriteMode != VAR_READ)) {
|
||||
write_back->valid = valid;
|
||||
|
||||
Reference in New Issue
Block a user