[sim] Add WPILib-class-taking constructors (#2538)

When not direct mapped, make index constructors private and add factory
functions for channel and index.

Co-authored-by: GabrielDeml <gabrielddeml@gmail.com>
This commit is contained in:
Peter Johnson
2020-07-04 10:10:43 -07:00
committed by GitHub
parent 80a1fa9ece
commit 3050e935a1
75 changed files with 1281 additions and 126 deletions

View File

@@ -20,8 +20,17 @@
namespace frc {
namespace sim {
/**
* Class to control the simulation side of a SimDevice.
*/
class SimDeviceSim {
public:
/**
* Constructs a SimDeviceSim.
*
* @param name name of the SimDevice
*/
explicit SimDeviceSim(const char* name)
: m_handle{HALSIM_GetSimDeviceHandle(name)} {}