Slide 1

Slide 1 text

IoT WITH EXTENSIBLE C

Slide 2

Slide 2 text

IoT with extensible C Kolja Dummann itemis AG ! @dumdidum http://logv.ws

Slide 3

Slide 3 text

IoT WITH EXTENSIBLE C

Slide 4

Slide 4 text

IoT with extensible C mbeddr http://mbeddr.com

Slide 5

Slide 5 text

IoT with extensible C mbeddr A Open Source Collection of integrated languages for embedded software engineering

Slide 6

Slide 6 text

IoT with extensible C Architecture

Slide 7

Slide 7 text

IoT with extensible C Architecture Core Plain C

Slide 8

Slide 8 text

IoT with extensible C Architecture Core Plain C Ext Components Statemachines Units

Slide 9

Slide 9 text

IoT with extensible C Architecture Core Plain C Ext Components Statemachines Units CC Requirements Documentation

Slide 10

Slide 10 text

IoT with extensible C Architecture Core Plain C Ext Components Statemachines Units CC Requirements Documentation Debugger

Slide 11

Slide 11 text

IoT with extensible C Architecture Core Plain C Ext Components Statemachines Units CC Requirements Documentation Analyses Debugger

Slide 12

Slide 12 text

IoT with extensible C Physical Units int16 distance = …; int16 time = …; int16 speed = time / distance; Physical Units

Slide 13

Slide 13 text

IoT with extensible C Physical Units int16 distance = …; int16 time = …; int16 speed = time / distance; Physical Units

Slide 14

Slide 14 text

IoT with extensible C Physical Units int16/m/ distance = …; int16/s/ time = …; int16/mps/ speed = distance / time; Physical Units

Slide 15

Slide 15 text

IoT with extensible C cs interface FlightRecorder { Trackpoint* process(Trackpoint* p) pre(0) p != null pre(1) p->id != 0 pre(2) p->time != 0 s post(3) result->id != 0 } Components Components

Slide 16

Slide 16 text

IoT with extensible C component AutoPilot extends nothing { requires FlightRecorder flightRecorder provides CourseProvider cp int16 cp_getCourse() <= op cp.getCourse { return 0; } } Components Components

Slide 17

Slide 17 text

IoT with extensible C statemachine selfdestruction initial = starting { in event update(int8 speed, int8 hight) state starting { on update [speed > 10 && hight > 0] -> flying } state flying { do { record_flightdata(); } on update [speed > 100 && hight < 42] -> kill } state kill { entry { blow_rocket(); } } } Statemachine Statemachine

Slide 18

Slide 18 text

IoT with extensible C testcase main { assert-equals(0) 10 == add(5, 5); assert-less(1) 20 < add(5, 10); assert(2) 30 == add(20, 10); } Testing Testing

Slide 19

Slide 19 text

IoT with extensible C Verification Verification

Slide 20

Slide 20 text

All of C Open Source Build with extensibility in mind Default extensions (Units, SM, …) Debug on the semantics of the DSL mbeddr

Slide 21

Slide 21 text

IoT WITH EXTENSIBLE C

Slide 22

Slide 22 text

IoT with extensible C Projectional Language Workbench Open Source

Slide 23

Slide 23 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 24

Slide 24 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 25

Slide 25 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 26

Slide 26 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 27

Slide 27 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 28

Slide 28 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 29

Slide 29 text

IoT with extensible C Projection vs. Parser Projection Parser

Slide 30

Slide 30 text

IoT with extensible C Flexible Notations Sum designed by Alex Auda Samora from the thenounproject.com Code/Text Tables Mathematical Graphical

Slide 31

Slide 31 text

IoT with extensible C Generator Generator

Slide 32

Slide 32 text

IoT with extensible C Generator Generator

Slide 33

Slide 33 text

IoT with extensible C Generator Generator

Slide 34

Slide 34 text

IoT with extensible C Generator Generator

Slide 35

Slide 35 text

IoT with extensible C Generator Generator

Slide 36

Slide 36 text

MPS Projectional Editor Open Source Support for all kinds of notations Incremental Generators All about LOP

Slide 37

Slide 37 text

IoT WITH EXTENSIBLE C

Slide 38

Slide 38 text

IoT with extensible C MQTT “MQ Telemetry Transport (MQTT) is a publish-subscribe based "light weight" messaging protocol for use on top of the TCP/IP protocol. It is designed for connections with remote locations where a "small code footprint" is required and/or network bandwidth is limited.” Wikipedia

Slide 39

Slide 39 text

IoT with extensible C Raspberry Pi “The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools.”

Slide 40

Slide 40 text

IoT with extensible C Sample Build Traffic Light A traffic light representing the state of the tests on the build server.

Slide 41

Slide 41 text

IoT with extensible C Sample Build Traffic Light MQTT A traffic light representing the state of the tests on the build server.

Slide 42

Slide 42 text

IoT with extensible C Sample Build Traffic Light MQTT GPIO A traffic light representing the state of the tests on the build server.

Slide 43

Slide 43 text

IoT with extensible C Sample Build Traffic Light MQTT GPIO GPIO A traffic light representing the state of the tests on the build server.

Slide 44

Slide 44 text

IoT with extensible C DEMO Picture CC-BY-NC by Don from Flickr