API¶
VRED User Plugin Interface¶
-
class VREDUserKernelInterface¶
Public Functions
-
inline VREDUserKernelInterface(const VREDFunctions *kiFunctions)¶
Constructor for VREDUserKernelInterface.
- Parameters
kiFunctions – Pointer to the VREDFunctions structure.
-
~VREDUserKernelInterface() = default¶
Destructor for VREDUserKernelInterface.
-
inline std::uint32_t getVersion() const¶
Gets the version of the VRED API.
- Returns
The version as a 32-bit unsigned integer.
-
inline std::size_t getSize() const¶
Gets the size of the VREDFunctions struct in the vred kernel.
- Returns
The size as a std::size_t.
-
inline void setFrameSize(std::uint32_t width, std::uint32_t height)¶
Sets the frame size.
- Parameters
width – The width of the frame.
height – The height of the frame.
-
inline bool runPython(const std::string &code)¶
Executes a Python command within VRED.
- Parameters
code – The Python code to execute.
- Returns
True if the command executed successfully, false otherwise.
-
inline std::string runPythonR(const std::string &code)¶
Executes a Python command within VRED and returns the result.
- Parameters
code – The Python code to execute.
- Returns
The result of the Python command as a std::string.
-
inline void registerInit(std::function<void()> fp)¶
Registers an initialization callback.
- Parameters
fp – The callback function to register.
-
inline void registerUpdate(std::function<void()> fp)¶
Registers an update callback.
- Parameters
fp – The callback function to register.
-
inline void registerMessage(std::function<void(const VREDMessage&)> fp)¶
Registers a message callback.
- Parameters
fp – The callback function to register.
-
inline void registerFrameBufferChanged(std::function<bool(const VREDGLBuffer&)> fp)¶
Registers a frame buffer changed callback.
- Parameters
fp – The callback function to register.
-
inline VREDUserKernelInterface(const VREDFunctions *kiFunctions)¶
-
class VREDUserPluginInterface¶
Interface for VRED User Plugin.
This class provides an interface for creating user plugins for VRED.
Public Functions
-
inline virtual void init() = 0¶
Initializes the user plugin.
This method must be implemented by the user plugin to perform any necessary initialization.
-
inline virtual void init() = 0¶