File: api.rst

package info (click to toggle)
asammdf 8.5.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,648 kB
  • sloc: python: 89,262; ansic: 2,251; makefile: 21
file content (82 lines) | stat: -rw-r--r-- 1,604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.. raw:: html

    <style> .red {color:red} </style>
    <style> .blue {color:blue} </style>
    <style> .green {color:green} </style>
    <style> .cyan {color:cyan} </style>
    <style> .magenta {color:magenta} </style>
    <style> .orange {color:orange} </style>
    <style> .brown {color:brown} </style>

.. role:: red
.. role:: blue
.. role:: green
.. role:: cyan
.. role:: magenta
.. role:: orange
.. role:: brown
.. default-role:: py:obj

---
API
---

MDF
===

This class acts as a proxy for the `MDF2`, `MDF3` and `MDF4` classes.
All attribute access is delegated to the underlying `_mdf` attribute (MDF2, MDF3 or MDF4 object).
See MDF3 and MDF4 for available extra methods (MDF2 and MDF3 share the same implementation).

An empty MDF file is created if the `name` argument is not provided.
If the `name` argument is provided then the file must exist in the filesystem, otherwise an exception is raised.

The best practice is to use the `MDF` as a context manager. This way all resources are released correctly in case of exceptions.

.. code::

    with MDF(r'test.mdf') as mdf_file:
        # do something


.. autoclass:: asammdf.mdf.MDF
    :members:
    
    
MDF3
====

.. autoclass:: asammdf.blocks.mdf_v3.MDF3
    :members:
    :noindex:
    
MDF version 2 & 3 blocks
------------------------

.. toctree::
   :maxdepth: 2
   
   v2v3blocks


MDF4
====

.. autoclass:: asammdf.blocks.mdf_v4.MDF4
    :members:
    :noindex:
    
MDF version 4 blocks
--------------------

.. toctree::
   :maxdepth: 2

   v4blocks
   
    
Signal
======

.. autoclass:: asammdf.signal.Signal
    :members: