[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:
PJ Reiniger
2025-10-24 01:28:04 -04:00
committed by GitHub
parent 8992dcdc99
commit 44b9cc1398
545 changed files with 27293 additions and 38 deletions

View File

@@ -0,0 +1,115 @@
classes:
nt::BooleanArraySubscriber:
methods:
BooleanArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](BooleanArraySubscriber *self) {
py::gil_scoped_release release;
*self = BooleanArraySubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](BooleanArraySubscriber *self) {
return self;
})
.def("__exit__", [](BooleanArraySubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanArraySubscriber();
})
nt::BooleanArrayPublisher:
methods:
BooleanArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](BooleanArrayPublisher *self) {
py::gil_scoped_release release;
*self = BooleanArrayPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](BooleanArrayPublisher *self) {
return self;
})
.def("__exit__", [](BooleanArrayPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanArrayPublisher();
})
nt::BooleanArrayEntry:
methods:
BooleanArrayEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](BooleanArrayEntry *self) {
py::gil_scoped_release release;
*self = BooleanArrayEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](BooleanArrayEntry *self) {
return self;
})
.def("__exit__", [](BooleanArrayEntry *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanArrayEntry();
})
nt::BooleanArrayTopic:
attributes:
kTypeString:
methods:
BooleanArrayTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](BooleanArrayTopic *self) {
py::gil_scoped_release release;
*self = BooleanArrayTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](BooleanArrayTopic *self) {
return self;
})
.def("__exit__", [](BooleanArrayTopic *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanArrayTopic();
})

View File

@@ -0,0 +1,107 @@
classes:
nt::BooleanSubscriber:
methods:
BooleanSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
GetAtomic:
overloads:
'[const]':
ParamType [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](BooleanSubscriber *self) {
py::gil_scoped_release release;
*self = BooleanSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](BooleanSubscriber *self) {
return self;
})
.def("__exit__", [](BooleanSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanSubscriber();
})
nt::BooleanPublisher:
methods:
BooleanPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](BooleanPublisher *self) {
py::gil_scoped_release release;
*self = BooleanPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](BooleanPublisher *self) {
return self;
})
.def("__exit__", [](BooleanPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanPublisher();
})
nt::BooleanEntry:
methods:
BooleanEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](BooleanEntry *self) {
py::gil_scoped_release release;
*self = BooleanEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](BooleanEntry *self) {
return self;
})
.def("__exit__", [](BooleanEntry *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanEntry();
})
nt::BooleanTopic:
attributes:
kTypeString:
methods:
BooleanTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |-
.def("close", [](BooleanTopic *self) {
py::gil_scoped_release release;
*self = BooleanTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](BooleanTopic *self) {
return self;
})
.def("__exit__", [](BooleanTopic *self, py::args args) {
py::gil_scoped_release release;
*self = BooleanTopic();
})

View File

@@ -0,0 +1,115 @@
classes:
nt::DoubleArraySubscriber:
methods:
DoubleArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](DoubleArraySubscriber *self) {
py::gil_scoped_release release;
*self = DoubleArraySubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](DoubleArraySubscriber *self) {
return self;
})
.def("__exit__", [](DoubleArraySubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleArraySubscriber();
})
nt::DoubleArrayPublisher:
methods:
DoubleArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](DoubleArrayPublisher *self) {
py::gil_scoped_release release;
*self = DoubleArrayPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](DoubleArrayPublisher *self) {
return self;
})
.def("__exit__", [](DoubleArrayPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleArrayPublisher();
})
nt::DoubleArrayEntry:
methods:
DoubleArrayEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](DoubleArrayEntry *self) {
py::gil_scoped_release release;
*self = DoubleArrayEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](DoubleArrayEntry *self) {
return self;
})
.def("__exit__", [](DoubleArrayEntry *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleArrayEntry();
})
nt::DoubleArrayTopic:
attributes:
kTypeString:
methods:
DoubleArrayTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |-
.def("close", [](DoubleArrayTopic *self) {
py::gil_scoped_release release;
*self = DoubleArrayTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](DoubleArrayTopic *self) {
return self;
})
.def("__exit__", [](DoubleArrayTopic *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleArrayTopic();
})

View File

@@ -0,0 +1,107 @@
classes:
nt::DoubleSubscriber:
methods:
DoubleSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
GetAtomic:
overloads:
'[const]':
ParamType [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](DoubleSubscriber *self) {
py::gil_scoped_release release;
*self = DoubleSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](DoubleSubscriber *self) {
return self;
})
.def("__exit__", [](DoubleSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleSubscriber();
})
nt::DoublePublisher:
methods:
DoublePublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](DoublePublisher *self) {
py::gil_scoped_release release;
*self = DoublePublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](DoublePublisher *self) {
return self;
})
.def("__exit__", [](DoublePublisher *self, py::args args) {
py::gil_scoped_release release;
*self = DoublePublisher();
})
nt::DoubleEntry:
methods:
DoubleEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](DoubleEntry *self) {
py::gil_scoped_release release;
*self = DoubleEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](DoubleEntry *self) {
return self;
})
.def("__exit__", [](DoubleEntry *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleEntry();
})
nt::DoubleTopic:
attributes:
kTypeString:
methods:
DoubleTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](DoubleTopic *self) {
py::gil_scoped_release release;
*self = DoubleTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](DoubleTopic *self) {
return self;
})
.def("__exit__", [](DoubleTopic *self, py::args args) {
py::gil_scoped_release release;
*self = DoubleTopic();
})

View File

@@ -0,0 +1,115 @@
classes:
nt::FloatArraySubscriber:
methods:
FloatArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](FloatArraySubscriber *self) {
py::gil_scoped_release release;
*self = FloatArraySubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](FloatArraySubscriber *self) {
return self;
})
.def("__exit__", [](FloatArraySubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = FloatArraySubscriber();
})
nt::FloatArrayPublisher:
methods:
FloatArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](FloatArrayPublisher *self) {
py::gil_scoped_release release;
*self = FloatArrayPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](FloatArrayPublisher *self) {
return self;
})
.def("__exit__", [](FloatArrayPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = FloatArrayPublisher();
})
nt::FloatArrayEntry:
methods:
FloatArrayEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](FloatArrayEntry *self) {
py::gil_scoped_release release;
*self = FloatArrayEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](FloatArrayEntry *self) {
return self;
})
.def("__exit__", [](FloatArrayEntry *self, py::args args) {
py::gil_scoped_release release;
*self = FloatArrayEntry();
})
nt::FloatArrayTopic:
attributes:
kTypeString:
methods:
FloatArrayTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](FloatArrayTopic *self) {
py::gil_scoped_release release;
*self = FloatArrayTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](FloatArrayTopic *self) {
return self;
})
.def("__exit__", [](FloatArrayTopic *self, py::args args) {
py::gil_scoped_release release;
*self = FloatArrayTopic();
})

