Plugins Python API » History » Revision 11
« Previous |
Revision 11/21
(diff)
| Next »
Alexis Jeandet, 21/09/2015 02:51 PM
Plugins Python API¶
All SocExplorer plugins expose some common functions and their own functions to the embedded Python terminal.
Common Functions¶
All this functions are either implemented in the base class socexplorerplugin or in the plugin itself.
Function list:- QVariantList Read (unsigned int address, unsigned int count);
- void Write (unsigned int address, QList<QVariant> dataList);
- void closeMe ();
- void activate (bool flag);
- void setInstanceName (const QString & newName);
- bool dumpMemory (unsigned int address, unsigned int count, QString file);
- bool memSet (unsigned int address, int value, unsigned int count);
- bool loadbin (unsigned int address, QString file);
- bool loadfile (abstractBinFile * file);
- bool dumpMemory (unsigned int address, unsigned int count, QString file, const QString & format);
QVariantList Read (unsigned int address, unsigned int count)¶
Reads target memory at given address and return its content. On any root plugin it will read system memory and by default on child plugin it will forward request to parent plugin util it reach root plugin and read system bus.
Note that this function could be re-implemented on a child plugin and have a different behavior.
The returned list is a Word list which means that the smallest data you can read is a word(32 bits) and count is the number of words to read. The function respect host endianness so it will convert data depending on target endianness.
See also void Write (unsigned int address, QList<QVariant> dataList);
void Write (unsigned int address, QList<QVariant> dataList)¶
Writes given datalist at given address in target system bus. On any root plugin it will writes system memory and by default on child plugin it will forward request to parent plugin util it reach root plugin and writes system bus.
Note that this function could be re-implemented on a child plugin and have a different behavior.
The given list is a Word list which means that the smallest data you can write is a word(32 bits). The function respect host endianness so it will convert data depending on target endianness.
Example:
Let's consider we have a Leon3 with some RAM at 0x40000000 and we want to write 1 2 3 and 0xffffffff. We are connected to the target through rootplugin which can be replaced by the plugin are using.
rootplugin.Write(0x40000000,[1,2,3,0xffffffff])
See also QVariantList Read (unsigned int address, unsigned int count);
void closeMe ()¶
Closes the plugin.
void activate (bool flag)¶
void setInstanceName (const QString & newName)¶
bool dumpMemory (unsigned int address, unsigned int count, QString file)¶
bool memSet (unsigned int address, int value, unsigned int count)¶
bool loadbin (unsigned int address, QString file)¶
bool loadfile (abstractBinFile * file)¶
bool dumpMemory (unsigned int address, unsigned int count, QString file, const QString & format)¶
Updated by Alexis Jeandet almost 9 years ago · 11 revisions