Code Monkey home page Code Monkey logo

ccdd's People

Contributors

bawi235 avatar bawillisjsc avatar jasonduley avatar kevinmccluney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccdd's Issues

Unable to add table to group

When using the 'Manage Groups' dialog, I'm able to select a table, select a group, and then click the right arrow to move the table into the group and see that its now listed under that group. When I click the store button no database queries show up in the main window but I'm able to exit the dialog without a warning about unsaved changes. The next time I open the dialog the table I added is not longer present in the group, indicating its not being stored in the database correctly.

Feature Request: Input datatype for existing structure rows

It would be useful to have a input data type which validated that the input is a structure row which already exists in the database. The use case is for defining data products which depend on existing definitions (or properties of those definitions) in the database, such as:

  • defining CCDD table types which describe CFS limit checker tables. Limit checker tables define the value to be checked in terms of the apid and packet offset, both of which are already available from CCDD given a valid structure row.
  • defining CCDD table types which describe CFS HK tables. HK tables define the value to place in a new packet by Apid and packet offset, similar to above.

Having the entry field validate the entry is an existing row in the database greatly simplifies the error checking necessary in the scripts to generate these products.

As a user-convenience feature, it would also be great if the input field could prompt/autocomplete a user typing the name/path of the mnemonic to make it easier to enter this data.

Thanks for the consideration.

Fields with boolean type not displayed as check box

When adding custom columns to the default structure table, the user's guide indicates that a check box will be used to represent boolean fields when editing tables. In practice a text field is present to the user which only accepts true or false. This works, but doesn't appear to be consistent with the user guide and results in having to handle an additional option (true, false, or empty) in script logic.

In built-in tables such as the Table Type Editor, the Unique and Required fields do correctly display as check boxes, so perhaps just user-defined fields are not being formatted?

Feature Request: Create/Delete projects from CLI

It would be useful to have the ability to create and delete projects from the command line interface to facilitate using CCDD as a background database.

I'm attempting to setup CCDD such that when a developer checks out a git branch it loads the correct version of the database into CCDD for them. Currently, if importing tables into an existing project, there's no option which allows for deleting tables not found in the imported file. This means that while tables present in the import can be updated (using 'replaceExisting' option), any tables present in the project (but not in the import) will remain in the project after import.

I believe the easiest solution for this workflow (and in terms of implementation) is to create a new project each time a branch is checked out, which requires the ability to create a project from the CLI and preferably a method of deleting them from the CLI.

CCDD hangs when running script via -execute

The command shown below is intended to run a script on a group to generate outputs. The documentation states that the -execute argument should result in a headless run of the script, however the CCDD Gui window pops up unexpectedly. Many queries are run and then the output freezes. After several minutes I ended up terminating CCDD due to apparent inactivity.

Command:
java -cp C:\My\Absolute\CCDD\Path\CCDD.jar CCDD.CcddMain -logPath C:\My\Absolute\Log\Path -project myProject -user myUser -password #### -execute 'myScript.js:Group:myGroup' -scriptOutPath C:\My\Absolute\Out\Path

Running the same database/same user/same script/same group/same paths via the GUI completes successfully in several seconds. I also observe this behavior when attempting to call one of the standard scripts, itosRecFile.js.

Not sure if its relevant/equatable, but starting the Gui, running the script, and closing the Gui resulted in 249 entries in the log file whereas running the script via the -execute argument results in ~50,000 entries in the log file before it stops updating and I terminate CCDD. I haven't closely examined the logs, but that seems to indicate that its doing vastly different things in each case.

Not sure if its relevant, but when letting the script run until the log stops updating (after several minutes), I notice that the last two entries are always:

localhost:5432|myProject|myUser|06/08/2018 08:57:43.015|Success|Project 'myProject' unlocked
localhost:5432|myProject|myUser|06/08/2018 08:57:43.016|Success|Project database 'myProject' closed

This was demonstrated on:
OS: Win10
CCDD: 1.2.37 6-7-2018
Java: 1.8.0_171 (64-bit)
PostgreSQL: 10.4
JDBC: PostgreSQL 9.4.1207.jre7 (type 4)
Jetty 9.2.18.v20160721

MsgIDs applied to non-root tables

When using the Message IDs > Assign IDs menu to apply message IDs to structure tables, Message IDs are applied to all structure tables, not just root tables. This results in child tables being assigned Message IDs.

Structure tables (by default) have two fields, Telemetry Message ID and Telemetry Message ID Name. These fields have applicability set to Root Only. This setting seems to control whether the Data > Edit Tables editor displays the Message ID field for editing. It seems like the Assign IDs menu should respect the Root Only setting of that field.

Exception when attempting to import file - filename?

Observed following exception when attempting to import a file named interfaces (1).json:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.filechooser.FileNameExtensionFilter cannot be cast to CCDD.CcddDialogHandler$ExtensionFilter
    at CCDD.CcddDialogHandler.choosePathFile(CcddDialogHandler.java:1231)
    at CCDD.CcddTableManagerDialog$1.complete(CcddTableManagerDialog.java:616)
    at CCDD.CcddBackgroundCommand$1.done(CcddBackgroundCommand.java:192)
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
    at javax.swing.Timer.fireActionPerformed(Timer.java:313)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Observed in 1.4.34 on OSX.

