WuxSimuExt.h#
Interfaces for standalone executables or simulation DLL extensions.
Defines
-
SIM_INFO#
“Information” level for WuxLogf
-
SIM_WARNING#
“Warning” level for WuxLogf
-
SIM_ERROR#
“Error” level for WuxLogf
Functions
-
void WuxLogf(int nLevel, const char *pszFormat, ...)#
Log a message.
The message is logged to the standard output, or to the Simulator tab of the output window when the target is the SCADE Simulator.
- Parameters:
nLevel – SIM_INFO, SIM_WARNING or SIM_ERROR
pszFormat – Format control
... – Optional arguments
-
int WuxGetExtensionsCount()#
Return the number of registered extensions.
- Returns:
int
-
CWuxSimulatorExtension **WuxGetExtensions()#
Return the array of the registered extensions.
The number of elements is provided by
WuxGetExtensionsCount
.- Returns:
CWuxSimulatorExtension**
-
class CWuxSimulatorExtension#
Base class for extending a standalone executable or a SCADE simulation DLL.
This class provides two interfaces:
Callbacks for the integrating application, for example the SCADE Simulator or the Generic Integration wrapper’s standalone executable.
Extended callbacks for integration applications other than the SCADE Simulator.
Public Functions
-
CWuxSimulatorExtension()#
Construct the instance and registers it.
-
virtual ~CWuxSimulatorExtension()#
Unregister the instance.
-
virtual void BeforeSimInit()#
Process the notification
BeforeSimInit
.This notification is sent before the initialization of the generated code, either from SCADE Suite or from SCADE Display.
The default implementation is empty.
-
virtual void AfterSimInit()#
Process the notification
AfterSimInit
.This notification is sent after the initialization of the generated code, either from SCADE Suite or from SCADE Display.
The default implementation is empty.
-
virtual void BeforeSimStep()#
Process the notification
BeforeSimStep
.This notification is sent before the call to the cyclic function of the root operators.
The default implementation is empty.
-
virtual void AfterSimStep()#
Process the notification
AfterSimStep
.This notification is sent after the call to the cyclic function of the root operators.
The default implementation is empty.
-
virtual void ExtendedSimStop()#
Process the notification
ExtendedSimStop
.This notification is sent when the main loop exits.
The default implementation is empty.
-
virtual void ExtendedGatherDumpData(char *pData)#
Retrieve additional dump data.
This function is called by the SCADE Simulator and its purpose is unclear.
The default implementation is empty.
-
virtual void ExtendedRestoreDumpData(const char *pData)#
Restore additional dump data.
This function is called by the SCADE Simulator and its purpose is unclear.
The default implementation is empty.
-
virtual int ExtendedGetDumpSize()#
Return the size of additional dump data.
This function is called by the SCADE Simulator and its purpose is unclear.
The default implementation returns 0.
-
virtual void UpdateValues()#
Process the notification
UpdateValues
.This function is called by the SCADE Simulator and its purpose is unclear.
The default implementation is empty.
-
virtual void UpdateSimulatorValues()#
Process the notification
UpdateSimulatorValues
.This function is called by the SCADE Simulator and its purpose is unclear.
The default implementation is empty.
-
virtual const char *GetIdent()#
Return the identifier of the extension.
The default implementation returns
"<none>"
.- Returns:
const char*
-
virtual bool IntegrationStart(int argc, char *argv[])#
Process the notification
IntegrationStart
.This function is called at startup, when the target is not the SCADE Simulator. It allows accessing the command line parameters specified when running the standalone executable.
Return
false
to stop the process, otherwisetrue
.The default implementation is empty and returns
true
.- Parameters:
argc – number of parameters
argv – array of parameters @ return bool
-
virtual void IntegrationStop()#
Process the notification
IntegrationStop
.This function is called before the process stops, when the target is not the SCADE Simulator.
The default implementation is empty.
-
virtual bool SelfPaced()#
Return whether the extension has its own synchronization mechanism.
When none of the registered extensions returns
true
, the integration uses the specified period to clock the main loop.This function is not called when the target is the SCADE Simulator.
The default implementation returns
false
.
-
virtual bool IsAlive()#
Return whether the extension is alive.
The process stops as soon as a registered extension returns
false
. For example, when a connection is closed.This function is not called when the target is the SCADE Simulator.
The default implementation returns
true
.