59 wpi::units::second_t time{};
87 constexpr wpi::units::second_t
GetTime()
const
132 systemTimestamp = std::move(newSystemTimestamp);
133 canivoreTimestamp = std::move(newCanivoreTimestamp);
134 deviceTimestamp = std::move(newDeviceTimestamp);
152 if (deviceTimestamp.IsValid()) {
153 return deviceTimestamp;
155 if (canivoreTimestamp.IsValid()) {
156 return canivoreTimestamp;
159 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:123
constexpr Timestamp const & GetBestTimestamp() const
Gets the most accurate timestamp available.
Definition Timestamp.hpp:150
constexpr Timestamp const & GetCANivoreTimestamp() const
Gets the timestamp as reported by the Timestamp::TimestampSource::CANivore source.
Definition Timestamp.hpp:173
constexpr Timestamp const & GetSystemTimestamp() const
Gets the timestamp as reported by the Timestamp::TimestampSource::System source.
Definition Timestamp.hpp:167
constexpr Timestamp const & GetDeviceTimestamp() const
Gets the timestamp as reported by the Timestamp::TimestampSource::Device source.
Definition Timestamp.hpp:179
constexpr void Update(Timestamp newSystemTimestamp, Timestamp newCanivoreTimestamp, Timestamp newDeviceTimestamp)
Definition Timestamp.hpp:130
Information about the timestamp of a signal.
Definition Timestamp.hpp:17
constexpr TimestampSource GetSource() const
Gets the source of this timestamp.
Definition Timestamp.hpp:96
constexpr bool IsValid() const
Gets whether this Timestamp is valid.
Definition Timestamp.hpp:105
TimestampSource
Source of the timestamp.
Definition Timestamp.hpp:22
@ CANivore
Timestamp as reported by the CANivore.
Definition Timestamp.hpp:42
@ System
Timestamp as reported by the system.
Definition Timestamp.hpp:31
@ Device
This timestamp source requires Phoenix Pro.
Definition Timestamp.hpp:55
wpi::units::second_t GetLatency() const
Gets the latency of this timestamp compared to now.
Definition Timestamp.hpp:114
constexpr Timestamp()=default
Constructs a new invalid Timestamp.
constexpr Timestamp(wpi::units::second_t time, TimestampSource source, bool valid=true)
Constructs a new Timestamp for the given source.
Definition Timestamp.hpp:76
constexpr wpi::units::second_t GetTime() const
Gets the time of this timestamp.
Definition Timestamp.hpp:87
wpi::units::second_t GetCurrentTime()
Get the current timestamp.
Definition Utils.hpp:27
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14