Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
taheran | 5b18f63229 | |
taheran | 26d6b32ef6 |
|
@ -18,6 +18,7 @@ public:
|
||||||
|
|
||||||
//! This is a mission-specific constant and determines the total
|
//! This is a mission-specific constant and determines the total
|
||||||
//! size reserved for timestamps.
|
//! size reserved for timestamps.
|
||||||
|
|
||||||
static const uint8_t MISSION_TIMESTAMP_SIZE = fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE;
|
static const uint8_t MISSION_TIMESTAMP_SIZE = fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE;
|
||||||
|
|
||||||
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#ifndef FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
#define FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class implementing this IF provides facilities to add a time stamp to the
|
||||||
|
* buffer provided.
|
||||||
|
* Implementors need to ensure that calling the method is thread-safe, i.e.
|
||||||
|
* addTimeStamp may be called in parallel from a different context.
|
||||||
|
*/
|
||||||
|
class TimeStamperIF {
|
||||||
|
public:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::TIME_STAMPER_IF;
|
||||||
|
static const ReturnValue_t BAD_TIMESTAMP = MAKE_RETURN_CODE(1);
|
||||||
|
|
||||||
|
//! This is a mission-specific constant and determines the total
|
||||||
|
//! size reserved for timestamps.
|
||||||
|
<<<<<<< HEAD:timemanager/TimeStamperIF.h
|
||||||
|
//! TODO: Default define in FSFWConfig ?
|
||||||
|
static const uint8_t MISSION_TIMESTAMP_SIZE = 6;
|
||||||
|
=======
|
||||||
|
static const uint8_t MISSION_TIMESTAMP_SIZE = fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE;
|
||||||
|
|
||||||
|
>>>>>>> upstream/master:src/fsfw/timemanager/TimeStamperIF.h
|
||||||
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
||||||
|
const uint8_t maxSize) = 0;
|
||||||
|
virtual ~TimeStamperIF() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FSFW_TIMEMANAGER_TIMESTAMPERIF_H_ */
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
#define FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
|
||||||
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class implementing this IF provides facilities to add a time stamp to the
|
||||||
|
* buffer provided.
|
||||||
|
* Implementors need to ensure that calling the method is thread-safe, i.e.
|
||||||
|
* addTimeStamp may be called in parallel from a different context.
|
||||||
|
*/
|
||||||
|
class TimeStamperIF {
|
||||||
|
public:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::TIME_STAMPER_IF;
|
||||||
|
static const ReturnValue_t BAD_TIMESTAMP = MAKE_RETURN_CODE(1);
|
||||||
|
|
||||||
|
//! This is a mission-specific constant and determines the total
|
||||||
|
//! size reserved for timestamps.
|
||||||
|
//! TODO: Default define in FSFWConfig ?
|
||||||
|
static const uint8_t MISSION_TIMESTAMP_SIZE = 8;
|
||||||
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
||||||
|
const uint8_t maxSize) = 0;
|
||||||
|
virtual ~TimeStamperIF() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FSFW_TIMEMANAGER_TIMESTAMPERIF_H_ */
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
#define FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
|
||||||
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class implementing this IF provides facilities to add a time stamp to the
|
||||||
|
* buffer provided.
|
||||||
|
* Implementors need to ensure that calling the method is thread-safe, i.e.
|
||||||
|
* addTimeStamp may be called in parallel from a different context.
|
||||||
|
*/
|
||||||
|
class TimeStamperIF {
|
||||||
|
public:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::TIME_STAMPER_IF;
|
||||||
|
static const ReturnValue_t BAD_TIMESTAMP = MAKE_RETURN_CODE(1);
|
||||||
|
|
||||||
|
//! This is a mission-specific constant and determines the total
|
||||||
|
//! size reserved for timestamps.
|
||||||
|
//! TODO: Default define in FSFWConfig ?
|
||||||
|
static const uint8_t MISSION_TIMESTAMP_SIZE = 6;
|
||||||
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
||||||
|
const uint8_t maxSize) = 0;
|
||||||
|
virtual ~TimeStamperIF() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FSFW_TIMEMANAGER_TIMESTAMPERIF_H_ */
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
#define FSFW_TIMEMANAGER_TIMESTAMPERIF_H_
|
||||||
|
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class implementing this IF provides facilities to add a time stamp to the
|
||||||
|
* buffer provided.
|
||||||
|
* Implementors need to ensure that calling the method is thread-safe, i.e.
|
||||||
|
* addTimeStamp may be called in parallel from a different context.
|
||||||
|
*/
|
||||||
|
class TimeStamperIF {
|
||||||
|
public:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::TIME_STAMPER_IF;
|
||||||
|
static const ReturnValue_t BAD_TIMESTAMP = MAKE_RETURN_CODE(1);
|
||||||
|
|
||||||
|
//! This is a mission-specific constant and determines the total
|
||||||
|
//! size reserved for timestamps.
|
||||||
|
static const uint8_t MISSION_TIMESTAMP_SIZE = fsfwconfig::FSFW_MISSION_TIMESTAMP_SIZE;
|
||||||
|
|
||||||
|
virtual ReturnValue_t addTimeStamp(uint8_t* buffer,
|
||||||
|
const uint8_t maxSize) = 0;
|
||||||
|
virtual ~TimeStamperIF() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FSFW_TIMEMANAGER_TIMESTAMPERIF_H_ */
|
|
@ -19,9 +19,9 @@ uint8_t TmPacketMinimal::getSubService() {
|
||||||
return tm_data->data_field.service_subtype;
|
return tm_data->data_field.service_subtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t TmPacketMinimal::getPacketSubcounter() {
|
/*uint8_t TmPacketMinimal::getPacketSubcounter() {
|
||||||
return tm_data->data_field.subcounter;
|
return tm_data->data_field.subcounter;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
ReturnValue_t TmPacketMinimal::getPacketTime(timeval* timestamp) {
|
ReturnValue_t TmPacketMinimal::getPacketTime(timeval* timestamp) {
|
||||||
if (timestampInterpreter == NULL) {
|
if (timestampInterpreter == NULL) {
|
||||||
|
|
|
@ -42,12 +42,12 @@ public:
|
||||||
* Returns the subcounter.
|
* Returns the subcounter.
|
||||||
* @return the subcounter of the Data Field Header.
|
* @return the subcounter of the Data Field Header.
|
||||||
*/
|
*/
|
||||||
uint8_t getPacketSubcounter();
|
// uint8_t getPacketSubcounter();
|
||||||
struct PUSTmMinimalHeader {
|
struct PUSTmMinimalHeader {
|
||||||
uint8_t version_type_ack;
|
uint8_t version_type_ack;
|
||||||
uint8_t service_type;
|
uint8_t service_type;
|
||||||
uint8_t service_subtype;
|
uint8_t service_subtype;
|
||||||
uint8_t subcounter;
|
// uint8_t subcounter;
|
||||||
};
|
};
|
||||||
|
|
||||||
ReturnValue_t getPacketTime(timeval* timestamp);
|
ReturnValue_t getPacketTime(timeval* timestamp);
|
||||||
|
|
Loading…
Reference in New Issue