WIP: somethings wrong.. #19
@ -67,7 +67,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
|||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
error << "Component " << std::hex << componentId
|
sif::error << "Component " << std::hex << componentId
|
||||||
<< " not found, not adding it to pst" << std::endl;
|
<< " not found, not adding it to pst" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ const uint32_t MutexIF::NO_TIMEOUT = 0;
|
|||||||
Mutex::Mutex() {
|
Mutex::Mutex() {
|
||||||
handle = xSemaphoreCreateMutex();
|
handle = xSemaphoreCreateMutex();
|
||||||
if(handle == NULL) {
|
if(handle == NULL) {
|
||||||
error << "Mutex creation failure" << std::endl;
|
sif::error << "Mutex creation failure" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ ReturnValue_t SerialBufferAdapter<count_t>::deSerialize(const uint8_t** buffer,
|
|||||||
template<typename count_t>
|
template<typename count_t>
|
||||||
uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
|
uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
|
||||||
if(m_buffer == nullptr) {
|
if(m_buffer == nullptr) {
|
||||||
error << "Wrong access function for stored type !"
|
sif::error << "Wrong access function for stored type !"
|
||||||
" Use getConstBuffer()" << std::endl;
|
" Use getConstBuffer()" << std::endl;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
|
|||||||
template<typename count_t>
|
template<typename count_t>
|
||||||
const uint8_t * SerialBufferAdapter<count_t>::getConstBuffer() {
|
const uint8_t * SerialBufferAdapter<count_t>::getConstBuffer() {
|
||||||
if(constBuffer == nullptr) {
|
if(constBuffer == nullptr) {
|
||||||
error << "Wrong access function for stored type !"
|
sif::error << "Wrong access function for stored type !"
|
||||||
" Use getBuffer()" << std::endl;
|
" Use getBuffer()" << std::endl;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ inline ReturnValue_t LocalPool<NUMBER_OF_POOLS>::reserveSpace(
|
|||||||
if (!ignoreFault) {
|
if (!ignoreFault) {
|
||||||
internalErrorReporter->storeFull();
|
internalErrorReporter->storeFull();
|
||||||
}
|
}
|
||||||
error << "LocalPool( " << std::hex << getObjectId() << std::dec
|
sif::error << "LocalPool( " << std::hex << getObjectId() << std::dec
|
||||||
<< " )::reserveSpace: Packet store is full." << std::endl;
|
<< " )::reserveSpace: Packet store is full." << std::endl;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
@ -31,11 +31,11 @@ seconds_t Stopwatch::stopSeconds() {
|
|||||||
|
|
||||||
void Stopwatch::display() {
|
void Stopwatch::display() {
|
||||||
if(displayMode == StopwatchDisplayMode::MILLIS) {
|
if(displayMode == StopwatchDisplayMode::MILLIS) {
|
||||||
info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
|
sif::info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
|
||||||
elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl;
|
elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl;
|
||||||
}
|
}
|
||||||
else if(displayMode == StopwatchDisplayMode::SECONDS) {
|
else if(displayMode == StopwatchDisplayMode::SECONDS) {
|
||||||
info <<"Stopwatch: Operation took " << std::setprecision(3)
|
sif::info <<"Stopwatch: Operation took " << std::setprecision(3)
|
||||||
<< std::fixed << timevalOperations::toDouble(elapsedTime)
|
<< std::fixed << timevalOperations::toDouble(elapsedTime)
|
||||||
<< " seconds" << std::endl;
|
<< " seconds" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ ReturnValue_t TmTcBridge::setNumberOfSentPacketsPerCycle(
|
|||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warning << "TmTcBridge: Number of packets sent per cycle "
|
sif::warning << "TmTcBridge: Number of packets sent per cycle "
|
||||||
"exceeds limits. Keeping default value." << std::endl;
|
"exceeds limits. Keeping default value." << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
|
|||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warning << "TmTcBridge: Number of packets stored "
|
sif::warning << "TmTcBridge: Number of packets stored "
|
||||||
"exceeds limits. Keeping default value." << std::endl;
|
"exceeds limits. Keeping default value." << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
@ -62,11 +62,11 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
|
|||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
result = handleTc();
|
result = handleTc();
|
||||||
if(result != RETURN_OK) {
|
if(result != RETURN_OK) {
|
||||||
error << "TMTC Bridge: Error handling TCs" << std::endl;
|
sif::error << "TMTC Bridge: Error handling TCs" << std::endl;
|
||||||
}
|
}
|
||||||
result = handleTm();
|
result = handleTm();
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
error << "TMTC Bridge: Error handling TMs" << std::endl;
|
sif::error << "TMTC Bridge: Error handling TMs" << std::endl;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ ReturnValue_t TmTcBridge::handleTc() {
|
|||||||
ReturnValue_t TmTcBridge::handleTm() {
|
ReturnValue_t TmTcBridge::handleTm() {
|
||||||
ReturnValue_t result = handleTmQueue();
|
ReturnValue_t result = handleTmQueue();
|
||||||
if(result != RETURN_OK) {
|
if(result != RETURN_OK) {
|
||||||
error << "TMTC Bridge: Reading TM Queue failed" << std::endl;
|
sif::error << "TMTC Bridge: Reading TM Queue failed" << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
|
|||||||
|
|
||||||
result = sendTm(data, size);
|
result = sendTm(data, size);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
error << "TMTC Bridge: Could not send TM packet"<< std::endl;
|
sif::error << "TMTC Bridge: Could not send TM packet"<< std::endl;
|
||||||
tmStore->deleteData(message.getStorageId());
|
tmStore->deleteData(message.getStorageId());
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
|
|||||||
store_address_t storeId = 0;
|
store_address_t storeId = 0;
|
||||||
|
|
||||||
if(tmFifo.full()) {
|
if(tmFifo.full()) {
|
||||||
error << "TMTC Bridge: TM downlink max. number of stored packet IDs "
|
sif::error << "TMTC Bridge: TM downlink max. number of stored packet IDs "
|
||||||
"reached! Overwriting old data" << std::endl;
|
"reached! Overwriting old data" << std::endl;
|
||||||
tmFifo.retrieve(&storeId);
|
tmFifo.retrieve(&storeId);
|
||||||
tmStore->deleteData(storeId);
|
tmStore->deleteData(storeId);
|
||||||
@ -153,7 +153,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
|
|||||||
sendTm(data,size);
|
sendTm(data,size);
|
||||||
|
|
||||||
if(result != RETURN_OK) {
|
if(result != RETURN_OK) {
|
||||||
error << "TMTC Bridge: Could not send stored downlink data"
|
sif::error << "TMTC Bridge: Could not send stored downlink data"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
result = RETURN_FAILED;
|
result = RETURN_FAILED;
|
||||||
}
|
}
|
||||||
@ -188,12 +188,12 @@ MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) {
|
|||||||
|
|
||||||
|
|
||||||
void TmTcBridge::printData(uint8_t * data, size_t dataLen) {
|
void TmTcBridge::printData(uint8_t * data, size_t dataLen) {
|
||||||
info << "TMTC Bridge: Printing data: [";
|
sif::info << "TMTC Bridge: Printing data: [";
|
||||||
for(uint32_t i = 0; i < dataLen; i++) {
|
for(uint32_t i = 0; i < dataLen; i++) {
|
||||||
info << std::hex << (int)data[i];
|
sif::info << std::hex << (int)data[i];
|
||||||
if(i < dataLen-1){
|
if(i < dataLen-1){
|
||||||
info << " , ";
|
sif::info << " , ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info << " ] " << std::endl;
|
sif::info << " ] " << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user