mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[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:
34
wpilibc/src/main/native/include/frc/simulation/SimHooks.h
Normal file
34
wpilibc/src/main/native/include/frc/simulation/SimHooks.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/simulation/MockHooks.h>
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
|
||||
void SetRuntimeType(HAL_RuntimeType type) { HALSIM_SetRuntimeType(type); }
|
||||
|
||||
void WaitForProgramStart() { HALSIM_WaitForProgramStart(); }
|
||||
|
||||
void SetProgramStarted() { HALSIM_SetProgramStarted(); }
|
||||
|
||||
bool GetProgramStarted() { return HALSIM_GetProgramStarted(); }
|
||||
|
||||
void RestartTiming() { HALSIM_RestartTiming(); }
|
||||
|
||||
void PauseTiming() { HALSIM_PauseTiming(); }
|
||||
|
||||
void ResumeTiming() { HALSIM_ResumeTiming(); }
|
||||
|
||||
bool IsTimingPaused() { return HALSIM_IsTimingPaused(); }
|
||||
|
||||
void StepTiming(uint64_t delta) { HALSIM_StepTiming(delta); }
|
||||
|
||||
} // namespace sim
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user