Feature Request: Add table to group during creation

It would be helpful if the New Table dialog allowed adding the new table to a group during its creation.

Currently, the process of creating a grouped table requires creating the table (via Data > New Table) and then going back into the Data menu to access Manage Groups and add the table to a group.

This process could be streamlined by having a dropdown menu on the New Table dialog which would default to No Group (current functionality) but allow the user to select any existing group to automatically add the table to that group.

Possible Command Import Bug?

I'm currently integrating a C2 system called COSMOS with CCDD for use with CubeSats. The telemetry configuration file integration has gone smoothly and is now automated. However, when importing commands into CCDD using CSV format I have noticed the Arg 1 Minimum and Arg 1 Maximum fields, when given column values, seem to stymie importation. It's almost certainly isolated to these two fields as I added a custom "Endianness" field at the end using the Table Type Editor and this was rendered fine into CCDD whenever I deleted any values for Arg 1 Minimum and Arg 1 Maximum. Any addition of these values causes the entire table to fail to load. I was wondering if you're aware of any outstanding bug. I cannot attach any example files I have been working with as they may contain classified information, but you can e-mail me at [email protected] if you wish to speak further about this issue. Your name did not have an associated e-mail listed with it in the internal global address book.

Installation/configuration on mac

One of the machines I'm attempting to use CCDD on is a mac (running OSX 10.12.6). We've cloned the CCDD repo and can start CCDD, and have installed Postgres, and CCDD can connect to the database. We're unable to create a CCDD project. When we attempt to create a project through the menu option, several commands are issued, shown below:

 Command | SELECT r.rolname FROM pg_catalog.pg_roles r ORDER BY r.rolname ASC;
 Command | SELECT datname \|\| E';' \|\| split_part(description, ';', 2) \|\| E';' \|\| split_part(split_part(description, ';', 1), 'Core Flight Software Command and Data Dictionary', 2) \|\| E';' \|\| substr(description, length(datName \|\| 'Core Flight Software Command and ... (247)

On other systems there's a CREATE DATABASE command issued after these two, that we're not observing on the mac. CCDD doesn't seem to issue the command to actually create the database, but also doesn't error or provide any feedback as to what's happening.

If you have any mac users, could they provide more detailed installation/configuration directions? We first tried the postgres installer (https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, version 10.5) but kept getting the error:

Problem running post install step … the Database Cluster Initialisation failed

We did manually initialize a database (using initdb) and create users, but were unable to get CCDD to create a project.

We then tried the PostgresApp (https://postgresapp.com/) (postgres versions 9.6 and 10.5) but are observing no errors and the same behavior from CCDD.

I'm not sure this is a CCDD issue. a postgres issue, or a mac issue, but will be happy to try to isolate it if you can provide some guidance. Any guidance would be appreciated. Thanks!

No feedback with password authentication issue

When CCDD is started without a user specified, the user is prompted for a database username and password. I'm attempting to setup a new CCDD machine and am stuck at this prompt (ie, username and password are entered, click 'okay', and prompt reappears). I've checked the log and there's only one entry (echoing the arguments CCDD was started with), but nothing relating to a login attempt.

When I start CCDD with the user argument (set to the user I would enter into the dialog) and shutdown, I get the following error in the log:
FATAL: password authentication failed
I suspect that's the same issue I'm seeing through the GUI, but can't tell without additional feedback from CCDD. It would be very helpful if CCDD could provide more information, preferably through a log message (and a dialog if using the GUI).

Observed with 1.4.44 on Ubuntu.

CCDD returns 0 (Success) with database errors

When I attempt to connect to a project which is already open, I (correctly) get the following error message:

Database Error : Cannot delete project database 'localhost:1234/myproject'; cause 'ERROR: database "myproject" is being accessed by other users
  Detail: There is 1 other session using the database.'

however CCDD still exits with exit code 0 (Success). It would be helpful if it returned a non-zero exit code so that calling program can handle the error. This is a similar issue to #47 where it was noted that CCDD (used to) return 0 on a password authentication failure.

Feature Request: Methods to query global structure tables

According to the documentation, the getStructureTableNumRows() scripting method is intended to return the number of rows in the structure table. In the built-in scripts this method is used to get the structure rows for the tables passed as arguments to the current script execution. It might be helpful to clarify this in the documentation (ie, that this methods does not returns the global number of structure rows, just the ones passed to the script).

It would be helpful to have script methods which are capable of querying the whole database, rather than just the elements passed to the script. This could be achieved either via specialized methods or optional arguments to existing methods.

I'm prototyping generating cFS HK tables via a custom table type which includes the name/path of the variables (in the CCDD database) which should be included in a particular HK-generated packet. Using the variable name to retrieve the Message ID and Byte Offset via scripts requires access to the rest of the database, which can currently only be achieved by calling the script on every available structure table. Global database query methods (and input validations such as issue #21) enable workflows in which tables refer to other elements in the database (such as for Limit Checker and HK tables).

Command-line script execution documentation appears to be inaccurate

Section 4.6.10 of the user guide documents how to execute a script from the command line. Documentation states that the argument format of -execute <script_name>:<table> or -execute <script_name>:Group:<group_name>. Argument format appears to actually be -execute <script_association_name>:<script_name>:<table> or -execute <script_association_name>:<script_name>:Group:<group_name>.

Attempting to run -execute myScript:myTable results in Cannot execute script ‘myTable’ using table(s) ' '. Running -execute myAssociation:myScript:myTable completes successfully. Using a myAssociation not in the database results in an error "Unrecognized association name".

Also, documentation states that script path is required if they’re not stored in the same location as the CCDD executes, however commands without path succeed for scripts located in the /scripts directory (did not test with other locations).

Observed on CCDD version "1.1.46 1-11-2018" cloned from git on 1/16/18.

GUI for CCDD in JS

I will be working at JSC and the instructions I was sent regarding my assignment is to develop a GUI in JavaScript for a Command & Data Dictionary. I am interested in learning as much as possible about this project and would like to get involved sooner than later. Is this the same CCDD referred to in my assignment? What would be a good way to get started? What tasks or issues can I help you work on now? Thanks and I look forward to working with you.

Java exception when unlocking database

When opening CCDD, receive message:
Cannot connect to project database '######' as user '######'; cause 'database is locked'

In response, I go to the menu and select Project > Unlock and click the 'Unlock' button. Gui doesn't respond and terminal shows the error message below. Restarting CCDD/repeating the process yields the same message.

Below is an image of the unlock dialog. According to the user guide, the dialog is supposed to list projects which may be unlocked, but mine is not.
image

This may explain why the dialog validation is failing.

System Info:
OS: Win10
Java: Java 8 Update 171 (64 bit)
PostgreSQL: PostgreSQL 10

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at CCDD.CcddDialogHandler.getCheckBoxSelected(CcddDialogHandler.java:322)
        at CCDD.CcddDbManagerDialog.verifySelection(CcddDbManagerDialog.java:776)
        at CCDD.CcddDialogHandler$1.closeWindow(CcddDialogHandler.java:220)
        at CCDD.CcddButtonPanelHandler$1.actionPerformed(CcddButtonPanelHandler.java:305)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.WaitDispatchSupport$2.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.awt.WaitDispatchSupport$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.WaitDispatchSupport.enter(Unknown Source)
        at java.awt.Dialog.show(Unknown Source)
        at java.awt.Component.show(Unknown Source)
        at java.awt.Component.setVisible(Unknown Source)
        at java.awt.Window.setVisible(Unknown Source)
        at java.awt.Dialog.setVisible(Unknown Source)
        at CCDD.CcddDialogHandler.createDialog(CcddDialogHandler.java:2221)
        at CCDD.CcddDialogHandler.showOptionsDialog(CcddDialogHandler.java:778)
        at CCDD.CcddDbManagerDialog$1.complete(CcddDbManagerDialog.java:474)
        at CCDD.CcddBackgroundCommand$1.done(CcddBackgroundCommand.java:156)
        at javax.swing.SwingWorker$5.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
        at sun.swing.AccumulativeRunnable.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Inconsistent structure table fields

My structure table type has a field 'Telemetry message name & ID' with applicability 'Roots Only'. When I edit the prototype of some of my structure tables I'm finding that some of them don't have that field defined. Is this supposed to be possible? My understanding was that all tables of a particular type would have the same columns and fields.

Edit: Observed on 1.4.38

Method to terminate script execution

Most of the built-in scripts provide some form of error checking in the main program (ex: checking structure rows exist) and use the showErrorDialog() method to present the error to the user. The flow control in those scripts appear to have been engineered such that showErrorDialog is called just before the script exits, however, for complicated scripts there can be error checking which is not easy to structure in this manner (ex: error checking values of structure columns which are not accessible until much later in the program).

It would be useful to have a way to cancel/terminate execution of the current script via the API. At least in jython, I've tried using a return statement and sys.exit to terminate the script with no luck.

This give script-writers the ability to decide if an error is recoverable and if not just inform the user and terminate the script, rather than having the user sit through and acknowledge any additional errors during the remaining execution.

Clarify CCDD API import in scripts

All of the example python scripts shipped with CCDD include the following line at the top of the file:

from CCDD import CcddScriptDataAccessHandler

however, the module imported (CcddScriptDataAccessHandler) doesn't appear to be used in any of the scripts. Further, the ccdd variable appears to be defined by default no matter if the import is used or not. The script shown here:

with open("init.txt","w") as file:
    file.write(",".join(dir()))
    file.write("\n")
    file.write(str(ccdd))
    file.write("\n")
    file.write(ccdd.getScriptName())

produces the following output:

__builtins__,ccdd,ccdds,file
CCDD.CcddScriptDataAccessHandler@3c874e39
C:\myCCDDpath\CCDD\scripts\testImport.py

and demonstrates that the variables ccdd and ccdds are created without the need for the import.

Could you clarify the purpose of the CcddScriptDataAccessHandler import?

Additionally, could you provide details on how to import the ccdd variable into other user-provided modules? Some of my scripts have reached a size where it would be preferable to organize them in multiple files, but I haven't been able to figure out what I need to import in the support files to have access to the same ccdd variable that the main script gets automatically.

It would be much preferable to be able to use something like

from CCDD.CcddScriptHandler import accessHandler as ccdd

and be able to use it in any module called by the script than to have the ccdd variable defined implicitly only in the main script. From my (limited) knowledge of jython, the above statement would work if accessHandler was a public variable in the CcddScriptHandler class and would provide the same ccdd variable as currently defined.

Table creation error

Hello,

I installed CCDD on Ubuntu 16.04 64bit, Postgresql 8.4.

When I open my project first, there is an error message.

localhost:5432|-|-|12/28/2017 17:19:07.820|Fail|Cannot load table members; cause 'ERROR: function get_table_members_by_index() does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 15'

I attached an error screen.

2017-12-28 5 51 46

Feature Request: Command Reference/Table Column Reference Input Type

Similar to the Variable Reference input type, it would be helpful to have a Command Reference input type for which the valid values are the name of an existing Command Name from a defined Command table. This may be more generally handled by an input type which references a particular column in a particular table type (both defined by the user). It would be helpful if the same autofill that works for the variable reference also worked for this input type to prompt the user with the valid options.

This command reference would be useful for the definition of RTS/ATS tables for which its important that the command the user selects already exists in the database. I don't currently have a specific use case for the general table column reference input type, other than as a more general implementation for the use case of the Command Reference described above.

Cannot register database driver

Hi,

I got an error, when I create new project BITSE, and then open the project.
I attached a screenshot for this.

I used postgres95 at this time, but have same error on postgres84.

Thanks.

OS: Ubuntu 16.04LTS 64bit
dpkg -l | grep postgres
ii postgresql 9.5+173ubuntu0.1 all object-relational SQL database (supported version)
ii postgresql-9.5 9.5.10-0ubuntu0.16.04 amd64 object-relational SQL database, version 9.5 server
ii postgresql-client-9.5 9.5.10-0ubuntu0.16.04 amd64 front-end programs for PostgreSQL 9.5
ii postgresql-client-common 173ubuntu0.1 all manager for multiple PostgreSQL client versions
ii postgresql-common 173ubuntu0.1 all PostgreSQL database-cluster manager
ii postgresql-contrib-9.5 9.5.10-0ubuntu0.16.04 amd64 additional facilities for PostgreSQL

2017-12-29 11 14 48

Identifiers in invalid column import error message

Currently if a file being imported contains an invalid array size specification (specifically invalid characters, in my case) an error is issued saying so, however that error message does not contain the location the invalid definition was encountered, making it difficult to track down. It would be useful if the error message contained some identifier (line number, table name, field name, etc) to more quickly locate the problem in the file being imported.

Thanks!

Unable to delete redundant macro definitions

I've ended up in a situation where I have duplicate macro definitions (through the import process, though I'm unsure if it may have been my fault). I'm unable to delete any of the duplicate definitions because the gui says that they're referenced by a table (which is true).

It would be helpful if the import process could merge completely identical macro definitions and either prompt or throw an error for different macro definitions with the same name (to allow the user to sort it out). It would also be helpful for the GUI to allow deleting macros (even if they're referenced by a table) as long as at least one macro with that name still exists.

Thanks!

Methods of inspecting script values at runtime

It would be very useful to be able to inspect values within CCDD scripts at runtime, which I don't believe is currently possible. This capability could be utilized for script development/debugging and could also be used for archiving the status/state/results of scripts beyond the success/fail that is currently logged.

Exposing a method in the scripting API to allow writing a message to the CCDD log file may be one way to provide this capability. Its currently possible to write short strings to the showErrorDialog/showWarningDialog methods, but dismissing those dialogs requires user interaction and does not appear to result in a log entry.

Thanks

Execute command output path subcommand

The scriptOutPath command is provided to control the placement of files created by scripts via the command line interface (CLI), which works as intended, however that command also changes the output path for users interacting with CCDD via the GUI (which may not be desirable).

To support workflows in which CCDD is used both as an editing/development interface (via the GUI) and as a data producer (via the CLI), it would be desirable to be able to set the output of scripts for a particular session, which wouldn't affect later GUI users. Currently, if scripts are called in between GUI sessions the output path may have unexpectedly (to the GUI user) changed.

Additionally, the CLI supports multiple execute commands, which effectively means that all outputs from a given session must be placed in a single output directory. This may be undesirable if several scripts producing different output are called during a single CCDD command.

It would be useful if the execute command took (an optional) subcommand allowing the specification of a path which overrides the CCDD global script output path set by setOutPath for a particular execute command. This allows organization of the outputs of multiple script calls and allows CLI users to execute CCDD scripts without modifying the state of CCDD, which may be confusing for GUI users. This would maintain the current functionality of scriptOutPath command but also support the points above. This also mirrors the functionality of the filePath subcommand of the export command.

Thanks

Longer stack trace for errors in scripts

The error handling for the scripting interface only logs the top of the stack trace, which complicates script debugging.

The following are an examples of error messages printed to the log upon encountering an error in a script:

localhost:5432|myProject|myUser|06/18/2018 12:18:58.002|Fail|Cannot execute script 'C:\my\path\to\script\myScript.py' using table(s) 'Group:myGroup'; cause 'script file 'C:\my\path\to\script\myScript.py' error 'TypeError: 'str' object is not callable in <script> at line number 432''
localhost:5432|myProject|myUser|06/18/2018 12:22:08.366|Fail|Cannot execute script 'C:\my\path\to\script\myScript.py' using table(s) 'Group:myGroup'; cause 'script file 'C:\my\path\to\script\myScript.py' error 'AttributeError: 'array.array' object has no attribute 'length' in <script> at line number 432''

In both cases the error is reported as having occurred on line 432, which (for this script) is the top-level parent function in the call stack in which the error occurred. In my case, this is a large helper function which implements the entire algorithm and these errors occurred in two different child functions, which can be complicated to track down. It would be very helpful to log longer/deeper stack traces.

Thanks

Export 'All Tables' group from command line

I'm attempting to use the command line interface to export all the tables in the database. I've listed the export commands I've attempted below.

-export "-filePath ./ -format json -tablePaths Group:All Tables -singleFile true"

Results in:

Error: Unrecognized delimiter for command 'Tables'

Both

-export "-filePath ./ -format json -tablePaths 'Group:All Tables' -singleFile true"

and

-export "-filePath ./ -format json -tablePaths Group:'All Tables' -singleFile true"

result in:

CCDD : Database Error : Cannot load table ' '

Since All Tables has a space in it, I presume I'm supposed to quote the name, but I haven't been able to figure out how to correctly specify the command and am unsure if this is user-error or a bug.

Thanks!

Unhandled exception using -shutdown argument

In CCDD 1.3.6, I get the following exception when using the -shutdown command with the -execute command. I have not tested all cases, but the exception does not occur if only the execute command is used (ie, if I allow the GUI to remain open after script execution), if only the shutdown command is used, or if the shutdown command is used with export.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at CCDD.CcddScriptHandler.getDataAndExecuteScript(CcddScriptHandler.java:1347)
        at CCDD.CcddCommandLineHandler$22.doCommand(CcddCommandLineHandler.java:953)
        at CCDD.CcddCommandLineHandler$CommandHandler.handler(CcddCommandLineHandler.java:366)
        at CCDD.CcddCommandLineHandler.parseCommand(CcddCommandLineHandler.java:1721)
        at CCDD.CcddCommandLineHandler.parseCommand(CcddCommandLineHandler.java:1589)
        at CCDD.CcddMain.parseDbSpecificCommandLineCommands(CcddMain.java:778)
        at CCDD.CcddDbControlHandler$2.complete(CcddDbControlHandler.java:2282)
        at CCDD.CcddBackgroundCommand$1.done(CcddBackgroundCommand.java:192)
        at javax.swing.SwingWorker$5.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
        at sun.swing.AccumulativeRunnable.run(Unknown Source)
        at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Hotkeys in table editing window not responding

Each button at the bottom of the table editing window and each dropdown menu along the top has a letter underlined, which implies that they're able to be used by hitting that letter as a hotkey. The only place that this works for me is if I've already opened one of the menus at the top (at which point if I hit one of the selected letters it will execute that command). I'm unable to open any of the menus (ex open File by hitting F) nor use any of the buttons along the bottom (ex, Store by hitting S) via hotkey.

As far as I can tell, neither case of the letter works nor is it dependent on what I have selected (ie I'm not editing one of the table fields while attempting to use a hotkey). Hitting ctrl and the letter also doesn't activate the hotkey.

The users guide doesn't appear to have any info on these hotkeys (nothing comes up when I search for hotkey or shortcut) so I'm not sure if this is a bug or if I'm misunderstanding how to use the hotkeys. Observed on 1.4.41 on win10.

Changes to input type definitions don't take effect until reapplied

When designing my own input type field for a column with an enumerated value (ie a set of 'Valid Selections), I noticed that changing the definition of an input field doesn't seem to take effect until that custom input type is reapplied to the column.

Steps to reproduce:

  1. Define a custom input datatype with values in the Valid Selections column via the input types editor, store changes
  2. Apply that custom input type to a column via the table type editor, store changes
  3. Open a table which uses that column, and confirm that the 'Valid Selections' are listed in a dropdown menu and are selectable
  4. Back in the input types editor, add additional Valid Selections, store the changes
  5. Open same table again, dropdown with Valid Selections doesn't appear, input field appears to just be a standard text input which will accept any value
  6. In table type editor, assign that column to any built-in input type, store changes
  7. Then, assign column back to custom input type, store changes
  8. While editing table, once again able to again see and select from the Valid Selections dropdown

Unhandled exception when opening Script > Execute window

When attempting to open Script > Execute I get the following exception printed to the command line and the Execute Scripts window appears but only contains the text Select script association(s) to execute with none of the normal selection boxes or buttons.

Script > Manage window opens correctly and scripts can be executed from there, so not urgent.

Please let me know if there's additional information I can provide. This was observed on version 1.2.50.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.DefaultStyledDocument.getParagraphElement(Unknown Source)
        at javax.swing.text.StyledEditorKit$AttributeTracker.updateInputAttributes(Unknown Source)
        at javax.swing.text.StyledEditorKit$AttributeTracker.caretUpdate(Unknown Source)
        at javax.swing.text.JTextComponent.fireCaretUpdate(Unknown Source)
        at javax.swing.text.JTextComponent$MutableCaretEvent.fire(Unknown Source)
        at javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(Unknown Source)
        at javax.swing.text.DefaultCaret.fireStateChanged(Unknown Source)
        at javax.swing.text.DefaultCaret.changeCaretPosition(Unknown Source)
        at javax.swing.text.DefaultCaret.handleSetDot(Unknown Source)
        at javax.swing.text.DefaultCaret.setDot(Unknown Source)
        at javax.swing.text.DefaultCaret$Handler.removeUpdate(Unknown Source)
        at javax.swing.text.AbstractDocument.fireRemoveUpdate(Unknown Source)
        at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
        at javax.swing.text.AbstractDocument.remove(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.DefaultStyledDocument$ElementBuffer.create(Unknown Source)
        at javax.swing.text.DefaultStyledDocument.create(Unknown Source)
        at javax.swing.text.html.HTMLDocument.create(Unknown Source)
        at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(Unknown Source)
        at javax.swing.text.html.HTMLDocument$HTMLReader.flush(Unknown Source)
        at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.Utilities.isComposedTextElement(Unknown Source)
        at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
        at javax.swing.text.AbstractDocument.remove(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.Utilities.isComposedTextElement(Unknown Source)
        at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
        at javax.swing.text.AbstractDocument.remove(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.Utilities.isComposedTextElement(Unknown Source)
        at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
        at javax.swing.text.AbstractDocument.remove(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at javax.swing.text.Utilities.isComposedTextElement(Unknown Source)
        at javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
        at javax.swing.text.AbstractDocument.remove(Unknown Source)
        at javax.swing.JEditorPane.setText(Unknown Source)
        at CCDD.CcddJTableHandler$HTMLCellRenderer.getTableCellRendererComponent(CcddJTableHandler.java:1927)
        at javax.swing.JTable.prepareRenderer(Unknown Source)
        at CCDD.CcddJTableHandler.updateRowHeights(CcddJTableHandler.java:3976)
        at CCDD.CcddJTableHandler.tableChanged(CcddJTableHandler.java:3948)
        at CCDD.CcddJTableHandler$11.run(CcddJTableHandler.java:4086)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

License File

can you please add a License file to the root of the repo when you get a chance? Thanks.

Feature Request: Numeric input type

In would be useful to have an input type which only accepts numeric characters and a single optional period. This is similar to the current Floating Point input, however the floating point input will add a trailing decimal even if the user does not enter one. This numeric input type should preserve the user's input with respect if the decimal exists or not.

The following regex describes the requested validation:

\d*\.?\d*

While this can be achieved via the input type editor, this seems like a generic-enough type that it may be worth including by default. I'm looking to use this input type to store literal values of command arguments and variable field, for use in scripts. While it would be ideal to check the value the user entered is consistent with the specified command argument/variable type, I think that ensuring the user enters a numeric value (and preserving what they entered) is sufficient for now.

Exception when attempting to import via CLI

I'm seeing the following exception when I attempt to import via the -import subcommand. The user I specify with the -user option does have write privileges and is able to import without issue through the GUI.

This was observed on 1.4.27

CCDD : CCDD Error : An unanticipated error occurred; cause 'null'  Error trace:   CcddFileIOHandler: createTablesFromDefinitions() line 1291   CcddFileIOHandler: importFile() line 868   CcddCommandLineHandler: doCommand() line 1025   CcddCommandLineHandlerCommandHandler: handler() line 363   CcddCommandLineHandler: parseCommand() line 1739   CcddCommandLineHandler: parseCommand() line 1605   CcddMain: parseDbSpecificCommandLineCommands() line 847   CcddDbControlHandler: complete() line 2631   CcddBackgroundCommand: done() line 192
Error: Import disabled; user lacks write access

Feature Request: Support for longer project fields

Currently it appears that there's a limit of 100 characters on project field widths (though that appears to be a limit on the displayed entry field, rather than a limit on the size of the contents). It would be useful to be able to use longer fields to store project metadata (for example, an overview of the mission and/or subsystem) that doesn't belong in the current CCDD project description field.

The content I'm looking to store is ~7,000 characters long, which would probably be unreasonable for the GUI to support, but something longer than 100 would be useful.

isStructureShared returns true for structure with only one parent

I'm not sure if I'm misunderstanding the documentation for the isStructureShared method, or if there is a bug with the implementation. The documentation for isStructureShared states: "Determine if the specified structure is referenced by more than one parent structure".

In my database, I have a structure 'PriHdr' which is a field in 'TlmHdr' which is a field in multiple other structures. PriHdr only has one parent (TlmHdr) whereas TlmHdr has many parents, however isStructureShared returns true for both.

I also have a structure 'TestData' which is a field in 'TestPkt'. TestPkt has no parents and TestData only has TestPkt as a parent. As expected, isStructureShared returns false for both.

The current implementation appears to determine if a structure has multiple root tables as ancestors, not multiple parents (based on the terminology defined in section 4.5.1). It would be helpful to clarify the documentation so that its consistent with the definitions earlier in the guide.

My application is that I am attempting to generate a database for COSMOS (http://cosmosrb.com/). For data structures which are utilized within multiple packets, they recommend defining the structure once in a separate file and using render (http://cosmosrb.com/news/2016/09/12/erb-config/) to include in where needed in the packet definition. Only in the case that a structure has multiple parents is it necessary to create a new file, which I was attempting to use isStructureShared to detect. In this application, its undesirable to detect if a structure has multiple ancestors because it only needs to be placed in a separate file if it has multiple parents. If isStructureShared is not the appropriate method to detect a single parent, could you suggest an alternative method?

Feature Request: Variable Reference validation

As described in the issue describing its implementation, the variable reference field turns yellow if the reference is not valid (ie, if the referenced variable has changed since the field was selected), which is useful for identifying invalid fields in the table the user is editing. As far as I'm aware, there is currently no way to tell if a change to a structure results in invalid references without opening each table containing a reference and checking for yellow cells.

It would be useful to have a reference validator utility (maybe accessible from the Data menu) which would check all of the variable reference fields in all tables and inform the user if any need to be updated.

Git-based CCDD Workflow - Request for Import/Export commands

I'm looking at using CCDD for a project which utilizes git as its code's CM system. The goal is to use CCDD to generate the interface artifacts (header files, ground system definitions, ICDs, etc) using the CCDD scripting interfaces. By git's nature, there may be multiple branches of the code which have different versions of an interface and it may be necessary to generate the interface artifacts for a particular branch. Can you suggest how to best utilize CCDD in this scenario?

My understanding is that the import/export when using the JSON and CSV formats is lossless (ie, its an exact definition of the database). My thought is to export the CCDD database and commit that to the git branch it describes. When a developer needs to make an interface change to a particular branch they'd import the database from that branch into CCDD, make the change, generate their artifacts, and then export the database and commit the new version of the database to their branch.

I believe this workflow offers the best of both worlds... managing the interface definition with the code that it represents while utilizing CCDD as the editing interface (to maintain database consistency) and leveraging it's scripting interfaces to generate the required artifacts.

I don't currently see a way to automate importing and exporting databases... this workflow could be almost entirely automated if the CCDD executable supported an 'import' and 'export' command which provided similar functionality to the respective dialogs. Is this something that is on the development roadmap?

Thanks

Exception when attempting to import

I'm seeing the following exception when attempting to import a json file:

image

I'm observing this on version 1.4.24. The json file was exported by the same version. Happy to provide additional information if needed.

Thanks

Edit: To clarify, this appears to only occur when importing into the same project from which it was exported. It does import correctly into a new project.

Cannot load project

With CCDD 1.4.7 I've been unable to load either projects created with older versions of CCDD nor new projects created with this version. When I attempt to load a project I see a long list of queries (~2200 repetitive sets of queries) and after ~10-20sec am presented with:

Cannot obtain command information:
image

acknowledging the dialog yields:
image

After these dialogs CCDD displays the project name as if I'm connects but won't allow creation of new tables and attempting to edit existing tables (of which I wouldn't expect there to be any) yields an error due to being unable to load table members.

image

and the log viewer displays:

Cannot load table members; cause 'Connection to server lost'

After this I'm forced to restart CCDD because all the project options are disabled.

execute interprets absolute path as association name

For robustness against where the user runs and/or places CCDD on their machine, I'd like to use absolute paths. When attempting to specify an absolute path to the script file, as shown in the command below:

java -cp C:\My\Absolute\CCDD\Path\CCDD.jar CCDD.CcddMain -logPath C:\My\Absolute\Log\Path -project myProject -user myUser -password #### -execute 'C:\My\Absolute\Script\Path\myScript.js:Group:myGroup' -scriptOutPath C:\My\Absolute\Out\Path

I get the error:
CCDD : Database Error : Unrecognized association name 'C'

at the command line. It appears that it may be parsing the colon in the path as the separator in the script definition. Using a relative path to the script (which doesn't include a colon) works as intended.

Feature Request: Export/Import group information

It would be useful to have the ability to automatically import/export groups into/out of CCDD.

I'm attempting to setup CCDD such that when a developer checks out a git branch it loads the correct version of the database into CCDD for them. I'm using groups to organize sets of tables by application to make it easy to execute scripts on the set of tables describing that application. Its currently possible to import table types, input types, data types, tables, and macros but not groups, which means grouping information is lost through an export/import cycle.

Export does not export macro definitions

The current export format (at least for CSV and JSON) does not contain a definition of the project macros. The dialog contains an option to substitute macro values for macro names, however this doesn't preserve the definition of the macro.

I'm using macros to define and ensure that enumeration values stay in sync. For example, if two packets telemeter the same type of enumeration, its desirable to have a single definition for that enumeration to eliminate the possibility of them accidentally being defined differently. This is achievable via macros (ie, define a macro containing the definition of the enumeration and then use the macro in the enumeration field of both table rows), however the value of the enumeration is not exported unless the substitute option has been checked, in which case the single definition of both enumerations is lost when imported.

I think it would be useful to export the definition of the macro if the substitute option is not selected (so that the user has access to the macro values) and to import macro definitions if found in the file being imported.

Incorrect documentation for isDataTypePrimitive and isStructureShared

The contents of the 'Description' and 'Input(s)' columns of the table on page 174 of the users guide appears to be swapped for rows describing the methods isDataTypePrimitive and isStructureShared.

The description/input for isStructureShared references datatypes and the description/input for isDataTypePrimitive references structures. Appears that swapping the rows would solve the issue.

Noted in user guide Version 1.1.50.

Database Name

I am trying to implement a feature on the CCDD_Viewer GUI that displays what database each user is logged into alongside what user name each user is "Signed in As".

I don't see any 'meta' project data that I can pull from the CCDD Tool's web server API. Would it be possible to add an API call that will allow me to pull the project details such as "AA2" so that I can display it on the Viewer's GUI?

Thanks!

Exception while importing

When attempting to import via the CLI, I'm receiving the following exception:

An unanticipated error occurred; cause 'null'  Error trace:   
CcddDbCommandHandler: executeDbUpdate() line 123   
CcddDbTableCommandHandler: createTable() line 1171   
CcddFileIOHandler: createImportedTable() line 1482   
CcddFileIOHandler: createTablesFromDefinitions() line 1254   
CcddFileIOHandler: importFile() line 880   
CcddCommandLineHandler: doCommand() line 1060   
CcddCommandLineHandlerCommandHandler: handler() line 385   
CcddCommandLineHandler: parseCommand() line 2119   
CcddCommandLineHandler: parseCommand() line 1985   
CcddMain: parseDbSpecificCommandLineCommands() line 848   
CcddDbControlHandler: complete() line 2657   
CcddBackgroundCommand: done() line 192 

The file being imported is successfully imported from the GUI. The following are the last couple lines (out of the ~1600 lines) of the log file:

localhost:5432|myproject|myuser|11/08/2018 13:11:40.064|Success|Connected to project 'myproject' as user 'myuser'
localhost:5432|myproject|myuser|11/08/2018 13:11:40.066|Status|PostgreSQL: 9.5  *** JDBC: PostgreSQL 9.4.1207.jre7 (type 4)
localhost:5432|myproject|myuser|11/08/2018 13:11:40.068|Command|SELECT * FROM get_table_members_by_name();
localhost:5432|*none*|myuser|11/08/2018 13:11:40.077|Fail|Cannot load table members; cause 'Connection to server lost'

This particular sequence of connecting to the database and then running a command occurs successfully ~100 times earlier in the log file... I'm not sure what causes this one to fail.

The command being run is:
java -cp "my/Path/CCDD.jar" CCDD.CcddMain -logPath "/my/Path/logs" -create "-name 'myproject' -owner myuser -description 'Project containing interface definitions'" -project myProject -user myuser -import "-fileName '/my/path/to/data/interfaces.json' -replaceExisting true" -shutdown.

Observed in 1.4.44 on Ubuntu.

All Tables pseudo-group not available when no other groups defined

When no groups have been defined by the user, the 'Filter by group' option is grayed out in windows which allow a selection of tables (ie, export menu, scripts menu). This prevents prevents usage of the All tables pseudo-group. It would be handy to be able to use that group regardless of if the user has defined other groups.

Feature Request: Enumerated Value input type

It would be useful to have an enumerated input type to constrain user inputs to one of a set of predefined values, preferably via a drop-down menu of options. This would be distinct from the current Enumerated input type, which is simply validated as an alphanumeric field.

I'm looking at tracking CFS event messages via a custom table type and need to track the event type (which is either 'Debug', 'Info', 'Error', or 'Critical'). It would be useful to have an input type which could validate the input is one of the items in a list of acceptable values. Otherwise, an unacceptable input cannot be caught until a script which depends on that value runs and throw an error.

Another potential use case may be in defining CFS limit tracker watchpoints where the user must select one of a pre-defined list of operations to be performed (LessThan, EqualTo, GreaterThan, etc) by the watchpoint.

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.