FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
espp/lib/python_bindings/module.cpp at main · esp-cpp/espp · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
esp-cpp
/
espp
Public
Notifications
You must be signed in to change notification settings
Fork
29
Star
113
Code
Issues
0
Pull requests
8
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
espp
/
lib
/
python_bindings
/
module.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (32 loc) · 1.55 KB
Breadcrumbs
espp
/
lib
/
python_bindings
/
module.cpp
Copy path
File metadata and controls
37 lines (32 loc) · 1.55 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
include
<
pybind11/pybind11.h
>
#
define
STRINGIFY
(
x
) #x
#
define
MACRO_STRINGIFY
(
x
)
STRINGIFY
(x)
namespace
py
=
pybind11;
void
py_init_module_espp
(py::
module
&m);
//
Hand-written bindings for the `rtps` component (see rtps_bindings.cpp for why they are not
//
generated). Must run after py_init_module_espp so shared types (e.g. Logger::Verbosity) and the
//
module's classes are already registered. The cdr component has no python bindings: its C++ API
//
is template-based, and the python side of a message is a plain pycdr2 dataclass instead (see
//
the cdr component README).
void
py_init_rtps
(py::
module
&m);
//
Hand-written bindings for espp::SocketReactor (litgen cannot parse it; see
//
socket_reactor_bindings.cpp). Runs after py_init_module_espp so UdpSocket / Socket::Info /
//
Logger::Verbosity are already registered.
void
py_init_socket_reactor
(py::
module
&m);
//
Hand-written bindings for espp::OdriveNative + the fibre stream framing helpers (std::function
//
accessors with std::error_code& and std::span wire APIs; see odrive_native_bindings.cpp). Runs
//
after py_init_module_espp so Logger::Verbosity is already registered.
void
py_init_odrive_native
(py::
module
&m);
//
This builds the native python extension module `espp._espp`, which the
//
`espp` python package (python_bindings/espp/__init__.py) re-exports.
PYBIND11_MODULE
(_espp, m) {
#
ifdef
VERSION_INFO
m.
attr
(
"
__version__
"
) =
MACRO_STRINGIFY
(
VERSION_INFO
);
#
else
m.
attr
(
"
__version__
"
) =
"
dev
"
;
#
endif
py_init_module_espp
(m);
py_init_rtps
(m);
py_init_socket_reactor
(m);
py_init_odrive_native
(m);
}
Back
|
FazBrowse Home
|
New Git URL