Code Examples Overview¶
This section contains code examples for various IoT modeling and digital twin implementation technologies covered in this documentation.
Available Examples¶
CAPS Model Examples¶
CAPS Code Examples - Model-based IoT system design using CAPS.
Download: CAPS Code Examples (ZIP)
These examples demonstrate how to use the CAPS (Capabilities-based Architecture Platform for Smart-devices) modeling language for IoT system design:
- Hardware modeling with CAPSHWML
- Software architecture modeling with CAPSSAML
- Deployment mapping models
- Network configuration specifications
CupCarbon Examples¶
CupCarbon Code Examples - Wireless Sensor Network simulation using CupCarbon.
Download: CupCarbon Code Examples (ZIP)
These examples show how to create and simulate Wireless Sensor Networks (WSNs) using the CupCarbon simulator, including:
- Router node scripts for message forwarding
- Motion detector sensor scripts
- Light control actuator scripts
- Temperature monitoring scripts
- Gateway node configurations
- Hardware and radio configurations
- GPS movement path definitions
PyDEVS Examples¶
PyDEVS Code Examples - Discrete event simulation using PyDEVS for IoT systems.
Download: PyDEVS Code Examples (ZIP)
These examples demonstrate how to build discrete event simulations for IoT systems using the Python DEVS (Discrete Event System Specification) framework. They include:
- Motion sensor simulation
- Message routing components
- Light control actuator
- Complete system model integration
- Simulation execution and analysis