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_simCANcoder;
39 wpi::hal::SimDouble m_simSupplyVoltage;
40 wpi::hal::SimDouble m_simPosition;
41 wpi::hal::SimDouble m_simRawPosition;
42 wpi::hal::SimDouble m_simVelocity;
44 int32_t m_simPeriodicUid{-1};
45 std::vector<int32_t> m_simValueChangedUids;
47 static void OnValueChanged(
48 const char *name,
void *param, HAL_SimValueHandle handle,
49 HAL_Bool readonly,
const struct HAL_Value *value
51 static void OnPeriodic(
void *param);
81 void LogTo(wpi::telemetry::TelemetryTable &table)
const override;
91#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
void LogTo(wpi::telemetry::TelemetryTable &table) const override
Logs the object to a wpi::telemetry::TelemetryTable.
std::string_view GetTelemetryType() const override
Gets the telemetry table type.
Definition CANcoder.hpp:88
CANcoder(int deviceId, CANBus canbus)
Constructs a new CANcoder object.
static CANcoder None()
Constructs a stubbed-out CANcoder, where all status signals, controls, configs, etc.
Definition CANcoder.hpp:71
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition CoreCANcoder.hpp:595
StatusSignal< wpi::units::turns_per_second_t > & GetVelocity(bool refresh=true)
Velocity of the device.
StatusSignal< wpi::units::turn_t > & GetPosition(bool refresh=true)
Position of the device.
Definition ExternalFeedbackConfigs.hpp:17
Definition ExternalFeedbackConfigs.hpp:16
Definition motor_constants.h:14