-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2024 Robert Bosch GmbH | ||
|
||
#include <stdint.h> | ||
#include <dse/clib/mdf/mdf.h> | ||
|
||
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0])) | ||
|
||
void mdf_api_example(void) | ||
{ | ||
const char* signal[] = { "SigA", "SigB", "SigC", "SigD" }; | ||
double scalar[] = { 0, 1, 2, 3 }; | ||
|
||
// Configure the MDF Channel Groups. | ||
MdfChannelGroup groups[] = { | ||
{ | ||
.name = "Physical", | ||
.signal = signal, | ||
.scalar = scalar, | ||
.count = ARRAY_SIZE(signal), | ||
}, | ||
}; | ||
|
||
// Open a file stream for writing MDF data. | ||
FILE* f = fopen("tsetfile.MF4", "w"); | ||
|
||
// Create the MDF Descriptor. | ||
MdfDesc mdf = mdf_create(f, groups, ARRAY_SIZE(groups)); | ||
|
||
// Write a number of samples to the MDF file stream. | ||
mdf_start_blocks(&mdf); | ||
for (double timestamp = 0.0; timestamp < 0.010; timestamp += 0.0005) { | ||
for (size_t i = 0; i < ARRAY_SIZE(scalar); i++) { | ||
scalar[i] += 1; | ||
} | ||
mdf_write_records(&mdf, timestamp); | ||
} | ||
|
||
// Close the file stream. | ||
fclose(f); | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C Lib API Reference on Dynamic Simulation Environment</title><link>https://boschglobal.github.io/dse.doc/apis/clib/</link><description>Recent content in C Lib API Reference on Dynamic Simulation Environment</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://boschglobal.github.io/dse.doc/apis/clib/index.xml" rel="self" type="application/rss+xml"/><item><title>Marshal API Reference</title><link>https://boschglobal.github.io/dse.doc/apis/clib/marshal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://boschglobal.github.io/dse.doc/apis/clib/marshal/</guid><description>marshal_generate_signalmap Creates a signal map between signals (i.e. the external signal interface) and the source (i.e. the internal interface to the target). | ||
Parameters signal (MarshalMapSpec) A map spec for the signals to be mapped (i.e. the representation of the signal interface). source (MarshalMapSpec) A map spec for the source values to be mapped (i.e. the representation of the target). ex_signals (SimpleSet*) A set used to keep track of signals between calls (to this function) and prevent duplicate mappings.</description></item></channel></rss> | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C Lib API Reference on Dynamic Simulation Environment</title><link>https://boschglobal.github.io/dse.doc/apis/clib/</link><description>Recent content in C Lib API Reference on Dynamic Simulation Environment</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://boschglobal.github.io/dse.doc/apis/clib/index.xml" rel="self" type="application/rss+xml"/><item><title>Marshal API Reference</title><link>https://boschglobal.github.io/dse.doc/apis/clib/marshal/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://boschglobal.github.io/dse.doc/apis/clib/marshal/</guid><description>Marshal API The Marshal API supports two modes of operation: | ||
Marshalling of intrinsic data types between source and target where the target represents externally defined data structures. Marshalling of signal maps between a signal interface and the source data objects (of the marshalling sub-system). When these operations are combined it becomes possible to map signals to externally defined data structures (i.e. C style structs). | ||
Component Diagram @startuml data-marshal-interface skinparam nodesep 55 skinparam ranksep 40 title Marshal Interface interface &#34;Signals&#34; as sig package &#34;Controller&#34; { component &#34;Source&#34; as sou component &#34;Target&#34; as tar } sig -right-&gt; sou : out sig &lt;-right- sou : in sou -right-&gt; tar : out sou &lt;-right- tar : in center footer Dynamic Simulation Environment @enduml marshal_type_size Return the size of a MarshalType (in bytes).</description></item><item><title>Mdf API Reference</title><link>https://boschglobal.github.io/dse.doc/apis/clib/mdf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://boschglobal.github.io/dse.doc/apis/clib/mdf/</guid><description>MDF API The MDF API (a part of the DSE C Lib) provides methods for creating an MDF4 data stream. Data is saved according to the ASAM Standards. | ||
Because of the streaming design the exact number of samples written to an MDF file is not known when the MDF file is initially created. Accordingly, to indicate this condition, the follwing flags are set in the MDF file: | ||
Update of cycle counters for CG-/CABLOCK required.</description></item></channel></rss> |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.