WIP: somethings wrong.. #19

Closed
muellerr wants to merge 808 commits from source/master into master
4 changed files with 10 additions and 10 deletions
Showing only changes of commit 9dcf0c7118 - Show all commits

View File

@ -26,7 +26,7 @@ MessageQueueId_t DataPoolAdmin::getCommandQueue() const {
} }
ReturnValue_t DataPoolAdmin::executeAction(ActionId_t actionId, ReturnValue_t DataPoolAdmin::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, uint32_t size) { MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
if (actionId != SET_VALIDITY) { if (actionId != SET_VALIDITY) {
return INVALID_ACTION_ID; return INVALID_ACTION_ID;
} }
@ -91,7 +91,7 @@ void DataPoolAdmin::handleCommand() {
} }
ReturnValue_t DataPoolAdmin::handleMemoryLoad(uint32_t address, ReturnValue_t DataPoolAdmin::handleMemoryLoad(uint32_t address,
const uint8_t* data, uint32_t size, uint8_t** dataPointer) { const uint8_t* data, size_t size, uint8_t** dataPointer) {
uint32_t poolId = glob::dataPool.PIDToDataPoolId(address); uint32_t poolId = glob::dataPool.PIDToDataPoolId(address);
uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address); uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address);
GlobDataSet testSet; GlobDataSet testSet;
@ -129,7 +129,7 @@ ReturnValue_t DataPoolAdmin::handleMemoryLoad(uint32_t address,
return ACTIVITY_COMPLETED; return ACTIVITY_COMPLETED;
} }
ReturnValue_t DataPoolAdmin::handleMemoryDump(uint32_t address, uint32_t size, ReturnValue_t DataPoolAdmin::handleMemoryDump(uint32_t address, size_t size,
uint8_t** dataPointer, uint8_t* copyHere) { uint8_t** dataPointer, uint8_t* copyHere) {
uint32_t poolId = glob::dataPool.PIDToDataPoolId(address); uint32_t poolId = glob::dataPool.PIDToDataPoolId(address);
uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address); uint8_t arrayIndex = glob::dataPool.PIDToArrayIndex(address);
@ -151,7 +151,7 @@ ReturnValue_t DataPoolAdmin::handleMemoryDump(uint32_t address, uint32_t size,
PoolVariableIF::VAR_READ); PoolVariableIF::VAR_READ);
status = rawSet.read(); status = rawSet.read();
if (status == RETURN_OK) { if (status == RETURN_OK) {
uint32_t temp = 0; size_t temp = 0;
status = variable.getEntryEndianSafe(ptrToCopy, &temp, size); status = variable.getEntryEndianSafe(ptrToCopy, &temp, size);
if (status != RETURN_OK) { if (status != RETURN_OK) {
return RETURN_FAILED; return RETURN_FAILED;

View File

@ -30,12 +30,12 @@ public:
MessageQueueId_t getCommandQueue() const; MessageQueueId_t getCommandQueue() const;
ReturnValue_t handleMemoryLoad(uint32_t address, const uint8_t* data, ReturnValue_t handleMemoryLoad(uint32_t address, const uint8_t* data,
uint32_t size, uint8_t** dataPointer); size_t size, uint8_t** dataPointer);
ReturnValue_t handleMemoryDump(uint32_t address, uint32_t size, ReturnValue_t handleMemoryDump(uint32_t address, size_t size,
uint8_t** dataPointer, uint8_t* copyHere); uint8_t** dataPointer, uint8_t* copyHere);
ReturnValue_t executeAction(ActionId_t actionId, ReturnValue_t executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, uint32_t size); MessageQueueId_t commandedBy, const uint8_t* data, size_t size);
//not implemented as ParameterHelper is no used //not implemented as ParameterHelper is no used
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId, ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,

View File

@ -121,7 +121,7 @@ uint8_t* PoolRawAccess::getEntry() {
} }
ReturnValue_t PoolRawAccess::getEntryEndianSafe(uint8_t* buffer, ReturnValue_t PoolRawAccess::getEntryEndianSafe(uint8_t* buffer,
uint32_t* writtenBytes, uint32_t max_size) { size_t* writtenBytes, size_t max_size) {
uint8_t* data_ptr = getEntry(); uint8_t* data_ptr = getEntry();
// debug << "PoolRawAccess::getEntry: Array position: " << // debug << "PoolRawAccess::getEntry: Array position: " <<
// index * size_of_type << " Size of T: " << (int)size_of_type << // index * size_of_type << " Size of T: " << (int)size_of_type <<

View File

@ -57,8 +57,8 @@ public:
* @return - @c RETURN_OK if entry could be acquired * @return - @c RETURN_OK if entry could be acquired
* - @c RETURN_FAILED else. * - @c RETURN_FAILED else.
*/ */
ReturnValue_t getEntryEndianSafe(uint8_t* buffer, uint32_t* size, ReturnValue_t getEntryEndianSafe(uint8_t *buffer, size_t *size,
uint32_t max_size); size_t maxSize);
/** /**
* @brief Serialize raw pool entry into provided buffer directly * @brief Serialize raw pool entry into provided buffer directly