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

Public Member Functions

std::string GetName (void) override
 Get board name registered in PICSimLab.
 
std::string GetAboutInfo (void) override
 Return the about information of part.
 
void Draw (void) override
 Called ever 100ms to draw board.
 
void Run_CPU (void) override
 Paralle thread called ever 100ms to run cpu code.
 
std::string GetSupportedDevices (void) override
 Return a list of supported microcontrollers.
 
int MInit (const char *processor, const char *fname, float freq) override
 board microcontroller init
 
void Reset (void) override
 Reset board status.
 
int MDumpMemory (const char *mfname) override
 board microcontroller save non volatile memory to hex file
 
void EvMouseMove (unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
 Event on the board.
 
void EvMouseButtonPress (unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
 Event on the board.
 
void EvMouseButtonRelease (unsigned int button, unsigned int x, unsigned int y, unsigned int state) override
 Event on the board.
 
void EvKeyPress (unsigned int key, unsigned int mask) override
 Event on the board.
 
void EvKeyRelease (unsigned int key, unsigned int mask) override
 Event on the board.
 
void EvOnShow (void) override
 Event on the board.
 
void RefreshStatus (void) override
 Called ever 1s to refresh status.
 
void WritePreferences (void) override
 Called to save board preferences in configuration file.
 
void ReadPreferences (char *name, char *value) override
 Called whe configuration file load preferences.
 
unsigned short GetInputId (char *name) override
 return the input ids numbers of names used in input map
 
unsigned short GetOutputId (char *name) override
 return the output ids numbers of names used in output map
 
void board_Event (const char *controlname) override
 Called when window side controls are activated.
 
void SetScale (double scale) override
 Set board draw scale.
 
void OnTime (void)
 
- Public Member Functions inherited from bsim_picsim
int DebugInit (int dtyppe) override
 Start debug support.
 
std::string GetDebugName (void) override
 Get debug interface name.
 
void DebugLoop (void) override
 debug step (pooling)
 
int CpuInitialized (void) override
 return true if microcontroller is initialized
 
void MSetSerial (const char *port) override
 Set serial port name to use.
 
void MEnd (void) override
 board microcontroller end
 
int MGetArchitecture (void) override
 Return board microcontroller architecture.
 
void MEraseFlash (void) override
 board microcontroller erase flash memory (program)
 
void MSetFreq (float freq) override
 board microcontroller set frequency
 
float MGetFreq (void) override
 board microcontroller get frequency
 
void MSetVCC (float vcc) override
 board microcontroller set vcc
 
float MGetVCC (void) override
 board microcontroller get vcc
 
float MGetInstClockFreq (void) override
 board microcontroller get cpu internal clock (in PIC frequency/4)
 
int MGetPinCount (void) override
 board microcontroller pin count
 
std::string MGetPinName (int pin) override
 board microcontroller pin name
 
void MSetPin (int pin, unsigned char value) override
 board microcontroller set digital pin
 
void MSetPinDOV (int pin, unsigned char ovalue) override
 board microcontroller set Default Open Value (external pull)
 
void MSetAPin (int pin, float value) override
 board microcontroller set analog pin
 
unsigned char MGetPin (int pin) override
 board microcontroller get digital pin value
 
const picpin * MGetPinsValues (void) override
 board microcontroller get all pins list struct
 
void MStep (void) override
 board microcontroller run one step
 
void MStepResume (void) override
 board microcontroller run one or two steps to resume instruction
 
void MReset (int flags) override
 board microcontroller reset
 
unsigned short * DBGGetProcID_p (void) override
 board microcontroller get pointer to processor ID
 
unsigned int DBGGetPC (void) override
 board microcontroller get PC
 
void DBGSetPC (unsigned int pc) override
 board microcontroller set PC
 
unsigned char * DBGGetRAM_p (void) override
 board microcontroller get RAM memory pointer
 
unsigned char * DBGGetROM_p (void) override
 board microcontroller get ROM (FLASH) memory pointer
 
unsigned char * DBGGetCONFIG_p (void) override
 board microcontroller get CONFIG memory pointer
 
unsigned char * DBGGetID_p (void) override
 board microcontroller get internal IDS memory pointer
 
unsigned char * DBGGetEEPROM_p (void) override
 board microcontroller get data EEPROM memory pointer
 
unsigned int DBGGetRAMSize (void) override
 board microcontroller get RAM memory size
 
unsigned int DBGGetROMSize (void) override
 board microcontroller get ROM (FLASH) memory size
 
unsigned int DBGGetCONFIGSize (void) override
 board microcontroller get CONFIG memory size
 
unsigned int DBGGetIDSize (void) override
 board microcontroller get internal IDS memory size
 
unsigned int DBGGetEEPROM_Size (void) override
 board microcontroller get data EEPROM memory size
 
unsigned int DBGGetRAMLAWR (void) override
 board microcontroller get last ram write address
 
unsigned int DBGGetRAMLARD (void) override
 board microcontroller get last ram read address
 
void EndServers (void) override
 board servers shutdown
 
int GetDefaultClock (void) override
 Get board default clock in MHz.
 
int GetUARTRX (const int uart_num) override
 Return the UART N RX pin number.
 
int GetUARTTX (const int uart_num) override
 Return the UART N TX pin number.
 
- Public Member Functions inherited from board
virtual std::string GetPictureFileName (void)
 Return the filename of board picture.
 
virtual std::string GetMapFile (void)
 Return the filename of board picture map.
 
virtual void EvThreadRun (void)
 Event on the board.
 
virtual void board_ButtonEvent (const char *controlname, unsigned int button, unsigned int x, unsigned int y, unsigned int state)
 Called when window side controls are activated.
 
 board (void)
 Called once on board creation.
 
virtual ~board (void)
 Called once on board destruction.
 
void SetUseOscilloscope (int uo)
 Enable/disable oscilloscope measurement.
 
void SetUseSpareParts (int sp)
 Enable/disable spare parts.
 
int GetUseOscilloscope (void)
 Get if oscilloscope is in use.
 
int GetUseSpareParts (void)
 Get if spare parts is in use.
 
void SetProcessorName (std::string proc)
 Set board processor.
 
std::string GetProcessorName (void)
 Get board processor in use.
 
int GetInputCount (void)
 Get board input count.
 
input_tGetInput (int n)
 Get board input.
 
int GetOutputCount (void)
 Get board output count.
 
output_tGetOutput (int n)
 Get board input.
 
int MGetClocksPerInstructions (void)
 board microcontroller get Clock pulses per instruction (in PIC equal to 4)
 
unsigned char CalcAngle (int i, int x, int y)
 Calc rotary potentiometer angle.
 
double GetScale (void)
 Get board draw scale.
 
std::string GetDefaultProcessor (void)
 Get board default processor.
 
void SetDefaultProcessor (std::string dproc)
 Set board default processor.
 
uint32_t GetInstCounter (void)
 Get instruction counter.
 
uint32_t GetInstCounter_us (const uint32_t start)
 Get elapsed time from instruction counter in us.
 
uint32_t GetInstCounter_ms (const uint32_t start)
 Get elapsed time from instruction counter in us.
 
int TimerRegister_us (const double micros, void(*Callback)(void *arg), void *arg)
 Register a new timer with time in us (default enabled)
 
int TimerRegister_ms (const double miles, void(*Callback)(void *arg), void *arg)
 Register a new timer with time in ms (default enabled)
 
int TimerUnregister (const int timer)
 Unregister timer.
 
int TimerChange_us (const int timer, const double micros)
 Modify timer value with us.
 
int TimerChange_ms (const int timer, const double miles)
 Modify timer value with us.
 
int TimerSetState (const int timer, const int enabled)
 Enable or disable timer.
 
uint64_t TimerGet_ns (const int timer)
 Get elapsed time from instruction counter in ns.
 
void TimerUpdateFrequency (float freq)
 Update Timer counters on frequency change.
 
virtual void IoLockAccess (void)
 Lock IO to others threads access.
 
virtual void IoUnlockAccess (void)
 Unlock IO to others threads access.
 
virtual std::string GetClkLabel (void)
 Return the description of clk label.
 

Private Member Functions

void RegisterRemoteControl (void) override
 Register remote control variables.
 

Private Attributes

unsigned char p_BT [7]
 
unsigned char p_KEY [12]
 
unsigned char pot [2]
 
unsigned char active [2]
 
int vtc
 
int vt
 
lcd_t lcd
 
mi2c_t mi2c
 
rtc_ds1307_t rtc2
 
int lcde
 
int sound_on
 
float vp1in
 
float vp2in
 
float vp2 [2]
 
float temp [2]
 
float ref
 
int rpmstp
 
int rpmc
 
unsigned char d
 
unsigned char sda
 
unsigned char sck
 
int jmp [1]
 
int dip [20]
 
unsigned int lm1 [40]
 
unsigned int lm2 [40]
 
unsigned int lm3 [40]
 
unsigned int lm4 [40]
 
int vent [2]
 
int lcdbmp [2]
 
int buzzerId
 
char mi2c_tmp_name [200]
 
SWBounce_t bounce
 
int heater_pwr
 
int cooler_pwr
 
int TimerID
 

Additional Inherited Members

- Protected Member Functions inherited from board
void InstCounterInc (void)
 Increment the Intructions Counter.
 
void ReadMaps (void)
 Read maps.
 
void StartThread (void)
 Start parallel thread.
 
void StopThread (void)
 Stop parallel thread.
 
- Protected Attributes inherited from bsim_picsim
_pic pic
 
- Protected Attributes inherited from board
std::string Proc
 Name of processor in use.
 
std::string DProc
 Name of default board processor.
 
input_t input [MAX_IDS]
 input map elements
 
input_tinput_ids [MAX_IDS]
 input map elements by id order
 
output_t output [MAX_IDS]
 output map elements
 
output_toutput_ids [MAX_IDS]
 output map elements by id order
 
int inputc
 input map elements counter
 
int outputc
 output map elements counter
 
int use_oscope
 use oscilloscope window
 
int use_spare
 use spare parts window
 
unsigned char p_RST
 board /RESET pin state
 
float Scale
 

Member Function Documentation

◆ board_Event()

void cboard_PICGenios::board_Event ( const char *  controlname)
overridevirtual

Called when window side controls are activated.

Reimplemented from board.

◆ Draw()

void cboard_PICGenios::Draw ( void  )
overridevirtual

Called ever 100ms to draw board.

Implements board.

Here is the call graph for this function:

◆ EvKeyPress()

void cboard_PICGenios::EvKeyPress ( unsigned int  key,
unsigned int  mask 
)
overridevirtual

Event on the board.

Implements board.

◆ EvKeyRelease()

void cboard_PICGenios::EvKeyRelease ( unsigned int  key,
unsigned int  mask 
)
overridevirtual

Event on the board.

Implements board.

◆ EvMouseButtonPress()

void cboard_PICGenios::EvMouseButtonPress ( unsigned int  button,
unsigned int  x,
unsigned int  y,
unsigned int  state 
)
overridevirtual

Event on the board.

Implements board.

Here is the call graph for this function:

◆ EvMouseButtonRelease()

void cboard_PICGenios::EvMouseButtonRelease ( unsigned int  button,
unsigned int  x,
unsigned int  y,
unsigned int  state 
)
overridevirtual

Event on the board.

Implements board.

Here is the call graph for this function:

◆ EvMouseMove()

void cboard_PICGenios::EvMouseMove ( unsigned int  button,
unsigned int  x,
unsigned int  y,
unsigned int  state 
)
overridevirtual

Event on the board.

Reimplemented from board.

Here is the call graph for this function:

◆ EvOnShow()

void cboard_PICGenios::EvOnShow ( void  )
overridevirtual

Event on the board.

Reimplemented from board.

Here is the call graph for this function:

◆ GetAboutInfo()

std::string cboard_PICGenios::GetAboutInfo ( void  )
inlineoverridevirtual

Return the about information of part.

Implements board.

◆ GetInputId()

unsigned short cboard_PICGenios::GetInputId ( char *  name)
overridevirtual

return the input ids numbers of names used in input map

Implements board.

◆ GetName()

std::string cboard_PICGenios::GetName ( void  )
inlineoverridevirtual

Get board name registered in PICSimLab.

Implements board.

◆ GetOutputId()

unsigned short cboard_PICGenios::GetOutputId ( char *  name)
overridevirtual

return the output ids numbers of names used in output map

Implements board.

◆ GetSupportedDevices()

std::string cboard_PICGenios::GetSupportedDevices ( void  )
inlineoverridevirtual

Return a list of supported microcontrollers.

Implements board.

◆ MDumpMemory()

int cboard_PICGenios::MDumpMemory ( const char *  fname)
overridevirtual

board microcontroller save non volatile memory to hex file

Reimplemented from bsim_picsim.

Here is the call graph for this function:

◆ MInit()

int cboard_PICGenios::MInit ( const char *  processor,
const char *  fname,
float  freq 
)
overridevirtual

board microcontroller init

Reimplemented from bsim_picsim.

Here is the call graph for this function:

◆ ReadPreferences()

void cboard_PICGenios::ReadPreferences ( char *  name,
char *  value 
)
overridevirtual

Called whe configuration file load preferences.

Reimplemented from board.

◆ RefreshStatus()

void cboard_PICGenios::RefreshStatus ( void  )
overridevirtual

Called ever 1s to refresh status.

Reimplemented from board.

◆ RegisterRemoteControl()

void cboard_PICGenios::RegisterRemoteControl ( void  )
overrideprivatevirtual

Register remote control variables.

Reimplemented from board.

◆ Reset()

void cboard_PICGenios::Reset ( void  )
overridevirtual

Reset board status.

Implements board.

Here is the call graph for this function:

◆ Run_CPU()

void cboard_PICGenios::Run_CPU ( void  )
overridevirtual

Paralle thread called ever 100ms to run cpu code.

Implements board.

Here is the call graph for this function:

◆ SetScale()

void cboard_PICGenios::SetScale ( double  scale)
overridevirtual

Set board draw scale.

Reimplemented from board.

Here is the call graph for this function:

◆ WritePreferences()

void cboard_PICGenios::WritePreferences ( void  )
overridevirtual

Called to save board preferences in configuration file.

Reimplemented from board.

Here is the call graph for this function:

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