Open tylzh97 opened 2 years ago
From what I can tell, it seems like this is an issue with create_panda_datatypes.py
not discovering this callback due to not having any headers named accordingly (no loaded_ppp.h
). So effectively--the loaded plugin wasn't properly setup to support pypanda.
The fix would likely look something like how proc_start_linux handles it.
loaded.h
to loaded_ppp.h
so that create_panda_datatypes.py
discovers itBEGIN_PYPANDA_NEEDS_THIS
and END_PYPANDA_NEEDS_THIS
comments.then to test you'd need to run setup.py in panda/python/core
to rebuild/install the python package. Then cffi should have access to the function pointer typedef (on_library_load_t
) needed for the callback function.
Yeah, @jamcleod is exactly right - plugins need to explicitly support the PyPANDA PPP interface by making sure their header files are organized as he described and it looks like the loaded plugin doesn't (yet) have that - if you're able to make those changes, we'd love to merge a fix! Otherwise you can wait until someone else eventually gets around to it.
I have read the docs and issues, cannot fix this problem. In https://github.com/panda-re/panda/blob/dev/panda/plugins/loaded/loaded.cpp#L121 , i saw this plugin register
on_library_load
, and i',m trying to run my script:But there is an
ffi.error
following:I'm confused, please tell me how to use
ppp.loaded.on_library_load
decorator in my script! Thanks!