-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Os::RawTime OSAL implementation, refactor Os::IntervalTimer #2923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
return *this; | ||
} | ||
|
||
bool TimeInterval::operator==(const TimeInterval& other) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
return (TimeInterval::compare(*this,other) == EQ); | ||
} | ||
|
||
bool TimeInterval::operator!=(const TimeInterval& other) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
return (TimeInterval::compare(*this,other) != EQ); | ||
} | ||
|
||
bool TimeInterval::operator>(const TimeInterval& other) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
return (TimeInterval::compare(*this,other) == GT); | ||
} | ||
|
||
bool TimeInterval::operator<(const TimeInterval& other) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
return (TimeInterval::compare(*this,other) == LT); | ||
} | ||
|
||
bool TimeInterval::operator>=(const TimeInterval& other) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
@@ -52,12 +52,12 @@ | |||
this->log_DIAGNOSTIC_RateGroupStarted(); | |||
} | |||
|
|||
void ActiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
void ActiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
@@ -103,7 +108,7 @@ | |||
|
|||
} | |||
|
|||
void ActiveRateGroup::CycleIn_preMsgHook(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
void ActiveRateGroup::CycleIn_preMsgHook(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
@@ -38,8 +38,8 @@ | |||
} | |||
|
|||
|
|||
void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
TimerVal end; | |||
void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
@@ -41,7 +41,7 @@ | |||
|
|||
} | |||
|
|||
void RateGroupDriver::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
void RateGroupDriver::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
TimeInterval::Comparison TimeInterval :: | ||
compare( |
Check notice
Code scanning / CodeQL
Long function without assertion Note
TimeInterval TimeInterval :: | ||
add( |
Check notice
Code scanning / CodeQL
Long function without assertion Note
} | ||
} | ||
|
||
#ifdef BUILD_UT |
Check notice
Code scanning / CodeQL
Conditional compilation Note
SERIALIZED_SIZE = sizeof(U32) * 2 | ||
}; | ||
|
||
TimeInterval() = default; // !< Default constructor |
Check notice
Code scanning / CodeQL
More than one statement per line Note
return this->m_delegate.deserialize(buffer); | ||
} | ||
|
||
RawTime::Status RawTime::getDiffUsec(const RawTime& other, U32& result) const { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
}; | ||
|
||
//! \brief default constructor | ||
RawTimeInterface() = default; |
Check notice
Code scanning / CodeQL
More than one statement per line Note
@@ -52,12 +52,12 @@ | |||
this->log_DIAGNOSTIC_RateGroupStarted(); | |||
} | |||
|
|||
void ActiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
void ActiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -38,8 +38,8 @@ | |||
} | |||
|
|||
|
|||
void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
TimerVal end; | |||
void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -41,7 +41,7 @@ | |||
|
|||
} | |||
|
|||
void RateGroupDriver::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) { | |||
void RateGroupDriver::CycleIn_handler(NATIVE_INT_TYPE portNum, Os::RawTime& cycleStart) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
… less vtable calls, refactor IntervalTimer
092d9ab
to
4a8fe38
Compare
check-spelling run (pull_request_target) for os-interval-timer Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>
TimeInterval TimeInterval :: | ||
sub( |
Check notice
Code scanning / CodeQL
Long function without assertion Note
|
||
namespace Os { | ||
|
||
IntervalTimer::IntervalTimer() : m_startTime(), m_stopTime() {} |
Check notice
Code scanning / CodeQL
More than one statement per line Note
return Status::OP_OK; | ||
} | ||
|
||
PosixRawTime::Status PosixRawTime::getTimeInterval(const Os::RawTime& other, Fw::TimeInterval& interval) const { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return buffer.serialize(static_cast<U32>(this->m_handle.m_timespec.tv_nsec)); | ||
} | ||
|
||
Fw::SerializeStatus PosixRawTime::deserialize(Fw::SerializeBufferBase& buffer) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
public: | ||
|
||
// Serialization size for RawTime objects, configured in config/FpConfig.h | ||
static const FwSizeType SERIALIZED_SIZE = FW_RAW_TIME_SERIALIZATION_MAX_SIZE; |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed review fixes are in!
Breaking change: |
Change Description
Implements #2726 and #2740
Rationale
See tickets above