Customization > SySim- SysML model execution > SySim profile package > <<SySim TWSimulator>> stereotype (SySim)
  
<<SySim TWSimulator>> stereotype (SySim)
Apply the «SySim TWSimulator» to Blocks that have the «SySim Simulator» applied.
The «SySim TWSimulator» stereotype prepares the simulation to work with the following:
A remote ThingWorx connection server, where simulation remote properties are sent, and from which execution of remote services is initiated.
An (optional) remote ThingWorx Composer, to which ThingShape definitions for Remote Things are sent.
The «SySim TWSimulator» stereotype applies the following Tag Definitions:
SySim TWConnectionServerAddress
Set to the IP:Port value required for reaching the ThingWorx connection server. For example, 192.168.200.102:8443. Only encrypted connections are supported.
SySim TWApplicationKey
Set to the GUID representing the ThingWorx application key associated with the Remote Things in the simulation. This replaces the required credentials to establish a connection to the connection server.
SySim TWComposerAddress
Set to the IP:Port value for reaching the ThingWorx Composer. This is optional and is used to send the ThingShapes to the composer environment. For example, 192.168.200.102:80. Leave blank if updating ThingShapes is not a requested feature.
SySim TWComposerUserColonPwd
Set to username:password. These are the credentials that authorize SySim to access the ThingWorx Composer.
SySim TWCurlPathName
Set to the path and name of the CURL executable. CURL is a public domain command line utility that is able to send data to an HTTP endpoint. This is used to send the updated ThingShapes to the Composer. Leave blank if updating ThingShapes is not a requested feature. For example, C:\Program Files\cURL\bin\curl.
How the code is generated
When the «SySim TWSimulator» stereotype is used, a nested class named TWClient is generated to the SySim SimMaster class, that is, the main class of the SySim generated application. The TWClient class inherits from the ConnectedThingClient class in the ThingWorx SDK.
The TWClient class has a constructor, a static operation that generates a configurator (an instance containing the connection options for the ThingWorx client), a ClientStart operation and a ClientStop operation.
The TWClient class is instantiated in the SimMaster class. The ClientStart and ClientStop operations are bound to the events that are generated when the Run and Stop buttons are clicked on the SySim simulator ribbon.