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