![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Os/DelegateRawTime.hpp>
Public Member Functions | |
| DelegateRawTime () | |
| Default constructor. More... | |
| DelegateRawTime (RawTimeSource source) | |
| Constructor with timer source selection. More... | |
| ~DelegateRawTime () final | |
| Destructor. More... | |
| DelegateRawTime (const DelegateRawTime &other) | |
| copy constructor that copies the internal representation More... | |
| DelegateRawTime & | operator= (const DelegateRawTime &other) |
| assignment operator that copies the internal representation More... | |
| RawTimeHandle * | getHandle () override |
| return the underlying RawTime handle (implementation specific) More... | |
| Status | now () override |
| Get the current time. More... | |
| Status | getTimeInterval (const Os::RawTime &other, Fw::TimeInterval &interval) const override |
| Calculate the time interval between this and another raw time. More... | |
| Fw::SerializeStatus | serializeTo (Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const override |
| Serialize the contents of the RawTimeInterface object into a buffer. More... | |
| Fw::SerializeStatus | deserializeFrom (Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) override |
| Deserialize the contents of the RawTimeInterface object from a buffer. More... | |
| Status | getDiffUsec (const RawTime &other, U32 &result) const override |
| Calculate the difference in microseconds between two RawTime objects. More... | |
| bool | operator== (const RawTime &other) const override |
| Compare whether two RawTime objects are the same (i.e. refer to the same microsecond) More... | |
| RawTimeSource | getSource () const |
| Get the timer source used by this RawTime instance. More... | |
Public Member Functions inherited from Os::RawTimeInterface | |
| RawTimeInterface ()=default | |
| default constructor More... | |
| virtual | ~RawTimeInterface ()=default |
| default virtual destructor More... | |
Public Member Functions inherited from Fw::Serializable | |
| DEPRECATED (SerializeStatus serialize(SerialBufferBase &buffer) const, "Use serializeTo(SerialBufferBase& buffer) instead") | |
| DEPRECATED (SerializeStatus deserialize(SerialBufferBase &buffer), "Use deserializeFrom(SerialBufferBase& buffer) instead") | |
Additional Inherited Members | |
Public Types inherited from Os::RawTimeInterface | |
| enum | Status { OP_OK, OP_OVERFLOW, INVALID_PARAMS, NOT_SUPPORTED, OTHER_ERROR } |
Public Types inherited from Fw::Serializable | |
| using | SizeType = FwSizeType |
Static Public Member Functions inherited from Os::RawTimeInterface | |
| static RawTimeInterface * | getDelegate (RawTimeHandleStorage &aligned_new_memory, const RawTimeInterface *to_copy=nullptr, RawTimeSource source=RAWTIME_DEFAULT) |
| provide a pointer to a RawTime delegate object More... | |
Static Public Attributes inherited from Os::RawTimeInterface | |
| static const FwSizeType | SERIALIZED_SIZE = FW_RAW_TIME_SERIALIZATION_MAX_SIZE |
Protected Member Functions inherited from Fw::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| virtual | ~Serializable () |
| Virtual destructor. More... | |
Definition at line 12 of file DelegateRawTime.hpp.
| Os::DelegateRawTime::DelegateRawTime | ( | ) |
Default constructor.
Definition at line 11 of file DelegateRawTime.cpp.
|
explicit |
Constructor with timer source selection.
| source | Timer source to use (defaults to RAWTIME_DEFAULT) |
Definition at line 15 of file DelegateRawTime.cpp.
|
final |
Destructor.
Definition at line 20 of file DelegateRawTime.cpp.
| Os::DelegateRawTime::DelegateRawTime | ( | const DelegateRawTime & | other | ) |
copy constructor that copies the internal representation
Definition at line 27 of file DelegateRawTime.cpp.
|
overridevirtual |
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. |
| mode | Endianness to use when deserializing from the buffer. |
Implements Os::RawTimeInterface.
Definition at line 61 of file DelegateRawTime.cpp.
|
overridevirtual |
Calculate the difference in microseconds between two RawTime objects.
This function calculates the difference in microseconds between the current RawTime object and another RawTime object provided as a parameter.
| other | The other RawTime object to compare against. |
| result | A reference to a U32 variable where the result will be stored. |
Reimplemented from Os::RawTimeInterface.
Definition at line 66 of file DelegateRawTime.cpp.
|
overridevirtual |
return the underlying RawTime handle (implementation specific)
Implements Os::RawTimeInterface.
Definition at line 41 of file DelegateRawTime.cpp.
| RawTimeSource Os::DelegateRawTime::getSource | ( | ) | const |
Get the timer source used by this RawTime instance.
Definition at line 76 of file DelegateRawTime.cpp.
|
overridevirtual |
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. |
Implements Os::RawTimeInterface.
Definition at line 51 of file DelegateRawTime.cpp.
|
overridevirtual |
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.
Implements Os::RawTimeInterface.
Definition at line 46 of file DelegateRawTime.cpp.
| DelegateRawTime & Os::DelegateRawTime::operator= | ( | const DelegateRawTime & | other | ) |
assignment operator that copies the internal representation
Definition at line 33 of file DelegateRawTime.cpp.
|
overridevirtual |
Compare whether two RawTime objects are the same (i.e. refer to the same microsecond)
Reimplemented from Os::RawTimeInterface.
Definition at line 71 of file DelegateRawTime.cpp.
|
overridevirtual |
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. |
| mode | Endianness to use when serializing to buffer. |
Implements Os::RawTimeInterface.
Definition at line 56 of file DelegateRawTime.cpp.