F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Os/RawTime.hpp>
Public Types | |
enum | Status { OP_OK , OP_OVERFLOW , INVALID_PARAMS , OTHER_ERROR } |
Public Types inherited from Fw::Serializable | |
using | SizeType = NATIVE_UINT_TYPE |
Public Member Functions | |
RawTimeInterface ()=default | |
default constructor More... | |
virtual | ~RawTimeInterface ()=default |
default virtual destructor More... | |
virtual RawTimeHandle * | getHandle ()=0 |
return the underlying RawTime handle (implementation specific) More... | |
virtual Status | now ()=0 |
Get the current time. More... | |
virtual Status | getTimeInterval (const Os::RawTime &other, Fw::TimeInterval &interval) const =0 |
Calculate the time interval between this and another raw time. More... | |
virtual Fw::SerializeStatus | serialize (Fw::SerializeBufferBase &buffer) const =0 |
Serialize the contents of the RawTimeInterface object into a buffer. More... | |
virtual Fw::SerializeStatus | deserialize (Fw::SerializeBufferBase &buffer)=0 |
Deserialize the contents of the RawTimeInterface object from a buffer. More... | |
Static Public Member Functions | |
static RawTimeInterface * | getDelegate (RawTimeHandleStorage &aligned_new_memory, const RawTimeInterface *to_copy=nullptr) |
provide a pointer to a RawTime delegate object More... | |
Static Public Attributes | |
static const FwSizeType | SERIALIZED_SIZE = FW_RAW_TIME_SERIALIZATION_MAX_SIZE |
Additional Inherited Members | |
Protected Member Functions inherited from Fw::Serializable | |
Serializable () | |
Default constructor. More... | |
virtual | ~Serializable () |
destructor More... | |
Definition at line 20 of file RawTime.hpp.
Enumerator | |
---|---|
OP_OK | Operation was successful. |
OP_OVERFLOW | Operation result caused an overflow. |
INVALID_PARAMS | Parameters invalid for current platform. |
OTHER_ERROR | All other errors. |
Definition at line 27 of file RawTime.hpp.
|
default |
default constructor
|
virtualdefault |
default virtual destructor
|
pure virtual |
Deserialize the contents of the RawTimeInterface object from a buffer.
This function deserializes the contents of the RawTimeInterface object from the provided buffer.
FW_RAW_TIME_SERIALIZATION_MAX_SIZE
bytes. This value is defined in FpConfig.h. For example, Posix systems use a pair of U32 (sec, nanosec) and can therefore serialize in 8 bytes. Should an OSAL implementation require more than this, the project must increase that value in its config/ folder.buffer | The buffer to deserialize the contents from. |
Implements Fw::Serializable.
Implemented in Os::Stub::RawTime::StubRawTime, Os::RawTime, and Os::Posix::RawTime::PosixRawTime.
|
static |
provide a pointer to a RawTime delegate object
get a delegate for RawTimeInterface that intercepts calls for stub RawTime usage
get a delegate for RawTimeInterface that intercepts calls for Posix
aligned_new_memory | aligned memory to fill |
to_copy | pointer to copy-constructor input |
Definition at line 14 of file DefaultRawTime.cpp.
|
pure virtual |
return the underlying RawTime handle (implementation specific)
Implemented in Os::Stub::RawTime::StubRawTime, Os::RawTime, and Os::Posix::RawTime::PosixRawTime.
|
pure virtual |
Calculate the time interval between this and another raw time.
This function calculates the time interval between the current raw time and another specified raw time. The result is stored in the provided (output) interval object.
other | The other RawTimeHandle to compare against. |
interval | Output parameter to store the calculated time interval. |
Implemented in Os::Stub::RawTime::StubRawTime, Os::RawTime, and Os::Posix::RawTime::PosixRawTime.
|
pure virtual |
Get the current time.
This function retrieves the current time and stores it in the RawTime object. Each implementation should define its RawTimeHandle type for storing the time.
Implemented in Os::Stub::RawTime::StubRawTime, Os::RawTime, and Os::Posix::RawTime::PosixRawTime.
|
pure virtual |
Serialize the contents of the RawTimeInterface object into a buffer.
This function serializes the contents of the RawTimeInterface object into the provided buffer.
FW_RAW_TIME_SERIALIZATION_MAX_SIZE
bytes. This value is defined in FpConfig.h. For example, Posix systems use a pair of U32 (sec, nanosec) and can therefore serialize in 8 bytes. Should an OSAL implementation require more than this, the project must increase that value in its config/ folder.buffer | The buffer to serialize the contents into. |
Implements Fw::Serializable.
Implemented in Os::Stub::RawTime::StubRawTime, Os::RawTime, and Os::Posix::RawTime::PosixRawTime.
|
static |
Definition at line 25 of file RawTime.hpp.