GithubHelp home page GithubHelp logo

pnp-software / fwprofile-editor-pub Goto Github PK

View Code? Open in Web Editor NEW
3.0 6.0 0.0 695 KB

The fwprofile editor is a web-based editor for the creation of state machines and activity diagrams compliant with the fwprofile.

License: GNU General Public License v3.0

Makefile 0.06% HTML 0.16% JavaScript 60.22% PHP 30.98% Shell 0.32% Python 5.95% C 2.31%
fwprofile modelling-tool code-generator c state-machine activity-diagrams

fwprofile-editor-pub's People

Contributors

cechticky avatar pasetti avatar tomas-m avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fwprofile-editor-pub's Issues

TC Parameters

This is a difficult issue and I cannot think of a good solution yet but the problem is (more or less) as follows.

Telecommands (items starting with "#TC") represent commands which can be sent to an application. A telecommand can have parameters. In the SCOS database base, the parameters are defined in this way:

  • The command is defined in table CCF: its unique identifier is in field CNAME of this table.
  • The list of parameters associated to a command is defined in table CDF: field CNAME of this table holds the identifier of a command and field PNAME holds the identifier of a parameter of the command
  • The characteristics of each parameter are defined in table CPC: field PNAME holds the identifier of a command parameter and field DESCR holds a human-readable name of the parameter

To illustrate, consider the following example:

  • In table CCF, we find command #TC(3,1) whose unique identifier is DPC70001
  • In table CDF, we find four entries corresponding DPC70001. Each entry is a parameter of TC(3,1). The unique identifiers of the two parameters are: DPP70001 to DPP70004
  • In table CPC, we finally find the human-readable names of the four telecommand parameters: DPU_IFSW_Sid, DPU_IFSW_Period, DPU_IFSW_NoDataItemId and DPU_IFSW_DataItemId

The need now is for the user to be able to define the value of the parameters of a command. For instance, a user might have a diagram where he is using telecommand #TC(3,1) and he would like to express the fact that he wants parameter DPU_IFSW_Sid to be equal to "HK_BASIC" and parameter DPU_IFSW_Period to be equal to 1. The other two parameters instead remain open.

To make things simpler we can make the following assumptions:

  • Parameter values are always expressed as strings
  • Parameters can only be defined if the TC item is defined in an action or guard (if it is defined in a "note" element, then there is no need to define its parameters)
  • A guard or an action can only contain one TC item

I am not sure what is the best way to let users define the TC parameters ...

Suppose that we have a node N1 with a #TC(x,y) element. Here are two options of how the parameters for TC(x,y) might be defined:

  • The parameters are defined in "run code" element: the user starts typing #TcPar and the autocompletion menu proposes the parameters associated to the TC(x,y)
  • The user creates a note with a connector to node N1 and then he starts typing #TcPar in the note and the autocompletion menu proposes the parameters associated to the TC(x,y)

I would appreciate Tomas's feedback on the above problem!

Indentation in Diagram Notes

For some reason, it is not possible to have leading spaces in the text in the notes. For instance, if I write the following text in a note:

image

What I see in the main panel of the editor is this:

image

Thus, it seems that the indentation at the start of a line is lost. Is there a special reason for this? Is there a way to keep the indentation?

Title Attribute for Diagrams

Diagrams have names which also appear on the "Global Property" panel of the diagram. I often find that the diagram names are short alphanumeric strings and are therefore not very descriptive. I would like to have a "Title" attribute for diagrams where I can put a brief description of a diagram.

At present, I put the diagram title in a note but perhaps we should make the title an attribute of a diagram and should show it on the diagram's "Global Property" panel.

As an example, the name of a diagram might be something like: "UpdRamMem" and its title might be something like: "Update RAM Memory".

Model Save Operation Fails Silently

I have made an installation of the editor on a server. The editor is accessed from an address like: https://www.xyz.com/fwprofile/. I have defined several models in the editor but I now have a non-nominal behaviour when I try to update the models. Here is what happens:

(1) I load a model and make the changes in my browser
(2) When I have completed the changes, I save the model
(3) The save operation appears to be successful
(4) However, when, at a later time and after having edited other models, I re-load the model I edited at point (1), I find that the changes I made at point (1) are no longer present
(5) Inspection of /var/log/apache2/errors.log shows that the save operation done at point (2) gave rise to the following error message:

[Fri Oct 15 22:09:21.599430 2021] [php7:warn] [pid 129045] [client 217.236.113.233:48674] PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in Unknown on line 0, referer: https://www.xyz.com/fwprofile/

(6) If I then log out and close the browser tag with the editor and then open a new browser tag and log back into the editor, the changes I had made at point (1) appear to have been saved!!!!

This behaviour is in my view non-nominal but it might be due to a server configuration issue because I do not recall observing it on the "official" deployment of the FW Profile Editor at: www.pnp-software.com/fwprofile/editor.

Import of Multiple json Files

At present, we can export multiple diagrams to json format but we can only import json files one by one. It would often be convenient to be able to import multiple json files. This could be done either by having a file picker where I can select the files I wish to import or by selecting a directory from which all *.json files are imported.

key was too long; max key length is 1000

Tested with wsl (windows subsystem for linux)

sudo apt install php
sudo apt install mysql-server
sudo service mysql start
...
calling install.php i got this:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARCHAR(3000)' at line 1
mysql> [Fri Sep 24 16:40:03 2021] 127.0.0.1:53582 Accepted
[Fri Sep 24 16:40:03 2021] PHP Notice:  Fatal error: The query CREATE TABLE IF NOT EXISTS diagrams (
   id int(10) unsigned NOT NULL AUTO_INCREMENT,
   userID int(10) unsigned NOT NULL,
   name varchar(255) NOT NULL,
   isEmpty enum('N','Y') NOT NULL DEFAULT 'N',
   editorType varchar(255) NOT NULL,
   lastUpdate datetime NOT NULL,
   fwprop mediumtext NOT NULL,
   svg mediumtext NOT NULL,
   width int(10) unsigned NOT NULL,
   height int(10) unsigned NOT NULL,
   PRIMARY KEY (id),
   KEY name (name,userID),
   KEY userID (userID)
   ) ENGINE=MyISAM  has generated error Specified key was too long; max key length is 1000 bytes in /mnt/c/work/directory/work/wika/fwprofile-editor-pub/inc_db.php on line 54
[Fri Sep 24 16:40:03 2021] 127.0.0.1:53582 [200]: GET /install.php

I removed all the ENGINE=MyISAM and got it done.
First tests running with the webeditor (just statemachines) seems to work.

Cannot Import More Than One json Model

I do not seem to be able to import more than one model into the editor. Here is what I do:

(1) I go to www.pnp-software.com/fwprofile/editor and log in the editor.
(2) I go to "Actions", select "Import json" and successfully import a new model
(3) After the newly imported model has been saved, I go to "presets" and select "New Procedure"
(4) I now have a clean canvas and I go again to "Actions" and select "Import json" but this time the import operation fails (I do not get any error messages but the model which I have selected for import is not imported and the canvas remains blank)

In order to make the import function work again, I must close the browser tab with the editor and then open a new one and re-start the editor in the new tab. After this is done, I can import one model in the browser (but only one -- afterwards, I get the same behaviour as described above).

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.