System-wide event function - vsmEvent()

This function is called by Embed to notify the DLL of interesting simulation-wide events.

LPSTR PASCAL vsmEvent(int msg, int wParam, long *arg);

Message

Function

VSE_GET_CODEGEN_DECL_STR

Sent once per DLL at the start of code generation. Returns a char * string of text to be inserted into the generated code at file scope before block code generation messages are processed.

VSE_GET_CODEGEN_FUNC_DECL_PREFIX

Returns a char * string of function declarator prefix.

VSE_GET_CODEGEN_INCLUDE_STR

Returns a char * string of include files.

VSE_GET_CODEGEN_INIT_STR

Returns a char * string of text for initialization.

VSE_GET_CODEGEN_INTERRUPT_CLR

Returns a char * string of C code that clears an interrupt.

VSE_GET_CODEGEN_INTERRUPT_ENABLE

Returns a char * string of C code that enables an interrupt.

VSE_GET_CODEGEN_INTERRUPT_ENTRY

Returns a char * string of function interrupt entry.

VSE_GET_CODEGEN_TIME_STEP_STR

For internal use only.

VSE_GET_CODEGEN_TIMER_FUNC_END_STR

Returns a char * string of C code that is inserted at end of main RTOS interrupt handler.

VSE_GET_CODEGEN_TIMER_START_STR

Returns a char * string of C code that is inserted at the start of main RTOS interrupt handler.

VSE_GET_PARAM_DESC

Returns descriptor for DLL configuration dialog that has no block associated with it. Syntax is identical to WM_VSM_GET_PARAM_DESC.

VSE_POST_SIM_END

Embed has stopped, either from user stop or time expiration.

VSE_POST_SIM_START

Embed has initialized all blocks and is about to start.

VSE_PRE_SIM_START

Embed is about to start a simulation but has not initialized any blocks.

VSE_SIM_RESTART

Embed is restarting due either from user restart or an auto-restart.

VSE_TARGET_CMD

If wParam==0: returns 1 if user can download; wParam==1, do download; wParam++2, display Download dialog box.

VSE_TIME_STEP

Simulation has completed a time step.

VSE_VSM_ACTIVATE_VIEW

Sent on diagram activation.
wp:   0
lp:     Window handle of parent view

VSM_WINDOW_HANDLE

Handle to Embed main window.
arg:  Window handle

WM_COMMNOTIFY

Comm port data is ready.

WM_DESTROY

Embed is exiting.

WM_VSM_WINDOW_HANDLE

Handle to Embed main window.
arg:  Window handle