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_ALLOC_CODEGEN_INTERRUPT |
Sent at start of code generation so Interrupt Enable string is emitted and configured as set in diagram. wp:
Interrupt configuration
string |
VSE_FILE_READ |
Sent after diagram is
read. |
VSE_FILE_SAVE |
Sent before diagram is
saved. |
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_FUNC_POSTAMBLE |
Returns text string of code to insert at end of
function. |
VSE_GET_CODEGEN_FUNC_PREAMBLE |
Returns text string of code to insert at start of
function. |
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_INIT_PROCESSOR_CLK |
Returns string for CPU clock 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_OSDETAILS |
Returns current OS string (like “stretch” or
“buster”). |
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_GET_TOOLCHAIN |
Returns current toolchain string (like “gcc” or
“armcc”). |
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_CODEGEN_START |
Guarantees to be send before any other code generation message. Args are ignored. |
VSE_PRE_SIM_START |
Embed is about to start a simulation but has not initialized any blocks. |
VSE_SET_CODEGEN_OPTIONS |
Passes code generation link option to target code
generation DLL. |
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. |
VSE_TIME_STEP |
Simulation has completed a time step. |
VSE_VSM_ACTIVATE_VIEW |
Sent on diagram
activation. |
VSM_WINDOW_HANDLE |
Handle to Embed main
window. |
WM_COMMNOTIFY |
Comm port data is ready. |
WM_DESTROY |
Embed is exiting. |
WM_VSM_WINDOW_HANDLE |
Handle to Embed main
window. |