CSV package

Requirements.Internal.CSV  ยท source

Icon of CSV

MA-HS-CSV file reader: the external object and its access functions (used by Sources.PartialSignalsFromFile)

Extends Modelica.Icons.InternalPackage

The external object File and the functions Sources.PartialSignalsFromFile and the blocks extending it call. The C implementation is header-only, Resources/Include/RequirementsCsv.h (C89, external linkage, no dependency beyond libc and ModelicaUtilities.h), pulled in through the Include annotation of every function; Resources/C-Sources/RequirementsCsv.c is the same code as a compilation unit for a Library= build. Resources/C-Sources/test/ tests the C reader against an independent Python reader.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Contents

NameKindDescription
FileclassMA-HS-CSV file read into memory once; the requested columns by name and type
nextTimeEventpure functionSmallest event time of the file strictly after t (a huge value when there is none)
getRealpure functionValue of the i-th Real column at time t (linear between rows; the event bracket picks the side of an event)
getRealDerpure functionTime derivative of the i-th Real column at time t (the slope of the linear segment, the last segment's at the last row; zero outside the file's range)
getBooleanpure functionValue of the i-th Boolean column at time t (piecewise constant)
getIntegerpure functionValue of the i-th Integer column at time t (piecewise constant)