By default, all signals will be logged and persisted on every sample. There will be one file generated pr. simulator. This can quickly lead to a large amount of data being generated, so it is recommended instead specifying what signals to log using the configurable log format outlined below.
libcosim supports basic configuration of specific signals to log from any simulator via an XML file. This file must be named
LogConfig.xml (exactly including case) and placed in the same folder as the configuration file (
|<simulators>|| ||Whether or not the output filenames should contain a trailing time-stamp. |
|<simulator>|| ||Contains all variables to be logged, attribute |
| ||Optional attribute |
|<variable>|| ||Declares the name of the simulator variable to be logged.|
<simulators> <simulator name="model1" decimationFactor="10"> <variable name="variable1"/> <variable name="variable2"/> </simulator> <simulator name="model2"> <variable name="variable1"/> <variable name="variable2"/> </simulator> </simulators>
The simulators with variables to be logged must be added as child elements to the
<simulators> root element. The variables must be specified by its variable name in separate
<variable> elements under the respective
<simulator> element with no
<variable> child elements will lead to all variables being logged. As aforementioned this could results in a large amount of data to be saved. It helps to reduce the logged data by the optional attribute
decimationFactor if not every sample data is required. Leaving out a simulator from the configuration will disable logging for that simulator. The result logs are persisted as csv files.