Project

General

Profile

Plugins Python API » History » Revision 2

Revision 1 (Alexis Jeandet, 18/09/2015 06:21 PM) → Revision 2/21 (Alexis Jeandet, 21/09/2015 12:32 PM)

h1. Plugins Python API 

 All SocExplorer plugins expose some common functions and their own functions to the embedded Python terminal. 

 h2. Common Functions 

 All this functions are either implemented in the base class *socexplorerplugin* or in the plugin itself. 

 Function list: 
 * %{color:green}QVariantList% *[[Plugins_Python_API#Read|Read]]* *Read* (%{color:green}unsigned int% address, %{color:green}unsigned int% count); 
 * %{color:blue}void% *[[Plugins_Python_API#Write|Write]]* *Write* (%{color:green}unsigned int% address, %{color:green}QList<QVariant>% dataList); 

 <pre> 
 * %{color:blue}void% *[[Plugins_Python_API#closeMe|closeMe]]* (); 
 * %{color:blue}void% *[[Plugins_Python_API#activate|activate]]* (%{color:green}bool% <code class="cpp"> 
     virtual void closeMe(); 
     virtual void activate(bool flag); 
 * %{color:blue}void% *[[Plugins_Python_API#setInstanceName|setInstanceName]]* (%{color:green}const QString% & 
     virtual void setInstanceName(const QString& newName); 
 * %{color:green}bool%    *[[Plugins_Python_API#dumpMemory|dumpMemory]]*    (%{color:green}unsigned int% address, %{color:green}unsigned int% count, %{color:green}QString% 

     virtual bool dumpMemory(unsigned int address,unsigned int count,QString file); 
 * %{color:green}bool%    *[[Plugins_Python_API#memSet|memSet]]* (%{color:green}unsigned int% address, %{color:green}int% 
     virtual bool memSet(unsigned int address,int value, %{color:green}unsigned int% unsigned int count); 
 * %{color:green}bool%    *[[Plugins_Python_API#loadbin|loadbin]]*    (%{color:green}unsigned int% address, %{color:green}QString% 
     virtual bool loadbin(unsigned int address,QString file); 
 * %{color:green}bool%    *[[Plugins_Python_API#loadfile|loadfile]]*    (%{color:green}abstractBinFile% * 
     virtual bool loadfile(abstractBinFile* file); 
 * %{color:green}bool%    *[[Plugins_Python_API#dumpMemory|dumpMemory]]*    (%{color:green}unsigned int% address, %{color:green}unsigned int% count, %{color:green}QString% file, %{color:green}const QString% & 
     virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); 


 h2(#Read). %{color:green}QVariantList% *Read* (%{color:green}unsigned int% address, %{color:green}unsigned int% count)  

 h2(#Write). %{color:blue}void% *Write* (%{color:green}unsigned int% address, %{color:green}QList<QVariant>% dataList) 

 h2(#closeMe). %{color:blue}void% *closeMe* () 

 h2(#activate). %{color:blue}void% *activate* (%{color:green}bool% flag) 

 h2(#setInstanceName). %{color:blue}void% *setInstanceName* (%{color:green}const QString% & newName) 

 h2(#dumpMemory). %{color:green}bool%    *dumpMemory*    (%{color:green}unsigned int% address, %{color:green}unsigned int% count, %{color:green}QString% file) 

 h2(#memSet). %{color:green}bool%    *memSet* (%{color:green}unsigned int% address, %{color:green}int% value, %{color:green}unsigned int% count) 

 h2(#loadbin). %{color:green}bool%    *loadbin*    (%{color:green}unsigned int% address, %{color:green}QString% file) 

 h2(#loadfile). %{color:green}bool%    *loadfile*    (%{color:green}abstractBinFile% * file) 

 h2(#dumpMemory). %{color:green}bool%    *dumpMemory*    (%{color:green}unsigned int% address, %{color:green}unsigned int% count, %{color:green}QString% file, %{color:green}const QString% & format) </code> 
 </pre>