REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
The SinglePluginLoader can only load a single plugin at a given time. More...
#include <plugin.h>


Public Member Functions | |
bool | can_load () const |
int | load (const Plugin &new_plugin) |
returns 0 on success | |
void | unload () |
frees memory, does not call unloader. | |
virtual int | load_and_execute (JsonObjectConst msg_in, JsonObject &msg_out) |
load from protocol message, gives out reply msg, returns 0 on success | |
virtual int | unload (JsonObjectConst msg_in, JsonObject &msg_out) |
unload from protocol message, gives out reply msg, returns 0 on success | |
Public Attributes | |
optional< Plugin > | plugin |
The slot for a single managed plugin (if loaded). It's load_addr defines the memory address. | |
uint8_t * | load_addr =0 |
Absolute address of the memory segment. It is always (plugin->load_addr = load_addr). | |
uint32_t | memsize =0 |
The maximum memory size managed/accessible/available by this loader. It is always (plugin->size <= memsize). | |
Detailed Description
The SinglePluginLoader can only load a single plugin at a given time.
He is typically limited by his memory size and layout, i.e. he does not use some memory mangament data structure (a heap, stack, tree, etc). Currently there is only one implementation, anyway.
Member Function Documentation
◆ can_load()
|
inline |
◆ load()
FLASHMEM int loader::SinglePluginLoader::load | ( | const Plugin & | new_plugin | ) |
◆ unload()
|
inline |
Member Data Documentation
◆ load_addr
uint8_t* loader::SinglePluginLoader::load_addr =0 |
Absolute address of the memory segment. It is always (plugin->load_addr = load_addr).
Definition at line 65 of file plugin.h.
Referenced by can_load(), and loader::GlobalPluginLoader::GlobalPluginLoader().
◆ memsize
uint32_t loader::SinglePluginLoader::memsize =0 |
The maximum memory size managed/accessible/available by this loader. It is always (plugin->size <= memsize).
Definition at line 66 of file plugin.h.
Referenced by loader::GlobalPluginLoader::GlobalPluginLoader().
◆ plugin
optional<Plugin> loader::SinglePluginLoader::plugin |
The slot for a single managed plugin (if loaded). It's load_addr defines the memory address.
Definition at line 64 of file plugin.h.
Referenced by can_load(), and unload().
The documentation for this struct was generated from the following files:
- lib/controller/src/plugin/plugin.h
- lib/controller/src/plugin/plugin.cpp