added test code

This commit is contained in:
Jakob Meier 2022-04-27 16:44:03 +02:00
parent 9fe2de5244
commit 7543a92dd9
10 changed files with 568 additions and 561 deletions

View File

@ -1708,11 +1708,11 @@ ReturnValue_t CoreController::timeFileHandler() {
} }
std::string fileName = currMntPrefix + TIME_FILE; std::string fileName = currMntPrefix + TIME_FILE;
std::ofstream timeFile(fileName); std::ofstream timeFile(fileName);
if (not timeFile.good()) { // if (not timeFile.good()) {
sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) // sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno)
<< std::endl; // << std::endl;
return RETURN_FAILED; // return RETURN_FAILED;
} // }
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
} }
return RETURN_OK; return RETURN_OK;

View File

@ -152,7 +152,7 @@ void ObjectFactory::produce(void* args) {
createSolarArrayDeploymentComponents(); createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher); createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1 #if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(); createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */ #endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher); createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher);
createPayloadComponents(gpioComIF); createPayloadComponents(gpioComIF);

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 186 translations. * @brief Auto-generated event translation file. Contains 186 translations.
* @details * @details
* Generated on: 2022-04-08 14:13:35 * Generated on: 2022-04-27 16:32:39
*/ */
#include "translateEvents.h" #include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 117 translations. * Contains 117 translations.
* Generated on: 2022-04-08 14:13:35 * Generated on: 2022-04-27 16:32:32
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 186 translations. * @brief Auto-generated event translation file. Contains 186 translations.
* @details * @details
* Generated on: 2022-04-08 14:13:35 * Generated on: 2022-04-27 16:32:39
*/ */
#include "translateEvents.h" #include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 117 translations. * Contains 117 translations.
* Generated on: 2022-04-08 14:13:35 * Generated on: 2022-04-27 16:32:32
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -27,6 +27,13 @@ ReturnValue_t VirtualChannel::performOperation() {
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
TmTcMessage message; TmTcMessage message;
uint8_t data[50] = {0xa};
result = ptme->writeToVc(vcId, data, sizeof(data));
if (result != RETURN_OK) {
sif::warning << "VirtualChannel::performOperation: Failed to send test data" << std::endl;
return result;
}
while (tmQueue->receiveMessage(&message) == RETURN_OK) { while (tmQueue->receiveMessage(&message) == RETURN_OK) {
store_address_t storeId = message.getStorageId(); store_address_t storeId = message.getStorageId();
const uint8_t* data = nullptr; const uint8_t* data = nullptr;

View File

@ -46,7 +46,7 @@ class VirtualChannel : public AcceptsTelemetryIF, public HasReturnvaluesIF {
private: private:
PtmeIF* ptme = nullptr; PtmeIF* ptme = nullptr;
MessageQueueIF* tmQueue = nullptr; MessageQueueIF* tmQueue = nullptr;
uint8_t vcId; uint8_t vcId = 0;
bool linkIsUp = false; bool linkIsUp = false;

2
tmtc

@ -1 +1 @@
Subproject commit 28983d387b82578a73fbfe052cb53dec1910d021 Subproject commit a457b001a33a2a561250544b3e9950885e1dac2e