View File

@@ -0,0 +1,107 @@
classes:
nt::FloatSubscriber:
methods:
FloatSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
GetAtomic:
overloads:
'[const]':
ParamType [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](FloatSubscriber *self) {
py::gil_scoped_release release;
*self = FloatSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](FloatSubscriber *self) {
return self;
})
.def("__exit__", [](FloatSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = FloatSubscriber();
})
nt::FloatPublisher:
methods:
FloatPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](FloatPublisher *self) {
py::gil_scoped_release release;
*self = FloatPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](FloatPublisher *self) {
return self;
})
.def("__exit__", [](FloatPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = FloatPublisher();
})
nt::FloatEntry:
methods:
FloatEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](FloatEntry *self) {
py::gil_scoped_release release;
*self = FloatEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](FloatEntry *self) {
return self;
})
.def("__exit__", [](FloatEntry *self, py::args args) {
py::gil_scoped_release release;
*self = FloatEntry();
})
nt::FloatTopic:
attributes:
kTypeString:
methods:
FloatTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](FloatTopic *self) {
py::gil_scoped_release release;
*self = FloatTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](FloatTopic *self) {
return self;
})
.def("__exit__", [](FloatTopic *self, py::args args) {
py::gil_scoped_release release;
*self = FloatTopic();
})

View File

@@ -0,0 +1,86 @@
extra_includes:
- src/nt_type_caster.h
classes:
nt::GenericSubscriber:
methods:
GenericSubscriber:
overloads:
'':
ignore: true
NT_Subscriber:
ignore: true
Get:
GetBoolean:
GetInteger:
GetFloat:
GetDouble:
GetString:
GetRaw:
GetBooleanArray:
GetIntegerArray:
GetFloatArray:
GetDoubleArray:
GetStringArray:
ReadQueue:
GetTopic:
nt::GenericPublisher:
methods:
GenericPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetBoolean:
SetInteger:
SetFloat:
SetDouble:
SetString:
SetRaw:
SetBooleanArray:
overloads:
std::span<const bool>, int64_t:
std::span<const int>, int64_t:
SetIntegerArray:
SetFloatArray:
SetDoubleArray:
SetStringArray:
SetDefault:
SetDefaultBoolean:
SetDefaultInteger:
SetDefaultFloat:
SetDefaultDouble:
SetDefaultString:
SetDefaultRaw:
SetDefaultBooleanArray:
SetDefaultIntegerArray:
SetDefaultFloatArray:
SetDefaultDoubleArray:
SetDefaultStringArray:
GetTopic:
nt::GenericEntry:
methods:
GenericEntry:
overloads:
'':
ignore: true
NT_Entry:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](GenericEntry *self) {
py::gil_scoped_release release;
*self = GenericEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](GenericEntry *self) {
return self;
})
.def("__exit__", [](GenericEntry *self, py::args args) {
py::gil_scoped_release release;
*self = GenericEntry();
})

View File

@@ -0,0 +1,115 @@
classes:
nt::IntegerArraySubscriber:
methods:
IntegerArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](IntegerArraySubscriber *self) {
py::gil_scoped_release release;
*self = IntegerArraySubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](IntegerArraySubscriber *self) {
return self;
})
.def("__exit__", [](IntegerArraySubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerArraySubscriber();
})
nt::IntegerArrayPublisher:
methods:
IntegerArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](IntegerArrayPublisher *self) {
py::gil_scoped_release release;
*self = IntegerArrayPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](IntegerArrayPublisher *self) {
return self;
})
.def("__exit__", [](IntegerArrayPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerArrayPublisher();
})
nt::IntegerArrayEntry:
methods:
IntegerArrayEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](IntegerArrayEntry *self) {
py::gil_scoped_release release;
*self = IntegerArrayEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](IntegerArrayEntry *self) {
return self;
})
.def("__exit__", [](IntegerArrayEntry *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerArrayEntry();
})
nt::IntegerArrayTopic:
attributes:
kTypeString:
methods:
IntegerArrayTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](IntegerArrayTopic *self) {
py::gil_scoped_release release;
*self = IntegerArrayTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](IntegerArrayTopic *self) {
return self;
})
.def("__exit__", [](IntegerArrayTopic *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerArrayTopic();
})

View File

@@ -0,0 +1,107 @@
classes:
nt::IntegerSubscriber:
methods:
IntegerSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
GetAtomic:
overloads:
'[const]':
ParamType [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](IntegerSubscriber *self) {
py::gil_scoped_release release;
*self = IntegerSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](IntegerSubscriber *self) {
return self;
})
.def("__exit__", [](IntegerSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerSubscriber();
})
nt::IntegerPublisher:
methods:
IntegerPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](IntegerPublisher *self) {
py::gil_scoped_release release;
*self = IntegerPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](IntegerPublisher *self) {
return self;
})
.def("__exit__", [](IntegerPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerPublisher();
})
nt::IntegerEntry:
methods:
IntegerEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](IntegerEntry *self) {
py::gil_scoped_release release;
*self = IntegerEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](IntegerEntry *self) {
return self;
})
.def("__exit__", [](IntegerEntry *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerEntry();
})
nt::IntegerTopic:
attributes:
kTypeString:
methods:
IntegerTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](IntegerTopic *self) {
py::gil_scoped_release release;
*self = IntegerTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](IntegerTopic *self) {
return self;
})
.def("__exit__", [](IntegerTopic *self, py::args args) {
py::gil_scoped_release release;
*self = IntegerTopic();
})

View File

@@ -0,0 +1,22 @@
classes:
nt::MultiSubscriber:
methods:
MultiSubscriber:
overloads:
'':
ignore: true
NetworkTableInstance, std::span<const std::string_view>, const PubSubOptions&:
GetHandle:
ignore: true
inline_code: |
.def("close", [](MultiSubscriber *self) {
py::gil_scoped_release release;
*self = MultiSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](MultiSubscriber *self) {
return self;
})
.def("__exit__", [](MultiSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = MultiSubscriber();
})

View File

@@ -0,0 +1,20 @@
extra_includes:
- networktables/NTSendableBuilder.h
classes:
nt::NTSendable:
methods:
InitSendable:
overloads:
NTSendableBuilder&:
virtual_xform: |
[&](py::function fn) {
auto builderHandle = py::cast(builder, py::return_value_policy::reference);
fn(builderHandle);
}
wpi::SendableBuilder&:
virtual_xform: |
[&](py::function fn) {
auto builderHandle = py::cast(builder, py::return_value_policy::reference);
fn(builderHandle);
}

View File

