API

These demos focus on basic systems or single topics of the SIL Kit API.

Simple Can

Abstract

Minimalistic demo for a participant with Can communication and virtual time synchronization.

Executables
  • SilKitDemoSimpleCan

Sources
Requirements
Parameters
  • <ParticipantName> Name of the SIL Kit participant.

System Example

Run the following commands in separate terminals:

# Registry (if not already running):
./sil-kit-registry

# Participant P1:
./SilKitDemoSimpleCan P1

# Participant P2:
./SilKitDemoSimpleCan P2

# System Controller:
./sil-kit-system-controller P1 P2

Autonomous lifecycle

Abstract

Minimal example of a participant with an autonomous lifecycle. The demo shows that this participant can be started and stopped independently from other participants.

Executables
  • SilKitDemoAutonomous

Sources
Requirements
Parameters
  • <ParticipantName> Name of the SIL Kit participant.

System Example

Run the following commands in separate terminals:

# Registry (if not already running):
./sil-kit-registry

# Participant P1:
./SilKitDemoAutonomous P1

# Participant P2:
./SilKitDemoAutonomous P2

Coordinated lifecycle

Abstract

Minimal example of a participant with a coordinated lifecycle. This shows how multiple participants can be started and stopped simultaneously, controlled by the sil-kit-system-controller.

Executables
  • SilKitDemoCoordinated

Sources
Requirements
Parameters
  • <ParticipantName> Name of the SIL Kit participant.

System Example

Run the following commands in separate terminals:

# Registry (if not already running):
./sil-kit-registry

# Participant P1:
./SilKitDemoCoordinated P1

# Participant P2:
./SilKitDemoCoordinated P2

# System Controller:
./sil-kit-system-controller P1 P2

Simulation step handler

Abstract

Minimal example of a participant with time synchronization and a simulation step handler.

Executables
  • SilKitDemoSimStep

Sources
Requirements
Parameters
  • <ParticipantName> Name of the SIL Kit participant.

System Example

Run the following commands in separate terminals:

# Registry (if not already running):
./sil-kit-registry

# Participant P1:
./SilKitDemoSimStep P1

# Participant P2:
./SilKitDemoSimStep P2

# System Controller:
./sil-kit-system-controller P1 P2

Asynchronous simulation step handler

Abstract

Minimal example of a participant with time synchronization and an asynchronous simulation step handler.

Executables
  • SilKitDemoSimStepAsync

Sources
Requirements
Parameters
  • <ParticipantName> Name of the SIL Kit participant.

System Example

Run the following commands in separate terminals:

# Registry (if not already running):
./sil-kit-registry

# Participant P1:
./SilKitDemoSimStepAsync P1

# Participant P2:
./SilKitDemoSimStepAsync P2

# System Controller:
./sil-kit-system-controller P1 P2

Network Simulator API

Abstract

Demonstrates the usage of the experimental SIL Kit NetworkSimulator API. A custom network simulation for Can is set up, the network simulator application can be used together with the Can demo.

Sources
Requirements
Parameters
  • <ParticipantConfiguration.yaml> File name of the participant configuration to be used; use DemoNetSim.silkit.yaml for an example configuration.

  • <ParticipantName> The name of the participant within the simulation.

  • [RegistryUri] The silkit:// URI of the registry to connect to; defaults to silkit://localhost:8500 (optional).

Parameter Example
# Start the Network Simulator Demo with the given configuration file and participant name
./SilKitDemoNetSim ./SilKit-Demos/NetworkSimulator/DemoNetSim.silkit.silkit.yaml NetworkSimulator
System Example

Interplay with the Can Demo:

# Registry (if not already running):
./sil-kit-registry

# Monitor (optional):
./sil-kit-monitor

# Can Reader:
./SilKitDemoCanReader

# Can Writer:
./SilKitDemoCanWriter

# System Controller:
./sil-kit-system-controller CanReader CanWriter NetworkSimulator

# Network Simulator Demo:
./SilKitDemoNetSim ./SilKit-Demos/NetworkSimulator/DemoNetSim.silkit.silkit.yaml NetworkSimulator
Notes
  • The Can Reader and Writer configure their controller on the network “CAN1”, which is simulated by the network simulator demo.

  • In the simple bus logic of the network simulation demo (see Demos\NetworkSimulator\src\Can\MySimulatedCanController.cpp), the acknowledgment (CanFrameTransmitEvent) is sent directly to the Can Writer. The frame itself (CanFrameEvent) is sent with a delay of 2ms.

# Registry (if not already running):
./sil-kit-registry

# Can Reader:
./SilKitDemoSimpleCan CanReader

# Can Writer:
./SilKitDemoSimpleCan CanWriter

# System Controller:
./sil-kit-system-controller CanReader CanWriter