11#include "wpi/sendable/Sendable.h"
12#include "wpi/sendable/SendableBuilder.h"
13#include "wpi/sendable/SendableHelper.h"
14#include <hal/SimDevice.h>
26 public wpi::SendableHelper<CANcoder>
37 hal::SimDevice m_simCANcoder;
38 hal::SimDouble m_simSupplyVoltage;
39 hal::SimDouble m_simPosition;
40 hal::SimDouble m_simRawPosition;
41 hal::SimDouble m_simVelocity;
43 int32_t m_simPeriodicUid{-1};
44 std::vector<int32_t> m_simValueChangedUids;
46 static void OnValueChanged(
const char *name,
void *param, HAL_SimValueHandle handle,
47 HAL_Bool readonly,
const struct HAL_Value *value);
48 static void OnPeriodic(
void *param);
65 CANcoder(
int deviceId, std::string canbus =
"");
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition: CANcoder.hpp:27
void InitSendable(wpi::SendableBuilder &builder) override
CANcoder(CANcoder &&)=default
CANcoder(int deviceId, std::string canbus="")
Constructs a new CANcoder object.
CANcoder & operator=(CANcoder &&)=default
Class for CANcoder, a CAN based magnetic encoder that provides absolute and relative position along w...
Definition: CoreCANcoder.hpp:504
StatusSignal< units::angle::turn_t > & GetPosition()
Position of the device.
Definition: string_util.hpp:15