@@ -0,0 +1,15 @@
classes:
nt::NTSendableBuilder:
force_type_casters:
- std::function
typealias:
- BackendKind = wpi::SendableBuilder::BackendKind
methods:
SetUpdateTable:
cpp_code: |
[](NTSendableBuilder *self, std::function<void()> func) {
self->SetUpdateTable(std::move(func));
}
GetTopic:
GetTable:
GetBackendKind:

View File

@@ -0,0 +1,178 @@
extra_includes:
- networktables/BooleanArrayTopic.h
- networktables/BooleanTopic.h
- networktables/DoubleArrayTopic.h
- networktables/DoubleTopic.h
- networktables/FloatArrayTopic.h
- networktables/FloatTopic.h
- networktables/IntegerArrayTopic.h
- networktables/IntegerTopic.h
- networktables/NetworkTableInstance.h
- networktables/RawTopic.h
- networktables/StringArrayTopic.h
- networktables/StringTopic.h
- networktables/StructArrayTopic.h
- networktables/StructTopic.h
- networktables/Topic.h
- src/py2value.h
- src/pyentry.h
- wpystruct.h
classes:
nt::NetworkTable:
attributes:
PATH_SEPARATOR_CHAR:
methods:
BasenameKey:
NormalizeKey:
overloads:
std::string_view, bool:
std::string_view, wpi::SmallVectorImpl<char>&, bool:
ignore: true
GetHierarchy:
NetworkTable:
ignore: true
GetInstance:
GetEntry:
GetTopic:
GetBooleanTopic:
GetIntegerTopic:
GetFloatTopic:
GetDoubleTopic:
GetStringTopic:
GetRawTopic:
GetBooleanArrayTopic:
GetIntegerArrayTopic:
GetFloatArrayTopic:
GetDoubleArrayTopic:
GetStringArrayTopic:
GetProtobufTopic:
ignore: true
GetStructTopic:
param_override:
info:
name: type
cpp_code: |
[](const NetworkTable &self, std::string_view name, const py::type &t) {
WPyStructInfo info(t);
return self.GetStructTopic<WPyStruct, WPyStructInfo>(name, info);
}
GetStructArrayTopic:
param_override:
info:
name: type
cpp_code: |
[](const NetworkTable &self, std::string_view name, const py::type &t) {
WPyStructInfo info(t);
return self.GetStructArrayTopic<WPyStruct, WPyStructInfo>(name, info);
}
GetSubTable:
ContainsKey:
ContainsSubTable:
GetTopicInfo:
GetTopics:
GetKeys:
GetSubTables:
SetPersistent:
ClearPersistent:
IsPersistent:
PutNumber:
SetDefaultNumber:
GetNumber:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetDoubleEntry(entry, defaultValue);
}
PutString:
SetDefaultString:
GetString:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetStringEntry(entry, defaultValue);
}
PutBoolean:
SetDefaultBoolean:
GetBoolean:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetBooleanEntry(entry, defaultValue);
}
PutBooleanArray:
SetDefaultBooleanArray:
GetBooleanArray:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetBooleanArrayEntry(entry, defaultValue);
}
PutNumberArray:
SetDefaultNumberArray:
GetNumberArray:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetDoubleArrayEntry(entry, defaultValue);
}
PutStringArray:
SetDefaultStringArray:
GetStringArray:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetStringArrayEntry(entry, defaultValue);
}
PutRaw:
SetDefaultRaw:
GetRaw:
cpp_code: |
[](NetworkTable * table, std::string_view key, py::object defaultValue) -> py::object {
nt::NetworkTableEntry entry;
{
py::gil_scoped_release release;
entry = table->GetEntry(key);
}
return pyntcore::GetRawEntry(entry, defaultValue);
}
PutValue:
ignore: true
SetDefaultValue:
ignore: true
GetValue:
ignore: true
GetPath:
AddListener:
overloads:
int, TableEventListener:
std::string_view, int, TableEventListener:
AddSubTableListener:
RemoveListener:
inline_code: |
#include <src/NetworkTable.cpp.inl>

View File

@@ -0,0 +1,97 @@
extra_includes:
- networktables/NetworkTableInstance.h
- networktables/Topic.h
- src/py2value.h
- src/pyentry.h
inline_code: |
#include <src/NetworkTableEntry.cpp.inl>
classes:
nt::NetworkTableEntry:
methods:
NetworkTableEntry:
overloads:
'':
ignore: true
NT_Entry:
ignore: true
GetHandle:
ignore: true
GetInstance:
Exists:
GetName:
GetType:
GetLastChange:
GetValue:
GetBoolean:
cpp_code: |
&pyntcore::GetBooleanEntry
GetInteger:
cpp_code: |
&pyntcore::GetIntegerEntry
GetFloat:
cpp_code: |
&pyntcore::GetFloatEntry
GetDouble:
cpp_code: |
&pyntcore::GetDoubleEntry
GetString:
cpp_code: |
&pyntcore::GetStringEntry
GetRaw:
cpp_code: |
&pyntcore::GetRawEntry
GetBooleanArray:
cpp_code: |
&pyntcore::GetBooleanArrayEntry
GetIntegerArray:
cpp_code: |
&pyntcore::GetIntegerArrayEntry
GetFloatArray:
cpp_code: |
&pyntcore::GetFloatArrayEntry
GetDoubleArray:
cpp_code: |
&pyntcore::GetDoubleArrayEntry
GetStringArray:
cpp_code: |
&pyntcore::GetStringArrayEntry
ReadQueue:
SetDefaultValue:
SetDefaultBoolean:
SetDefaultInteger:
SetDefaultFloat:
SetDefaultDouble:
SetDefaultString:
SetDefaultRaw:
SetDefaultBooleanArray:
SetDefaultIntegerArray:
SetDefaultFloatArray:
SetDefaultDoubleArray:
SetDefaultStringArray:
SetValue:
SetBoolean:
SetInteger:
SetFloat:
SetDouble:
SetString:
SetRaw:
SetBooleanArray:
overloads:
std::span<const bool>, int64_t:
std::span<const int>, int64_t:
ignore: true
SetIntegerArray:
SetFloatArray:
SetDoubleArray:
SetStringArray:
SetPersistent:
ClearPersistent:
IsPersistent:
Unpublish:
GetTopic:
operator==:
inline_code: |
.def("__repr__", [](NetworkTableEntry self) {
return py::str("<NetworkTableEntry {!r}>").format(self.GetName());
})

View File

