Git Product home page Git Product logo

hula's People

Contributors

felixwellen avatar ltjax avatar miq avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

felixwellen

hula's Issues

Ugly snake caseing of properties, attributes and commands

An attribute definition like

[[attributes]]
name = "ExperimentUUID"
type = "bool"

results in the member function deklaration

virtual bool read_experiment_u_u_i_d() = 0;

in the hula generated base class. The following declaration would be more correct and much better to read:

virtual bool read_experiment_uuid() = 0;

Handle reserved names

Consider reserved names for C++ (continue, break, etc) and tango (Init, State, Status)
E.g. when naming commands "continue" - error out or change the name slightly?

Make hula build compatible to conan 2

A build with conan 2 gives the following error:

ERROR: /tango-ads-bridge/hula:
ConfigParser: Unrecognized field 'build_requires'

In addition the dependency cppTango also does not build with conan 2...


Recipe 'cpptango/9.3.3@softwareschneiderei/stable' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0


ERROR: Package 'cpptango/9.3.3@softwareschneiderei/stable' not resolved: cpptango/9.3.3@softwareschneiderei/stable: Cannot load recipe.
Error loading conanfile at '/root/.conan2/p/cppta8c4692633816f/e/conanfile.py': Unable to load conanfile in /root/.conan2/p/cppta8c4692633816f/e/conanfile.py
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/root/.conan2/p/cppta8c4692633816f/e/conanfile.py", line 4, in
ImportError: cannot import name 'ConanFile' from 'conans' (/usr/local/lib/python3.9/dist-packages/conans/init.py)

Support spectrum attributes and array commands

Design

Array command parameter-/return-type:

parameter_type = "string[]"
return_type = "float[]"

Will use use std::vector<std::string> and std::vector<float>

Spectrum attribute:

type = "int[1024]"

Will use std::vector<int>, max size 1024

Image attribute:

type = "double[800,600]"

Will use std::vector<double>, max size 800x600 (hence the vector can have up to 800*600 elements)

Make commands and attributes optional

You have to define at least one attribute and at least one command. In the wild there may be some devices without the need of one or the other.

Especially in development there is the realistic possibility to start without (user defined) commands for example.

When the sections for attributes/commands are missing following errors are reported:

[error] key "commands" not found in the top-level table
--> master.toml
|
1 | name = "Master"
| ^--- the top-level table starts here

[error] key "attributes" not found in the top-level table
--> master.toml
|
1 | name = "Master"
| ^--- the top-level table starts here

If you specify a mandatory section but leave it empty following error is displayed:

[error] key "name" not found
--> master.toml
|
15 | [[attributes]]
| ~~~~~~~~~~~~~~ in this table

Numbers in attribute names are disappearing

I have a device with attributes like

[[attributes]]
name = "Master1Alive"
type = bool

[[attributes]]
name = "Master2Alive"
type = bool

Current hula generates these functions out of the attribute definition:

virtual bool read_master_alive() = 0;
virtual bool read_master_alive() = 0;

Obviously that does not work due to duplicate declarations because the number is lost.

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.