[wpilib] Document simulation APIs (#3079)

- Remove sim checkstyle suppression
- Add [[nodiscard]] to C++ register callback functions
- Add a couple of missing sim functions

Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
Co-authored-by: Starlight220 <yotamshlomi@gmail.com>
This commit is contained in:
Peter Johnson
2021-01-11 21:55:45 -08:00
committed by GitHub
parent 26584ff145
commit 9c3b51ca0f
64 changed files with 4516 additions and 199 deletions

View File

@@ -4,7 +4,17 @@
package edu.wpi.first.hal;
/** A wrapper around a simulator device handle. */
/**
* A wrapper around a simulator device handle.
*
* <p>Teams: if you are using this class, you are likely confusing it for {@link
* edu.wpi.first.wpilibj.simulation.SimDeviceSim}.
*
* <p>Vendors: This class should be used from inside the device class to define the
* properties/fields of the device. Use {@link #create} to get a SimDevice object, then use {@link
* #createDouble(String, Direction, double)} or similar to define the device's fields. See {@link
* edu.wpi.first.wpilibj.ADXRS450_Gyro} for an example implementation.
*/
public class SimDevice implements AutoCloseable {
public enum Direction {
kInput(SimDeviceJNI.kInput),