@@ -0,0 +1,181 @@
extra_includes:
- networktables/BooleanArrayTopic.h
- networktables/BooleanTopic.h
- networktables/DoubleArrayTopic.h
- networktables/DoubleTopic.h
- networktables/FloatArrayTopic.h
- networktables/FloatTopic.h
- networktables/IntegerArrayTopic.h
- networktables/IntegerTopic.h
- networktables/MultiSubscriber.h
- networktables/RawTopic.h
- networktables/StringArrayTopic.h
- networktables/StringTopic.h
- networktables/StructArrayTopic.h
- networktables/StructTopic.h
- networktables/Topic.h
- src/py2value.h
- src/nt_instance.h
- wpi/datalog/DataLog.h
- wpystruct.h
classes:
nt::NetworkTableInstance:
force_type_casters:
- std::function
attributes:
kDefaultPort:
enums:
NetworkMode:
arithmetic: true
inline_code: |
.value("kNetModeStarting", (nt::NetworkTableInstance::NetworkMode)NT_NET_MODE_STARTING)
LogLevel:
methods:
NetworkTableInstance:
overloads:
'':
ignore: true
NT_Inst:
ignore: true
GetDefault:
Create:
Destroy:
cpp_code: |
[](NetworkTableInstance * self) {
pyntcore::onInstanceDestroy(self);
py::gil_scoped_release release;
NetworkTableInstance::Destroy(*self);
}
GetHandle:
internal: true
GetTopic:
GetBooleanTopic:
GetIntegerTopic:
GetFloatTopic:
GetDoubleTopic:
GetStringTopic:
GetRawTopic:
GetBooleanArrayTopic:
GetIntegerArrayTopic:
GetFloatArrayTopic:
GetDoubleArrayTopic:
GetStringArrayTopic:
GetProtobufTopic:
ignore: true
GetStructTopic:
param_override:
info:
name: type
cpp_code: |
[](const NetworkTableInstance &self, std::string_view name, const py::type &t) {
WPyStructInfo info(t);
return self.GetStructTopic<WPyStruct, WPyStructInfo>(name, info);
}
GetStructArrayTopic:
param_override:
info:
name: type
cpp_code: |
[](const NetworkTableInstance &self, std::string_view name, const py::type &t) {
WPyStructInfo info(t);
return self.GetStructArrayTopic<WPyStruct, WPyStructInfo>(name, info);
}
GetTopics:
overloads:
'':
std::string_view:
std::string_view, unsigned int:
std::string_view, std::span<std::string_view>:
GetTopicInfo:
overloads:
'':
std::string_view:
std::string_view, unsigned int:
std::string_view, std::span<std::string_view>:
GetEntry:
GetTable:
RemoveListener:
WaitForListenerQueue:
AddConnectionListener:
AddTimeSyncListener:
AddListener:
overloads:
Topic, unsigned int, ListenerCallback:
Subscriber&, unsigned int, ListenerCallback:
MultiSubscriber&, int, ListenerCallback:
const NetworkTableEntry&, int, ListenerCallback:
std::span<const std::string_view>, int, ListenerCallback:
GetNetworkMode:
StartLocal:
cpp_code: |
[](NetworkTableInstance * self) {
pyntcore::onInstanceStart(self);
py::gil_scoped_release release;
self->StartLocal();
}
StopLocal:
StartServer:
cpp_code: |
[](NetworkTableInstance * self, std::string_view persist_filename, const char* listen_address,
unsigned int port) {
pyntcore::onInstanceStart(self);
py::gil_scoped_release release;
self->StartServer(persist_filename, listen_address, port);
}
StopServer:
StopClient:
SetServer:
overloads:
std::string_view, unsigned int:
std::span<const std::pair<std::string_view, unsigned int>>:
std::span<const std::string_view>, unsigned int:
SetServerTeam:
Disconnect:
StartDSClient:
StopDSClient:
FlushLocal:
Flush:
GetConnections:
IsConnected:
GetServerTimeOffset:
StartEntryDataLog:
StopEntryDataLog:
StartConnectionDataLog:
StopConnectionDataLog:
AddLogger:
HasSchema:
AddSchema:
overloads:
std::string_view, std::string_view, std::span<const uint8_t>:
std::string_view, std::string_view, std::string_view:
AddProtobufSchema:
ignore: true
AddStructSchema:
ignore: true
operator==:
StartClient:
inline_code: |
.def("configPythonLogging", [](NetworkTableInstance * self,
NetworkTableInstance::LogLevel minLevel, NetworkTableInstance::LogLevel maxLevel, py::str logName) {
py::module::import("ntcore._logutil").attr("_config_logging")(self, minLevel, maxLevel, logName);
}, py::kw_only(),
py::arg("min") = NetworkTableInstance::LogLevel::kLogInfo,
py::arg("max") = NetworkTableInstance::LogLevel::kLogCritical,
py::arg("name") = "nt",
py::doc("Configure python logging for this instance.\n"
"\n"
":param min: Minimum NT level to log\n"
":param max: Maximum NT level to log\n"
":param name: Name of python logger\n"
"\n"
".. note:: This must be called before the instance is started")
)
.def("_reset", [](NetworkTableInstance *self) {
pyntcore::onInstancePreReset(self);
{
py::gil_scoped_release release;
nt::ResetInstance(self->GetHandle());
}
pyntcore::onInstancePostReset(self);
})

View File

@@ -0,0 +1,63 @@
classes:
nt::NetworkTableListener:
force_type_casters:
- std::function
methods:
NetworkTableListener:
overloads:
'':
CreateListener:
overloads:
NetworkTableInstance, std::span<const std::string_view>, unsigned int, ListenerCallback:
Topic, unsigned int, ListenerCallback:
Subscriber&, unsigned int, ListenerCallback:
MultiSubscriber&, unsigned int, ListenerCallback:
NetworkTableEntry&, unsigned int, ListenerCallback:
CreateConnectionListener:
CreateTimeSyncListener:
CreateLogger:
GetHandle:
WaitForQueue:
inline_code: |
.def("close", [](NetworkTableListener *self) {
py::gil_scoped_release release;
*self = NetworkTableListener();
}, py::doc("Destroys the listener"))
.def("__enter__", [](NetworkTableListener *self) {
return self;
})
.def("__exit__", [](NetworkTableListener *self, py::args args) {
py::gil_scoped_release release;
*self = NetworkTableListener();
})
nt::NetworkTableListenerPoller:
methods:
NetworkTableListenerPoller:
overloads:
'':
NetworkTableInstance:
GetHandle:
AddListener:
overloads:
std::span<const std::string_view>, unsigned int:
Topic, unsigned int:
Subscriber&, unsigned int:
MultiSubscriber&, unsigned int:
NetworkTableEntry&, unsigned int:
AddConnectionListener:
AddTimeSyncListener:
AddLogger:
RemoveListener:
ReadQueue:
inline_code: |
.def("close", [](NetworkTableListenerPoller *self) {
py::gil_scoped_release release;
*self = NetworkTableListenerPoller();
}, py::doc("Destroys the poller"))
.def("__enter__", [](NetworkTableListenerPoller *self) {
return self;
})
.def("__exit__", [](NetworkTableListenerPoller *self, py::args args) {
py::gil_scoped_release release;
*self = NetworkTableListenerPoller();
})

View File

