create a C/C++ plugin system for pybullet / C-API.
This commit is contained in:
22
examples/SharedMemory/plugins/testPlugin/testplugin.cpp
Normal file
22
examples/SharedMemory/plugins/testPlugin/testplugin.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#include "testplugin.h"
|
||||
#include "../../SharedMemoryPublic.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
B3_SHARED_API int initPlugin()
|
||||
{
|
||||
printf("hi!\n");
|
||||
return SHARED_MEMORY_MAGIC_NUMBER;
|
||||
}
|
||||
|
||||
B3_SHARED_API int executePluginCommand()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
|
||||
B3_SHARED_API void exitPlugin()
|
||||
{
|
||||
printf("bye!\n");
|
||||
}
|
||||
Reference in New Issue
Block a user