61 units::time::second_t time{};
89 constexpr units::time::second_t
GetTime()
const
134 systemTimestamp = newSystemTimestamp;
135 canivoreTimestamp = newCanivoreTimestamp;
136 deviceTimestamp = newDeviceTimestamp;
154 if (deviceTimestamp.
IsValid()) {
155 return deviceTimestamp;
157 if (canivoreTimestamp.
IsValid()) {
158 return canivoreTimestamp;
161 return systemTimestamp;
Cross the Road Electronics End User License Agreement This Software License or “Customer” and Cross The Road Electronics a Michigan based company with its principal place of business located at MI Terms Agreement this End User License Agreement that forms the entire agreement between You and the Company regarding the use of the Software CAN BUS a communication standard designed to allow hardware devices to communicate with each other Leone USA Content refers to content such as or other information that can be linked to or otherwise made available by regardless of the form of that content Device a hardware product or sold by Company FRC FIRST Robotics and or is stored with Devices This includes and is not limited to Device source
Definition CTRE_LICENSE.txt:27
A collection of timestamps for a received signal.
Definition Timestamp.hpp:125
Timestamp const & GetBestTimestamp() const
Get the most accurate timestamp available.
Definition Timestamp.hpp:152
Timestamp const & GetCANivoreTimestamp() const
Get the timestamp as reported by the Timestamp::TimestampSource::CANivore source.
Definition Timestamp.hpp:175
void Update(Timestamp const &newSystemTimestamp, Timestamp const &newCanivoreTimestamp, Timestamp const &newDeviceTimestamp)
Definition Timestamp.hpp:132
Timestamp const & GetDeviceTimestamp() const
Get the timestamp as reported by the Timestamp::TimestampSource::Device source.
Definition Timestamp.hpp:181
Timestamp const & GetSystemTimestamp() const
Get the timestamp as reported by the Timestamp::TimestampSource::System source.
Definition Timestamp.hpp:169
Information about the timestamp of a signal.
Definition Timestamp.hpp:17
constexpr units::time::second_t GetTime() const
Get the time in seconds as reported from this timestamp.
Definition Timestamp.hpp:89
constexpr TimestampSource GetSource() const
Get the source of this timestamp.
Definition Timestamp.hpp:98
constexpr bool IsValid() const
Returns if this Timestamp is valid or not.
Definition Timestamp.hpp:116
TimestampSource
Source of the timestamp.
Definition Timestamp.hpp:22
@ System
Timestamp as reported by the system.
units::time::second_t GetLatency() const
Get the latency of this timestamp compared to now.
Definition Timestamp.hpp:107
constexpr Timestamp(units::time::second_t time, TimestampSource source, bool valid=true)
Construct a new Timestamp for the given source.
Definition Timestamp.hpp:78
constexpr Timestamp()=default
Construct a new invalid Timestamp.
units::second_t GetCurrentTime()
Get the current timestamp.
Definition Utils.hpp:29
Definition motor_constants.h:14