@@ -0,0 +1,2 @@
enums:
NetworkTableType:

View File

@@ -0,0 +1,184 @@
extra_includes:
- networktables/NetworkTableType.h
- src/py2value.h
functions:
Now:
ignore: true
classes:
nt::Value:
methods:
Value:
overloads:
'':
ignore: true
NT_Type, size_t, int64_t, const private_init&:
ignore: true
NT_Type, size_t, int64_t, int64_t, const private_init&:
ignore: true
type:
cpp_code: |
[](Value *t) {
return (NetworkTableType)t->type();
}
value:
cpp_code: |
[](const Value &self) -> py::object {
return pyntcore::ntvalue2py(self);
}
last_change:
time:
size:
SetTime:
server_time:
SetServerTime:
IsValid:
IsBoolean:
IsInteger:
IsFloat:
IsDouble:
IsString:
IsRaw:
IsBooleanArray:
IsIntegerArray:
IsFloatArray:
IsDoubleArray:
IsStringArray:
GetBoolean:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_BOOLEAN, self);
return self->GetBoolean();
}
GetInteger:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_INTEGER, self);
return self->GetInteger();
}
GetFloat:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_FLOAT, self);
return self->GetFloat();
}
GetDouble:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_DOUBLE, self);
return self->GetDouble();
}
GetString:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_STRING, self);
return self->GetString();
}
GetRaw:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_RAW, self);
return self->GetRaw();
}
GetBooleanArray:
cpp_code: |
[](Value *self) -> py::object {
pyntcore::ensure_value_is(NT_BOOLEAN_ARRAY, self);
auto v = self->value();
py::list l(v.data.arr_boolean.size);
for (size_t i = 0; i < v.data.arr_boolean.size; i++) {
auto b = py::bool_(v.data.arr_boolean.arr[i]);
PyList_SET_ITEM(l.ptr(), i, b.release().ptr());
}
return std::move(l);
}
GetIntegerArray:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_INTEGER_ARRAY, self);
return self->GetIntegerArray();
}
GetFloatArray:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_FLOAT_ARRAY, self);
return self->GetFloatArray();
}
GetDoubleArray:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_DOUBLE_ARRAY, self);
return self->GetDoubleArray();
}
GetStringArray:
cpp_code: |
[](Value *self) {
pyntcore::ensure_value_is(NT_STRING_ARRAY, self);
return self->GetStringArray();
}
MakeBoolean:
MakeInteger:
MakeFloat:
MakeDouble:
MakeString:
overloads:
std::string_view, int64_t:
T&&, int64_t:
ignore: true
MakeRaw:
overloads:
std::span<const uint8_t>, int64_t:
T&&, int64_t:
ignore: true
MakeBooleanArray:
overloads:
std::span<const bool>, int64_t:
std::initializer_list<bool>, int64_t:
ignore: true
std::span<const int>, int64_t:
ignore: true
std::initializer_list<int>, int64_t:
ignore: true
std::vector<int>&&, int64_t:
ignore: true
MakeIntegerArray:
overloads:
std::span<const int64_t>, int64_t:
ignore: true
std::initializer_list<int64_t>, int64_t:
ignore: true
std::vector<int64_t>&&, int64_t:
MakeFloatArray:
overloads:
std::span<const float>, int64_t:
ignore: true
std::initializer_list<float>, int64_t:
ignore: true
std::vector<float>&&, int64_t:
MakeDoubleArray:
overloads:
std::span<const double>, int64_t:
ignore: true
std::initializer_list<double>, int64_t:
ignore: true
std::vector<double>&&, int64_t:
MakeStringArray:
overloads:
std::span<const std::string>, int64_t:
ignore: true
std::initializer_list<std::string>, int64_t:
ignore: true
std::vector<std::string>&&, int64_t:
inline_code: |-
.def_static("makeValue", [](py::handle value) {
return pyntcore::py2ntvalue(value);
}, py::arg("value"))
.def_static("getFactoryByType", [](nt::NetworkTableType type) {
return pyntcore::valueFactoryByType(type);
}, py::arg("type"))
.def("__repr__", [](const Value &self) -> py::str {
auto typestr = pyntcore::nttype2str(self.type());
auto valrepr = py::repr(pyntcore::ntvalue2py(self));
return py::str("<Value type={} value={}>").format(typestr, valrepr);
})

View File

@@ -0,0 +1,114 @@
extra_includes:
- src/nt_type_caster.h
classes:
nt::RawSubscriber:
methods:
RawSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](RawSubscriber *self) {
py::gil_scoped_release release;
*self = RawSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](RawSubscriber *self) {
return self;
})
.def("__exit__", [](RawSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = RawSubscriber();
})
nt::RawPublisher:
methods:
RawPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](RawPublisher *self) {
py::gil_scoped_release release;
*self = RawPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](RawPublisher *self) {
return self;
})
.def("__exit__", [](RawPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = RawPublisher();
})
nt::RawEntry:
methods:
RawEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](RawEntry *self) {
py::gil_scoped_release release;
*self = RawEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](RawEntry *self) {
return self;
})
.def("__exit__", [](RawEntry *self, py::args args) {
py::gil_scoped_release release;
*self = RawEntry();
})
nt::RawTopic:
methods:
RawTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
Publish:
PublishEx:
GetEntry:
inline_code: |
.def("close", [](RawTopic *self) {
py::gil_scoped_release release;
*self = RawTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](RawTopic *self) {
return self;
})
.def("__exit__", [](RawTopic *self, py::args args) {
py::gil_scoped_release release;
*self = RawTopic();
})

View File

@@ -0,0 +1,107 @@
classes:
nt::StringArraySubscriber:
methods:
StringArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
GetAtomic:
overloads:
'[const]':
ParamType [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](StringArraySubscriber *self) {
py::gil_scoped_release release;
*self = StringArraySubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](StringArraySubscriber *self) {
return self;
})
.def("__exit__", [](StringArraySubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = StringArraySubscriber();
})
nt::StringArrayPublisher:
methods:
StringArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](StringArrayPublisher *self) {
py::gil_scoped_release release;
*self = StringArrayPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](StringArrayPublisher *self) {
return self;
})
.def("__exit__", [](StringArrayPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = StringArrayPublisher();
})
nt::StringArrayEntry:
methods:
StringArrayEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](StringArrayEntry *self) {
py::gil_scoped_release release;
*self = StringArrayEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](StringArrayEntry *self) {
return self;
})
.def("__exit__", [](StringArrayEntry *self, py::args args) {
py::gil_scoped_release release;
*self = StringArrayEntry();
})
nt::StringArrayTopic:
attributes:
kTypeString:
methods:
StringArrayTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](StringArrayTopic *self) {
py::gil_scoped_release release;
*self = StringArrayTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](StringArrayTopic *self) {
return self;
})
.def("__exit__", [](StringArrayTopic *self, py::args args) {
py::gil_scoped_release release;
*self = StringArrayTopic();
})

