© Alex van Rooijen, Bart Grootendorst, and Harry Broeders.
ImpComponent
class
BoolConnection
class
ByteConnection
class
WordConnection
class
LongConnection
class
CallOnChange
template
CallOnRise
template
CallOnFall
template
CallOnWrite
template
ImpComponent
class
void SetCompWinIcon(HICON
hicon)
With this function it's possible to change the icon of your component window.
void SetCompWinTitle(LPCSTR
str)
With this function it's possible to change the title of your component window.
Calls a connect dialogbox for your component. Can be used in a right mouse button click popup menu.
void Expose(Connection
connection, const char* name, const char*
prefcon=0)
This function is obligatory for every pin of the component and must be used in the Component constructor.
This function makes a connection pin,connection
, available for the THRSim11.name
is a user friendly name for this pin that is used in the connection dialogbox.connection
is the pin you want to make available for the THRSim11 and can be made with anyxxxxxConnection
class type. With the optional third parameterprefcon
it's possible to ask the THRSim11 to connect this pin to thename
pin of the component. The possible names are the same ones that are used in the simulator. For example: if you prefer that a pin connects to pin 2 of port B you use "PB2" asname
.
void SetComponentName(const
char* new_name)
This function is obligatory for every component and must be used in the Component constructor.
Set the name used in the pulldown menu of the THRSim11 and as default window title.
void SetGroupName(const
char* group_name)
This function can be used in the Component constructor. Set the submenu name used in the pulldown menu of the THRSim11. This is a new feature in CDK version 3.0 and you need THRSim11 version 3.30 or higher to use it.
virtual HWND CreateComponentWindow(HWND
parent)
It's only necessary to override this function when you want to create a component with a window. Within this function you need to create your window using theparent HWND
. You need to return theHWND
of the newly made window. If you don't override this function, a minimized window will be created which represents the component.
BoolConnection
class (a connection pin)
Set connectionpin to new state
.
Get current state of connection pin.
ByteConnection
class (a connection pin)
Set connectionpin to new state
.
Get current state of connection pin.
WordConnection
class (a connection pin)
Set connectionpin to new state
.
Get current state of connectionpin.
LongConnecion
class (a connection pin)
Set connectionpin to new state
.
Get current state of connection pin.
CallOnChange
template
template<class T, class C>
CallOnChange(const Model<T>& m, C* po, PF
pmf)
Notifies when pinm
is changed.m
is the pin to be monitored.po
is the pointer to the object that contains the function you want to call when the pin changes (in most casesthis
).pmf
is the member function you want to call when the pin changes.
CallOnRise
template
template<class T, class C>
CallOnRise(const Model<T>& m,
C* po, PF pmf)
Notifies when pinm
rises.m
is the pin to be monitored.po
is the pointer to the object that contains the function you want to call when the signal on the pin rises (in most casesthis
).pmf
is the member function you want to call when the when the signal of the pin rises.
CallOnFall
template
template<class T, class C>
CallOnFall(const Model<T>& m,
C* po, PF pmf)
Notifies when pinm
falls.m
is the pin to be monitored.po
is the pointer to the object that contains the function you want to call when the the signal on the pin falls (in most casesthis
).pmf
is the member function you want to call when the signal on the pin falls.
CallOnWrite
template
template<class T, class C>
CallOnWrite(const Model<T>& m, C* po, PF
pmf)
Notifies whenever is written to the pin even when this means the state isn't changed.m
is the pin to be monitored.po
is the pointer to the object that contains the function you want to call when the pin is written (in most casesthis
).pmf
is the member function you want to call when the pin is written.