5 #ifndef OS_RAWTIME_HPP_
6 #define OS_RAWTIME_HPP_
#define FW_HANDLE_ALIGNMENT
Alignment of handle storage.
#define FW_RAW_TIME_SERIALIZATION_MAX_SIZE
Maximum allowed serialization size for Os::RawTime objects.
PlatformSizeType FwSizeType
C++-compatible configuration header for fprime configuration.
U8 RawTimeHandleStorage[FW_RAW_TIME_HANDLE_MAX_SIZE]
RawTimeHandle * getHandle() override
return the underlying RawTime handle (implementation specific)
~RawTime() final
Destructor.
Status getDiffUsec(const RawTime &other, U32 &result) const
Calculate the difference in microseconds between two RawTime objects.
Status now() override
Get the current time.
Status getTimeInterval(const Os::RawTime &other, Fw::TimeInterval &interval) const override
Calculate the time interval between this and another raw time.
RawTime & operator=(const RawTime &other)
assignment operator that copies the internal representation
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const override
Serialize the contents of the RawTimeInterface object into a buffer.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer) override
Deserialize the contents of the RawTimeInterface object from a buffer.
static const FwSizeType SERIALIZED_SIZE
RawTimeInterface()=default
default constructor
@ INVALID_PARAMS
Parameters invalid for current platform.
@ OP_OK
Operation was successful.
@ OTHER_ERROR
All other errors.
@ OP_OVERFLOW
Operation result caused an overflow.
virtual ~RawTimeInterface()=default
default virtual destructor
virtual Status getTimeInterval(const Os::RawTime &other, Fw::TimeInterval &interval) const =0
Calculate the time interval between this and another raw time.
virtual RawTimeHandle * getHandle()=0
return the underlying RawTime handle (implementation specific)
virtual Status now()=0
Get the current time.
static RawTimeInterface * getDelegate(RawTimeHandleStorage &aligned_new_memory, const RawTimeInterface *to_copy=nullptr)
provide a pointer to a RawTime delegate object
virtual Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const =0
Serialize the contents of the RawTimeInterface object into a buffer.
virtual Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)=0
Deserialize the contents of the RawTimeInterface object from a buffer.
SerializeStatus
forward declaration for string