Skip to content

Write string signals to result file #1555

@wojciech-graj

Description

@wojciech-graj

Is your feature request related to a problem? Please describe.
Simulation result files (*.mat, *.csv) currently contain only real, integer, and boolean signals. I have some signals that are strings that I would like to include in the results.

Describe the solution you'd like
I'm not familiar with the mat file format, so I don't know how feasible it is to add there. However, for CSV files, it's as simple as adding a few lines to the following part of the CSVWriter

        switch (parameters[j].signal.type)
        {
          case SignalType_REAL:
            fprintf(pFile, ", %.12g", parameters[j].value.realValue);
            break;
          case SignalType_INT:
            fprintf(pFile, ", %d", parameters[j].value.intValue);
            break;
          case SignalType_BOOL:
            fprintf(pFile, ", %d", parameters[j].value.boolValue);
            break;
        }

Describe alternatives you've considered
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions