janwilmans / dezynesamples Goto Github PK
View Code? Open in Web Editor NEWSimple examples of Dezyne models and their generated code
License: MIT License
Simple examples of Dezyne models and their generated code
License: MIT License
All tests were done on the version of Dezyne downloaded from the Dezyne website at Nov 2. 2017.
Generated using dzn service version 2.5.3.
dzn code -l c++ -s AlarmSystem Alarm.dzn
generated two files:
Alarm.hh and Alarm.cc
In Alarm.hh:
////////////////////////////////////////////////////////////////////////////////
// #ifndef ALARMSYSTEM_HH
// #define ALARMSYSTEM_HH
//interface includes
#include "Alarm.hh"
#include "Alarm.hh"
#include "Alarm.hh"
While this does not actually cause any problems, it is a little weird to include the same files multiple times.
dzn code -l c++ -s AlarmSystem Alarm.dzn
generated two files:
Alarm.hh and Alarm.cc
However, Alarm.cc tried to:
#include "AlarmSystem.hh"
So this does not compile.
dzn code -l c++ -s Alarm Alarm.dzn
generated two files:
Alarm.hh and Alarm.cc
However, the thread-safe-shell is not actually generated at all!
Could be done using shared-object in the locator
------ Build started: Project: Alarm, Configuration: Debug x64 ------
1>main.cpp
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\vs2017project\main.cpp(44): warning C4100: 'argv': unreferenced formal parameter
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\vs2017project\main.cpp(44): warning C4100: 'argc': unreferenced formal parameter
1>runtime.cc
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(19): warning C4458: declaration of 'state' hides class member
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(30): note: see declaration of 'dzn::context::state'
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(101): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
1>pump.cc
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(19): warning C4458: declaration of 'state' hides class member
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(30): note: see declaration of 'dzn::context::state'
1>c:\users\jan\dezyneworkspace\dezynesamples\alarm\dzn\context.hh(101): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
1>Alarm.cc
1>Generating Code...
1>Alarm.vcxproj -> C:\Users\jan\DezyneWorkspace\DezyneSamples\Alarm\vs2017project\x64\Debug\Alarm.exe
1>Done building project "Alarm.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
<external>.arm -> .alarm.console.arm [0, 0]
sensor enabled
.alarm.console.return -> <external>.return [1, 0]
<external>.triggered -> .alarm.sensor.triggered [1, 0]
Detected!
siren on!
I've added [trace_in] and [trace_out] to the messages here:
<external>.arm -> [trace_in] .alarm.console.arm [0, 0]
sensor enabled
.alarm.console.return -> [trace_out] <external>.return [1, 0]
<external>.triggered -> [trace_out] .alarm.sensor.triggered [1, 0]
Detected!
siren on!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.