Skip to main content

The communication flows

The communication between the code compiled, running in the background, and the Sim4Sys-VB Javascript, running in Chrome, uses websockets. Each system can have its own port, allowing to simulate scenarios with several systems interacting.

The clock is controlled in Sim4Sys-VB. At each time-step, information are exchanged between Sim4Sys-VB and the code of each system running in the background. When several systems exchange information, the exchange goes through Sim4Sys-VB.

Communication Architecture

This architecture makes Sim4Sys-VB a continuous integration bench of all systems down the first branch of the V-development cycle. Any stakeholder can see in Sim4Sys-VB, at any time during development, how systems collaborate to produce an operational scenario.

Several views are available in Sim4Sys-VB : the physical scene in 2D or 3D, HMI views, timelines, measures board, and fully customized views. The events triggers can happen in different ways:

  1. sensors can be attached to an object that will then be able to capture other objects in its environment and deliver the information in the websocket.
  2. user actions can be defined :
  • on an object trajectory : the trigger will then happen when an object reaches a position or while it is in a zone
  • on the timeline : the trigger will then happen when the clock reached a time or while it is in a time zone
  • by interacting live with the scenario with HMI objects like buttons, cursors and so on.

The triggers are usually communicated to the code running in the background, thanks to the proper flows definition. Some internal flows are also needed in Sim4Sys-VB, when a trigger in a view needs to be seen in another view simultaneously.

The step by step explanation on how to define "mappings" of all kinds is given in the Virtual Bench user guide.