| Title | Filename | Date | Size | Remarks |
| HAPSIM Source Code | hapsim220_src.zip | 16.2.2012 | 429.822 bytes | MFC VC++6.0 project files |
| HXS - XML Serializer Generator | hxs100144.zip | 30.1.2005 | 22.005 bytes | Executable; You need this tool for automatic code generation of your new control's XML Serializer classes |
| HXS Source Code | hxs100144_src.zip | 30.1.2005 | 11.575 bytes | optional |
| PSAPI Library | psapi.zip | 16.3.2004 | 3.066 bytes | psapi is part of the Windows Platform SDK! I don't remember where I previously downloaded it. I'm sure it can be found somewhere in the Microsoft download area ... Until I know the official download link I place it here (I've been asked for it several times). |
Every control consists of
CHapsimDoc, e.g. CNewControlDoc virtual void Serialize(CArchive *pArch);
which can be copied from any other control without change.CView, CFormView,...), e.g. CNewControlView void Serialize(CArchive *pArch);
which is called from your Document class for serialization.DocTemplate
within the InitInstance() function of the ChapsimApp class.
e.g.
pDocTemplate = new CHapsimDocTemplate(
IDR_NEWCONTROLTYPE,
RUNTIME_CLASS(CNewControlDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CNewControlView));
AddDocTemplate(pDocTemplate);
CNewControlSerializer ... but DON'T edit this class! It's generated!WM_CONFIGLOADED msg. -> leads to OnConfigLoaded() after a config file has been loaded.
theApp.SetViewList(this, register-address, bitmask-value);
Then your view gets informed by a WM_AVRPORT message whenever one of the specified bits of the selected
register has changed -> leads to OnAvrRegChange where lParam is the new value of the
register.
theApp.m_hook.AvrRegWrite(addr, value, 1, REG_INPUT or REG_BOTH);
REG_INPUT is only sufficient when you are sure that the AVR-Simulator of AVRStudio is in waiting state which is the case after receiving a register change before calling the AvrResetBusy() function.
theApp.m_timer.StartTimer(this, delay);your view will get informed by a WM_AVRTIMER message after the expiration of 'delay' clock cycles inside the AVR Simulator.
If you made changes and you think they might be useful for others too then please send me the new and modified files and I would be glad to integrate them into a new official release of HAPSIM!
Also don't hesitate to e-mail to helmix@gmx.at if you have questions or problems with your implementation.
Helmut Wallner, 5.5.2007