WIP: somethings wrong.. #19
@ -34,7 +34,7 @@ ReturnValue_t PoolRawAccessHelper::serialize(uint8_t **buffer, size_t *size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(remainingParametersSize != 0) {
|
if(remainingParametersSize != 0) {
|
||||||
debug << "Pool Raw Access: Remaining parameters size not 0 !" << std::endl;
|
sif::debug << "Pool Raw Access: Remaining parameters size not 0 !" << std::endl;
|
||||||
result = RETURN_FAILED;
|
result = RETURN_FAILED;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -56,7 +56,7 @@ ReturnValue_t PoolRawAccessHelper::serializeWithValidityMask(uint8_t ** buffer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(remainingParametersSize != 0) {
|
if(remainingParametersSize != 0) {
|
||||||
debug << "Pool Raw Access: Remaining parameters size not 0 !" << std::endl;
|
sif::debug << "Pool Raw Access: Remaining parameters size not 0 !" << std::endl;
|
||||||
result = RETURN_FAILED;
|
result = RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ ReturnValue_t PoolRawAccessHelper::serializeCurrentPoolEntryIntoBuffer(
|
|||||||
ReturnValue_t result = AutoSerializeAdapter::deSerialize(¤tPoolId,
|
ReturnValue_t result = AutoSerializeAdapter::deSerialize(¤tPoolId,
|
||||||
&poolIdBuffer,remainingParameters,true);
|
&poolIdBuffer,remainingParameters,true);
|
||||||
if(result != RETURN_OK) {
|
if(result != RETURN_OK) {
|
||||||
debug << std::hex << "Pool Raw Access Helper: Error deSeralizing "
|
sif::debug << std::hex << "Pool Raw Access Helper: Error deSeralizing "
|
||||||
"pool IDs" << std::dec << std::endl;
|
"pool IDs" << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(
|
|||||||
while(not poolEntrySerialized) {
|
while(not poolEntrySerialized) {
|
||||||
|
|
||||||
if(counter > DataSet::DATA_SET_MAX_SIZE) {
|
if(counter > DataSet::DATA_SET_MAX_SIZE) {
|
||||||
error << "Pool Raw Access Helper: Config error, "
|
sif::error << "Pool Raw Access Helper: Config error, "
|
||||||
"max. number of possible data set variables exceeded"
|
"max. number of possible data set variables exceeded"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -110,7 +110,7 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(
|
|||||||
|
|
||||||
result = currentDataSet.read();
|
result = currentDataSet.read();
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
debug << std::hex << "Pool Raw Access Helper: Error reading raw "
|
sif::debug << std::hex << "Pool Raw Access Helper: Error reading raw "
|
||||||
"dataset with returncode 0x"
|
"dataset with returncode 0x"
|
||||||
<< result << std::dec << std::endl;
|
<< result << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -119,7 +119,7 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(
|
|||||||
result = checkRemainingSize(¤tPoolRawAccess, &poolEntrySerialized,
|
result = checkRemainingSize(¤tPoolRawAccess, &poolEntrySerialized,
|
||||||
&arrayPosition);
|
&arrayPosition);
|
||||||
if(result != RETURN_OK) {
|
if(result != RETURN_OK) {
|
||||||
error << "Pool Raw Access Helper: Configuration Error at pool ID "
|
sif::error << "Pool Raw Access Helper: Configuration Error at pool ID "
|
||||||
<< std::hex << currentPoolId
|
<< std::hex << currentPoolId
|
||||||
<< ". Size till end smaller than 0" << std::dec << std::endl;
|
<< ". Size till end smaller than 0" << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -136,7 +136,7 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(
|
|||||||
result = currentDataSet.serialize(argStruct.buffer, argStruct.size,
|
result = currentDataSet.serialize(argStruct.buffer, argStruct.size,
|
||||||
argStruct.max_size, argStruct.bigEndian);
|
argStruct.max_size, argStruct.bigEndian);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
debug << "Pool Raw Access Helper: Error serializing pool data with "
|
sif::debug << "Pool Raw Access Helper: Error serializing pool data with "
|
||||||
"ID 0x" << std::hex << currentPoolId << " into send buffer "
|
"ID 0x" << std::hex << currentPoolId << " into send buffer "
|
||||||
"with return code " << result << std::dec << std::endl;
|
"with return code " << result << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
@ -174,7 +174,7 @@ void PoolRawAccessHelper::handleMaskModification(uint8_t * validityMask) {
|
|||||||
uint8_t PoolRawAccessHelper::bitSetter(uint8_t byte, uint8_t position,
|
uint8_t PoolRawAccessHelper::bitSetter(uint8_t byte, uint8_t position,
|
||||||
bool value) {
|
bool value) {
|
||||||
if(position < 1 or position > 8) {
|
if(position < 1 or position > 8) {
|
||||||
debug << "Pool Raw Access: Bit setting invalid position" << std::endl;
|
sif::debug << "Pool Raw Access: Bit setting invalid position" << std::endl;
|
||||||
return byte;
|
return byte;
|
||||||
}
|
}
|
||||||
uint8_t shiftNumber = position + (6 - 2 * (position - 1));
|
uint8_t shiftNumber = position + (6 - 2 * (position - 1));
|
||||||
|
@ -126,7 +126,7 @@ void CommunicationMessage::setDataByte(uint8_t byte, uint8_t position) {
|
|||||||
memcpy(getData() + 3 * sizeof(uint32_t) + position * sizeof(uint8_t), &byte, sizeof(byte));
|
memcpy(getData() + 3 * sizeof(uint32_t) + position * sizeof(uint8_t), &byte, sizeof(byte));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error << "Comm Message: Invalid byte position" << std::endl;
|
sif::error << "Comm Message: Invalid byte position" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ uint8_t CommunicationMessage::getDataByte(uint8_t position) const {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
error << "Comm Message: Invalid byte position" << std::endl;
|
sif::error << "Comm Message: Invalid byte position" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ void CommunicationMessage::setDataUint16(uint16_t data, uint8_t position) {
|
|||||||
memcpy(getData() + 3 * sizeof(uint32_t) + position * sizeof(uint16_t), &data, sizeof(data));
|
memcpy(getData() + 3 * sizeof(uint32_t) + position * sizeof(uint16_t), &data, sizeof(data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error << "Comm Message: Invalid byte position" << std::endl;
|
sif::error << "Comm Message: Invalid byte position" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ uint16_t CommunicationMessage::getDataUint16(uint8_t position) const{
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
error << "Comm Message: Invalid byte position" << std::endl;
|
sif::error << "Comm Message: Invalid byte position" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ BinarySemaphore::BinarySemaphore() {
|
|||||||
handle = xSemaphoreCreateBinary();
|
handle = xSemaphoreCreateBinary();
|
||||||
if(handle == nullptr) {
|
if(handle == nullptr) {
|
||||||
|
|
||||||
error << "Binary semaphore creation failure" << std::endl;
|
sif::error << "Binary semaphore creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
xSemaphoreGive(handle);
|
xSemaphoreGive(handle);
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ BinarySemaphore::~BinarySemaphore() {
|
|||||||
BinarySemaphore::BinarySemaphore(const BinarySemaphore& other) {
|
BinarySemaphore::BinarySemaphore(const BinarySemaphore& other) {
|
||||||
handle = xSemaphoreCreateBinary();
|
handle = xSemaphoreCreateBinary();
|
||||||
if(handle == nullptr) {
|
if(handle == nullptr) {
|
||||||
error << "Binary semaphore creation failure" << std::endl;
|
sif::error << "Binary semaphore creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
xSemaphoreGive(handle);
|
xSemaphoreGive(handle);
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ BinarySemaphore& BinarySemaphore::operator =(const BinarySemaphore& s) {
|
|||||||
if(this != &s) {
|
if(this != &s) {
|
||||||
handle = xSemaphoreCreateBinary();
|
handle = xSemaphoreCreateBinary();
|
||||||
if(handle == nullptr) {
|
if(handle == nullptr) {
|
||||||
error << "Binary semaphore creation failure" << std::endl;
|
sif::error << "Binary semaphore creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
xSemaphoreGive(handle);
|
xSemaphoreGive(handle);
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ BinarySemaphore& BinarySemaphore::operator =(const BinarySemaphore& s) {
|
|||||||
BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) {
|
BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) {
|
||||||
handle = xSemaphoreCreateBinary();
|
handle = xSemaphoreCreateBinary();
|
||||||
if(handle == nullptr) {
|
if(handle == nullptr) {
|
||||||
error << "Binary semaphore creation failure" << std::endl;
|
sif::error << "Binary semaphore creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
xSemaphoreGive(handle);
|
xSemaphoreGive(handle);
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ BinarySemaphore& BinarySemaphore::operator =(
|
|||||||
if(&s != this) {
|
if(&s != this) {
|
||||||
handle = xSemaphoreCreateBinary();
|
handle = xSemaphoreCreateBinary();
|
||||||
if(handle == nullptr) {
|
if(handle == nullptr) {
|
||||||
error << "Binary semaphore creation failure" << std::endl;
|
sif::error << "Binary semaphore creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
xSemaphoreGive(handle);
|
xSemaphoreGive(handle);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ TmPacketStored::TmPacketStored(uint16_t apid, uint8_t service,
|
|||||||
(TmPacketBase::TM_PACKET_MIN_SIZE + size + headerSize), &pData);
|
(TmPacketBase::TM_PACKET_MIN_SIZE + size + headerSize), &pData);
|
||||||
|
|
||||||
if (returnValue != store->RETURN_OK) {
|
if (returnValue != store->RETURN_OK) {
|
||||||
debug << "TM Packet Stored: Issue getting free storage" << std::endl;
|
sif::debug << "TM Packet Stored: Issue getting free storage" << std::endl;
|
||||||
checkAndReportLostTm();
|
checkAndReportLostTm();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user