View File

@@ -0,0 +1,115 @@
classes:
nt::StringSubscriber:
methods:
StringSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, ParamType:
ignore: true
Get:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
GetAtomic:
overloads:
'[const]':
ParamType [const]:
wpi::SmallVectorImpl<SmallElemType>& [const]:
ignore: true
wpi::SmallVectorImpl<SmallElemType>&, ParamType [const]:
ignore: true
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](StringSubscriber *self) {
py::gil_scoped_release release;
*self = StringSubscriber();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](StringSubscriber *self) {
return self;
})
.def("__exit__", [](StringSubscriber *self, py::args args) {
py::gil_scoped_release release;
*self = StringSubscriber();
})
nt::StringPublisher:
methods:
StringPublisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](StringPublisher *self) {
py::gil_scoped_release release;
*self = StringPublisher();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](StringPublisher *self) {
return self;
})
.def("__exit__", [](StringPublisher *self, py::args args) {
py::gil_scoped_release release;
*self = StringPublisher();
})
nt::StringEntry:
methods:
StringEntry:
overloads:
'':
ignore: true
NT_Entry, ParamType:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](StringEntry *self) {
py::gil_scoped_release release;
*self = StringEntry();
}, py::doc("Destroys the entry"))
.def("__enter__", [](StringEntry *self) {
return self;
})
.def("__exit__", [](StringEntry *self, py::args args) {
py::gil_scoped_release release;
*self = StringEntry();
})
nt::StringTopic:
attributes:
kTypeString:
methods:
StringTopic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
Topic:
Subscribe:
SubscribeEx:
Publish:
PublishEx:
GetEntry:
GetEntryEx:
inline_code: |
.def("close", [](StringTopic *self) {
py::gil_scoped_release release;
*self = StringTopic();
}, py::doc("Destroys the topic"))
.def("__enter__", [](StringTopic *self) {
return self;
})
.def("__exit__", [](StringTopic *self, py::args args) {
py::gil_scoped_release release;
*self = StringTopic();
})

View File

@@ -0,0 +1,167 @@
classes:
nt::StructArraySubscriber:
template_params:
- T
- I
methods:
StructArraySubscriber:
overloads:
'':
ignore: true
NT_Subscriber, U&&, I...:
ignore: true
Get:
overloads:
'[const]':
U&& [const]:
ignore: true
std::span<const T> [const]:
GetAtomic:
overloads:
'[const]':
U&& [const]:
ignore: true
std::span<const T> [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](nt::StructArraySubscriber<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructArraySubscriber<T, I>();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](nt::StructArraySubscriber<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructArraySubscriber<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructArraySubscriber<T, I>();
})
nt::StructArrayPublisher:
template_params:
- T
- I
methods:
StructArrayPublisher:
overloads:
'':
ignore: true
NT_Publisher, I...:
ignore: true
Set:
overloads:
U&&, int64_t:
ignore: true
std::span<const T>, int64_t:
SetDefault:
overloads:
U&&:
ignore: true
std::span<const T>:
GetTopic:
inline_code: |
.def("close", [](nt::StructArrayPublisher<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructArrayPublisher<T, I>();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](nt::StructArrayPublisher<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructArrayPublisher<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructArrayPublisher<T, I>();
})
nt::StructArrayEntry:
template_params:
- T
- I
base_qualnames:
StructArraySubscriber: nt::StructArraySubscriber<T, I>
StructArrayPublisher: nt::StructArrayPublisher<T, I>
methods:
StructArrayEntry:
overloads:
'':
ignore: true
NT_Entry, U&&, const I&...:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](nt::StructArrayEntry<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructArrayEntry<T, I>();
}, py::doc("Destroys the entry"))
.def("__enter__", [](nt::StructArrayEntry<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructArrayEntry<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructArrayEntry<T, I>();
})
nt::StructArrayTopic:
template_params:
- T
- I
methods:
StructArrayTopic:
overloads:
'':
ignore: true
NT_Topic, I...:
ignore: true
Topic, I...:
param_override:
info:
name: type
cpp_code: |
[](Topic topic, const py::type &t) {
WPyStructInfo info(t);
return nt::StructArrayTopic<T, I>(topic, info);
}
Subscribe:
overloads:
U&&, const PubSubOptions&:
ignore: true
std::span<const T>, const PubSubOptions&:
Publish:
PublishEx:
GetEntry:
overloads:
U&&, const PubSubOptions&:
ignore: true
std::span<const T>, const PubSubOptions&:
inline_code: |
.def("close", [](nt::StructArrayTopic<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructArrayTopic<T, I>();
}, py::doc("Destroys the topic"))
.def("__enter__", [](nt::StructArrayTopic<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructArrayTopic<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructArrayTopic<T, I>();
})
templates:
StructArraySubscriber:
qualname: nt::StructArraySubscriber
params:
- WPyStruct
- WPyStructInfo
StructArrayPublisher:
qualname: nt::StructArrayPublisher
params:
- WPyStruct
- WPyStructInfo
StructArrayEntry:
qualname: nt::StructArrayEntry
params:
- WPyStruct
- WPyStructInfo
StructArrayTopic:
qualname: nt::StructArrayTopic
params:
- WPyStruct
- WPyStructInfo

View File

