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<CANrange>
38 hal::SimDevice m_simCANrange;
39 hal::SimDouble m_simSupplyVoltage;
40 hal::SimDouble m_simDistance;
41 hal::SimBoolean m_simIsDetected;
44 std::vector<int32_t> m_simValueChangedUids;
48 static void OnPeriodic(
void *
param);
Class for getting information about an available CAN bus.
Definition CANBus.hpp:19
Represents a status signal with data of type T, and operations available to retrieve information abou...
Definition StatusSignal.hpp:657
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CANrange.hpp:27
CANrange(int deviceId, CANBus canbus)
Constructs a new CANrange object.
Definition CANrange.hpp:72
CANrange(int deviceId, std::string canbus="")
Constructs a new CANrange object.
void InitSendable(wpi::SendableBuilder &builder) override
StatusSignal< T > & LookupStatusSignal(uint16_t spn, std::string signalName, bool reportOnConstruction, bool refresh)
Definition ParentDevice.hpp:553
Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front o...
Definition CoreCANrange.hpp:728
StatusSignal< bool > & GetIsDetected(bool refresh=true)
Whether the CANrange detects an object using the configured proximity parameters.
StatusSignal< units::length::meter_t > & GetDistance(bool refresh=true)
Distance to the nearest object in the configured field of view of the CANrange.
Definition StatusCodes.h:18