]>
Commit | Line | Data |
---|---|---|
1 | ## | |
2 | ## This file is part of the libsigrokdecode project. | |
3 | ## | |
4 | ## Copyright (C) 2019 Comlab AG | |
5 | ## Copyright (C) 2020 Gerhard Sittig <gerhard.sittig@gmx.net> | |
6 | ## | |
7 | ## This program is free software; you can redistribute it and/or modify | |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation; either version 2 of the License, or | |
10 | ## (at your option) any later version. | |
11 | ## | |
12 | ## This program is distributed in the hope that it will be useful, | |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
16 | ## | |
17 | ## You should have received a copy of the GNU General Public License | |
18 | ## along with this program; if not, see <http://www.gnu.org/licenses/>. | |
19 | ## | |
20 | ||
21 | ''' | |
22 | This protocol decoder takes a set of logic input signals, and interprets | |
23 | their bit pattern according to user specifications as different kinds of | |
24 | numbers, or an enumeration of e.g. machine states. | |
25 | ||
26 | Supported formats are: signed and unsigned integers, fixed point numbers, | |
27 | IEEE754 floating point numbers, and number to text mapping controlled by | |
28 | external data files. (Support for half precision floats depends on the | |
29 | Python runtime, and may not universally be available.) | |
30 | ||
31 | User provided text mapping files can either use the JSON format: | |
32 | {"one": 1, "two": 2, "four": 4} | |
33 | or the Python programming language: | |
34 | enumtext = { 1: "one", 2: "two", 3: "three", } | |
35 | ||
36 | In addition to all enum values on one row (sequential presentation of | |
37 | the data), a limited number of enum values also are shown in tabular | |
38 | presentation, which can help visualize state machines or task switches. | |
39 | ''' | |
40 | ||
41 | from .pd import Decoder |