[sim] Move Sim classes from HAL to wpilibc/j (#2549)

Also move some things in HAL for consistency.

WAS:
C++:
- C APIs: #include "mockdata/AccelerometerData.h"
- User side class: #include "simulation/AccelerometerSim.h"
Java:
- JNI APIs: hal.sim.mockdata.AccelerometerData (and a few classes in hal.sim)
- User side classes: hal.sim.AccelerometerSim

IS:
C++:
- C APIs: #include "hal/simulation/AccelerometerData.h"
- C++ class: #include "frc/simulation/AccelerometerSim.h"
Java:
- JNI APIs: hal.simulation.AccelerometerData
- User side class: wpilibj.simulation.AccelerometerSim
This commit is contained in:
Peter Johnson
2020-06-27 22:11:24 -07:00
committed by GitHub
parent 22c0e2813a
commit ce3bc91946
207 changed files with 1420 additions and 1415 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/AccelerometerData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AccelerometerData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AccelerometerData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -11,9 +11,9 @@
#include <wpi/spinlock.h>
#include "mockdata/AddressableLEDData.h"
#include "mockdata/SimCallbackRegistry.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AddressableLEDData.h"
#include "hal/simulation/SimCallbackRegistry.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AddressableLEDData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/AnalogGyroData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AnalogGyroData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AnalogGyroData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/AnalogInData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AnalogInData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AnalogInData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/AnalogOutData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AnalogOutData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AnalogOutData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/AnalogTriggerData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/AnalogTriggerData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class AnalogTriggerData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/CanData.h"
#include "mockdata/SimCallbackRegistry.h"
#include "hal/simulation/CanData.h"
#include "hal/simulation/SimCallbackRegistry.h"
namespace hal {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/DIOData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/DIOData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class DIOData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/DigitalPWMData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/DigitalPWMData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class DigitalPWMData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -11,8 +11,8 @@
#include <wpi/spinlock.h>
#include "mockdata/DriverStationData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/DriverStationData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
struct JoystickOutputStore;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,8 +10,8 @@
#include <atomic>
#include <limits>
#include "mockdata/DutyCycleData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/DutyCycleData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class DutyCycleData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,8 +10,8 @@
#include <atomic>
#include <limits>
#include "mockdata/EncoderData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/EncoderData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class EncoderData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,9 +7,9 @@
#pragma once
#include "mockdata/I2CData.h"
#include "mockdata/SimCallbackRegistry.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/I2CData.h"
#include "hal/simulation/SimCallbackRegistry.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class I2CData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -8,8 +8,8 @@
#pragma once
#include "../PortsInternal.h"
#include "mockdata/PCMData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/PCMData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class PCMData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -8,8 +8,8 @@
#pragma once
#include "../PortsInternal.h"
#include "mockdata/PDPData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/PDPData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class PDPData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/PWMData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/PWMData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class PWMData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/RelayData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/RelayData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class RelayData {

View File

@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/RoboRioData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/RoboRioData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class RoboRioData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,8 +7,8 @@
#pragma once
#include "mockdata/SPIAccelerometerData.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/SPIAccelerometerData.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {
class SPIAccelerometerData {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,9 +7,9 @@
#pragma once
#include "mockdata/SPIData.h"
#include "mockdata/SimCallbackRegistry.h"
#include "mockdata/SimDataValue.h"
#include "hal/simulation/SPIData.h"
#include "hal/simulation/SimCallbackRegistry.h"
#include "hal/simulation/SimDataValue.h"
namespace hal {

View File

@@ -1,11 +1,11 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#include "mockdata/SimDeviceData.h" // NOLINT(build/include_order)
#include "hal/simulation/SimDeviceData.h" // NOLINT(build/include_order)
#include <algorithm>

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -19,8 +19,8 @@
#include <wpi/spinlock.h>
#include "hal/Value.h"
#include "mockdata/SimCallbackRegistry.h"
#include "mockdata/SimDeviceData.h"
#include "hal/simulation/SimCallbackRegistry.h"
#include "hal/simulation/SimDeviceData.h"
namespace hal {