PICSimLab - Programmable IC Simulator Laboratory 0.9.2
PICSimLab - API
Loading...
Searching...
No Matches
CPICSimLab Class Reference
Collaboration diagram for CPICSimLab:

Public Member Functions

void Init (void)
 
std::string GetSharePath (void)
 Get the file path of resources.
 
void SetSharePath (std::string spath)
 
std::string GetLibPath (void)
 
void SetLibPath (std::string lpath)
 
std::string GetHomePath (void)
 
void SetHomePath (std::string home)
 
std::string GetPath (void)
 
void SetPath (std::string path)
 
std::string GetFNAME (void)
 
void SetFNAME (std::string fname)
 
std::string GetOldPath (void)
 
void SetOldPath (std::string op)
 
std::string GetProcessorName (void)
 
void SetProcessorName (std::string pn)
 
long int GetNSTEP (void)
 
void SetNSTEP (long int ns)
 
long int GetNSTEPJ (void)
 Get the number of steps in 100ms of simulation.
 
void SetNSTEPJ (long int nsj)
 
int GetJUMPSTEPS (void)
 Get the number of steps to be skipped in board update.
 
void SetJUMPSTEPS (int js)
 
boardGetBoard (void)
 Return a pointer to board object.
 
void SetBoard (board *b)
 
void DeleteBoard (void)
 
int GetMcuPwr (void)
 Return actual power status of microcontroller ON/OFF.
 
int GetMcuRst (void)
 Retunr if microcontroller reset pin is enabled.
 
int GetMcuDbg (void)
 
void SetMcuPwr (int pp)
 Set the power status of microcontroller ON/OFF.
 
void SetCpuState (const PICSimlabCPUState cs)
 
void SetMcuRst (int pr)
 Set mcu rst flag (inform simulator about mcu reset state)
 
char GetCpuState (void)
 
void Set_mcudbg (int pd)
 
void SetMcuRun (int mr)
 
int GetMcuRun (void)
 
unsigned short GetDebugPort (void)
 Return the selected debugger port.
 
void SetDebugPort (unsigned short dp)
 Set debug TCP port.
 
unsigned short GetRemotecPort (void)
 Return the selected remote control port.
 
void SetRemotecPort (unsigned short rcp)
 Set remote control TCP port.
 
int GetInstanceNumber (void)
 Return the program instance number.
 
int GetDebugType (void)
 Return the selected debugger type.
 
void SetDebugType (int dt)
 Set debug type (MDB or GDB)
 
int GetDebugStatus (void)
 Get debug status (On/Off)
 
void SetDebugStatus (int dbs)
 Set debug status flag.
 
void SetClock (const float clk, const int update=1)
 
float GetClock (void)
 
void SavePrefs (std::string name, std::string value)
 Save the preferences.
 
void PrefsClear (void)
 
int PrefsSaveToFile (std::string fname)
 
int PrefsLoadFromFile (std::string fname)
 
unsigned int PrefsGetLinesCount (void)
 
std::string PrefsGetLine (int ln)
 
void OpenLoadHexFileDialog (void)
 
void SetNeedReboot (int nr=1)
 
int GetNeedReboot (void)
 
void RegisterError (const std::string error)
 
int GetErrorCount (void)
 
std::string GetError (int en)
 
void DeleteError (int en)
 
void EndSimulation (int saveold=0, const char *newpath=NULL)
 
void SetWorkspaceFileName (const std::string fname)
 
void SetLabs (const int lb, const int lb_)
 
int GetLab (void)
 
int GetLab_ (void)
 
int LoadHexFile (std::string fname)
 
void LoadWorkspace (std::string fnpzw, const int show_readme=1)
 
void SaveWorkspace (std::string fnpzw)
 
void SetSimulationRun (int run)
 
int GetSimulationRun (void)
 
double GetScale (void)
 
void SetScale (double s)
 
int GetNeedResize (void)
 
void SetNeedResize (int nr)
 
void Configure (const char *home, int use_default_board=0, int create=0, const char *lfile=NULL, const int disable_debug=0)
 
void SetplWidth (int pw)
 
void SetplHeight (int ph)
 
double GetIdleMs (void)
 
void SetIdleMs (double im)
 
int GetUseDSRReset (void)
 
void SetUseDSRReset (int udsr)
 
void SetToDestroy (void)
 
int GetToDestroy (void)
 
void SetSync (unsigned char s)
 
unsigned char GetSync (void)
 
char * GetPzwTmpdir (void)
 
void UpdateStatus (const PICSimlabStatus field, const std::string msg)
 
void * UpdateGUI (const int id, const PICSimlabGUIType type, const PICSimlabGUIAction action, const void *arg)
 
void ConfigMenuGUI (const PICSimlabGUIMenu type)
 

Static Public Member Functions

static int CanvasCmd (const CanvasCmd_t cmd)
 
static int WindowCmd (const int id, const char *ControlName, const PICSimLabWindowAction action, const char *Value, void *ReturnBuff=NULL)
 
static int SystemCmd (const PICSimLabSystemCmd cmd, const char *Arg, void *ReturnBuff=NULL)
 

Public Attributes

union { 
 
   char   st [2] 
 
   unsigned short int   status 
 
status 
 
int tgo
 
int plWidth
 
int plHeight
 
int use_dsr_reset
 
void(* OnUpdateStatus )(const int field, const std::string msg)
 
void(* OnConfigure )(void)
 
void(* OnClockSet )(const float clk, const int update)
 
void(* OnReadPreferences )(const char *name, const char *value, const int create)
 
void(* OnSavePrefs )(void)
 
void(* OnLoadHexFile )(const std::string fname)
 
void(* OnOpenLoadHexFileDialog )(void)
 
void(* OnEndSimulation )(void)
 
void *(* OnUpdateGUI )(const int id, const PICSimlabGUIType type, const PICSimlabGUIAction action, const void *arg)
 
void(* OnConfigMenuGUI )(const PICSimlabGUIMenu type)
 
int(* OnCanvasCmd )(const CanvasCmd_t cmd)
 
int(* OnWindowCmd )(const int id, const char *ControlName, const PICSimLabWindowAction action, const char *Value, void *ReturnBuff)
 
int(* OnSystemCmd )(const PICSimLabSystemCmd cmd, const char *Arg, void *ReturnBuff)
 

Private Member Functions

void StartRControl (void)
 

Private Attributes

boardpboard
 
int lab
 
int lab_
 
std::string SHARE
 
std::string libpath
 
long int NSTEP
 
long int NSTEPJ
 
int JUMPSTEPS
 
int mcurun
 
int mcupwr
 
int mcurst
 
int mcudbg
 
PICSimlabCPUState cpustate
 
unsigned short debug_port
 
unsigned short remotec_port
 
std::string HOME
 
std::string PATH
 
std::string FNAME
 
std::string OldPath
 
std::string proc_
 
std::string pzw_ver
 
int Instance
 
int debug_type
 
int debug
 
int need_resize
 
std::vector< std::string > prefs
 
int NeedReboot
 
std::vector< std::string > Errors
 
std::string Workspacefn
 
double scale
 
double idle_ms
 
int settodestroy
 
unsigned char sync
 
char pzwtmpdir [1024]
 

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