add prototype for new ToAscii CCSDSTime function
This commit is contained in:
parent
096af44e39
commit
819a2bfac4
@ -11,8 +11,7 @@ DleParser::DleParser(SimpleRingBuffer& decodeRingBuf, DleEncoder& decoder, BufPa
|
||||
: decodeRingBuf(decodeRingBuf),
|
||||
decoder(decoder),
|
||||
encodedBuf(encodedBuf),
|
||||
decodedBuf(decodedBuf) {
|
||||
}
|
||||
decodedBuf(decodedBuf) {}
|
||||
|
||||
ReturnValue_t DleParser::passData(const uint8_t* data, size_t len) {
|
||||
if (data == nullptr or len == 0) {
|
||||
@ -126,7 +125,8 @@ void DleParser::defaultErrorHandler() {
|
||||
case (ErrorTypes::ENCODED_BUF_TOO_SMALL):
|
||||
case (ErrorTypes::DECODING_BUF_TOO_SMALL): {
|
||||
char opt[64];
|
||||
snprintf(opt, sizeof(opt), ": Too small for packet with length %zu", ctx.decodedPacket.second);
|
||||
snprintf(opt, sizeof(opt), ": Too small for packet with length %zu",
|
||||
ctx.decodedPacket.second);
|
||||
if (ctx.error.first == ErrorTypes::ENCODED_BUF_TOO_SMALL) {
|
||||
errorPrinter("Encoded buf too small", opt);
|
||||
} else {
|
||||
@ -168,10 +168,6 @@ ReturnValue_t DleParser::confirmBytesRead(size_t bytesRead) {
|
||||
return decodeRingBuf.deleteData(bytesRead);
|
||||
}
|
||||
|
||||
const DleParser::Context& DleParser::getContext() {
|
||||
return ctx;
|
||||
}
|
||||
const DleParser::Context& DleParser::getContext() { return ctx; }
|
||||
|
||||
void DleParser::reset() {
|
||||
decodeRingBuf.clear();
|
||||
}
|
||||
void DleParser::reset() { decodeRingBuf.clear(); }
|
||||
|
@ -246,6 +246,11 @@ ReturnValue_t CCSDSTime::convertFromASCII(Clock::TimeOfDay_t* to, const uint8_t*
|
||||
return UNSUPPORTED_TIME_FORMAT;
|
||||
}
|
||||
|
||||
ReturnValue_t CCSDSTime::convertToASCII(int8_t* to, const Clock::TimeOfDay_t* from,
|
||||
uint8_t length) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t CCSDSTime::checkCcs(const uint8_t* time, uint8_t length) {
|
||||
const Ccs_mseconds* time_struct = reinterpret_cast<const Ccs_mseconds*>(time);
|
||||
|
||||
|
@ -207,7 +207,7 @@ class CCSDSTime {
|
||||
|
||||
static ReturnValue_t convertFromASCII(Clock::TimeOfDay_t *to, uint8_t const *from,
|
||||
uint8_t length);
|
||||
|
||||
static ReturnValue_t convertToASCII(int8_t *to, const Clock::TimeOfDay_t *from, uint8_t length);
|
||||
static uint32_t subsecondsToMicroseconds(uint16_t subseconds);
|
||||
|
||||
private:
|
||||
|
@ -6,10 +6,9 @@
|
||||
class TmStoreFrontendSimpleIF {
|
||||
public:
|
||||
virtual ~TmStoreFrontendSimpleIF() = default;
|
||||
|
||||
private:
|
||||
virtual MessageQueueId_t getCommandQueue() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* FSFW_SRC_FSFW_TMSTORAGE_TMSTOREBACKENDSIMPLEIF_H_ */
|
||||
|
@ -2,6 +2,9 @@
|
||||
#define FSFW_TMSTORAGE_TMSTOREPACKETS_H_
|
||||
|
||||
#include <fsfw/tmtcpacket/pus/tm/PusTmReader.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fsfw/globalfunctions/timevalOperations.h"
|
||||
#include "fsfw/serialize/SerialBufferAdapter.h"
|
||||
#include "fsfw/serialize/SerialFixedArrayListAdapter.h"
|
||||
@ -12,8 +15,6 @@
|
||||
#include "fsfw/tmtcpacket/pus/tm/PusTmMinimal.h"
|
||||
#include "tmStorageConf.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class ServiceSubservice : public SerialLinkedListAdapter<SerializeIF> {
|
||||
public:
|
||||
SerializeElement<uint8_t> service;
|
||||
@ -65,8 +66,9 @@ class ChangeSelectionDefinition : public SerialLinkedListAdapter<SerializeIF> {
|
||||
|
||||
class TmPacketInformation : public SerializeIF {
|
||||
public:
|
||||
TmPacketInformation(PusTmReader* packet, size_t timestampLen)
|
||||
: rawTimestamp(timestampLen) { setContent(packet); }
|
||||
TmPacketInformation(PusTmReader* packet, size_t timestampLen) : rawTimestamp(timestampLen) {
|
||||
setContent(packet);
|
||||
}
|
||||
TmPacketInformation(size_t timestampLen)
|
||||
: apid(ccsds::LIMIT_APID),
|
||||
sourceSequenceCount(0),
|
||||
@ -97,7 +99,8 @@ class TmPacketInformation : public SerializeIF {
|
||||
// if (result != returnvalue::OK) {
|
||||
// return;
|
||||
//}
|
||||
//if (*pField == CCSDSTime::P_FIELD_CDS_SHORT && size <= TimeStamperIF::MISSION_TIMESTAMP_SIZE) {
|
||||
// if (*pField == CCSDSTime::P_FIELD_CDS_SHORT && size <= TimeStamperIF::MISSION_TIMESTAMP_SIZE)
|
||||
// {
|
||||
// Shortcut to avoid converting CDS back and forth.
|
||||
// TODO: Fix
|
||||
// memcpy(rawTimestamp, pField, size);
|
||||
|
@ -23,7 +23,9 @@ class AcceptsTelemetryIF {
|
||||
*/
|
||||
[[nodiscard]] virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const = 0;
|
||||
|
||||
[[nodiscard]] virtual MessageQueueId_t getReportReceptionQueue() const { return getReportReceptionQueue(0); }
|
||||
[[nodiscard]] virtual MessageQueueId_t getReportReceptionQueue() const {
|
||||
return getReportReceptionQueue(0);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* FSFW_TMTCSERVICES_ACCEPTSTELEMETRYIF_H_ */
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "UartComIF.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
@ -458,5 +459,3 @@ ReturnValue_t UartComIF::flushUartTxAndRxBuf(CookieIF* cookie) {
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,15 +1,14 @@
|
||||
#ifndef BSP_Q7S_COMIF_UARTCOMIF_H_
|
||||
#define BSP_Q7S_COMIF_UARTCOMIF_H_
|
||||
|
||||
#include "UartCookie.h"
|
||||
#include "helper.h"
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "UartCookie.h"
|
||||
#include "helper.h"
|
||||
|
||||
/**
|
||||
* @brief This is the communication interface to access serial ports on linux based operating
|
||||
|
@ -1,14 +1,12 @@
|
||||
#ifndef SAM9G20_COMIF_COOKIES_UART_COOKIE_H_
|
||||
#define SAM9G20_COMIF_COOKIES_UART_COOKIE_H_
|
||||
|
||||
#include "helper.h"
|
||||
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfw/objectmanager/SystemObjectIF.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#include "helper.h"
|
||||
|
||||
/**
|
||||
* @brief Cookie for the UartComIF. There are many options available to configure the UART driver.
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "helper.h"
|
||||
#include "fsfw/serviceinterface.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "fsfw/serviceinterface.h"
|
||||
|
||||
void uart::setMode(struct termios& options, UartModes mode) {
|
||||
if (mode == UartModes::NON_CANONICAL) {
|
||||
/* Disable canonical mode */
|
||||
@ -147,4 +148,3 @@ void uart::setBaudrate(struct termios& options, UartBaudRate baud) {
|
||||
int uart::readCountersAndErrors(int serialPort, serial_icounter_struct& icounter) {
|
||||
return ioctl(serialPort, TIOCGICOUNT, &icounter);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef FSFW_HAL_LINUX_UART_HELPER_H_
|
||||
#define FSFW_HAL_LINUX_UART_HELPER_H_
|
||||
|
||||
#include <termios.h>
|
||||
#include <linux/serial.h>
|
||||
#include <termios.h>
|
||||
|
||||
enum class Parity { NONE, EVEN, ODD };
|
||||
|
||||
@ -56,7 +56,6 @@ void setBaudrate(struct termios& options, UartBaudRate baud);
|
||||
|
||||
int readCountersAndErrors(int serialPort, serial_icounter_struct& icounter);
|
||||
|
||||
}
|
||||
|
||||
} // namespace uart
|
||||
|
||||
#endif /* FSFW_HAL_LINUX_UART_HELPER_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user