@@ -0,0 +1,149 @@
classes:
nt::StructSubscriber:
template_params:
- T
- I
methods:
StructSubscriber:
overloads:
'':
ignore: true
NT_Subscriber, T, I...:
ignore: true
Get:
overloads:
'[const]':
const T& [const]:
GetInto:
ignore: true
GetAtomic:
overloads:
'[const]':
const T& [const]:
ReadQueue:
GetTopic:
inline_code: |
.def("close", [](nt::StructSubscriber<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructSubscriber<T, I>();
}, py::doc("Destroys the subscriber"))
.def("__enter__", [](nt::StructSubscriber<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructSubscriber<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructSubscriber<T, I>();
})
nt::StructPublisher:
template_params:
- T
- I
methods:
StructPublisher:
overloads:
'':
ignore: true
NT_Publisher, I...:
ignore: true
Set:
SetDefault:
GetTopic:
inline_code: |
.def("close", [](nt::StructPublisher<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructPublisher<T, I>();
}, py::doc("Destroys the publisher"))
.def("__enter__", [](nt::StructPublisher<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructPublisher<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructPublisher<T, I>();
})
nt::StructEntry:
template_params:
- T
- I
base_qualnames:
StructSubscriber: nt::StructSubscriber<T, I>
StructPublisher: nt::StructPublisher<T, I>
methods:
StructEntry:
overloads:
'':
ignore: true
NT_Entry, T, const I&...:
ignore: true
GetHandle:
ignore: true
GetTopic:
Unpublish:
inline_code: |
.def("close", [](nt::StructEntry<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructEntry<T, I>();
}, py::doc("Destroys the entry"))
.def("__enter__", [](nt::StructEntry<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructEntry<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructEntry<T, I>();
})
nt::StructTopic:
template_params:
- T
- I
methods:
StructTopic:
overloads:
'':
ignore: true
NT_Topic, I...:
ignore: true
Topic, I...:
param_override:
info:
name: type
cpp_code: |
[](Topic topic, const py::type &t) {
WPyStructInfo info(t);
return nt::StructTopic<T, I>(topic, info);
}
Subscribe:
Publish:
PublishEx:
GetEntry:
inline_code: |
.def("close", [](nt::StructTopic<T, I> *self) {
py::gil_scoped_release release;
*self = nt::StructTopic<T, I>();
}, py::doc("Destroys the topic"))
.def("__enter__", [](nt::StructTopic<T, I> *self) {
return self;
})
.def("__exit__", [](nt::StructTopic<T, I> *self, py::args args) {
py::gil_scoped_release release;
*self = nt::StructTopic<T, I>();
})
templates:
StructSubscriber:
qualname: nt::StructSubscriber
params:
- WPyStruct
- WPyStructInfo
StructPublisher:
qualname: nt::StructPublisher
params:
- WPyStruct
- WPyStructInfo
StructEntry:
qualname: nt::StructEntry
params:
- WPyStruct
- WPyStructInfo
StructTopic:
qualname: nt::StructTopic
params:
- WPyStruct
- WPyStructInfo

View File

@@ -0,0 +1,89 @@
extra_includes:
- networktables/GenericEntry.h
- networktables/NetworkTableInstance.h
classes:
nt::Topic:
methods:
Topic:
overloads:
'':
ignore: true
NT_Topic:
ignore: true
GetHandle:
ignore: true
GetInstance:
GetName:
GetType:
GetTypeString:
SetPersistent:
IsPersistent:
SetRetained:
IsRetained:
SetCached:
IsCached:
Exists:
GetProperty:
SetProperty:
DeleteProperty:
GetProperties:
SetProperties:
GetInfo:
GenericSubscribe:
overloads:
const PubSubOptions&:
std::string_view, const PubSubOptions&:
GenericPublish:
GenericPublishEx:
GetGenericEntry:
overloads:
const PubSubOptions&:
std::string_view, const PubSubOptions&:
operator==:
inline_code: |
.def("__repr__", [](py::handle self) {
py::object type_name = self.get_type().attr("__qualname__");
std::string name = self.cast<Topic>().GetName();
return py::str("<{} {!r}>").format(type_name, name);
})
nt::Subscriber:
attributes:
m_subHandle:
methods:
GetHandle:
ignore: true
Exists:
GetLastChange:
GetTopic:
Subscriber:
overloads:
'':
ignore: true
NT_Subscriber:
ignore: true
inline_code: |
.def("__repr__", [](py::handle self) {
py::object type_name = self.get_type().attr("__qualname__");
auto topic = self.cast<const Subscriber&>().GetTopic();
return py::str("<{} {!r}>").format(type_name, topic.GetName());
})
nt::Publisher:
attributes:
m_pubHandle:
methods:
GetHandle:
ignore: true
GetTopic:
Publisher:
overloads:
'':
ignore: true
NT_Publisher:
ignore: true
inline_code: |
.def("__repr__", [](py::handle self) {
py::object type_name = self.get_type().attr("__qualname__");
auto topic = self.cast<const Publisher&>().GetTopic();
return py::str("<{} {!r}>").format(type_name, topic.GetName());
})

View File

