mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a This mirrors the robotpy files for the following projects: - apriltag - datalog - hal - ntcore - romiVendordep - wpilibc - wpimath - xrpVendordep This excludes cscore and the halsim wrappers for at this time. NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
7
hal/src/main/python/README.md
Normal file
7
hal/src/main/python/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
robotpy-hal
|
||||
===========
|
||||
|
||||
Python wrappers around the WPILib HAL.
|
||||
|
||||
API Documentation can be found at
|
||||
https://robotpy.readthedocs.io/projects/hal/en/latest
|
||||
12
hal/src/main/python/hal/__init__.py
Normal file
12
hal/src/main/python/hal/__init__.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from .version import version as __version__
|
||||
|
||||
# Only needed for side effects
|
||||
from . import _initialize
|
||||
from .exceptions import HALError
|
||||
|
||||
from . import _init__wpiHal
|
||||
from ._wpiHal import *
|
||||
|
||||
from ._wpiHal import __hal_simulation__
|
||||
|
||||
del _init__wpiHal
|
||||
9
hal/src/main/python/hal/_initialize.py
Normal file
9
hal/src/main/python/hal/_initialize.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from . import exceptions, _init__wpiHal, _wpiHal
|
||||
|
||||
# Always initialize HAL here, disable extension notice because we'll handle
|
||||
# that for users
|
||||
_sse = getattr(_wpiHal, "setShowExtensionsNotFoundMessages", None)
|
||||
if _sse:
|
||||
_wpiHal.setShowExtensionsNotFoundMessages(False)
|
||||
|
||||
_wpiHal.initialize(500, 0)
|
||||
2
hal/src/main/python/hal/exceptions.py
Normal file
2
hal/src/main/python/hal/exceptions.py
Normal file
@@ -0,0 +1,2 @@
|
||||
class HALError(RuntimeError):
|
||||
pass
|
||||
0
hal/src/main/python/hal/py.typed
Normal file
0
hal/src/main/python/hal/py.typed
Normal file
4
hal/src/main/python/hal/simulation/__init__.py
Normal file
4
hal/src/main/python/hal/simulation/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from . import _init__simulation
|
||||
from ._simulation import *
|
||||
|
||||
del _init__simulation
|
||||
30
hal/src/main/python/hal/simulation/main.cpp
Normal file
30
hal/src/main/python/hal/simulation/main.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#include <semiwrap_init.hal.simulation._simulation.hpp>
|
||||
#include <pybind11/functional.h>
|
||||
|
||||
#include "sim_cb.h"
|
||||
#include "sim_value_cb.h"
|
||||
|
||||
void HALSIM_ResetGlobalHandles();
|
||||
|
||||
SEMIWRAP_PYBIND11_MODULE(m) {
|
||||
|
||||
py::class_<SimCB> cls_SimCB(m, "SimCB");
|
||||
cls_SimCB.doc() = "Simulation callback handle";
|
||||
cls_SimCB.def("cancel", &SimCB::Cancel, py::doc("Cancel the callback"));
|
||||
|
||||
py::class_<SimValueCB> cls_SimValueCB(m, "SimValueCB");
|
||||
cls_SimValueCB.doc() = "Simulation callback handle";
|
||||
cls_SimValueCB.def("cancel", &SimValueCB::Cancel, py::doc("Cancel the callback"));
|
||||
|
||||
initWrapper(m);
|
||||
|
||||
m.def(
|
||||
"resetGlobalHandles",
|
||||
[]() {
|
||||
#ifndef __FRC_SYSTEMCORE__
|
||||
HALSIM_ResetGlobalHandles();
|
||||
#endif
|
||||
},
|
||||
release_gil());
|
||||
}
|
||||
29
hal/src/main/python/hal/simulation/resethandles.cpp
Normal file
29
hal/src/main/python/hal/simulation/resethandles.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
#ifndef __FRC_SYSTEMCORE__
|
||||
#include <hal/Notifier.h>
|
||||
#include <hal/handles/HandlesInternal.h>
|
||||
#include <hal/simulation/NotifierData.h>
|
||||
|
||||
void HALSIM_ResetGlobalHandles() {
|
||||
|
||||
// if we just reset the handles, notifiers might hang forever,
|
||||
// so we just enumerate and cancel them all
|
||||
auto sz = HALSIM_GetNotifierInfo(nullptr, 0);
|
||||
if (sz > 0) {
|
||||
struct HALSIM_NotifierInfo *info = new struct HALSIM_NotifierInfo[sz];
|
||||
HALSIM_GetNotifierInfo(info, sz);
|
||||
|
||||
for (int i = 0; i < sz; i++) {
|
||||
HAL_CleanNotifier(info->handle);
|
||||
}
|
||||
}
|
||||
|
||||
hal::HandleBase::ResetGlobalHandles();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void HALSIM_ResetGlobalHandles() {}
|
||||
|
||||
#endif
|
||||
33
hal/src/main/python/hal/simulation/sim_cb.h
Normal file
33
hal/src/main/python/hal/simulation/sim_cb.h
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
class SimCB {
|
||||
public:
|
||||
|
||||
SimCB(std::function<void(void)> fn, std::function<void(int32_t)> cancel) :
|
||||
m_fn(fn),
|
||||
m_cancel(cancel)
|
||||
{}
|
||||
|
||||
void SetUID(int32_t uid) {
|
||||
m_uid = uid;
|
||||
}
|
||||
|
||||
~SimCB() {
|
||||
Cancel();
|
||||
}
|
||||
|
||||
void Cancel() {
|
||||
if (m_valid) {
|
||||
m_cancel(m_uid);
|
||||
m_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
std::function<void(void)> m_fn;
|
||||
|
||||
private:
|
||||
bool m_valid = true;
|
||||
int32_t m_uid;
|
||||
std::function<void(int32_t)> m_cancel;
|
||||
};
|
||||
37
hal/src/main/python/hal/simulation/sim_value_cb.h
Normal file
37
hal/src/main/python/hal/simulation/sim_value_cb.h
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/SimDevice.h>
|
||||
|
||||
class SimValueCB {
|
||||
public:
|
||||
|
||||
using FnType = std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)>;
|
||||
|
||||
SimValueCB(FnType fn, std::function<void(int32_t)> cancel) :
|
||||
m_fn(fn),
|
||||
m_cancel(cancel)
|
||||
{}
|
||||
|
||||
void SetUID(int32_t uid) {
|
||||
m_uid = uid;
|
||||
}
|
||||
|
||||
~SimValueCB() {
|
||||
Cancel();
|
||||
}
|
||||
|
||||
void Cancel() {
|
||||
if (m_valid) {
|
||||
m_cancel(m_uid);
|
||||
m_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
FnType m_fn;
|
||||
|
||||
private:
|
||||
bool m_valid = true;
|
||||
int32_t m_uid;
|
||||
std::function<void(int32_t)> m_cancel;
|
||||
};
|
||||
16
hal/src/main/python/hal/src/ds_types_fmt.h
Normal file
16
hal/src/main/python/hal/src/ds_types_fmt.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <pybind11/pybind11.h>
|
||||
|
||||
#include "hal/DriverStationTypes.h"
|
||||
|
||||
namespace pybind11 {
|
||||
|
||||
template <>
|
||||
struct format_descriptor<HAL_JoystickPOV> {
|
||||
static constexpr const char c = 'B';
|
||||
static constexpr const char value[2] = {c, '\0'};
|
||||
static std::string format() { return std::string(1, c); }
|
||||
};
|
||||
|
||||
}
|
||||
110
hal/src/main/python/hal/src/hal.cpp
Normal file
110
hal/src/main/python/hal/src/hal.cpp
Normal file
@@ -0,0 +1,110 @@
|
||||
|
||||
|
||||
#include <hal/HALBase.h>
|
||||
#include <hal/DriverStation.h>
|
||||
#include <hal/Value.h>
|
||||
#include <semiwrap_init.hal._wpiHal.hpp>
|
||||
|
||||
using namespace pybind11::literals;
|
||||
|
||||
static py::module_ sys_module;
|
||||
|
||||
SEMIWRAP_PYBIND11_MODULE(m) {
|
||||
|
||||
// Add this manually so it can be used from SimValue
|
||||
py::enum_<HAL_Type>(m, "Type")
|
||||
.value("UNASSIGNED", HAL_Type::HAL_UNASSIGNED)
|
||||
.value("BOOLEAN", HAL_Type::HAL_BOOLEAN)
|
||||
.value("DOUBLE", HAL_Type::HAL_DOUBLE)
|
||||
.value("ENUM", HAL_Type::HAL_ENUM)
|
||||
.value("INT", HAL_Type::HAL_INT)
|
||||
.value("LONG", HAL_Type::HAL_LONG);
|
||||
|
||||
// Add this manually because it would be annoying to do otherwise
|
||||
py::class_<HAL_Value>(m, "Value")
|
||||
.def_readonly("type", &HAL_Value::type)
|
||||
.def_property_readonly("value",
|
||||
[](const HAL_Value &self) -> py::object {
|
||||
switch (self.type) {
|
||||
case HAL_BOOLEAN:
|
||||
return py::bool_(self.data.v_boolean);
|
||||
case HAL_DOUBLE:
|
||||
return py::float_(self.data.v_double);
|
||||
case HAL_ENUM:
|
||||
return py::int_(self.data.v_enum);
|
||||
case HAL_INT:
|
||||
return py::int_(self.data.v_int);
|
||||
case HAL_LONG:
|
||||
return py::int_(self.data.v_long);
|
||||
default:
|
||||
return py::none();
|
||||
}
|
||||
}
|
||||
)
|
||||
.def("__repr__", [](const HAL_Value &self) -> py::str {
|
||||
switch (self.type) {
|
||||
case HAL_BOOLEAN:
|
||||
return "<Value type=bool value=" + std::to_string(self.data.v_boolean) + ">";
|
||||
case HAL_DOUBLE:
|
||||
return "<Value type=double value=" + std::to_string(self.data.v_double) + ">";
|
||||
case HAL_ENUM:
|
||||
return "<Value type=enum value=" + std::to_string(self.data.v_enum) + ">";
|
||||
case HAL_INT:
|
||||
return "<Value type=int value=" + std::to_string(self.data.v_int) + ">";
|
||||
case HAL_LONG:
|
||||
return "<Value type=long value=" + std::to_string(self.data.v_long) + ">";
|
||||
default:
|
||||
return "<Value type=invalid>";
|
||||
}
|
||||
});
|
||||
|
||||
initWrapper(m);
|
||||
|
||||
#ifdef __FRC_SYSTEMCORE__
|
||||
m.attr("__halplatform__") = "Systemcore";
|
||||
m.attr("__hal_simulation__") = false;
|
||||
#else
|
||||
m.attr("__halplatform__") = "sim";
|
||||
m.attr("__hal_simulation__") = true;
|
||||
|
||||
m.def("__test_senderr", []() {
|
||||
HAL_SendError(1, 2, 0, "\xfa" "badmessage", "location", "callstack", 1);
|
||||
}, release_gil());
|
||||
|
||||
#endif
|
||||
|
||||
// Redirect stderr to python stderr
|
||||
sys_module = py::module_::import("sys");
|
||||
|
||||
HAL_SetPrintErrorImpl([](const char *line, size_t size) {
|
||||
if (size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
py::gil_scoped_acquire lock;
|
||||
PyObject *o = PyUnicode_DecodeUTF8(line, size, "replace");
|
||||
if (o == nullptr) {
|
||||
PyErr_Clear();
|
||||
py::print(py::bytes(line, size), "file"_a=sys_module.attr("stderr"));
|
||||
} else {
|
||||
py::print(py::reinterpret_steal<py::str>(o), "file"_a=sys_module.attr("stderr"));
|
||||
}
|
||||
});
|
||||
|
||||
// Do cleanup on module unload
|
||||
static int unused; // the capsule needs something to reference
|
||||
py::capsule cleanup(&unused, [](void *) {
|
||||
{
|
||||
py::gil_scoped_acquire lock;
|
||||
HAL_SetPrintErrorImpl(nullptr);
|
||||
sys_module.dec_ref();
|
||||
sys_module.release();
|
||||
}
|
||||
|
||||
{
|
||||
py::gil_scoped_release unlock;
|
||||
HAL_Shutdown();
|
||||
}
|
||||
});
|
||||
m.add_object("_cleanup", cleanup);
|
||||
}
|
||||
41
hal/src/main/python/native-pyproject.toml
Normal file
41
hal/src/main/python/native-pyproject.toml
Normal file
@@ -0,0 +1,41 @@
|
||||
[build-system]
|
||||
build-backend = "hatchling.build"
|
||||
requires = [
|
||||
"hatchling",
|
||||
"hatch-nativelib~=0.2.0",
|
||||
"hatch-robotpy~=0.2.1",
|
||||
"robotpy-native-wpiutil==2027.0.0a2",
|
||||
"robotpy-native-ntcore==2027.0.0a2",
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "robotpy-native-wpihal"
|
||||
version = "2027.0.0a2"
|
||||
description = "WPILib HAL implementation"
|
||||
license = "BSD-3-Clause"
|
||||
|
||||
dependencies = [
|
||||
"robotpy-native-wpiutil==2027.0.0a2",
|
||||
"robotpy-native-ntcore==2027.0.0a2",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/native"]
|
||||
|
||||
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
|
||||
artifact_id = "hal-cpp"
|
||||
group_id = "edu.wpi.first.hal"
|
||||
repo_url = "https://frcmaven.wpi.edu/artifactory/release-2027"
|
||||
version = "2027.0.0-alpha-2"
|
||||
|
||||
extract_to = "src/native/wpihal"
|
||||
libs = ["wpiHal"]
|
||||
|
||||
[[tool.hatch.build.hooks.nativelib.pcfile]]
|
||||
pcfile = "src/native/wpihal/robotpy-native-wpihal.pc"
|
||||
name = "wpihal"
|
||||
|
||||
includedir = "src/native/wpihal/include"
|
||||
libdir = "src/native/wpihal/lib"
|
||||
shared_libraries = ["wpiHal"]
|
||||
requires = ["robotpy-native-wpiutil", "robotpy-native-ntcore"]
|
||||
169
hal/src/main/python/pyproject.toml
Normal file
169
hal/src/main/python/pyproject.toml
Normal file
@@ -0,0 +1,169 @@
|
||||
[build-system]
|
||||
build-backend = "hatchling.build"
|
||||
requires = [
|
||||
"semiwrap~=0.1.7",
|
||||
"hatch-meson~=0.1.0b2",
|
||||
"hatchling",
|
||||
"pyntcore==2027.0.0a2",
|
||||
"robotpy-native-wpihal==2027.0.0a2",
|
||||
"robotpy-wpiutil==2027.0.0a2",
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "robotpy-hal"
|
||||
version = "2027.0.0a2"
|
||||
description = "Binary wrapper for FRC HAL"
|
||||
authors = [
|
||||
{name = "RobotPy Development Team", email = "robotpy@googlegroups.com"},
|
||||
]
|
||||
license = "BSD-3-Clause"
|
||||
dependencies = [
|
||||
"pyntcore==2027.0.0a2",
|
||||
"robotpy-native-wpihal==2027.0.0a2",
|
||||
"robotpy-wpiutil==2027.0.0a2",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Source code" = "https://github.com/robotpy/mostrobotpy"
|
||||
|
||||
|
||||
[tool.hatch.build.hooks.robotpy]
|
||||
version_file = "hal/version.py"
|
||||
|
||||
[tool.hatch.build.hooks.semiwrap]
|
||||
|
||||
[tool.hatch.build.hooks.meson]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["hal"]
|
||||
|
||||
|
||||
[tool.semiwrap]
|
||||
update_init = []
|
||||
scan_headers_ignore = [
|
||||
"hal/ChipObject.h",
|
||||
"hal/DMA.h",
|
||||
"hal/Errors.h",
|
||||
"hal/HAL.h",
|
||||
"hal/IMU.h",
|
||||
"hal/IMUTypes.h",
|
||||
"hal/SystemServer.h",
|
||||
"hal/Types.h",
|
||||
"hal/Value.h",
|
||||
|
||||
"hal/cpp/SerialHelper.h",
|
||||
"hal/cpp/UnsafeDIO.h",
|
||||
"hal/cpp/fpga_clock.h",
|
||||
|
||||
"hal/handles/DigitalHandleResource.h",
|
||||
"hal/handles/IndexedClassedHandleResource.h",
|
||||
"hal/handles/IndexedHandleResource.h",
|
||||
"hal/handles/LimitedClassedHandleResource.h",
|
||||
"hal/handles/LimitedHandleResource.h",
|
||||
"hal/handles/UnlimitedHandleResource.h",
|
||||
|
||||
"hal/proto/*",
|
||||
|
||||
"hal/roborio/HMB.h",
|
||||
"hal/roborio/InterruptManager.h",
|
||||
|
||||
"hal/simulation/CanData.h",
|
||||
"hal/simulation/I2CData.h",
|
||||
"hal/simulation/NotifyListener.h",
|
||||
"hal/simulation/SPIData.h",
|
||||
"hal/simulation/SimCallbackRegistry.h",
|
||||
"hal/simulation/SimDataValue.h",
|
||||
|
||||
# TODO: might want this in the future
|
||||
"mrc/*",
|
||||
|
||||
"src/ds_types_fmt.h",
|
||||
"sim_cb.h",
|
||||
"sim_value_cb.h",
|
||||
]
|
||||
|
||||
[tool.semiwrap.extension_modules."hal._wpiHal"]
|
||||
name = "wpihal"
|
||||
wraps = ["robotpy-native-wpihal"]
|
||||
depends = ["wpiutil", "ntcore"]
|
||||
|
||||
[tool.semiwrap.extension_modules."hal._wpiHal".headers]
|
||||
# hal
|
||||
AddressableLED = "hal/AddressableLED.h"
|
||||
AddressableLEDTypes = "hal/AddressableLEDTypes.h"
|
||||
AnalogInput = "hal/AnalogInput.h"
|
||||
CAN = "hal/CAN.h"
|
||||
CANAPI = "hal/CANAPI.h"
|
||||
CANAPITypes = "hal/CANAPITypes.h"
|
||||
CTREPCM = "hal/CTREPCM.h"
|
||||
Constants = "hal/Constants.h"
|
||||
Counter = "hal/Counter.h"
|
||||
DIO = "hal/DIO.h"
|
||||
# DMA = "hal/DMA.h"
|
||||
DriverStation = "hal/DriverStation.h"
|
||||
DriverStationTypes = "hal/DriverStationTypes.h"
|
||||
DutyCycle = "hal/DutyCycle.h"
|
||||
Encoder = "hal/Encoder.h"
|
||||
# Errors = "hal/Errors.h"
|
||||
Extensions = "hal/Extensions.h"
|
||||
# HAL = "hal/HAL.h"
|
||||
HALBase = "hal/HALBase.h"
|
||||
I2C = "hal/I2C.h"
|
||||
I2CTypes = "hal/I2CTypes.h"
|
||||
# IMU = "hal/IMU.h"
|
||||
# IMUTypes = "hal/IMUTypes.h"
|
||||
Main = "hal/Main.h"
|
||||
Notifier = "hal/Notifier.h"
|
||||
PWM = "hal/PWM.h"
|
||||
Ports = "hal/Ports.h"
|
||||
Power = "hal/Power.h"
|
||||
PowerDistribution = "hal/PowerDistribution.h"
|
||||
REVPH = "hal/REVPH.h"
|
||||
SerialPort = "hal/SerialPort.h"
|
||||
SimDevice = "hal/SimDevice.h"
|
||||
UsageReporting = "hal/UsageReporting.h"
|
||||
Threads = "hal/Threads.h"
|
||||
# Types = "hal/Types.h"
|
||||
# Value = "hal/Value.h"
|
||||
|
||||
# hal/cpp
|
||||
# fpga_clock = "hal/cpp/fpga_clock.h"
|
||||
|
||||
# hal/handles
|
||||
# DigitalHandleResource = "hal/handles/DigitalHandleResource.h"
|
||||
HandlesInternal = "hal/handles/HandlesInternal.h"
|
||||
# IndexedClassedHandleResource = "hal/handles/IndexedClassedHandleResource.h"
|
||||
# IndexedHandleResource = "hal/handles/IndexedHandleResource.h"
|
||||
# LimitedClassedHandleResource = "hal/handles/LimitedClassedHandleResource.h"
|
||||
# LimitedHandleResource = "hal/handles/LimitedHandleResource.h"
|
||||
# UnlimitedHandleResource = "hal/handles/UnlimitedHandleResource.h"
|
||||
|
||||
|
||||
[tool.semiwrap.extension_modules."hal.simulation._simulation"]
|
||||
name = "hal_simulation"
|
||||
wraps = ["robotpy-native-wpihal"]
|
||||
depends = ["wpiutil", "ntcore"]
|
||||
yaml_path = "semiwrap/simulation"
|
||||
|
||||
[tool.semiwrap.extension_modules."hal.simulation._simulation".headers]
|
||||
AddressableLEDData = "hal/simulation/AddressableLEDData.h"
|
||||
AnalogInData = "hal/simulation/AnalogInData.h"
|
||||
CTREPCMData = "hal/simulation/CTREPCMData.h"
|
||||
# CanData = "hal/simulation/CanData.h"
|
||||
DIOData = "hal/simulation/DIOData.h"
|
||||
DigitalPWMData = "hal/simulation/DigitalPWMData.h"
|
||||
DriverStationData = "hal/simulation/DriverStationData.h"
|
||||
DutyCycleData = "hal/simulation/DutyCycleData.h"
|
||||
EncoderData = "hal/simulation/EncoderData.h"
|
||||
# I2CData = "hal/simulation/I2CData.h"
|
||||
MockHooks = "hal/simulation/MockHooks.h"
|
||||
NotifierData = "hal/simulation/NotifierData.h"
|
||||
# NotifyListener = "hal/simulation/NotifyListener.h"
|
||||
PWMData = "hal/simulation/PWMData.h"
|
||||
PowerDistributionData = "hal/simulation/PowerDistributionData.h"
|
||||
REVPHData = "hal/simulation/REVPHData.h"
|
||||
Reset = "hal/simulation/Reset.h"
|
||||
RoboRioData = "hal/simulation/RoboRioData.h"
|
||||
# SimCallbackRegistry = "hal/simulation/SimCallbackRegistry.h"
|
||||
# SimDataValue = "hal/simulation/SimDataValue.h"
|
||||
SimDeviceData = "hal/simulation/SimDeviceData.h"
|
||||
9
hal/src/main/python/semiwrap/AddressableLED.yml
Normal file
9
hal/src/main/python/semiwrap/AddressableLED.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeAddressableLED:
|
||||
HAL_FreeAddressableLED:
|
||||
HAL_SetAddressableLEDLength:
|
||||
HAL_SetAddressableLEDStart:
|
||||
HAL_SetAddressableLEDData:
|
||||
14
hal/src/main/python/semiwrap/AddressableLEDTypes.yml
Normal file
14
hal/src/main/python/semiwrap/AddressableLEDTypes.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
classes:
|
||||
HAL_AddressableLEDData:
|
||||
attributes:
|
||||
b:
|
||||
g:
|
||||
r:
|
||||
enums:
|
||||
HAL_AddressableLEDColorOrder:
|
||||
functions:
|
||||
format_as:
|
||||
ignore: true
|
||||
23
hal/src/main/python/semiwrap/AnalogInput.yml
Normal file
23
hal/src/main/python/semiwrap/AnalogInput.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeAnalogInputPort:
|
||||
HAL_FreeAnalogInputPort:
|
||||
HAL_CheckAnalogModule:
|
||||
HAL_CheckAnalogInputChannel:
|
||||
HAL_SetAnalogInputSimDevice:
|
||||
HAL_SetAnalogSampleRate:
|
||||
HAL_GetAnalogSampleRate:
|
||||
HAL_SetAnalogAverageBits:
|
||||
HAL_GetAnalogAverageBits:
|
||||
HAL_SetAnalogOversampleBits:
|
||||
HAL_GetAnalogOversampleBits:
|
||||
HAL_GetAnalogValue:
|
||||
HAL_GetAnalogAverageValue:
|
||||
HAL_GetAnalogVoltsToValue:
|
||||
HAL_GetAnalogVoltage:
|
||||
HAL_GetAnalogAverageVoltage:
|
||||
HAL_GetAnalogLSBWeight:
|
||||
HAL_GetAnalogOffset:
|
||||
HAL_GetAnalogValueToVolts:
|
||||
16
hal/src/main/python/semiwrap/CAN.yml
Normal file
16
hal/src/main/python/semiwrap/CAN.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_CAN_SendMessage:
|
||||
HAL_CAN_ReceiveMessage:
|
||||
HAL_CAN_OpenStreamSession:
|
||||
HAL_CAN_CloseStreamSession:
|
||||
HAL_CAN_ReadStreamSession:
|
||||
ignore: true # TODO: an array of messages
|
||||
HAL_CAN_GetCANStatus:
|
||||
classes:
|
||||
HAL_CANStreamMessage:
|
||||
attributes:
|
||||
messageId:
|
||||
message:
|
||||
13
hal/src/main/python/semiwrap/CANAPI.yml
Normal file
13
hal/src/main/python/semiwrap/CANAPI.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeCAN:
|
||||
HAL_CleanCAN:
|
||||
HAL_WriteCANPacket:
|
||||
HAL_WriteCANPacketRepeating:
|
||||
HAL_WriteCANRTRFrame:
|
||||
HAL_StopCANPacketRepeating:
|
||||
HAL_ReadCANPacketNew:
|
||||
HAL_ReadCANPacketLatest:
|
||||
HAL_ReadCANPacketTimeout:
|
||||
19
hal/src/main/python/semiwrap/CANAPITypes.yml
Normal file
19
hal/src/main/python/semiwrap/CANAPITypes.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_CANDeviceType:
|
||||
value_prefix: HAL_CAN_Dev
|
||||
HAL_CANManufacturer:
|
||||
value_prefix: HAL_CAN_Man
|
||||
HAL_CANFlags:
|
||||
classes:
|
||||
HAL_CANMessage:
|
||||
attributes:
|
||||
flags:
|
||||
dataSize:
|
||||
data:
|
||||
HAL_CANReceiveMessage:
|
||||
attributes:
|
||||
timeStamp:
|
||||
message:
|
||||
26
hal/src/main/python/semiwrap/CTREPCM.yml
Normal file
26
hal/src/main/python/semiwrap/CTREPCM.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeCTREPCM:
|
||||
HAL_FreeCTREPCM:
|
||||
HAL_CheckCTREPCMSolenoidChannel:
|
||||
HAL_GetCTREPCMCompressor:
|
||||
HAL_SetCTREPCMClosedLoopControl:
|
||||
HAL_GetCTREPCMClosedLoopControl:
|
||||
HAL_GetCTREPCMPressureSwitch:
|
||||
HAL_GetCTREPCMCompressorCurrent:
|
||||
HAL_GetCTREPCMCompressorCurrentTooHighFault:
|
||||
HAL_GetCTREPCMCompressorCurrentTooHighStickyFault:
|
||||
HAL_GetCTREPCMCompressorShortedStickyFault:
|
||||
HAL_GetCTREPCMCompressorShortedFault:
|
||||
HAL_GetCTREPCMCompressorNotConnectedStickyFault:
|
||||
HAL_GetCTREPCMCompressorNotConnectedFault:
|
||||
HAL_GetCTREPCMSolenoids:
|
||||
HAL_SetCTREPCMSolenoids:
|
||||
HAL_GetCTREPCMSolenoidDisabledList:
|
||||
HAL_GetCTREPCMSolenoidVoltageStickyFault:
|
||||
HAL_GetCTREPCMSolenoidVoltageFault:
|
||||
HAL_ClearAllCTREPCMStickyFaults:
|
||||
HAL_FireCTREPCMOneShot:
|
||||
HAL_SetCTREPCMOneShotDuration:
|
||||
5
hal/src/main/python/semiwrap/Constants.yml
Normal file
5
hal/src/main/python/semiwrap/Constants.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_GetSystemClockTicksPerMicrosecond:
|
||||
12
hal/src/main/python/semiwrap/Counter.yml
Normal file
12
hal/src/main/python/semiwrap/Counter.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeCounter:
|
||||
HAL_FreeCounter:
|
||||
HAL_ResetCounter:
|
||||
HAL_GetCounter:
|
||||
HAL_GetCounterPeriod:
|
||||
HAL_SetCounterMaxPeriod:
|
||||
HAL_GetCounterStopped:
|
||||
HAL_SetCounterEdgeConfiguration:
|
||||
22
hal/src/main/python/semiwrap/DIO.yml
Normal file
22
hal/src/main/python/semiwrap/DIO.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeDIOPort:
|
||||
HAL_CheckDIOChannel:
|
||||
HAL_FreeDIOPort:
|
||||
HAL_SetDIOSimDevice:
|
||||
HAL_AllocateDigitalPWM:
|
||||
HAL_FreeDigitalPWM:
|
||||
HAL_SetDigitalPWMRate:
|
||||
HAL_SetDigitalPWMDutyCycle:
|
||||
HAL_SetDigitalPWMPPS:
|
||||
HAL_SetDigitalPWMOutputChannel:
|
||||
HAL_SetDIO:
|
||||
HAL_SetDIODirection:
|
||||
HAL_GetDIO:
|
||||
HAL_GetDIODirection:
|
||||
HAL_Pulse:
|
||||
HAL_PulseMultiple:
|
||||
HAL_IsPulsing:
|
||||
HAL_IsAnyPulsing:
|
||||
42
hal/src/main/python/semiwrap/DriverStation.yml
Normal file
42
hal/src/main/python/semiwrap/DriverStation.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_SendError:
|
||||
HAL_SetPrintErrorImpl:
|
||||
ignore: true
|
||||
HAL_SendConsoleLine:
|
||||
HAL_GetControlWord:
|
||||
HAL_GetAllianceStation:
|
||||
HAL_GetJoystickAxes:
|
||||
HAL_GetJoystickPOVs:
|
||||
HAL_GetJoystickButtons:
|
||||
HAL_GetAllJoystickData:
|
||||
HAL_GetJoystickDescriptor:
|
||||
HAL_GetJoystickType:
|
||||
HAL_GetJoystickName:
|
||||
param_override:
|
||||
name:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](int32_t joystickNum) {
|
||||
WPI_String name;
|
||||
HAL_GetJoystickName(&name, joystickNum);
|
||||
std::string sname(wpi::to_string_view(&name));
|
||||
WPI_FreeString(&name);
|
||||
return sname;
|
||||
}
|
||||
HAL_GetJoystickAxisType:
|
||||
HAL_SetJoystickOutputs:
|
||||
HAL_GetMatchTime:
|
||||
HAL_GetOutputsEnabled:
|
||||
HAL_GetMatchInfo:
|
||||
HAL_RefreshDSData:
|
||||
HAL_ProvideNewDataEventHandle:
|
||||
HAL_RemoveNewDataEventHandle:
|
||||
HAL_ObserveUserProgramStarting:
|
||||
HAL_ObserveUserProgramDisabled:
|
||||
HAL_ObserveUserProgramAutonomous:
|
||||
HAL_ObserveUserProgramTeleop:
|
||||
HAL_ObserveUserProgramTest:
|
||||
HAL_GetJoystickIsGamepad:
|
||||
53
hal/src/main/python/semiwrap/DriverStationTypes.yml
Normal file
53
hal/src/main/python/semiwrap/DriverStationTypes.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
extra_includes:
|
||||
- src/ds_types_fmt.h
|
||||
|
||||
enums:
|
||||
HAL_AllianceStationID:
|
||||
value_prefix: HAL_AllianceStationID
|
||||
HAL_JoystickPOV:
|
||||
value_prefix: HAL_JoystickPOV
|
||||
HAL_MatchType:
|
||||
value_prefix: HAL_kMatchType
|
||||
classes:
|
||||
HAL_ControlWord:
|
||||
attributes:
|
||||
enabled:
|
||||
autonomous:
|
||||
test:
|
||||
eStop:
|
||||
fmsAttached:
|
||||
dsAttached:
|
||||
control_reserved:
|
||||
HAL_JoystickAxes:
|
||||
attributes:
|
||||
count:
|
||||
axes:
|
||||
raw:
|
||||
HAL_JoystickPOVs:
|
||||
attributes:
|
||||
count:
|
||||
povs:
|
||||
HAL_JoystickButtons:
|
||||
attributes:
|
||||
buttons:
|
||||
count:
|
||||
HAL_JoystickDescriptor:
|
||||
attributes:
|
||||
type:
|
||||
name:
|
||||
axisCount:
|
||||
axisTypes:
|
||||
buttonCount:
|
||||
povCount:
|
||||
isGamepad:
|
||||
HAL_MatchInfo:
|
||||
attributes:
|
||||
eventName:
|
||||
matchType:
|
||||
matchNumber:
|
||||
replayNumber:
|
||||
gameSpecificMessage:
|
||||
gameSpecificMessageSize:
|
||||
11
hal/src/main/python/semiwrap/DutyCycle.yml
Normal file
11
hal/src/main/python/semiwrap/DutyCycle.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeDutyCycle:
|
||||
HAL_FreeDutyCycle:
|
||||
HAL_SetDutyCycleSimDevice:
|
||||
ifndef: __FRC_SYSTEMCORE__
|
||||
HAL_GetDutyCycleFrequency:
|
||||
HAL_GetDutyCycleOutput:
|
||||
HAL_GetDutyCycleHighTime:
|
||||
31
hal/src/main/python/semiwrap/Encoder.yml
Normal file
31
hal/src/main/python/semiwrap/Encoder.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_EncoderIndexingType:
|
||||
value_prefix: HAL
|
||||
HAL_EncoderEncodingType:
|
||||
value_prefix: HAL
|
||||
functions:
|
||||
HAL_InitializeEncoder:
|
||||
HAL_FreeEncoder:
|
||||
HAL_SetEncoderSimDevice:
|
||||
HAL_GetEncoder:
|
||||
HAL_GetEncoderRaw:
|
||||
HAL_GetEncoderEncodingScale:
|
||||
HAL_ResetEncoder:
|
||||
HAL_GetEncoderPeriod:
|
||||
HAL_SetEncoderMaxPeriod:
|
||||
HAL_GetEncoderStopped:
|
||||
HAL_GetEncoderDirection:
|
||||
HAL_GetEncoderDistance:
|
||||
HAL_GetEncoderRate:
|
||||
HAL_SetEncoderMinRate:
|
||||
HAL_SetEncoderDistancePerPulse:
|
||||
HAL_SetEncoderReverseDirection:
|
||||
HAL_SetEncoderSamplesToAverage:
|
||||
HAL_GetEncoderSamplesToAverage:
|
||||
HAL_GetEncoderFPGAIndex:
|
||||
HAL_GetEncoderDecodingScaleFactor:
|
||||
HAL_GetEncoderDistancePerPulse:
|
||||
HAL_GetEncoderEncodingType:
|
||||
16
hal/src/main/python/semiwrap/Extensions.yml
Normal file
16
hal/src/main/python/semiwrap/Extensions.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_LoadOneExtension:
|
||||
ifndef: __FRC_SYSTEMCORE__
|
||||
HAL_LoadExtensions:
|
||||
ifndef: __FRC_SYSTEMCORE__
|
||||
HAL_RegisterExtension:
|
||||
ignore: true
|
||||
HAL_RegisterExtensionListener:
|
||||
ignore: true
|
||||
HAL_SetShowExtensionsNotFoundMessages:
|
||||
ifndef: __FRC_SYSTEMCORE__
|
||||
HAL_OnShutdown:
|
||||
ignore: true
|
||||
47
hal/src/main/python/semiwrap/HALBase.yml
Normal file
47
hal/src/main/python/semiwrap/HALBase.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_RuntimeType:
|
||||
functions:
|
||||
HAL_GetErrorMessage:
|
||||
HAL_GetFPGAVersion:
|
||||
HAL_GetFPGARevision:
|
||||
HAL_GetSerialNumber:
|
||||
param_override:
|
||||
serialNumber:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[]() {
|
||||
WPI_String s;
|
||||
HAL_GetSerialNumber(&s);
|
||||
std::string ss(wpi::to_string_view(&s));
|
||||
WPI_FreeString(&s);
|
||||
return ss;
|
||||
}
|
||||
HAL_GetComments:
|
||||
param_override:
|
||||
comments:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[]() {
|
||||
WPI_String s;
|
||||
HAL_GetComments(&s);
|
||||
std::string ss(wpi::to_string_view(&s));
|
||||
WPI_FreeString(&s);
|
||||
return ss;
|
||||
}
|
||||
HAL_GetTeamNumber:
|
||||
HAL_GetRuntimeType:
|
||||
HAL_GetSystemActive:
|
||||
HAL_GetBrownedOut:
|
||||
HAL_GetFPGATime:
|
||||
HAL_ExpandFPGATime:
|
||||
HAL_GetRSLState:
|
||||
HAL_GetSystemTimeValid:
|
||||
HAL_Initialize:
|
||||
HAL_Shutdown:
|
||||
HAL_SimPeriodicBefore:
|
||||
HAL_SimPeriodicAfter:
|
||||
HAL_GetLastError:
|
||||
HAL_GetCommsDisableCount:
|
||||
15
hal/src/main/python/semiwrap/HandlesInternal.yml
Normal file
15
hal/src/main/python/semiwrap/HandlesInternal.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_HandleEnum:
|
||||
functions:
|
||||
getHandleIndex:
|
||||
getHandleType:
|
||||
isHandleType:
|
||||
isHandleCorrectVersion:
|
||||
getHandleTypedIndex:
|
||||
createHandle:
|
||||
classes:
|
||||
hal::HandleBase:
|
||||
ignore: true
|
||||
16
hal/src/main/python/semiwrap/I2C.yml
Normal file
16
hal/src/main/python/semiwrap/I2C.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeI2C:
|
||||
HAL_TransactionI2C:
|
||||
buffers:
|
||||
- {type: IN, src: dataToSend, len: sendSize}
|
||||
- {type: OUT, src: dataReceived, len: receiveSize}
|
||||
HAL_WriteI2C:
|
||||
buffers:
|
||||
- {type: IN, src: dataToSend, len: sendSize}
|
||||
HAL_ReadI2C:
|
||||
buffers:
|
||||
- {type: OUT, src: buffer, len: count}
|
||||
HAL_CloseI2C:
|
||||
6
hal/src/main/python/semiwrap/I2CTypes.yml
Normal file
6
hal/src/main/python/semiwrap/I2CTypes.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_I2CPort:
|
||||
value_prefix: HAL_I2C
|
||||
9
hal/src/main/python/semiwrap/Main.yml
Normal file
9
hal/src/main/python/semiwrap/Main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_SetMain:
|
||||
ignore: true # TODO
|
||||
HAL_HasMain:
|
||||
HAL_RunMain:
|
||||
HAL_ExitMain:
|
||||
12
hal/src/main/python/semiwrap/Notifier.yml
Normal file
12
hal/src/main/python/semiwrap/Notifier.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializeNotifier:
|
||||
HAL_SetNotifierName:
|
||||
HAL_StopNotifier:
|
||||
HAL_CleanNotifier:
|
||||
HAL_UpdateNotifierAlarm:
|
||||
HAL_CancelNotifierAlarm:
|
||||
HAL_WaitForNotifierAlarm:
|
||||
HAL_SetNotifierThreadPriority:
|
||||
11
hal/src/main/python/semiwrap/PWM.yml
Normal file
11
hal/src/main/python/semiwrap/PWM.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_InitializePWMPort:
|
||||
HAL_FreePWMPort:
|
||||
HAL_CheckPWMChannel:
|
||||
HAL_SetPWMPulseTimeMicroseconds:
|
||||
HAL_GetPWMPulseTimeMicroseconds:
|
||||
HAL_SetPWMSimDevice:
|
||||
HAL_SetPWMOutputPeriod:
|
||||
22
hal/src/main/python/semiwrap/Ports.yml
Normal file
22
hal/src/main/python/semiwrap/Ports.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_GetNumAnalogInputs:
|
||||
HAL_GetNumCounters:
|
||||
HAL_GetNumDigitalChannels:
|
||||
HAL_GetNumPWMChannels:
|
||||
HAL_GetNumDigitalPWMOutputs:
|
||||
HAL_GetNumEncoders:
|
||||
HAL_GetNumInterrupts:
|
||||
HAL_GetNumDutyCycles:
|
||||
HAL_GetNumAddressableLEDs:
|
||||
HAL_GetNumCTREPCMModules:
|
||||
HAL_GetNumCTRESolenoidChannels:
|
||||
HAL_GetNumCTREPDPModules:
|
||||
HAL_GetNumCTREPDPChannels:
|
||||
HAL_GetNumREVPDHModules:
|
||||
HAL_GetNumREVPDHChannels:
|
||||
HAL_GetNumREVPHModules:
|
||||
HAL_GetNumREVPHChannels:
|
||||
HAL_GetNumCanBuses:
|
||||
14
hal/src/main/python/semiwrap/Power.yml
Normal file
14
hal/src/main/python/semiwrap/Power.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_GetVinVoltage:
|
||||
HAL_GetUserVoltage3V3:
|
||||
HAL_GetUserCurrent3V3:
|
||||
HAL_GetUserActive3V3:
|
||||
HAL_GetUserCurrentFaults3V3:
|
||||
HAL_SetUserRailEnabled3V3:
|
||||
HAL_GetBrownoutVoltage:
|
||||
HAL_SetBrownoutVoltage:
|
||||
HAL_GetCPUTemp:
|
||||
HAL_ResetUserCurrentFaults:
|
||||
105
hal/src/main/python/semiwrap/PowerDistribution.yml
Normal file
105
hal/src/main/python/semiwrap/PowerDistribution.yml
Normal file
@@ -0,0 +1,105 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_PowerDistributionType:
|
||||
functions:
|
||||
HAL_InitializePowerDistribution:
|
||||
HAL_GetPowerDistributionModuleNumber:
|
||||
HAL_CleanPowerDistribution:
|
||||
HAL_CheckPowerDistributionChannel:
|
||||
HAL_CheckPowerDistributionModule:
|
||||
HAL_GetPowerDistributionType:
|
||||
HAL_GetPowerDistributionNumChannels:
|
||||
HAL_GetPowerDistributionTemperature:
|
||||
HAL_GetPowerDistributionVoltage:
|
||||
HAL_GetPowerDistributionChannelCurrent:
|
||||
HAL_GetPowerDistributionAllChannelCurrents:
|
||||
HAL_GetPowerDistributionTotalCurrent:
|
||||
HAL_GetPowerDistributionTotalPower:
|
||||
HAL_GetPowerDistributionTotalEnergy:
|
||||
HAL_ResetPowerDistributionTotalEnergy:
|
||||
HAL_ClearPowerDistributionStickyFaults:
|
||||
HAL_SetPowerDistributionSwitchableChannel:
|
||||
HAL_GetPowerDistributionSwitchableChannel:
|
||||
HAL_GetPowerDistributionVersion:
|
||||
HAL_GetPowerDistributionFaults:
|
||||
HAL_GetPowerDistributionStickyFaults:
|
||||
HAL_StartPowerDistributionStream:
|
||||
ifdef: __FRC_SYSTEMCORE__
|
||||
HAL_GetPowerDistributionStreamData:
|
||||
ifdef: __FRC_SYSTEMCORE__
|
||||
HAL_FreePowerDistributionStreamData:
|
||||
ifdef: __FRC_SYSTEMCORE__
|
||||
HAL_StopPowerDistributionStream:
|
||||
ifdef: __FRC_SYSTEMCORE__
|
||||
classes:
|
||||
HAL_PowerDistributionVersion:
|
||||
attributes:
|
||||
firmwareMajor:
|
||||
firmwareMinor:
|
||||
firmwareFix:
|
||||
hardwareMinor:
|
||||
hardwareMajor:
|
||||
uniqueId:
|
||||
HAL_PowerDistributionFaults:
|
||||
attributes:
|
||||
channel0BreakerFault:
|
||||
channel1BreakerFault:
|
||||
channel2BreakerFault:
|
||||
channel3BreakerFault:
|
||||
channel4BreakerFault:
|
||||
channel5BreakerFault:
|
||||
channel6BreakerFault:
|
||||
channel7BreakerFault:
|
||||
channel8BreakerFault:
|
||||
channel9BreakerFault:
|
||||
channel10BreakerFault:
|
||||
channel11BreakerFault:
|
||||
channel12BreakerFault:
|
||||
channel13BreakerFault:
|
||||
channel14BreakerFault:
|
||||
channel15BreakerFault:
|
||||
channel16BreakerFault:
|
||||
channel17BreakerFault:
|
||||
channel18BreakerFault:
|
||||
channel19BreakerFault:
|
||||
channel20BreakerFault:
|
||||
channel21BreakerFault:
|
||||
channel22BreakerFault:
|
||||
channel23BreakerFault:
|
||||
brownout:
|
||||
canWarning:
|
||||
hardwareFault:
|
||||
HAL_PowerDistributionStickyFaults:
|
||||
attributes:
|
||||
channel0BreakerFault:
|
||||
channel1BreakerFault:
|
||||
channel2BreakerFault:
|
||||
channel3BreakerFault:
|
||||
channel4BreakerFault:
|
||||
channel5BreakerFault:
|
||||
channel6BreakerFault:
|
||||
channel7BreakerFault:
|
||||
channel8BreakerFault:
|
||||
channel9BreakerFault:
|
||||
channel10BreakerFault:
|
||||
channel11BreakerFault:
|
||||
channel12BreakerFault:
|
||||
channel13BreakerFault:
|
||||
channel14BreakerFault:
|
||||
channel15BreakerFault:
|
||||
channel16BreakerFault:
|
||||
channel17BreakerFault:
|
||||
channel18BreakerFault:
|
||||
channel19BreakerFault:
|
||||
channel20BreakerFault:
|
||||
channel21BreakerFault:
|
||||
channel22BreakerFault:
|
||||
channel23BreakerFault:
|
||||
brownout:
|
||||
canWarning:
|
||||
canBusOff:
|
||||
hasReset:
|
||||
hardwareFault:
|
||||
firmwareFault:
|
||||
82
hal/src/main/python/semiwrap/REVPH.yml
Normal file
82
hal/src/main/python/semiwrap/REVPH.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_REVPHCompressorConfigType:
|
||||
functions:
|
||||
HAL_InitializeREVPH:
|
||||
HAL_FreeREVPH:
|
||||
HAL_CheckREVPHSolenoidChannel:
|
||||
HAL_CheckREVPHModuleNumber:
|
||||
HAL_GetREVPHCompressor:
|
||||
HAL_SetREVPHCompressorConfig:
|
||||
HAL_SetREVPHClosedLoopControlDisabled:
|
||||
HAL_SetREVPHClosedLoopControlDigital:
|
||||
HAL_SetREVPHClosedLoopControlAnalog:
|
||||
HAL_SetREVPHClosedLoopControlHybrid:
|
||||
HAL_GetREVPHCompressorConfig:
|
||||
HAL_GetREVPHPressureSwitch:
|
||||
HAL_GetREVPHCompressorCurrent:
|
||||
HAL_GetREVPHAnalogVoltage:
|
||||
HAL_GetREVPHVoltage:
|
||||
HAL_GetREVPH5VVoltage:
|
||||
HAL_GetREVPHSolenoidCurrent:
|
||||
HAL_GetREVPHSolenoidVoltage:
|
||||
HAL_GetREVPHVersion:
|
||||
HAL_GetREVPHSolenoids:
|
||||
HAL_SetREVPHSolenoids:
|
||||
HAL_FireREVPHOneShot:
|
||||
HAL_GetREVPHFaults:
|
||||
HAL_GetREVPHStickyFaults:
|
||||
HAL_ClearREVPHStickyFaults:
|
||||
HAL_GetREVPHSolenoidDisabledList:
|
||||
classes:
|
||||
HAL_REVPHVersion:
|
||||
attributes:
|
||||
firmwareMajor:
|
||||
firmwareMinor:
|
||||
firmwareFix:
|
||||
hardwareMinor:
|
||||
hardwareMajor:
|
||||
uniqueId:
|
||||
HAL_REVPHCompressorConfig:
|
||||
attributes:
|
||||
minAnalogVoltage:
|
||||
maxAnalogVoltage:
|
||||
forceDisable:
|
||||
useDigital:
|
||||
HAL_REVPHFaults:
|
||||
attributes:
|
||||
channel0Fault:
|
||||
channel1Fault:
|
||||
channel2Fault:
|
||||
channel3Fault:
|
||||
channel4Fault:
|
||||
channel5Fault:
|
||||
channel6Fault:
|
||||
channel7Fault:
|
||||
channel8Fault:
|
||||
channel9Fault:
|
||||
channel10Fault:
|
||||
channel11Fault:
|
||||
channel12Fault:
|
||||
channel13Fault:
|
||||
channel14Fault:
|
||||
channel15Fault:
|
||||
compressorOverCurrent:
|
||||
compressorOpen:
|
||||
solenoidOverCurrent:
|
||||
brownout:
|
||||
canWarning:
|
||||
hardwareFault:
|
||||
HAL_REVPHStickyFaults:
|
||||
attributes:
|
||||
compressorOverCurrent:
|
||||
compressorOpen:
|
||||
solenoidOverCurrent:
|
||||
brownout:
|
||||
canWarning:
|
||||
canBusOff:
|
||||
hasReset:
|
||||
hardwareFault:
|
||||
firmwareFault:
|
||||
30
hal/src/main/python/semiwrap/SerialPort.yml
Normal file
30
hal/src/main/python/semiwrap/SerialPort.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_SerialPort:
|
||||
functions:
|
||||
HAL_InitializeSerialPort:
|
||||
HAL_InitializeSerialPortDirect:
|
||||
HAL_GetSerialFD:
|
||||
HAL_SetSerialBaudRate:
|
||||
HAL_SetSerialDataBits:
|
||||
HAL_SetSerialParity:
|
||||
HAL_SetSerialStopBits:
|
||||
HAL_SetSerialWriteMode:
|
||||
HAL_SetSerialFlowControl:
|
||||
HAL_SetSerialTimeout:
|
||||
HAL_EnableSerialTermination:
|
||||
HAL_DisableSerialTermination:
|
||||
HAL_SetSerialReadBufferSize:
|
||||
HAL_SetSerialWriteBufferSize:
|
||||
HAL_GetSerialBytesReceived:
|
||||
HAL_ReadSerial:
|
||||
buffers:
|
||||
- {type: OUT, src: buffer, len: count}
|
||||
HAL_WriteSerial:
|
||||
buffers:
|
||||
- {type: IN, src: buffer, len: count}
|
||||
HAL_FlushSerial:
|
||||
HAL_ClearSerial:
|
||||
HAL_CloseSerial:
|
||||
376
hal/src/main/python/semiwrap/SimDevice.yml
Normal file
376
hal/src/main/python/semiwrap/SimDevice.yml
Normal file
@@ -0,0 +1,376 @@
|
||||
defaults:
|
||||
ignore: true
|
||||
report_ignored_missing: false
|
||||
|
||||
extra_includes:
|
||||
- hal/simulation/SimDeviceData.h
|
||||
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
enums:
|
||||
HAL_SimValueDirection:
|
||||
classes:
|
||||
hal::SimValue:
|
||||
doc: |
|
||||
Readonly wrapper around a HAL simulator value.
|
||||
|
||||
It is not useful to construct these directly -- they are returned from
|
||||
:meth:`.SimDeviceSim.getValue` or :meth:`.SimDevice.createValue`.
|
||||
methods:
|
||||
SimValue:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
GetValue:
|
||||
ignore: true
|
||||
SetValue:
|
||||
ignore: true
|
||||
hal::SimInt:
|
||||
doc: |
|
||||
Wrapper around a HAL simulator int value handle.
|
||||
|
||||
It is not useful to construct these directly, they are returned
|
||||
from various functions.
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
SimInt:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
Get:
|
||||
Set:
|
||||
Reset:
|
||||
hal::SimLong:
|
||||
doc: |
|
||||
Wrapper around a HAL simulator long value handle.
|
||||
|
||||
It is not useful to construct these directly, they are returned
|
||||
from various functions.
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
SimLong:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
Get:
|
||||
Set:
|
||||
Reset:
|
||||
hal::SimDouble:
|
||||
doc: |
|
||||
Wrapper around a HAL simulator double value.
|
||||
|
||||
It is not useful to construct these directly -- they are returned from
|
||||
:meth:`.SimDeviceSim.getDouble` or :meth:`.SimDevice.createDouble`.
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
SimDouble:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
Get:
|
||||
Set:
|
||||
Reset:
|
||||
hal::SimEnum:
|
||||
doc: |
|
||||
Wrapper around a HAL simulator enum value.
|
||||
|
||||
It is not useful to construct these directly -- they are returned from
|
||||
:meth:`.SimDeviceSim.getEnum` or :meth:`.SimDevice.createEnum`.
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
SimEnum:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
Get:
|
||||
Set:
|
||||
hal::SimBoolean:
|
||||
doc: |
|
||||
Wrapper around a HAL simulator boolean value.
|
||||
|
||||
It is not useful to construct these directly -- they are returned from
|
||||
:meth:`.SimDeviceSim.getBoolean` or :meth:`.SimDevice.createBoolean`.
|
||||
force_no_trampoline: true
|
||||
methods:
|
||||
SimBoolean:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
HAL_SimValueHandle:
|
||||
param_override:
|
||||
val:
|
||||
name: handle
|
||||
Get:
|
||||
Set:
|
||||
hal::SimDevice:
|
||||
doc: |
|
||||
Wrapper around a HAL simulation 'device'
|
||||
|
||||
This creates a simulated 'device' object that can be interacted with
|
||||
from user SimDeviceSim objects or via the Simulation GUI.
|
||||
|
||||
.. note:: To interact with an existing device use
|
||||
:class:`hal.simulation.SimDeviceSim` instead.
|
||||
force_type_casters:
|
||||
- wpi::SmallVector
|
||||
enums:
|
||||
Direction:
|
||||
methods:
|
||||
SimDevice:
|
||||
overloads:
|
||||
'':
|
||||
ignore: true
|
||||
const char*:
|
||||
const char*, int:
|
||||
const char*, int, int:
|
||||
GetName:
|
||||
CreateValue:
|
||||
ignore: true
|
||||
CreateDouble:
|
||||
CreateEnum:
|
||||
overloads:
|
||||
const char*, int32_t, std::initializer_list<const char *>, int32_t:
|
||||
ignore: true
|
||||
const char*, int32_t, std::span<const char * const>, int32_t:
|
||||
cpp_code: |
|
||||
[](SimDevice &self, const char * name, int32_t direction, const wpi::SmallVector<std::string, 8> &options, int32_t initialValue) {
|
||||
wpi::SmallVector<const char *, 8> coptions;
|
||||
coptions.reserve(options.size());
|
||||
for (auto &s: options) {
|
||||
coptions.push_back(s.c_str());
|
||||
}
|
||||
return self.CreateEnum(name, direction, coptions, initialValue);
|
||||
}
|
||||
|
||||
CreateEnumDouble:
|
||||
overloads:
|
||||
const char*, int32_t, std::initializer_list<const char *>, std::initializer_list<double>, int32_t:
|
||||
ignore: true
|
||||
const char*, int32_t, std::span<const char * const>, std::span<const double>, int32_t:
|
||||
cpp_code: |
|
||||
[](SimDevice &self, const char * name, int32_t direction, const wpi::SmallVector<std::string, 8> &options, const wpi::SmallVector<double, 8> &optionValues, int32_t initialValue) {
|
||||
wpi::SmallVector<const char *, 8> coptions;
|
||||
coptions.reserve(options.size());
|
||||
for (auto &s: options) {
|
||||
coptions.push_back(s.c_str());
|
||||
}
|
||||
return self.CreateEnumDouble(name, direction, coptions, optionValues, initialValue);
|
||||
}
|
||||
|
||||
CreateBoolean:
|
||||
CreateInt:
|
||||
CreateLong:
|
||||
|
||||
inline_code: |2
|
||||
|
||||
cls_SimValue
|
||||
.def_property_readonly("value", [](const hal::SimValue &self) -> py::object {
|
||||
HAL_Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.GetValue();
|
||||
}
|
||||
switch (value.type) {
|
||||
case HAL_BOOLEAN:
|
||||
return py::bool_(value.data.v_boolean);
|
||||
case HAL_DOUBLE:
|
||||
return py::float_(value.data.v_double);
|
||||
case HAL_ENUM:
|
||||
return py::int_(value.data.v_enum);
|
||||
case HAL_INT:
|
||||
return py::int_(value.data.v_int);
|
||||
case HAL_LONG:
|
||||
return py::int_(value.data.v_long);
|
||||
default:
|
||||
return py::none();
|
||||
}
|
||||
})
|
||||
.def_property_readonly("type", [](const hal::SimValue &self) -> HAL_Type {
|
||||
py::gil_scoped_release release;
|
||||
return self.GetValue().type;
|
||||
})
|
||||
.def("__bool__", [](const hal::SimValue &self) -> bool {
|
||||
return (bool)self;
|
||||
})
|
||||
.def("__repr__", [](const hal::SimValue &self) -> py::str {
|
||||
if (!self) {
|
||||
return "<SimValue (invalid)>";
|
||||
}
|
||||
HAL_Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.GetValue();
|
||||
}
|
||||
switch (value.type) {
|
||||
case HAL_BOOLEAN:
|
||||
if (value.data.v_boolean) {
|
||||
return "<SimValue (bool) True>";
|
||||
} else {
|
||||
return "<SimValue (bool) False>";
|
||||
}
|
||||
case HAL_DOUBLE:
|
||||
return "<SimValue (double) " + std::to_string(value.data.v_double) + ">";
|
||||
case HAL_ENUM:
|
||||
return "<SimValue (enum) " + std::to_string(value.data.v_enum) + ">";
|
||||
case HAL_INT:
|
||||
return "<SimValue (int) " + std::to_string(value.data.v_int) + ">";
|
||||
case HAL_LONG:
|
||||
return "<SimValue (long) " + std::to_string(value.data.v_long) + ">";
|
||||
default:
|
||||
return "<SimValue (unknown)>";
|
||||
}
|
||||
});
|
||||
|
||||
cls_SimBoolean
|
||||
.def_property("value", &SimBoolean::Get, &SimBoolean::Set, release_gil())
|
||||
.def("__repr__", [](const SimBoolean &self) -> py::str {
|
||||
if (self) {
|
||||
bool value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.Get();
|
||||
}
|
||||
return std::string("<SimBoolean value=") + (value ? "True" : "False") + ">";
|
||||
} else {
|
||||
return "<SimBoolean (invalid)>";
|
||||
}
|
||||
});
|
||||
|
||||
cls_SimDevice
|
||||
.def("__bool__", [](const hal::SimDevice &self) -> bool {
|
||||
return (bool)self;
|
||||
})
|
||||
.def_property_readonly("name", [](const hal::SimDevice &self) -> py::str {
|
||||
#ifdef __FRC_SYSTEMCORE__
|
||||
return "<invalid>";
|
||||
#else
|
||||
if (!self) {
|
||||
return "<invalid>";
|
||||
} else {
|
||||
const char *name;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
name = HALSIM_GetSimDeviceName(self);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
#endif
|
||||
})
|
||||
.def("__repr__", [](const hal::SimDevice &self) -> py::str {
|
||||
#ifdef __FRC_SYSTEMCORE__
|
||||
return "<SimDevice (invalid)>";
|
||||
#else
|
||||
if (!self) {
|
||||
return "<SimDevice (invalid)>";
|
||||
}
|
||||
const char *name;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
name = HALSIM_GetSimDeviceName(self);
|
||||
}
|
||||
return py::str("SimDevice(name={!r})").format(py::str(name));
|
||||
#endif
|
||||
});
|
||||
|
||||
cls_SimDouble
|
||||
.def_property("value", &SimDouble::Get, &SimDouble::Set, release_gil())
|
||||
.def("__repr__", [](const SimDouble &self) -> py::str {
|
||||
if (self) {
|
||||
double value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.Get();
|
||||
}
|
||||
return "<SimDouble value=" + std::to_string(value) + ">";
|
||||
} else {
|
||||
return "<SimDouble (invalid)>";
|
||||
}
|
||||
});
|
||||
|
||||
cls_SimEnum
|
||||
.def_property("value", &SimEnum::Get, &SimEnum::Set)
|
||||
.def("__repr__", [](const SimEnum &self) -> py::str {
|
||||
#ifdef __FRC_SYSTEMCORE__
|
||||
return "<SimEnum (invalid)>";
|
||||
#else
|
||||
if (self) {
|
||||
int32_t value;
|
||||
int32_t numOptions;
|
||||
int32_t numdOptions;
|
||||
const char ** options;
|
||||
const double * doptions;
|
||||
const char * option = "<unknown>";
|
||||
std::string doption;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.Get();
|
||||
options = HALSIM_GetSimValueEnumOptions(self, &numOptions);
|
||||
doptions = HALSIM_GetSimValueEnumDoubleValues(self, &numdOptions);
|
||||
}
|
||||
|
||||
if (options && value >= 0 && value < numOptions) {
|
||||
option = options[value];
|
||||
}
|
||||
|
||||
if (doptions && value >= 0 && value < numdOptions) {
|
||||
doption = " dvalue=" + std::to_string(doptions[value]);
|
||||
}
|
||||
|
||||
return "<SimEnum name=" + std::string(option) +
|
||||
" value=" + std::to_string(value) + doption + ">";
|
||||
} else {
|
||||
return "<SimEnum (invalid)>";
|
||||
}
|
||||
#endif
|
||||
});
|
||||
|
||||
cls_SimInt
|
||||
.def_property("value", &SimInt::Get, &SimInt::Set)
|
||||
.def("__repr__", [](const SimInt &self) -> py::str {
|
||||
if (self) {
|
||||
int32_t value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.Get();
|
||||
}
|
||||
return "<SimInt value=" + std::to_string(value) + ">";
|
||||
} else {
|
||||
return "<SimInt (invalid)>";
|
||||
}
|
||||
});
|
||||
|
||||
cls_SimLong
|
||||
.def_property("value", &SimLong::Get, &SimLong::Set)
|
||||
.def("__repr__", [](const SimLong &self) -> py::str {
|
||||
if (self) {
|
||||
int64_t value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
value = self.Get();
|
||||
}
|
||||
return "<SimLong value=" + std::to_string(value) + ">";
|
||||
} else {
|
||||
return "<SimLong (invalid)>";
|
||||
}
|
||||
});
|
||||
12
hal/src/main/python/semiwrap/Threads.yml
Normal file
12
hal/src/main/python/semiwrap/Threads.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_GetThreadPriority:
|
||||
# no way to get native handle
|
||||
ignore: true
|
||||
HAL_GetCurrentThreadPriority:
|
||||
HAL_SetThreadPriority:
|
||||
# no way to get native handle
|
||||
ignore: true
|
||||
HAL_SetCurrentThreadPriority:
|
||||
10
hal/src/main/python/semiwrap/UsageReporting.yml
Normal file
10
hal/src/main/python/semiwrap/UsageReporting.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
strip_prefixes:
|
||||
- HAL_
|
||||
|
||||
functions:
|
||||
HAL_ReportUsage:
|
||||
overloads:
|
||||
const struct WPI_String*, const struct WPI_String*:
|
||||
ignore: true
|
||||
std::string_view, std::string_view:
|
||||
std::string_view, int, std::string_view:
|
||||
@@ -0,0 +1,31 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetAddressableLEDData:
|
||||
HALSIM_RegisterAddressableLEDInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAddressableLEDInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_GetAddressableLEDInitialized:
|
||||
HALSIM_SetAddressableLEDInitialized:
|
||||
HALSIM_RegisterAddressableLEDStartCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAddressableLEDStartCallback:
|
||||
ignore: true
|
||||
HALSIM_GetAddressableLEDStart:
|
||||
HALSIM_SetAddressableLEDStart:
|
||||
HALSIM_RegisterAddressableLEDLengthCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAddressableLEDLengthCallback:
|
||||
ignore: true
|
||||
HALSIM_GetAddressableLEDLength:
|
||||
HALSIM_SetAddressableLEDLength:
|
||||
HALSIM_RegisterAddressableLEDDataCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAddressableLEDDataCallback:
|
||||
ignore: true
|
||||
HALSIM_GetAddressableLEDData:
|
||||
HALSIM_SetAddressableLEDData:
|
||||
HALSIM_RegisterAddressableLEDAllCallbacks:
|
||||
ignore: true
|
||||
28
hal/src/main/python/semiwrap/simulation/AnalogInData.yml
Normal file
28
hal/src/main/python/semiwrap/simulation/AnalogInData.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetAnalogInData:
|
||||
HALSIM_RegisterAnalogInInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAnalogInInitializedCallback:
|
||||
HALSIM_GetAnalogInInitialized:
|
||||
HALSIM_SetAnalogInInitialized:
|
||||
HALSIM_GetAnalogInSimDevice:
|
||||
HALSIM_RegisterAnalogInAverageBitsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAnalogInAverageBitsCallback:
|
||||
HALSIM_GetAnalogInAverageBits:
|
||||
HALSIM_SetAnalogInAverageBits:
|
||||
HALSIM_RegisterAnalogInOversampleBitsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAnalogInOversampleBitsCallback:
|
||||
HALSIM_GetAnalogInOversampleBits:
|
||||
HALSIM_SetAnalogInOversampleBits:
|
||||
HALSIM_RegisterAnalogInVoltageCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelAnalogInVoltageCallback:
|
||||
HALSIM_GetAnalogInVoltage:
|
||||
HALSIM_SetAnalogInVoltage:
|
||||
HALSIM_RegisterAnalogInAllCallbacks:
|
||||
ignore: true
|
||||
47
hal/src/main/python/semiwrap/simulation/CTREPCMData.yml
Normal file
47
hal/src/main/python/semiwrap/simulation/CTREPCMData.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetCTREPCMData:
|
||||
HALSIM_RegisterCTREPCMInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMInitialized:
|
||||
HALSIM_SetCTREPCMInitialized:
|
||||
HALSIM_RegisterCTREPCMSolenoidOutputCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMSolenoidOutputCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMSolenoidOutput:
|
||||
HALSIM_SetCTREPCMSolenoidOutput:
|
||||
HALSIM_RegisterCTREPCMCompressorOnCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMCompressorOnCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMCompressorOn:
|
||||
HALSIM_SetCTREPCMCompressorOn:
|
||||
HALSIM_RegisterCTREPCMClosedLoopEnabledCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMClosedLoopEnabledCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMClosedLoopEnabled:
|
||||
HALSIM_SetCTREPCMClosedLoopEnabled:
|
||||
HALSIM_RegisterCTREPCMPressureSwitchCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMPressureSwitchCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMPressureSwitch:
|
||||
HALSIM_SetCTREPCMPressureSwitch:
|
||||
HALSIM_RegisterCTREPCMCompressorCurrentCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelCTREPCMCompressorCurrentCallback:
|
||||
ignore: true
|
||||
HALSIM_GetCTREPCMCompressorCurrent:
|
||||
HALSIM_SetCTREPCMCompressorCurrent:
|
||||
HALSIM_GetCTREPCMAllSolenoids:
|
||||
HALSIM_SetCTREPCMAllSolenoids:
|
||||
HALSIM_RegisterCTREPCMAllNonSolenoidCallbacks:
|
||||
ignore: true
|
||||
HALSIM_RegisterCTREPCMAllSolenoidCallbacks:
|
||||
ignore: true
|
||||
33
hal/src/main/python/semiwrap/simulation/DIOData.yml
Normal file
33
hal/src/main/python/semiwrap/simulation/DIOData.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetDIOData:
|
||||
HALSIM_RegisterDIOInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDIOInitializedCallback:
|
||||
HALSIM_GetDIOInitialized:
|
||||
HALSIM_SetDIOInitialized:
|
||||
HALSIM_GetDIOSimDevice:
|
||||
HALSIM_RegisterDIOValueCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDIOValueCallback:
|
||||
HALSIM_GetDIOValue:
|
||||
HALSIM_SetDIOValue:
|
||||
HALSIM_RegisterDIOPulseLengthCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDIOPulseLengthCallback:
|
||||
HALSIM_GetDIOPulseLength:
|
||||
HALSIM_SetDIOPulseLength:
|
||||
HALSIM_RegisterDIOIsInputCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDIOIsInputCallback:
|
||||
HALSIM_GetDIOIsInput:
|
||||
HALSIM_SetDIOIsInput:
|
||||
HALSIM_RegisterDIOFilterIndexCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDIOFilterIndexCallback:
|
||||
HALSIM_GetDIOFilterIndex:
|
||||
HALSIM_SetDIOFilterIndex:
|
||||
HALSIM_RegisterDIOAllCallbacks:
|
||||
ignore: true
|
||||
23
hal/src/main/python/semiwrap/simulation/DigitalPWMData.yml
Normal file
23
hal/src/main/python/semiwrap/simulation/DigitalPWMData.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_FindDigitalPWMForChannel:
|
||||
HALSIM_ResetDigitalPWMData:
|
||||
HALSIM_RegisterDigitalPWMInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDigitalPWMInitializedCallback:
|
||||
HALSIM_GetDigitalPWMInitialized:
|
||||
HALSIM_SetDigitalPWMInitialized:
|
||||
HALSIM_RegisterDigitalPWMDutyCycleCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDigitalPWMDutyCycleCallback:
|
||||
HALSIM_GetDigitalPWMDutyCycle:
|
||||
HALSIM_SetDigitalPWMDutyCycle:
|
||||
HALSIM_RegisterDigitalPWMPinCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDigitalPWMPinCallback:
|
||||
HALSIM_GetDigitalPWMPin:
|
||||
HALSIM_SetDigitalPWMPin:
|
||||
HALSIM_RegisterDigitalPWMAllCallbacks:
|
||||
ignore: true
|
||||
113
hal/src/main/python/semiwrap/simulation/DriverStationData.yml
Normal file
113
hal/src/main/python/semiwrap/simulation/DriverStationData.yml
Normal file
@@ -0,0 +1,113 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetDriverStationData:
|
||||
HALSIM_RegisterDriverStationEnabledCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationEnabledCallback:
|
||||
HALSIM_GetDriverStationEnabled:
|
||||
HALSIM_SetDriverStationEnabled:
|
||||
HALSIM_RegisterDriverStationAutonomousCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationAutonomousCallback:
|
||||
HALSIM_GetDriverStationAutonomous:
|
||||
HALSIM_SetDriverStationAutonomous:
|
||||
HALSIM_RegisterDriverStationTestCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationTestCallback:
|
||||
HALSIM_GetDriverStationTest:
|
||||
HALSIM_SetDriverStationTest:
|
||||
HALSIM_RegisterDriverStationEStopCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationEStopCallback:
|
||||
HALSIM_GetDriverStationEStop:
|
||||
HALSIM_SetDriverStationEStop:
|
||||
HALSIM_RegisterDriverStationFmsAttachedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationFmsAttachedCallback:
|
||||
HALSIM_GetDriverStationFmsAttached:
|
||||
HALSIM_SetDriverStationFmsAttached:
|
||||
HALSIM_RegisterDriverStationDsAttachedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationDsAttachedCallback:
|
||||
HALSIM_GetDriverStationDsAttached:
|
||||
HALSIM_SetDriverStationDsAttached:
|
||||
HALSIM_RegisterDriverStationAllianceStationIdCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationAllianceStationIdCallback:
|
||||
HALSIM_GetDriverStationAllianceStationId:
|
||||
HALSIM_SetDriverStationAllianceStationId:
|
||||
HALSIM_RegisterDriverStationMatchTimeCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationMatchTimeCallback:
|
||||
HALSIM_GetDriverStationMatchTime:
|
||||
HALSIM_SetDriverStationMatchTime:
|
||||
HALSIM_RegisterJoystickAxesCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelJoystickAxesCallback:
|
||||
HALSIM_GetJoystickAxes:
|
||||
HALSIM_SetJoystickAxes:
|
||||
HALSIM_RegisterJoystickPOVsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelJoystickPOVsCallback:
|
||||
HALSIM_GetJoystickPOVs:
|
||||
HALSIM_SetJoystickPOVs:
|
||||
HALSIM_RegisterJoystickButtonsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelJoystickButtonsCallback:
|
||||
HALSIM_GetJoystickButtons:
|
||||
HALSIM_SetJoystickButtons:
|
||||
HALSIM_RegisterJoystickDescriptorCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelJoystickDescriptorCallback:
|
||||
HALSIM_GetJoystickDescriptor:
|
||||
HALSIM_SetJoystickDescriptor:
|
||||
HALSIM_RegisterJoystickOutputsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelJoystickOutputsCallback:
|
||||
HALSIM_GetJoystickOutputs:
|
||||
HALSIM_SetJoystickOutputs:
|
||||
HALSIM_RegisterMatchInfoCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelMatchInfoCallback:
|
||||
HALSIM_GetMatchInfo:
|
||||
HALSIM_SetMatchInfo:
|
||||
HALSIM_SetJoystickButton:
|
||||
HALSIM_SetJoystickAxis:
|
||||
HALSIM_SetJoystickPOV:
|
||||
HALSIM_SetJoystickButtonsValue:
|
||||
HALSIM_SetJoystickAxisCount:
|
||||
HALSIM_SetJoystickPOVCount:
|
||||
HALSIM_SetJoystickButtonCount:
|
||||
HALSIM_GetJoystickCounts:
|
||||
HALSIM_SetJoystickType:
|
||||
HALSIM_SetJoystickName:
|
||||
cpp_code: |
|
||||
[](int32_t stick, std::string_view sv) {
|
||||
auto s = wpi::make_string(sv);
|
||||
HALSIM_SetJoystickName(stick, &s);
|
||||
}
|
||||
HALSIM_SetJoystickAxisType:
|
||||
HALSIM_SetGameSpecificMessage:
|
||||
cpp_code: |
|
||||
[](std::string_view sv) {
|
||||
auto s = wpi::make_string(sv);
|
||||
HALSIM_SetGameSpecificMessage(&s);
|
||||
}
|
||||
HALSIM_SetEventName:
|
||||
cpp_code: |
|
||||
[](std::string_view sv) {
|
||||
auto s = wpi::make_string(sv);
|
||||
HALSIM_SetEventName(&s);
|
||||
}
|
||||
HALSIM_SetMatchType:
|
||||
HALSIM_SetMatchNumber:
|
||||
HALSIM_SetReplayNumber:
|
||||
HALSIM_RegisterDriverStationAllCallbacks:
|
||||
ignore: true
|
||||
HALSIM_RegisterDriverStationNewDataCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDriverStationNewDataCallback:
|
||||
HALSIM_NotifyDriverStationNewData:
|
||||
HALSIM_SetJoystickIsGamepad:
|
||||
23
hal/src/main/python/semiwrap/simulation/DutyCycleData.yml
Normal file
23
hal/src/main/python/semiwrap/simulation/DutyCycleData.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetDutyCycleData:
|
||||
HALSIM_RegisterDutyCycleInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDutyCycleInitializedCallback:
|
||||
HALSIM_GetDutyCycleInitialized:
|
||||
HALSIM_SetDutyCycleInitialized:
|
||||
HALSIM_GetDutyCycleSimDevice:
|
||||
HALSIM_RegisterDutyCycleOutputCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDutyCycleOutputCallback:
|
||||
HALSIM_GetDutyCycleOutput:
|
||||
HALSIM_SetDutyCycleOutput:
|
||||
HALSIM_RegisterDutyCycleFrequencyCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelDutyCycleFrequencyCallback:
|
||||
HALSIM_GetDutyCycleFrequency:
|
||||
HALSIM_SetDutyCycleFrequency:
|
||||
HALSIM_RegisterDutyCycleAllCallbacks:
|
||||
ignore: true
|
||||
60
hal/src/main/python/semiwrap/simulation/EncoderData.yml
Normal file
60
hal/src/main/python/semiwrap/simulation/EncoderData.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_FindEncoderForChannel:
|
||||
HALSIM_ResetEncoderData:
|
||||
HALSIM_GetEncoderDigitalChannelA:
|
||||
HALSIM_GetEncoderDigitalChannelB:
|
||||
HALSIM_RegisterEncoderInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderInitializedCallback:
|
||||
HALSIM_GetEncoderInitialized:
|
||||
HALSIM_SetEncoderInitialized:
|
||||
HALSIM_GetEncoderSimDevice:
|
||||
HALSIM_RegisterEncoderCountCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderCountCallback:
|
||||
HALSIM_GetEncoderCount:
|
||||
HALSIM_SetEncoderCount:
|
||||
HALSIM_RegisterEncoderPeriodCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderPeriodCallback:
|
||||
HALSIM_GetEncoderPeriod:
|
||||
HALSIM_SetEncoderPeriod:
|
||||
HALSIM_RegisterEncoderResetCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderResetCallback:
|
||||
HALSIM_GetEncoderReset:
|
||||
HALSIM_SetEncoderReset:
|
||||
HALSIM_RegisterEncoderMaxPeriodCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderMaxPeriodCallback:
|
||||
HALSIM_GetEncoderMaxPeriod:
|
||||
HALSIM_SetEncoderMaxPeriod:
|
||||
HALSIM_RegisterEncoderDirectionCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderDirectionCallback:
|
||||
HALSIM_GetEncoderDirection:
|
||||
HALSIM_SetEncoderDirection:
|
||||
HALSIM_RegisterEncoderReverseDirectionCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderReverseDirectionCallback:
|
||||
HALSIM_GetEncoderReverseDirection:
|
||||
HALSIM_SetEncoderReverseDirection:
|
||||
HALSIM_RegisterEncoderSamplesToAverageCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderSamplesToAverageCallback:
|
||||
HALSIM_GetEncoderSamplesToAverage:
|
||||
HALSIM_SetEncoderSamplesToAverage:
|
||||
HALSIM_RegisterEncoderDistancePerPulseCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelEncoderDistancePerPulseCallback:
|
||||
HALSIM_GetEncoderDistancePerPulse:
|
||||
HALSIM_SetEncoderDistancePerPulse:
|
||||
HALSIM_RegisterEncoderAllCallbacks:
|
||||
ignore: true
|
||||
HALSIM_SetEncoderDistance:
|
||||
HALSIM_GetEncoderDistance:
|
||||
HALSIM_SetEncoderRate:
|
||||
HALSIM_GetEncoderRate:
|
||||
59
hal/src/main/python/semiwrap/simulation/MockHooks.yml
Normal file
59
hal/src/main/python/semiwrap/simulation/MockHooks.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
extra_includes:
|
||||
- sim_cb.h
|
||||
- pybind11/functional.h
|
||||
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_SetRuntimeType:
|
||||
HALSIM_WaitForProgramStart:
|
||||
HALSIM_SetProgramStarted:
|
||||
HALSIM_GetProgramStarted:
|
||||
HALSIM_RestartTiming:
|
||||
HALSIM_PauseTiming:
|
||||
HALSIM_ResumeTiming:
|
||||
HALSIM_IsTimingPaused:
|
||||
HALSIM_StepTiming:
|
||||
HALSIM_StepTimingAsync:
|
||||
|
||||
# following functions are ignored for raw function pointers
|
||||
|
||||
HALSIM_SetSendError:
|
||||
ignore: true
|
||||
HALSIM_SetSendConsoleLine:
|
||||
ignore: true
|
||||
|
||||
HALSIM_RegisterSimPeriodicBeforeCallback:
|
||||
param_override:
|
||||
param:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](std::function<void(void)> fn) -> std::unique_ptr<SimCB> {
|
||||
auto cb = std::make_unique<SimCB>(fn, HALSIM_CancelSimPeriodicBeforeCallback);
|
||||
auto uid = HALSIM_RegisterSimPeriodicBeforeCallback([](void *param) {
|
||||
((SimCB*)param)->m_fn();
|
||||
}, cb.get());
|
||||
cb->SetUID(uid);
|
||||
return std::move(cb);
|
||||
}
|
||||
HALSIM_CancelSimPeriodicBeforeCallback:
|
||||
ignore: true
|
||||
|
||||
HALSIM_RegisterSimPeriodicAfterCallback:
|
||||
param_override:
|
||||
param:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](std::function<void(void)> fn) -> std::unique_ptr<SimCB> {
|
||||
auto cb = std::make_unique<SimCB>(fn, HALSIM_CancelSimPeriodicAfterCallback);
|
||||
auto uid = HALSIM_RegisterSimPeriodicAfterCallback([](void *param) {
|
||||
((SimCB*)param)->m_fn();
|
||||
}, cb.get());
|
||||
cb->SetUID(uid);
|
||||
return std::move(cb);
|
||||
}
|
||||
HALSIM_CancelSimPeriodicAfterCallback:
|
||||
ignore: true
|
||||
|
||||
HALSIM_CancelAllSimPeriodicCallbacks:
|
||||
14
hal/src/main/python/semiwrap/simulation/NotifierData.yml
Normal file
14
hal/src/main/python/semiwrap/simulation/NotifierData.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_GetNextNotifierTimeout:
|
||||
HALSIM_GetNumNotifiers:
|
||||
HALSIM_GetNotifierInfo:
|
||||
classes:
|
||||
HALSIM_NotifierInfo:
|
||||
attributes:
|
||||
handle:
|
||||
name:
|
||||
timeout:
|
||||
waitTimeValid:
|
||||
25
hal/src/main/python/semiwrap/simulation/PWMData.yml
Normal file
25
hal/src/main/python/semiwrap/simulation/PWMData.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetPWMData:
|
||||
HALSIM_RegisterPWMInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPWMInitializedCallback:
|
||||
HALSIM_GetPWMInitialized:
|
||||
HALSIM_SetPWMInitialized:
|
||||
HALSIM_RegisterPWMPulseMicrosecondCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPWMPulseMicrosecondCallback:
|
||||
ignore: true
|
||||
HALSIM_GetPWMPulseMicrosecond:
|
||||
HALSIM_SetPWMPulseMicrosecond:
|
||||
HALSIM_RegisterPWMAllCallbacks:
|
||||
ignore: true
|
||||
HALSIM_GetPWMSimDevice:
|
||||
HALSIM_RegisterPWMOutputPeriodCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPWMOutputPeriodCallback:
|
||||
ignore: true
|
||||
HALSIM_GetPWMOutputPeriod:
|
||||
HALSIM_SetPWMOutputPeriod:
|
||||
@@ -0,0 +1,29 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetPowerDistributionData:
|
||||
HALSIM_RegisterPowerDistributionInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPowerDistributionInitializedCallback:
|
||||
HALSIM_GetPowerDistributionInitialized:
|
||||
HALSIM_SetPowerDistributionInitialized:
|
||||
HALSIM_RegisterPowerDistributionTemperatureCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPowerDistributionTemperatureCallback:
|
||||
HALSIM_GetPowerDistributionTemperature:
|
||||
HALSIM_SetPowerDistributionTemperature:
|
||||
HALSIM_RegisterPowerDistributionVoltageCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPowerDistributionVoltageCallback:
|
||||
HALSIM_GetPowerDistributionVoltage:
|
||||
HALSIM_SetPowerDistributionVoltage:
|
||||
HALSIM_RegisterPowerDistributionCurrentCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelPowerDistributionCurrentCallback:
|
||||
HALSIM_GetPowerDistributionCurrent:
|
||||
HALSIM_SetPowerDistributionCurrent:
|
||||
HALSIM_GetPowerDistributionAllCurrents:
|
||||
HALSIM_SetPowerDistributionAllCurrents:
|
||||
HALSIM_RegisterPowerDistributionAllNonCurrentCallbacks:
|
||||
ignore: true
|
||||
41
hal/src/main/python/semiwrap/simulation/REVPHData.yml
Normal file
41
hal/src/main/python/semiwrap/simulation/REVPHData.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetREVPHData:
|
||||
HALSIM_RegisterREVPHInitializedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHInitializedCallback:
|
||||
HALSIM_GetREVPHInitialized:
|
||||
HALSIM_SetREVPHInitialized:
|
||||
HALSIM_RegisterREVPHSolenoidOutputCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHSolenoidOutputCallback:
|
||||
HALSIM_GetREVPHSolenoidOutput:
|
||||
HALSIM_SetREVPHSolenoidOutput:
|
||||
HALSIM_RegisterREVPHCompressorOnCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHCompressorOnCallback:
|
||||
HALSIM_GetREVPHCompressorOn:
|
||||
HALSIM_SetREVPHCompressorOn:
|
||||
HALSIM_RegisterREVPHCompressorConfigTypeCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHCompressorConfigTypeCallback:
|
||||
HALSIM_GetREVPHCompressorConfigType:
|
||||
HALSIM_SetREVPHCompressorConfigType:
|
||||
HALSIM_RegisterREVPHPressureSwitchCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHPressureSwitchCallback:
|
||||
HALSIM_GetREVPHPressureSwitch:
|
||||
HALSIM_SetREVPHPressureSwitch:
|
||||
HALSIM_RegisterREVPHCompressorCurrentCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelREVPHCompressorCurrentCallback:
|
||||
HALSIM_GetREVPHCompressorCurrent:
|
||||
HALSIM_SetREVPHCompressorCurrent:
|
||||
HALSIM_GetREVPHAllSolenoids:
|
||||
HALSIM_SetREVPHAllSolenoids:
|
||||
HALSIM_RegisterREVPHAllNonSolenoidCallbacks:
|
||||
ignore: true
|
||||
HALSIM_RegisterREVPHAllSolenoidCallbacks:
|
||||
ignore: true
|
||||
5
hal/src/main/python/semiwrap/simulation/Reset.yml
Normal file
5
hal/src/main/python/semiwrap/simulation/Reset.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetAllSimData:
|
||||
97
hal/src/main/python/semiwrap/simulation/RoboRioData.yml
Normal file
97
hal/src/main/python/semiwrap/simulation/RoboRioData.yml
Normal file
@@ -0,0 +1,97 @@
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_ResetRoboRioData:
|
||||
HALSIM_RegisterRoboRioFPGAButtonCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioFPGAButtonCallback:
|
||||
ignore: true
|
||||
HALSIM_GetRoboRioFPGAButton:
|
||||
ignore: true
|
||||
HALSIM_SetRoboRioFPGAButton:
|
||||
ignore: true
|
||||
HALSIM_RegisterRoboRioVInVoltageCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioVInVoltageCallback:
|
||||
HALSIM_GetRoboRioVInVoltage:
|
||||
HALSIM_SetRoboRioVInVoltage:
|
||||
HALSIM_RegisterRoboRioUserVoltage3V3Callback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioUserVoltage3V3Callback:
|
||||
HALSIM_GetRoboRioUserVoltage3V3:
|
||||
HALSIM_SetRoboRioUserVoltage3V3:
|
||||
HALSIM_RegisterRoboRioUserCurrent3V3Callback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioUserCurrent3V3Callback:
|
||||
HALSIM_GetRoboRioUserCurrent3V3:
|
||||
HALSIM_SetRoboRioUserCurrent3V3:
|
||||
HALSIM_RegisterRoboRioUserActive3V3Callback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioUserActive3V3Callback:
|
||||
HALSIM_GetRoboRioUserActive3V3:
|
||||
HALSIM_SetRoboRioUserActive3V3:
|
||||
HALSIM_RegisterRoboRioUserFaults3V3Callback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioUserFaults3V3Callback:
|
||||
HALSIM_GetRoboRioUserFaults3V3:
|
||||
HALSIM_SetRoboRioUserFaults3V3:
|
||||
HALSIM_RegisterRoboRioBrownoutVoltageCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioBrownoutVoltageCallback:
|
||||
HALSIM_GetRoboRioBrownoutVoltage:
|
||||
HALSIM_SetRoboRioBrownoutVoltage:
|
||||
HALSIM_RegisterRoboRioTeamNumberCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioTeamNumberCallback:
|
||||
HALSIM_GetRoboRioTeamNumber:
|
||||
HALSIM_SetRoboRioTeamNumber:
|
||||
HALSIM_RegisterRoboRioSerialNumberCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioSerialNumberCallback:
|
||||
HALSIM_GetRoboRioSerialNumber:
|
||||
param_override:
|
||||
serialNumber:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[]() {
|
||||
WPI_String s;
|
||||
HALSIM_GetRoboRioSerialNumber(&s);
|
||||
std::string ss(wpi::to_string_view(&s));
|
||||
WPI_FreeString(&s);
|
||||
return ss;
|
||||
}
|
||||
HALSIM_SetRoboRioSerialNumber:
|
||||
cpp_code: |
|
||||
[](std::string_view sv) {
|
||||
auto s = wpi::make_string(sv);
|
||||
HALSIM_SetRoboRioSerialNumber(&s);
|
||||
}
|
||||
HALSIM_RegisterRoboRioCommentsCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioCommentsCallback:
|
||||
HALSIM_GetRoboRioComments:
|
||||
param_override:
|
||||
comments:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[]() {
|
||||
WPI_String s;
|
||||
HALSIM_GetRoboRioComments(&s);
|
||||
std::string ss(wpi::to_string_view(&s));
|
||||
WPI_FreeString(&s);
|
||||
return ss;
|
||||
}
|
||||
HALSIM_SetRoboRioComments:
|
||||
cpp_code: |
|
||||
[](std::string_view sv) {
|
||||
auto s = wpi::make_string(sv);
|
||||
HALSIM_SetRoboRioComments(&s);
|
||||
}
|
||||
HALSIM_RegisterRoboRioAllCallbacks:
|
||||
ignore: true
|
||||
HALSIM_RegisterRoboRioCPUTempCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelRoboRioCPUTempCallback:
|
||||
HALSIM_GetRoboRioCPUTemp:
|
||||
HALSIM_SetRoboRioCPUTemp:
|
||||
92
hal/src/main/python/semiwrap/simulation/SimDeviceData.yml
Normal file
92
hal/src/main/python/semiwrap/simulation/SimDeviceData.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
extra_includes:
|
||||
- sim_value_cb.h
|
||||
- pybind11/functional.h
|
||||
|
||||
strip_prefixes:
|
||||
- HALSIM_
|
||||
|
||||
functions:
|
||||
HALSIM_SetSimDeviceEnabled:
|
||||
HALSIM_IsSimDeviceEnabled:
|
||||
HALSIM_RegisterSimDeviceCreatedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelSimDeviceCreatedCallback:
|
||||
ignore: true
|
||||
HALSIM_RegisterSimDeviceFreedCallback:
|
||||
ignore: true
|
||||
HALSIM_CancelSimDeviceFreedCallback:
|
||||
ignore: true
|
||||
HALSIM_GetSimDeviceHandle:
|
||||
HALSIM_GetSimDeviceName:
|
||||
HALSIM_GetSimValueDeviceHandle:
|
||||
HALSIM_EnumerateSimDevices:
|
||||
ignore: true
|
||||
HALSIM_RegisterSimValueCreatedCallback:
|
||||
param_override:
|
||||
param:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](hal::SimDevice &simdevice, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
|
||||
auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimDeviceCreatedCallback);
|
||||
auto uid = HALSIM_RegisterSimValueCreatedCallback(simdevice, cb.get(),
|
||||
[](const char* name, void* param,
|
||||
HAL_SimValueHandle handle,
|
||||
int32_t direction,
|
||||
const struct HAL_Value* value) {
|
||||
((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
|
||||
}, initialNotify);
|
||||
cb->SetUID(uid);
|
||||
return std::move(cb);
|
||||
}
|
||||
HALSIM_CancelSimValueCreatedCallback:
|
||||
ignore: true
|
||||
HALSIM_RegisterSimValueChangedCallback:
|
||||
param_override:
|
||||
handle:
|
||||
name: value
|
||||
param:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](hal::SimValue &simvalue, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
|
||||
auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimValueChangedCallback);
|
||||
auto uid = HALSIM_RegisterSimValueChangedCallback(simvalue, cb.get(),
|
||||
[](const char* name, void* param,
|
||||
HAL_SimValueHandle handle,
|
||||
int32_t direction,
|
||||
const struct HAL_Value* value) {
|
||||
((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
|
||||
}, initialNotify);
|
||||
cb->SetUID(uid);
|
||||
return std::move(cb);
|
||||
}
|
||||
HALSIM_CancelSimValueChangedCallback:
|
||||
ignore: true
|
||||
HALSIM_RegisterSimValueResetCallback:
|
||||
param_override:
|
||||
handle:
|
||||
name: value
|
||||
param:
|
||||
ignore: true
|
||||
cpp_code: |
|
||||
[](hal::SimValue &simvalue, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
|
||||
auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimValueResetCallback);
|
||||
auto uid = HALSIM_RegisterSimValueChangedCallback(simvalue, cb.get(),
|
||||
[](const char* name, void* param,
|
||||
HAL_SimValueHandle handle,
|
||||
int32_t direction,
|
||||
const struct HAL_Value* value) {
|
||||
((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
|
||||
}, initialNotify);
|
||||
cb->SetUID(uid);
|
||||
return std::move(cb);
|
||||
}
|
||||
HALSIM_CancelSimValueResetCallback:
|
||||
ignore: true
|
||||
HALSIM_GetSimValueHandle:
|
||||
HALSIM_EnumerateSimValues:
|
||||
ignore: true
|
||||
HALSIM_GetSimValueEnumOptions:
|
||||
ignore: true
|
||||
HALSIM_GetSimValueEnumDoubleValues:
|
||||
ignore: true
|
||||
HALSIM_ResetSimDeviceData:
|
||||
Reference in New Issue
Block a user