REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
loader::GlobalPluginLoader Struct Reference

Reserves storage in the data segment (address space that constains static variables, i.e. More...

#include <plugin.h>

Inheritance diagram for loader::GlobalPluginLoader:
Collaboration diagram for loader::GlobalPluginLoader:

Public Member Functions

 GlobalPluginLoader ()
 
- Public Member Functions inherited from loader::SinglePluginLoader
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
 

Additional Inherited Members

- Public Attributes inherited from loader::SinglePluginLoader
optional< Pluginplugin
 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

Reserves storage in the data segment (address space that constains static variables, i.e.

global variables or static local variables) and uses that storage for loading plugin code at runtime.

Pros: (1.) Address is well-known at compile time for a given firmware, this simplifies linking of plugin code. (2.) Plugin loader communcation is reduced thanks to fixed address. Cons: (1.) Storage is always reserved regardless of whether used or not (2.) Cannot grow (cannot hold bigger code then the reserved memory)

Use the compile time constant ANABRID_ENABLE_GLOBAL_PLUGIN_LOADER to enable this mechanism.

Definition at line 96 of file plugin.h.

Constructor & Destructor Documentation

◆ GlobalPluginLoader()


The documentation for this struct was generated from the following files: