Giter Site home page Giter Site logo

dezynesamples's People

Contributors

janwilmans avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dezynesamples's Issues

Code generation problems

All tests were done on the version of Dezyne downloaded from the Dezyne website at Nov 2. 2017.
image

Generated using dzn service version 2.5.3.

without TSS (thread-safe-shell)

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.

with TSS (thread-safe-shell)

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.

with TSS (thread-safe-shell), but providing the wrong component as System

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!

Wishlist for better workflow integration

  • Namespaces!
  • #Include’s and copyright comments in generated code
  • No warnings in generated code at MSVC level 4
  • Build system support
    • Verify all + generate all code (incremental in UI and full at command line)
    • Model <> code integrity check
    • Option to use windows (\r\n) newlines
    • Better formatting generated code (post process using clang_format if it is present, so user can customize)
    • Download runtime from command line (without doing it file-by-file)
  • Visual studio UI integration support
  • Generated Armors
  • Custom code generation from interface models (COM, http,…)
  • download multiple files / wildcards for dzn get

Warning at warning level 4 in visual studio 2017

------ 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 ==========

Asymetrical log messages

<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!
  • signals on out-ports coming into a system only have an 'trace_out' entry
  • signals on out-ports going out of a system do not log anything

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.