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

Public Member Functions

void Init (void)
 
void UpdateAll (const int force=0)
 
int GetCount (void)
 
partGetPart (const int partn)
 
void DeleteParts (void)
 
void ResetPullupBus (unsigned char pin)
 
void SetPullupBus (unsigned char pin, unsigned char value)
 
unsigned char GetPullupBus (unsigned char pin)
 
void Process (void)
 Execute the process code of spare parts N times (where N is the number of steps in 100ms)
 
void PreProcess (void)
 Execute the pre process code of spare parts one time per 100ms.
 
void PostProcess (void)
 Execute the post process code of spare parts one time per 100ms.
 
std::string GetPinsNames (void)
 Return the name of all pins.
 
std::string GetPinName (unsigned char pin)
 Return the name of one pin.
 
const picpin * GetPinsValues (void)
 
void SetPin (unsigned char pin, unsigned char value)
 
void SetAPin (unsigned char pin, float value)
 
void SetPinDOV (unsigned char pin, unsigned char ovalue)
 
void SetPinDir (unsigned char pin, unsigned char dir)
 
void WritePin (unsigned char pin, unsigned char value)
 
void WritePinA (unsigned char pin, unsigned char avalue)
 
void WritePinOA (unsigned char pin, unsigned short oavalue)
 
unsigned char RegisterIOpin (std::string pname, unsigned char pin=0, unsigned char dir=PD_OUT)
 
unsigned char UnregisterIOpin (unsigned char pin)
 
partAddPart (const char *partname, const int x, const int y, const float scale, board *pboard_)
 
void DeletePart (const int partn)
 
void SetUseAlias (const int use)
 
unsigned char GetUseAlias (void)
 
bool SavePinAlias (std::string fname)
 
bool LoadPinAlias (std::string fname, unsigned char show_error_msg=0)
 
bool LoadConfig (std::string fname, const int disable_debug=0)
 
void ClearPinAlias (void)
 
std::string GetAliasFname (void)
 
float GetScale (void)
 
void SetScale (float s)
 
void Reset (void)
 
void Setfdtype (int value)
 
int Getfdtype (void)
 
void ReadPreferences (char *name, char *value)
 
void WritePreferences (void)
 
bool SaveConfig (std::string fname)
 
std::string GetLoadConfigFile (void)
 
void SetfdOldFilename (const std::string ofn)
 
std::string GetOldFilename (void)
 
void SetPartOnDraw (int pod)
 
int GetPartOnDraw (void)
 

Static Public Member Functions

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

Public Attributes

int(* OnCanvasCmd )(const CanvasCmd_t cmd)
 
int(* OnWindowCmd )(const int id, const char *ControlName, const PICSimLabWindowAction action, const char *Value, void *ReturnBuff)
 

Private Attributes

float scale
 
boardpboard
 
std::string PinNames [256]
 
std::string PinAlias [256]
 
std::string alias_fname
 
std::string LoadConfigFile
 
picpin * Pins
 
unsigned char PinsCount
 
unsigned char useAlias
 
int partsc
 
partparts [MAX_PARTS]
 
int partsc_aup
 
partparts_aup [MAX_PARTS]
 
unsigned char pullup_bus [IOINIT]
 
int pullup_bus_count
 
unsigned char pullup_bus_ptr [IOINIT]
 
int fdtype
 
std::string oldfname
 
int PartOnDraw
 

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