11#include <wpi/hal/SimDevice.hpp>
12#include <wpi/telemetry/TelemetryLoggable.hpp>
18#if defined(_WIN32) || defined(_WIN64)
20#pragma warning(disable : 4250)
38 wpi::hal::SimDevice m_simCANrange;
39 wpi::hal::SimDouble m_simSupplyVoltage;
40 wpi::hal::SimDouble m_simDistance;
41 wpi::hal::SimBoolean m_simIsDetected;
43 int32_t m_simPeriodicUid{-1};
44 std::vector<int32_t> m_simValueChangedUids;
46 static void OnValueChanged(
47 const char *name,
void *param, HAL_SimValueHandle handle,
48 HAL_Bool readonly,
const struct HAL_Value *value
50 static void OnPeriodic(
void *param);
80 void LogTo(wpi::telemetry::TelemetryTable &table)
const override;
90#if defined(_WIN32) || defined(_WIN64)
Class for getting information about an available CAN bus.
Definition CANBus.hpp:142
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:523
std::string_view GetTelemetryType() const override
Gets the telemetry table type.
Definition CANrange.hpp:87
CANrange(int deviceId, CANBus canbus)
Constructs a new CANrange object.
void LogTo(wpi::telemetry::TelemetryTable &table) const override
Logs the object to a wpi::telemetry::TelemetryTable.
static CANrange None()
Constructs a stubbed-out CANrange, where all status signals, controls, configs, etc.
Definition CANrange.hpp:70
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CoreCANrange.hpp:728
StatusSignal< wpi::units::meter_t > & GetDistance(bool refresh=true)
Distance to the nearest object in the configured field of view of the CANrange.
StatusSignal< bool > & GetIsDetected(bool refresh=true)
Whether the CANrange detects an object using the configured proximity parameters.
Definition ExternalFeedbackConfigs.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14