pnp-software / cordetfw-pus

PUS Extension of the CORDET Framework
Mozilla Public License 2.0
2 stars 1 forks source link

Multiplicity Check in Generation Script #11

Open pasetti opened 1 year ago

pasetti commented 1 year ago

In function createCrPsDataPoolServHeaders in the Cordet FW Editor code generator, I check whether a data item is an array by checking whether its multiplicity is equal to 1. In the editor, the multiplicity is often defined through a symbolic constant. Thus, with the current implementation, function createCrPsDataPoolServHeaders treats scalars and arrays with a size 1 in the same manner. This is probably not what is intended. The multiplicity check should probably be modified to something like:

IF (there is a symbol representing the multiplicity) OR (the multiplicity is greater than 1) THEN    
   .... /* treat data item as an array */

The problem described here probably also applies to other functions in the generator.

pasetti commented 1 year ago

I have modified function getMultiplicity to return a third item which defines whether the argument data item is a scalar or an array.