@@ -0,0 +1,317 @@
defaults:
ignore: true
report_ignored_missing: false
extra_includes:
- pybind11/stl.h
- networktables/Topic.h
functions:
RemoveListener:
internal: true
Now:
internal: true
SetNow:
internal: true
AddPolledLogger:
internal: true
HasSchema:
ignore: true
DecodeTopicPublishers:
subpackage: meta
DecodeTopicSubscribers:
subpackage: meta
DecodeClientPublishers:
subpackage: meta
DecodeClientSubscribers:
subpackage: meta
DecodeClients:
subpackage: meta
classes:
nt::EventFlags:
attributes:
kNone:
kImmediate:
kConnected:
kDisconnected:
kConnection:
kPublish:
kUnpublish:
kProperties:
kTopic:
kValueRemote:
kValueLocal:
kValueAll:
kLogMessage:
kTimeSync:
nt::TopicInfo:
attributes:
name:
type_str:
properties:
topic:
ignore: true
type:
ignore: true
methods:
GetProperties:
inline_code: |
.def_property_readonly("topic", [](const TopicInfo &self) {
return std::make_shared<nt::Topic>(self.topic);
})
.def_property_readonly("type", [](const TopicInfo &self) {
return nt::NetworkTableType(self.type);
})
.def("__repr__", [](const TopicInfo &self) -> py::str {
return py::str("<TopicInfo name={} type={}>")
.format(self.name, self.type_str);
})
nt::ConnectionInfo:
attributes:
remote_id:
remote_ip:
remote_port:
last_update:
protocol_version:
inline_code: |
.def("__repr__", [](const ConnectionInfo &self) -> py::str {
return py::str("<ConnectionInfo id={} addr={}:{} last_update={} protocol={}>")
.format(self.remote_id, self.remote_ip, self.remote_port,
self.last_update, self.protocol_version);
})
nt::ValueEventData:
attributes:
topic:
ignore: true
subentry:
ignore: true
value:
methods:
ValueEventData:
overloads:
'':
ignore: true
NT_Topic, NT_Handle, Value:
ignore: true
inline_code: |
.def_property_readonly("topic", [](const ValueEventData &self) {
return std::make_shared<nt::Topic>(self.topic);
})
.def("__repr__", [](const ValueEventData &self) -> py::str {
auto topicInfo = nt::GetTopicInfo(self.topic);
return py::str("<ValueEventData topic_name=\"{}\" topic_type={} value={}>")
.format(topicInfo.name, topicInfo.type_str, self.value);
})
nt::LogMessage:
attributes:
level:
filename:
line:
message:
methods:
LogMessage:
overloads:
'':
ignore: true
unsigned int, std::string_view, unsigned int, std::string_view:
ignore: true
nt::TimeSyncEventData:
attributes:
serverTimeOffset:
rtt2:
valid:
methods:
TimeSyncEventData:
overloads:
'':
ignore: true
int64_t, int64_t, bool:
nt::Event:
attributes:
listener:
flags:
data:
ignore: true
methods:
Event:
overloads:
'':
ignore: true
NT_Listener, unsigned int, ConnectionInfo:
ignore: true
NT_Listener, unsigned int, TopicInfo:
ignore: true
NT_Listener, unsigned int, ValueEventData:
ignore: true
NT_Listener, unsigned int, LogMessage:
ignore: true
NT_Listener, unsigned int, NT_Topic, NT_Handle, Value:
ignore: true
NT_Listener, unsigned int, unsigned int, std::string_view, unsigned int, std::string_view:
ignore: true
NT_Listener, unsigned int, int64_t, int64_t, bool:
ignore: true
Is:
rename: is_
GetConnectionInfo:
overloads:
'[const]':
ignore: true
'':
ignore: true
GetTopicInfo:
overloads:
'[const]':
ignore: true
'':
ignore: true
GetValueEventData:
overloads:
'[const]':
ignore: true
'':
ignore: true
GetLogMessage:
overloads:
'[const]':
ignore: true
'':
ignore: true
GetTimeSyncEventData:
overloads:
'[const]':
ignore: true
'':
ignore: true
inline_code: |
.def_property_readonly("data", [](nt::Event *self){
return self->data;
})
.def("__repr__", [](const nt::Event &self) -> py::str {
return py::str("<Event listener={} flags={} data={}>")
.format(self.listener, self.flags, self.data);
})
nt::PubSubOptions:
force_no_default_constructor: true
attributes:
kDefaultPeriodic:
structSize:
ignore: true
pollStorage:
periodic:
excludePublisher:
sendAll:
topicsOnly:
keepDuplicates:
prefixMatch:
disableRemote:
disableLocal:
excludeSelf:
hidden:
inline_code: |
// autogenerated by gen-pubsub.py
.def(py::init([](
unsigned int pollStorage,
double periodic,
std::optional<std::shared_ptr<nt::Publisher>> excludePublisher,
bool sendAll,
bool topicsOnly,
bool keepDuplicates,
bool prefixMatch,
bool disableRemote,
bool disableLocal,
bool excludeSelf,
bool hidden
) -> nt::PubSubOptions {
return nt::PubSubOptions{
.pollStorage = pollStorage,
.periodic = periodic,
.excludePublisher = excludePublisher.has_value() ? excludePublisher.value()->GetHandle() : 0,
.sendAll = sendAll,
.topicsOnly = topicsOnly,
.keepDuplicates = keepDuplicates,
.prefixMatch = prefixMatch,
.disableRemote = disableRemote,
.disableLocal = disableLocal,
.excludeSelf = excludeSelf,
.hidden = hidden
};
}),
py::kw_only(),
py::arg("pollStorage") = 0,
py::arg("periodic") = nt::PubSubOptions::kDefaultPeriodic,
py::arg("excludePublisher") = std::nullopt,
py::arg("sendAll") = false,
py::arg("topicsOnly") = false,
py::arg("keepDuplicates") = false,
py::arg("prefixMatch") = false,
py::arg("disableRemote") = false,
py::arg("disableLocal") = false,
py::arg("excludeSelf") = false,
py::arg("hidden") = false,
R"(
:param pollStorage: Polling storage size for a subscription. Specifies the maximum number of
updates NetworkTables should store between calls to the subscriber's
ReadQueue() function. If zero, defaults to 1 if sendAll is false, 20 if
sendAll is true.
:param periodic: How frequently changes will be sent over the network, in seconds.
NetworkTables may send more frequently than this (e.g. use a combined
minimum period for all values) or apply a restricted range to this value.
The default is 100 ms.
:param excludePublisher: For subscriptions, if non-zero, value updates for ReadQueue() are not
queued for this publisher.
:param sendAll: Send all value changes over the network.
:param topicsOnly: For subscriptions, don't ask for value changes (only topic announcements).
:param keepDuplicates: Preserve duplicate value changes (rather than ignoring them).
:param prefixMatch: Perform prefix match on subscriber topic names. Is ignored/overridden by
Subscribe() functions; only present in struct for the purposes of getting
information about subscriptions.
:param disableRemote: For subscriptions, if remote value updates should not be queued for
ReadQueue(). See also disableLocal.
:param disableLocal: For subscriptions, if local value updates should not be queued for
ReadQueue(). See also disableRemote.
:param excludeSelf: For entries, don't queue (for ReadQueue) value updates for the entry's
internal publisher.
:param hidden: For subscriptions, don't share the existence of the subscription with the
network. Note this means updates will not be received from the network
unless another subscription overlaps with this one, and the subscription
will not appear in metatopics.
)"
)
nt::meta::SubscriberOptions:
subpackage: meta
attributes:
periodic:
topicsOnly:
sendAll:
prefixMatch:
nt::meta::TopicPublisher:
subpackage: meta
attributes:
client:
pubuid:
nt::meta::TopicSubscriber:
subpackage: meta
attributes:
client:
subuid:
options:
nt::meta::ClientPublisher:
subpackage: meta
attributes:
uid:
topic:
nt::meta::ClientSubscriber:
subpackage: meta
attributes:
uid:
topics:
options:
nt::meta::Client:
subpackage: meta
attributes:
id:
conn:
version:

View File

@@ -0,0 +1,82 @@
extra_includes:
- src/nt_type_caster.h
defaults:
ignore: true
report_ignored_missing: false
classes:
nt::Timestamped:
template_params:
- T
attributes:
time:
serverTime:
value:
methods:
Timestamped:
overloads:
'':
int64_t, int64_t, T:
inline_code: |
;
// capture class name by value
auto clsname = clsName;
cls_Timestamped.def("__repr__", [clsname](const Timestamped<T>& self) -> py::str {
return py::str("{}(time={}, serverTime={}, value={!r})")
.format(clsname, self.time, self.serverTime, self.value);
})
templates:
TimestampedBoolean:
qualname: nt::Timestamped
params:
- bool
TimestampedInteger:
qualname: nt::Timestamped
params:
- int64_t
TimestampedFloat:
qualname: nt::Timestamped
params:
- float
TimestampedDouble:
qualname: nt::Timestamped
params:
- double
TimestampedString:
qualname: nt::Timestamped
params:
- std::string
TimestampedRaw:
qualname: nt::Timestamped
params:
- std::vector<uint8_t>
TimestampedBooleanArray:
qualname: nt::Timestamped
params:
- std::vector<int>
TimestampedIntegerArray:
qualname: nt::Timestamped
params:
- std::vector<int64_t>
TimestampedFloatArray:
qualname: nt::Timestamped
params:
- std::vector<float>
TimestampedDoubleArray:
qualname: nt::Timestamped
params:
- std::vector<double>
TimestampedStringArray:
qualname: nt::Timestamped
params:
- std::vector<std::string>
TimestampedStruct:
qualname: nt::Timestamped
params:
- WPyStruct
TimestampedStructArray:
qualname: nt::Timestamped
params:
- std::vector<WPyStruct>